hc
2024-03-22 a0752693d998599af469473b8dc239ef973a012f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/** @file
CPU EIST control methods
 
Copyright (c) 2013-2015 Intel Corporation.
 
SPDX-License-Identifier: BSD-2-Clause-Patent
 
**/
 
DefinitionBlock (
    "CPU0IST.aml",
    "SSDT",
    0x01,
    "SsgPmm",
    "Cpu0Ist",
    0x0012
    )
{
    External (PDC0, IntObj)
    External (CFGD, FieldUnitObj)
    External(\_PR.CPU0, DeviceObj)
 
    Scope(\_PR.CPU0)
    {
        Method(_PPC,0)
        {
            Return(ZERO)   // Return All States Available.
        }
 
        Method(_PCT,0)
        {
            //
            // If GV3 is supported and OSPM is capable of direct access to
            // performance state MSR, we use MSR method
            //
            //
            // PDCx[0] = Indicates whether OSPM is capable of direct access to
            // performance state MSR.
            //
            If(LAnd(And(CFGD,0x0001), And(PDC0,0x0001)))
            {
                Return(Package()    // MSR Method
                {
                    ResourceTemplate(){Register(FFixedHW, 0, 0, 0)},
                    ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}
                })
 
            }
 
            //
            // Otherwise, we use smi method
            //
            Return(Package()    // SMI Method
                {
                  ResourceTemplate(){Register(SystemIO,16,0,0xB2)},
                  ResourceTemplate(){Register(SystemIO, 8,0,0xB3)}
                })
        }
 
        Method(_PSS,0)
        {
            //
            // If OSPM is capable of direct access to performance state MSR,
            // we report NPSS, otherwise, we report SPSS.
            If (And(PDC0,0x0001))
            {
                Return(NPSS)
            }
 
            Return(SPSS)
        }
 
        Name(SPSS,Package()
        {
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000}
        })
 
        Name(NPSS,Package()
        {
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000},
            Package(){0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000}
        })
 
        Method(_PSD,0)
        {
          //
          // If CMP is suppored, we report the dependency with two processors
          //
          If(And(CFGD,0x1000000))
          {
            //
            // If OSPM is capable of hardware coordination of P-states, we report
            // the dependency with hardware coordination.
            //
            // PDCx[11] = Indicates whether OSPM is capable of hardware coordination of P-states
            //
            If(And(PDC0,0x0800))
            {
              Return(Package(){
                Package(){
                  5,  // # entries.
                  0,  // Revision.
                  0,  // Domain #.
                  0xFE,  // Coord Type- HW_ALL.
                  2  // # processors.
                }
              })
            }
 
            //
            // Otherwise, the dependency with OSPM coordination
            //
            Return(Package(){
              Package(){
                5,    // # entries.
                0,    // Revision.
                0,    // Domain #.
                0xFC, // Coord Type- SW_ALL.
                2     // # processors.
              }
            })
          }
 
          //
          //  Otherwise, we report the dependency with one processor
          //
          Return(Package(){
            Package(){
              5,      // # entries.
              0,      // Revision.
              0,      // Domain #.
              0xFC,   // Coord Type- SW_ALL.
              1       // # processors.
            }
          })
        }
    }
}