summaryrefslogtreecommitdiff
path: root/ChvRefCodePkg
diff options
context:
space:
mode:
authorGuo Mang <mang.guo@intel.com>2016-06-02 13:05:28 +0800
committerHao Wu <hao.a.wu@intel.com>2016-06-07 09:55:20 +0800
commit2f4cd8bb806bdafa830c730105c3cf48ff412a55 (patch)
tree1f313e93fd46e322d26adf7666168aa65e6f2235 /ChvRefCodePkg
parenta08d03e7d2d58467cf199ee022fd85040408da00 (diff)
downloadedk2-platforms-2f4cd8bb806bdafa830c730105c3cf48ff412a55.tar.xz
ChvRefCodeLkg: Add CPU AcpiTables.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'ChvRefCodePkg')
-rw-r--r--ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuAcpiTables.inf46
-rw-r--r--ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApCst.asl62
-rw-r--r--ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApIst.asl118
-rw-r--r--ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApTst.asl214
-rw-r--r--ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Cst.asl402
-rw-r--r--ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Ist.asl241
-rw-r--r--ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Tst.asl191
-rw-r--r--ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/CpuPm.asl753
8 files changed, 2027 insertions, 0 deletions
diff --git a/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuAcpiTables.inf b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuAcpiTables.inf
new file mode 100644
index 0000000000..b246e74ad3
--- /dev/null
+++ b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuAcpiTables.inf
@@ -0,0 +1,46 @@
+## @file
+# Braswell Cpu Power Management ACPI Table Module
+#
+# Provides the required ACPI table information to allow an ACPI aware OS to
+# provide power management control of valleyview processor. These tables
+# must be consumed by a separate module so that they can be published so an
+# OS can use them.
+#
+# Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>
+#
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php.
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+[defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = CpuAcpiTables2
+ FILE_GUID = 92638AB2-9D19-4f6f-B824-539FEE6E6353
+ MODULE_TYPE = USER_DEFINED
+ VERSION_STRING = 1.0
+ EDK_RELEASE_VERSION = 0x00020000
+ EFI_SPECIFICATION_VERSION = 0x00020000
+
+
+[sources.common]
+ CpuSsdt/Cpu0Cst.asl
+ CpuSsdt/Cpu0Ist.asl
+ CpuSsdt/Cpu0Tst.asl
+ CpuSsdt/ApCst.asl
+ CpuSsdt/ApIst.asl
+ CpuSsdt/ApTst.asl
+ CpuSsdt/CpuPm.asl
+
+[Packages]
+ MdePkg/MdePkg.dec
+ ChvRefCodePkg/ChvRefCodePkg.dec
+
+[Guids]
+ gPowerManagementAcpiTableStorageGuid ## PRODUCES ## FV
+
diff --git a/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApCst.asl b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApCst.asl
new file mode 100644
index 0000000000..f6f0ab1ce6
--- /dev/null
+++ b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApCst.asl
@@ -0,0 +1,62 @@
+/** @file
+ Intel Processor Power Management ACPI Code.
+
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+DefinitionBlock (
+ "APCST.aml",
+ "SSDT",
+ 1,
+ "PmRef",
+ "ApCst",
+ 0x3000
+ )
+{
+External(\_PR.CPU1, DeviceObj)
+External(\_PR.CPU2, DeviceObj)
+External(\_PR.CPU3, DeviceObj)
+External(\_PR.CPU0._CST)
+
+ Scope(\_PR.CPU1)
+ {
+ Method(_CST,0)
+ {
+ //
+ // Return P0's _CST object.
+ //
+ Return(\_PR.CPU0._CST)
+ }
+ }
+
+ Scope(\_PR.CPU2)
+ {
+ Method(_CST,0)
+ {
+ //
+ // Return P0's _CST object.
+ //
+ Return(\_PR.CPU0._CST)
+ }
+ }
+
+ Scope(\_PR.CPU3)
+ {
+ Method(_CST,0)
+ {
+ //
+ // Return P0's _CST object.
+ //
+ Return(\_PR.CPU0._CST)
+ }
+ }
+} // End of Definition Block
diff --git a/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApIst.asl b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApIst.asl
new file mode 100644
index 0000000000..3897eaf732
--- /dev/null
+++ b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApIst.asl
@@ -0,0 +1,118 @@
+/** @file
+ Intel Processor Power Management ACPI Code.
+
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+DefinitionBlock (
+ "APIST.aml",
+ "SSDT",
+ 1,
+ "PmRef",
+ "ApIst",
+ 0x3000
+ )
+{
+ External(\_PR.CPU0._PSS, MethodObj)
+ External(\_PR.CPU0._PCT, MethodObj)
+ External(\_PR.CPU0._PPC, IntObj)
+ External(\_PR.CPU0._PSD, MethodObj)
+ External(\_PR.CPU1, DeviceObj)
+ External(\_PR.CPU2, DeviceObj)
+ External(\_PR.CPU3, DeviceObj)
+ External (CFGD)
+ External (PDC0)
+
+ Scope(\_PR.CPU1)
+ {
+ Method(_PPC,0)
+ {
+ Return(\_PR.CPU0._PPC) // Return P0 _PPC value.
+ }
+
+ Method(_PCT,0)
+ {
+ Return(\_PR.CPU0._PCT) // Return P0 _PCT.
+ }
+
+ Method(_PSS,0)
+ {
+ //Return the same table as CPU0 for CMP cases.
+ Return(\_PR.CPU0._PSS)
+ }
+
+ // The _PSD object provides information to the OSPM related
+ // to P-State coordination between processors in a multi-processor
+ // configurations.
+ //
+ Method(_PSD,0)
+ {
+ Return(\_PR.CPU0._PSD) // Return P0 _PSD.
+ }
+ }
+
+ Scope(\_PR.CPU2)
+ {
+ Method(_PPC,0)
+ {
+ Return(\_PR.CPU0._PPC) // Return P0 _PPC value.
+ }
+
+ Method(_PCT,0)
+ {
+ Return(\_PR.CPU0._PCT) // Return P0 _PCT.
+ }
+
+ Method(_PSS,0)
+ {
+ //Return the same table as CPU0 for CMP cases.
+ Return(\_PR.CPU0._PSS)
+ }
+
+ // The _PSD object provides information to the OSPM related
+ // to P-State coordination between processors in a multi-processor
+ // configurations.
+ //
+ Method(_PSD,0)
+ {
+ Return(\_PR.CPU0._PSD) // Return P0 _PSD.
+ }
+ }
+
+ Scope(\_PR.CPU3)
+ {
+ Method(_PPC,0)
+ {
+ Return(\_PR.CPU0._PPC) // Return P0 _PPC value.
+ }
+
+ Method(_PCT,0)
+ {
+ Return(\_PR.CPU0._PCT) // Return P0 _PCT.
+ }
+
+ Method(_PSS,0)
+ {
+ //Return the same table as CPU0 for CMP cases.
+ Return(\_PR.CPU0._PSS)
+ }
+
+ // The _PSD object provides information to the OSPM related
+ // to P-State coordination between processors in a multi-processor
+ // configurations.
+ //
+ Method(_PSD,0)
+ {
+ Return(\_PR.CPU0._PSD) // Return P0 _PSD.
+ }
+ }
+} // End of Definition Block
diff --git a/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApTst.asl b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApTst.asl
new file mode 100644
index 0000000000..b4f2d85729
--- /dev/null
+++ b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/ApTst.asl
@@ -0,0 +1,214 @@
+/** @file
+ Intel Processor Power Management ACPI Code.
+
+ Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
+
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+DefinitionBlock(
+ "APTST.aml",
+ "SSDT",
+ 0x01,
+ "PmRef",
+ "ApTst",
+ 0x3000
+ )
+{
+ External(\_PR.CPU1, DeviceObj)
+ External(\_PR.CPU2, DeviceObj)
+ External(\_PR.CPU3, DeviceObj)
+ External(\_PR.CPU0._PTC)
+ External(\_PR.CPU0._TSS)
+ External(PDC0)
+ External(CFGD)
+ External(MPEN)
+
+ Scope(\_PR.CPU1)
+ {
+ Name(_TPC, 0) // All T-States are available
+
+ //
+ // T-State Control/Status interface
+ //
+ Method(_PTC, 0)
+ {
+ Return(\_PR.CPU0._PTC)
+ }
+
+ Method(_TSS, 0)
+ {
+ Return(\_PR.CPU0._TSS)
+ }
+
+ //
+ // T-State Dependency
+ //
+ Method(_TSD, 0)
+ {
+ //
+ // IF four cores are supported/enabled && !(direct access to MSR)
+ // Report 4 processors and SW_ANY as the coordination
+ // IF two cores are supported/enabled && !(direct access to MSR)
+ // Report 2 processors and SW_ANY as the coordination type
+ // ELSE
+ // Report 1 processor and SW_ALL as the coordination type (domain 1)
+ //
+ // CFGD[23] = Four cores enabled
+ // CFGD[24] = Two or more cores enabled
+ // PDCx[2] = OSPM is capable of direct access to On
+ // Demand throttling MSR
+ //
+
+ If(LNot(And(PDC0,4)))
+ {
+ Return(Package(){ // SW_ANY
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFD, // Coord Type- SW_ANY
+ MPEN // # processors.
+ }
+ })
+ }
+ Return(Package(){ // SW_ALL
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 1, // Domain #.
+ 0xFC, // Coord Type- SW_ALL
+ 1 // # processors.
+ }
+ })
+ }
+ } // End of CPU1
+
+ Scope(\_PR.CPU2)
+ {
+ Name(_TPC, 0) // All T-States are available
+
+ //
+ // T-State Control/Status interface
+ //
+ Method(_PTC, 0)
+ {
+ Return(\_PR.CPU0._PTC)
+ }
+
+ Method(_TSS, 0)
+ {
+ Return(\_PR.CPU0._TSS)
+ }
+
+ //
+ // T-State Dependency
+ //
+ Method(_TSD, 0)
+ {
+ //
+ // IF four cores are supported/enabled && !(direct access to MSR)
+ // Report 4 processors and SW_ANY as the coordination
+ // IF two cores are supported/enabled && !(direct access to MSR)
+ // Report 2 processors and SW_ANY as the coordination type
+ // ELSE
+ // Report 1 processor and SW_ALL as the coordination type (domain 1)
+ //
+ // CFGD[23] = Four cores enabled
+ // CFGD[24] = Two or more cores enabled
+ // PDCx[2] = OSPM is capable of direct access to On
+ // Demand throttling MSR
+ //
+
+ If(LNot(And(PDC0,4)))
+ {
+ Return(Package(){ // SW_ANY
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFD, // Coord Type- SW_ANY
+ MPEN // # processors.
+ }
+ })
+ }
+ Return(Package(){ // SW_ALL
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 1, // Domain #.
+ 0xFC, // Coord Type- SW_ALL
+ 1 // # processors.
+ }
+ })
+ }
+ } // End of CPU2
+
+ Scope(\_PR.CPU3)
+ {
+ Name(_TPC, 0) // All T-States are available
+
+ //
+ // T-State Control/Status interface
+ //
+ Method(_PTC, 0)
+ {
+ Return(\_PR.CPU0._PTC)
+ }
+
+ Method(_TSS, 0)
+ {
+ Return(\_PR.CPU0._TSS)
+ }
+
+ //
+ // T-State Dependency
+ //
+ Method(_TSD, 0)
+ {
+ //
+ // IF four cores are supported/enabled && !(direct access to MSR)
+ // Report 4 processors and SW_ANY as the coordination
+ // IF two cores are supported/enabled && !(direct access to MSR)
+ // Report 2 processors and SW_ANY as the coordination type
+ // ELSE
+ // Report 1 processor and SW_ALL as the coordination type (domain 1)
+ //
+ // CFGD[23] = Four cores enabled
+ // CFGD[24] = Two or more cores enabled
+ // PDCx[2] = OSPM is capable of direct access to On
+ // Demand throttling MSR
+ //
+
+ If(LNot(And(PDC0,4)))
+ {
+ Return(Package(){ // SW_ANY
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFD, // Coord Type- SW_ANY
+ MPEN // # processors.
+ }
+ })
+ }
+ Return(Package(){ // SW_ALL
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 1, // Domain #.
+ 0xFC, // Coord Type- SW_ALL
+ 1 // # processors.
+ }
+ })
+ }
+ } // End of CPU3
+} // End of Definition Block
+
diff --git a/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Cst.asl b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Cst.asl
new file mode 100644
index 0000000000..ca11591a13
--- /dev/null
+++ b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Cst.asl
@@ -0,0 +1,402 @@
+/** @file
+ Intel Processor Power Management ACPI Code.
+
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+DefinitionBlock (
+ "CPU0CST.aml",
+ "SSDT",
+ 1,
+ "PmRef",
+ "Cpu0Cst",
+ 0x3001
+ )
+{
+ External(\_PR.CPU0, DeviceObj)
+ External(PWRS)
+ External(CFGD)
+ External(PDC0)
+
+ Scope(\_PR.CPU0)
+ {
+ OperationRegion (DEB0, SystemIO, 0x80, 1) //DBG
+ Field (DEB0, ByteAcc,NoLock,Preserve) //DBG
+ { DBG8, 8,} //DBG
+
+ Method (_CST, 0)
+ {
+ Store(0x60,DBG8) //DBG
+
+ // IF CMP is supported, but independent C-States beyond C1 are
+ // not supported; return C1 Halt and rely on BIOS based software
+ // coordination
+ //
+ // CFGD[24] = CMP support
+ // PDCx[4] = 0 - OS does not support ind. C2/C3 in MP systems
+ //
+ // Note: SMI will be generated when both processor enter the
+ // Halt state.
+ //
+ If(LAnd(And(CFGD,0x01000000), LNot(And(PDC0,0x10))))
+ {
+ Store(0x61,DBG8) //DBG
+ Return(Package() {
+ 1,
+ Package()
+ { // C1 halt, but with BIOS coordination
+ ResourceTemplate(){Register(FFixedHW, 0, 0, 0)},
+ 1,
+ 157,
+ 1000
+ }
+ })
+ }
+
+ // IF MWAIT extensions are supported, use them.
+ //
+ // IF C6 capable/enabled AND Battery
+ // Report MWAIT C1, C2, C6 w/ BM_STS avoidance
+ // ELSE IF C4 capable/enabled AND Battery
+ // Report MWAIT C1, C2, C4 w/ BM_STS avoidance
+ // ELSE IF C3 capable/enabled
+ // Report MWAIT C1, C2, C3 w/ BM_STS avoidance
+ // ELSE IF C2 capable/enabled
+ // Report MWAIT C1, C2
+ // ELSE
+ // Report MWAIT C1
+ //
+ // CFGD[21] = 1 - MWAIT extensions supported
+ // CFGD[13] = 1 - C7 Capable/Enabled
+ // CFGD[12] = 1 - C6S Capable/Enabled
+ // CFGD[11] = 1 - C6 Capable/Enabled
+ // CFGD[7] = 1 - C4 Capable/Enabled
+ // CFGD[5] = 1 - C3 Capable/Enabled
+ // PDCx[9] = 1 - OS supports MWAIT extensions
+ // PDCx[8] = 1 - OS supports MWAIT for C1
+ // (Inferred from PDCx[9] = 1.)
+ // PDCx[4] = 1 - OS supports independent C2/C3 in MP systems
+ // or
+ // NOT CMP (Inferred from previous check.)
+ //
+ If(LAnd(And(CFGD, 0x200000), And(PDC0,0x200)))
+ {
+ //
+ // <TODO> The implementor may wish to only report C1-C2
+ // when on AC power. In this case, the IF clause below can
+ // be modified to something like:
+ //
+ // "If(LAnd(And(CFGD,0x200), LNot(PWRS)))"
+ //
+ // Which uses the power state of the system (PWRS) to
+ // determine whether to allow deepers states.
+ //
+ // IF C7 supported AND on battery
+ // report MWAIT C1, C6, C7
+ //
+ // CFGD[13] = C7 Capable/Enabled
+ // CFGD[11] = C6 Capable/Enabled
+ //
+ If(And(CFGD,0x2000)) // Setup Max C-State = C7
+ {
+ Store(0x77,DBG8) //DBG
+ Return( Package()
+ {
+ 3,
+ Package()
+ { // C1, MWAIT
+ ResourceTemplate(){Register(FFixedHW, 1, 2, 0x00, 1)},
+ 1,
+ 1,
+ 1000
+ },
+ Package()
+ {
+ // C6, MWAIT Extension with Incremental L2 Shrink
+ // ResourceTemplate(){Register(FFixedHW, 1, 2, 0x50, 1)},
+ // C6, MWAIT Extension with No L2 Shrink
+ ResourceTemplate(){Register(FFixedHW, 1, 2, 0x58, 1)},
+ 2,
+ 500,
+ 10
+ },
+ Package()
+ {
+ // C7, MWAIT Extension with Full L2 Shrink
+ ResourceTemplate(){Register(FFixedHW, 1, 2, 0x64, 1)},
+ 3,
+ 1000,
+ 10
+ }
+ })
+ }
+ If(And(CFGD,0x800)) // Setup Max C-State = C6
+ {
+ Store(0x76,DBG8) //DBG
+ Return( Package()
+ {
+ 2,
+ Package()
+ { // C1, MWAIT
+ ResourceTemplate(){Register(FFixedHW, 1, 2, 0x00, 1)},
+ 1,
+ 1,
+ 1000
+ },
+ Package()
+ {
+ // C6, MWAIT Extension with Incremental L2 Shrink
+ // ResourceTemplate(){Register(FFixedHW, 1, 2, 0x50, 1)},
+ // C6, MWAIT Extension with No L2 Shrink
+ ResourceTemplate(){Register(FFixedHW, 1, 2, 0x58, 1)},
+ 2,
+ 500,
+ 10
+ }
+ })
+ }
+ //
+ // IF no deeper C-States are supported; report MWAIT C1.
+ //
+ Store(0x71,DBG8) //DBG
+ Return(Package()
+ {
+ 1,
+ Package()
+ { // C1, MWAIT
+ ResourceTemplate () {Register(FFixedHW, 1, 2, 0x00, 1)},
+ 1,
+ 1,
+ 1000
+ }
+ })
+ }
+
+ // IF C1 MWAIT is supported, use it.
+ //
+ // IF C6 capable/enabled AND Battery
+ // Report MWAIT C1, C2, C6
+ // ELSE IF C4 capable/enabled AND Battery
+ // Report MWAIT C1, Standard C2, C4
+ // ELSE IF C3 capable/enabled
+ // Report MWAIT C1, Standard C2, C3
+ // ELSE IF C2 capable/enabled
+ // Report MWAIT C1, Standard C2
+ // ELSE
+ // Report MWAIT C1
+ //
+ // CFGD[21] = 1 - MWAIT extensions supported
+ // CFGD[11] = 1 - C6 Capable/Enabled
+ // CFGD[7] = 1 - C4 Capable/Enabled
+ // CFGD[5] = 1 - C3 Capable/Enabled
+ // PDCx[9] = 0 - OS supports MWAIT extensions
+ // (Inferred from previous checks.)
+ // PDCx[8] = 1 - OS supports MWAIT for C1
+ // PDCx[4] = 1 - OS supports independent C2/C3 in MP systems
+ // or
+ // NOT CMP (Inferred from previous check.)
+ //
+ If(LAnd(And(CFGD, 0x200000), And(PDC0,0x100)))
+ {
+ //
+ // <TODO> The implementor may wish to only report C1-C2
+ // when on AC power. In this case, the IF clause below can
+ // be modified to something like:
+ //
+ // "If(LAnd(And(CFGD,0x200), LNot(PWRS)))"
+ //
+ // Which uses the power state of the system (PWRS) to
+ // determine whether to allow deepers states.
+ //
+ //
+ // IF C6 supported AND battery
+ // Report MWAIT C1, I/O C4/C6
+ //
+ // CFGD[13] = C7 Capable/Enabled
+ // CFGD[11] = C6 Capable/Enabled
+ //
+ If(And(CFGD,0x2000))
+ {
+ Store(0x87,DBG8) //DBG
+ Return( Package()
+ {
+ 3,
+ Package()
+ { // C1, MWAIT
+ ResourceTemplate () {Register(FFixedHW, 1, 2, 0x00, 1)},
+ 1,
+ 1,
+ 1000
+ },
+ Package()
+ { // C6, LVL_3
+ ResourceTemplate () {Register(SystemIO, 8, 0, 0x416)},
+ 2,
+ 500,
+ 100
+ },
+ Package()
+ { // C7, LVL_4
+ ResourceTemplate () {Register(SystemIO, 8, 0, 0x417)},
+ 3,
+ 1000,
+ 10
+ }
+ })
+ }
+ If(And(CFGD,0x800))
+ {
+ Store(0x86,DBG8) //DBG
+ Return( Package()
+ {
+ 2,
+ Package()
+ { // C1, MWAIT
+ ResourceTemplate () {Register(FFixedHW, 1, 2, 0x00, 1)},
+ 1,
+ 1,
+ 1000
+ },
+ Package()
+ { // C6, LVL_3
+ ResourceTemplate () {Register(SystemIO, 8, 0, 0x416)},
+ 2,
+ 500,
+ 10
+ }
+ })
+ }
+ //
+ // IF no deeper C-States are supported; report MWAIT C1.
+ //
+ Store(0x81,DBG8) //DBG
+ Return(Package()
+ {
+ 1,
+ Package()
+ { // C1, MWAIT
+ ResourceTemplate () {Register(FFixedHW, 1, 2, 0x00, 1)},
+ 1,
+ 1,
+ 1000
+ }
+ })
+ }
+
+ // ELSE IF MWAIT is NOT supported:
+ //
+ // IF C6 capable/enabled and Battery
+ // Report C1, C2, C6
+ // ELSE IF C4 capable/enabled and Battery
+ // Report C1, C2, C4
+ // ELSE IF C3 capable/enabled
+ // Report C1, C2, C3
+ // ELSE IF C2 capable/enabled
+ // Report C1, C2
+ // ELSE Report C1
+ //
+ // CFGD[21] = 0 - MWAIT extensions not supported
+ // PDCx[9] = 0 - OS does not support MWAIT extensions
+ // (Inferred from previous checks.)
+ // PDCx[8] = 0 - OS does not support MWAIT for C1
+ // (Inferred from previous checks.)
+ // PDCx[4] = 1 - OS supports independent C2/C3 in MP systems
+ // or
+ // NOT CMP (Inferred from previous check.)
+ //
+ // <TODO> The implementor may wish to only report C1-C2
+ // when on AC power. In this case, the IF clause below can
+ // be modified to something like:
+ //
+ // "If(LAnd(And(CFGD,0x200), LNot(PWRS)))"
+ //
+ // Which uses the power state of the system (PWRS) to
+ // determine whether to allow deepers states.
+ //
+ //
+ // IF AC power AND C6 supported; report C1/C3/C6
+ //
+ // CFGD[13] = C7 Capable/Enabled
+ // CFGD[11] = C6 Capable/Enabled
+ //
+ If(And(CFGD,0x2000))
+ {
+ Store(0x97,DBG8) //DBG
+ Return(Package()
+ {
+ // Added ACPI C4 c-state package for Linux
+ 3,
+ Package()
+ { // C1
+ ResourceTemplate () {Register(FFixedHW, 0, 0, 0)},
+ 1,
+ 1,
+ 1000
+ },
+ Package()
+ { // C6
+ ResourceTemplate () {Register(SystemIO, 8, 0, 0x416)},
+ 2,
+ 500,
+ 100
+ },
+ Package()
+ { // C7
+ ResourceTemplate () {Register(SystemIO, 8, 0, 0x417)},
+ 3,
+ 5000,
+ 10
+ }
+ })
+ }
+ If(And(CFGD,0x800))
+ {
+ Store(0x96,DBG8) //DBG
+ Return(Package()
+ {
+ 2,
+ Package()
+ { // C1
+ ResourceTemplate () {Register(FFixedHW, 0, 0, 0)},
+ 1,
+ 1,
+ 1000
+ },
+ Package()
+ { // C6
+ ResourceTemplate () {Register(SystemIO, 8, 0, 0x416)},
+ 2,
+ 500,
+ 10
+ }
+ })
+ }
+ //
+ // IF no deeper C-States are supported; report C1.
+ //
+ Store(0x91,DBG8) //DBG
+ Return(Package()
+ {
+ 1,
+ Package()
+ { // C1
+ ResourceTemplate () {Register(FFixedHW, 0, 0, 0)},
+ 1,
+ 1,
+ 1000
+ }
+ })
+ }
+ }
+}
+
+
diff --git a/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Ist.asl b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Ist.asl
new file mode 100644
index 0000000000..3b2d1cf6c0
--- /dev/null
+++ b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Ist.asl
@@ -0,0 +1,241 @@
+/** @file
+ Intel Processor Power Management ACPI Code.
+
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+DefinitionBlock (
+ "CPU0IST.aml",
+ "SSDT",
+ 0x01,
+ "PmRef",
+ "Cpu0Ist",
+ 0x3000
+ )
+{
+ External (\_PR.CPU0, DeviceObj)
+ External (PDC0)
+ External (CFGD)
+ External (OSID)
+ External(\ADBG, MethodObj)
+
+ Scope(\_PR.CPU0)
+ {
+ //OperationRegion (DEB0, SystemIO, 0x80, 1) //DBG
+ //Field (DEB0, ByteAcc,NoLock,Preserve) //DBG
+ //{ DBG8, 8,} //DBG
+
+ Name(_PPC, 0) // Initialize as All States Available.
+
+ // NOTE: For CMP systems; this table is not loaded unless
+ // the required driver support is present.
+ // So, we do not check for those cases here.
+ //
+ // CFGD[0] = GV3 Capable/Enabled
+ // PDCx[0] = OS Capable of Hardware P-State control
+ //
+ Method(_PCT,0)
+ {
+ If(LAnd(And(CFGD,0x0001), And(PDC0,0x0001)))
+ {
+ //Store(0xA0,DBG8) //DBG
+ Return(Package() // Native Mode
+ {
+ ResourceTemplate(){Register(FfixedHW, 0, 0, 0)},
+ ResourceTemplate(){Register(FfixedHW, 0, 0, 0)}
+ })
+ }
+ // @NOTE: IO Trap is not supported. Therefore should not expose any IO interface for _PCT
+ // For all other cases, report control through the
+ // SMI interface. (The port used for SMM control is fixed up
+ // by the initialization code.)
+ //
+ Return(Package() // SMM Mode
+ {
+ ResourceTemplate(){Register(FfixedHW, 0, 0, 0)},
+ ResourceTemplate(){Register(FfixedHW, 0, 0, 0)}
+ })
+ }
+
+
+ // NOTE: For CMP systems; this table is not loaded if MP
+ // driver support is not present or P-State are disabled.
+ //
+ Method(_PSS,0)
+ {
+ 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},
+ 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},
+ 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},
+ 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},
+ 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}
+ })
+
+ // The _PSD object provides information to the OSPM related
+ // to P-State coordination between processors in a multi-processor
+ // configurations.
+ //
+ Method(_PSD,0)
+ {
+ //
+ // IF CMP is supported/enabled
+ // IF quad core processor
+ // IF PDC[11]
+ // Report 4 processors and HW_ALL as the coordination type
+ // ELSE
+ // Report 4 processors and SW_ALL as the coordination type
+ // ELSE
+ // IF PDC[11]
+ // Report 2 processors and HW_ALL as the coordination type
+ // ELSE
+ // Report 2 processors and SW_ALL as the coordination type
+ // ELSE
+ // Report 1 processor and SW_ALL as the coordination type
+ // (Domain 0)
+ //
+ // CFGD[24] = Two or more cores enabled
+ // CFGD[23] = Four cores enabled
+ // PDCx[11] = Hardware coordination with hardware feedback
+ //
+
+ If(And(CFGD,0x1000000)) // CMP Enabled.
+ {
+ If(And(CFGD,0x800000)) // Four Cores
+ {
+ If(And(PDC0,0x0800))
+ {
+ Return(Package(){ // HW_ALL
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFE, // Coord Type- HW_ALL.
+ 4 // # processors.
+ }
+ })
+ } // If(And(PDC0,0x0800))
+
+ Return(Package(){ // SW_ALL
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFC, // Coord Type- SW_ALL.
+ 4 // # processors.
+ }
+ })
+ } // If(And(CFGD,0x800000))
+
+ If(And(PDC0,0x0800))
+ {
+ Return(Package(){ // HW_ALL
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFE, // Coord Type- HW_ALL.
+ 2 // # processors.
+ }
+ })
+ } // If(And(PDC0,0x0800))
+ Return(Package(){ // SW_ALL
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFC, // Coord Type- SW_ALL.
+ 2 // # processors.
+ }
+ })
+ } // If(And(CFGD,0x1000000)) // CMP Enabled.
+
+ Return(Package(){ // SW_ALL
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFC, // Coord Type- SW_ALL.
+ 4 // # processors.
+ }
+ })
+ } // Method(_PSD,0)
+ } // Scope(\_PR.CPU0)
+} // End of Definition Block
+
+
diff --git a/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Tst.asl b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Tst.asl
new file mode 100644
index 0000000000..2cc0cd02fe
--- /dev/null
+++ b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/Cpu0Tst.asl
@@ -0,0 +1,191 @@
+/** @file
+ Intel Processor Power Management ACPI Code.
+
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+DefinitionBlock(
+ "CPU0TST.aml",
+ "SSDT",
+ 0x01,
+ "PmRef",
+ "Cpu0Tst",
+ 0x3000
+ )
+{
+ External(\_PR.CPU0, DeviceObj)
+ External(PDC0)
+ External(CFGD)
+ External(_PSS)
+
+ Scope(\_PR.CPU0)
+ {
+ Name(_TPC, 0) // All T-States are available
+
+ //
+ // T-State Control/Status interface
+ //
+ Method(_PTC, 0)
+ {
+ //
+ // IF OSPM is capable of direct access to MSR
+ // Report MSR interface
+ // ELSE
+ // Report I/O interface
+ //
+ // PDCx[2] = OSPM is capable of direct access to On
+ // Demand throttling MSR
+ //
+ If(And(PDC0, 0x0004)) {
+ Return(Package() {
+ ResourceTemplate(){Register(FFixedHW, 0, 0, 0)},
+ ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}
+ })
+ }
+ Return(Package() {
+ ResourceTemplate(){Register(SystemIO, 4, 1, 0x410)},
+ ResourceTemplate(){Register(SystemIO, 4, 1, 0x410)}
+ })
+ }
+
+ // _TSS package for I/O port based T-State control
+ // "Power" fields are replaced with real values by the first
+ // call of _TSS method.
+ //
+ Name(TSSI, Package() {
+ Package(){100, 1000, 0, 0x00, 0},
+ Package(){ 88, 875, 0, 0x0F, 0},
+ Package(){ 75, 750, 0, 0x0E, 0},
+ Package(){ 63, 625, 0, 0x0D, 0},
+ Package(){ 50, 500, 0, 0x0C, 0},
+ Package(){ 38, 375, 0, 0x0B, 0},
+ Package(){ 25, 250, 0, 0x0A, 0},
+ Package(){ 13, 125, 0, 0x09, 0}
+ })
+
+ // _TSS package for MSR based T-State control
+ // "Power" fields are replaced with real values by the first
+ // call of _TSS method.
+ //
+ Name(TSSM, Package() {
+ Package(){100, 1000, 0, 0x00, 0},
+ Package(){ 88, 875, 0, 0x1E, 0},
+ Package(){ 75, 750, 0, 0x1C, 0},
+ Package(){ 63, 625, 0, 0x1A, 0},
+ Package(){ 50, 500, 0, 0x18, 0},
+ Package(){ 38, 375, 0, 0x16, 0},
+ Package(){ 25, 250, 0, 0x14, 0},
+ Package(){ 13, 125, 0, 0x12, 0}
+ })
+
+ Name(TSSF, 0) // Flag for TSSI/TSSM initialization
+
+ Method(_TSS, 0)
+ {
+ // Update "Power" fields of TSSI/TSSM with the LFM
+ // power data IF _PSS is available
+ //
+ IF (LAnd(LNot(TSSF),CondRefOf(_PSS)))
+ {
+ Store(_PSS, Local0)
+ Store(SizeOf(Local0), Local1) // _PSS size
+ Decrement(Local1) // Index of LFM
+ Store(DerefOf(Index(DerefOf(Index(Local0,Local1)),1)), Local2) // LFM Power
+
+ Store(0, Local3)
+ While(LLess(Local3, SizeOf(TSSI)))
+ {
+ Store(Divide(Multiply(Local2, Subtract(8, Local3)), 8),
+ Local4) // Power for this TSSI/TSSM entry
+ Store(Local4,Index(DerefOf(Index(TSSI,Local3)),1))
+ Store(Local4,Index(DerefOf(Index(TSSM,Local3)),1))
+ Increment(Local3)
+ }
+ Store(Ones, TSSF) // TSSI/TSSM are updated
+ }
+ //
+ // IF OSPM is capable of direct access to MSR
+ // Report TSSM
+ // ELSE
+ // Report TSSI
+ //
+ If(And(PDC0, 0x0004))
+ {
+ Return(TSSM)
+ }
+ Return(TSSI)
+ }
+
+ Method(_TDL, 0)
+ {
+ Store ("Cpu0: _TDL Called", Debug)
+ Name ( LFMI, 0)
+ Store (SizeOf(TSSM), LFMI)
+ Decrement(LFMI) // Index of LFM entry in TSSM
+ Return(LFMI)
+ }
+
+ //
+ // T-State Dependency
+ //
+ Method(_TSD, 0)
+ {
+ //
+ // IF four cores are supported/enabled && !(direct access to MSR)
+ // Report 4 processors and SW_ANY as the coordination type
+ // ELSE IF two cores are supported/enabled && !(direct access to MSR)
+ // Report 2 processors and SW_ANY as the coordination type
+ // ELSE
+ // Report 1 processor and SW_ALL as the coordination type
+ //
+ // CFGD[23] = Four cores enabled
+ // CFGD[24] = Two or more cores enabled
+ // PDCx[2] = OSPM is capable of direct access to On
+ // Demand throttling MSR
+ //
+ If(LAnd(And(CFGD,0x0800000),LNot(And(PDC0,4))))
+ {
+ Return(Package(){ // SW_ANY
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFD, // Coord Type- SW_ANY
+ 4 // # processors.
+ }
+ })
+ }
+ If(LAnd(And(CFGD,0x1000000),LNot(And(PDC0,4))))
+ {
+ Return(Package(){ // SW_ANY
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFD, // Coord Type- SW_ANY
+ 2 // # processors.
+ }
+ })
+ }
+ Return(Package(){ // SW_ALL
+ Package(){
+ 5, // # entries.
+ 0, // Revision.
+ 0, // Domain #.
+ 0xFC, // Coord Type- SW_ALL
+ 1 // # processors.
+ }
+ })
+ }
+ }
+} // End of Definition Block
+
diff --git a/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/CpuPm.asl b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/CpuPm.asl
new file mode 100644
index 0000000000..872d4d4f86
--- /dev/null
+++ b/ChvRefCodePkg/CherryViewSoc/CPU/AcpiTables/CpuSsdt/CpuPm.asl
@@ -0,0 +1,753 @@
+/** @file
+ Intel Processor Power Management ACPI Code.
+
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+DefinitionBlock (
+ "CPUPM.aml",
+ "SSDT",
+ 0x01,
+ "PmRef",
+ "CpuPm",
+ 0x3000
+ )
+{
+ External(\_PR.CPU0, DeviceObj)
+ External(\_PR.CPU1, DeviceObj)
+ External(\_PR.CPU2, DeviceObj)
+ External(\_PR.CPU3, DeviceObj)
+ External(SMIF)
+
+ Scope(\)
+ {
+
+ // Package of pointers to SSDT's
+ //
+ // First column is SSDT name, used for debug only.
+ // (First column must be EXACTLY eight characters.)
+ // Second column is physical address.
+ // Third column is table length.
+ //
+ // IF modifying this file, see warnings listed in ppminit.asm.
+ //
+ Name(SSDT,Package()
+ {
+ "CPU0IST ", 0x80000000, 0x80000000,
+ "APIST ", 0x80000000, 0x80000000,
+ "CPU0CST ", 0x80000000, 0x80000000,
+ "APCST ", 0x80000000, 0x80000000
+ })
+
+ //
+ // Note: See PpmBiosInit in PPMINIT.ASM for a definition of
+ // the PpmFlags mirrored in CFGD.
+ //
+ Name(CFGD, 0x80000000)
+
+ Name(\PDC0,0x80000000) // CPU0 _PDC Flags.
+ Name(\PDC1,0x80000000) // CPU1 _PDC Flags.
+ Name(\PDC2,0x80000000) // CPU2 _PDC Flags.
+ Name(\PDC3,0x80000000) // CPU3 _PDC Flags.
+ Name(\SDTL,0x00) // Loaded SSDT Flags.
+ }
+
+ Scope(\_PR.CPU0)
+ {
+ //
+ // Define handles for opregions (used by load.)
+ //
+ Name(HI0,0) // Handle to CPU0IST
+ Name(HC0,0) // Handle to CPU0CST
+
+ Method(_PDC,1)
+ {
+ //
+ // Check and extract the _PDC information.
+ //
+ Store(CPDC(Arg0), Local0)
+ //
+ // Save the capability information and load tables as needed.
+ //
+ GCAP(Local0)
+ //
+ // Return status.
+ //
+ //Return (Local0)
+ }
+
+ Method(_OSC, 4)
+ {
+ //
+ // Check and extract the _OSC information.
+ //
+ Store(COSC(Arg0, Arg1, Arg2, Arg3), Local0)
+ //
+ // Save the capability information and load tables as needed.
+ //
+ GCAP(Local0)
+ //
+ // Return status.
+ //
+ Return (Local0)
+ }
+
+ //
+ // Implement a generic Method to check _PDC information which may be called
+ // by any of the processor scopes. (The use of _PDC is deprecated in ACPI 3.
+ // in favor of _OSC. However, for backwards compatibility, _PDC may be
+ // implemented using _OSC as follows:)
+ //
+ Method(CPDC,1)
+ {
+ CreateDwordField (Arg0, 0, REVS)
+ CreateDwordField (Arg0, 4, SIZE)
+
+ //
+ // Local0 = Number of bytes for Arg0
+ //
+ Store (SizeOf (Arg0), Local0)
+
+ //
+ // Local1 = Number of Capabilities bytes in Arg0
+ //
+ Store (Subtract (Local0, 8), Local1)
+
+ //
+ // TEMP = Temporary field holding Capability DWORDs
+ //
+ CreateField (Arg0, 64, Multiply (Local1, 8), TEMP)
+
+ //
+ // Create the Status (STAT) buffer with the first DWORD = 0
+ // This is required as per ACPI 3.0 Spec which says the
+ // first DWORD is used to return errors defined by _OSC.
+ //
+ Name (STS0, Buffer () {0x00, 0x00, 0x00, 0x00})
+
+ //
+ // Concatenate the _PDC capabilities bytes to the STS0 Buffer
+ // and store them in a local variable for calling OSC
+ //
+ Concatenate (STS0, TEMP, Local2)
+
+ Return(COSC (ToUUID("4077A616-290C-47BE-9EBD-D87058713953"), REVS, SIZE, Local2))
+ }
+
+ //
+ // Implement a generic Method to check _OSC information which may be called
+ // by any of the processor scopes.
+ //
+ Method(COSC, 4)
+ {
+ //
+ // Point to Status DWORD in the Arg3 buffer (STATUS)
+ //
+ CreateDWordField(Arg3, 0, STS0)
+ //
+ // Point to Caps DWORDs of the Arg3 buffer (CAPABILITIES)
+ //
+ CreateDwordField(Arg3, 4, CAP0)
+
+ //
+ // _OSC needs to validate the UUID and Revision.
+ //
+ // IF Unrecognized UUID
+ // Return Unrecognized UUID _OSC Failure
+ // IF Unsupported Revision
+ // Return Unsupported Revision _OSC Failure
+ //
+ // STS0[0] = Reserved
+ // STS0[1] = _OSC Failure
+ // STS0[2] = Unrecognized UUID
+ // STS0[3] = Unsupported Revision
+ // STS0[4] = Capabilities masked
+ //
+ // Note: The comparison method used is necessary due to
+ // limitations of certain OSes which cannot perform direct
+ // buffer comparisons.
+ //
+ // Create a set of "Input" UUID fields.
+ //
+ CreateDwordField(Arg0, 0x0, IID0)
+ CreateDwordField(Arg0, 0x4, IID1)
+ CreateDwordField(Arg0, 0x8, IID2)
+ CreateDwordField(Arg0, 0xC, IID3)
+ //
+ // Create a set of "Expected" UUID fields.
+ //
+ Name(UID0, ToUUID("4077A616-290C-47BE-9EBD-D87058713953"))
+ CreateDwordField(UID0, 0x0, EID0)
+ CreateDwordField(UID0, 0x4, EID1)
+ CreateDwordField(UID0, 0x8, EID2)
+ CreateDwordField(UID0, 0xC, EID3)
+ //
+ // Verify the input UUID matches the expected UUID.
+ //
+ If(LNot(LAnd(LAnd(LEqual(IID0, EID0),LEqual(IID1, EID1)),LAnd(LEqual(IID2, EID2),LEqual(IID3, EID3)))))
+ {
+ //
+ // Return Unrecognized UUID _OSC Failure
+ //
+ Store (0x6, STS0)
+ Return (Arg3)
+ }
+
+ If(LNot(LEqual(Arg1,1)))
+ {
+ //
+ // Return Unsupported Revision _OSC Failure
+ //
+ Store (0xA, STS0)
+ Return (Arg3)
+ }
+
+ Return (Arg3)
+ }
+
+ //
+ // Get the capability information and load appropriate tables as needed.
+ //
+ Method(GCAP, 1)
+ {
+
+ // Point to Status DWORD in the Arg0 buffer (STATUS)
+ CreateDWordField(Arg0, 0, STS0)
+
+ // Point to Caps DWORDs of the Arg0 buffer (CAPABILITIES)
+ CreateDwordField(Arg0, 4, CAP0)
+
+ //
+ // If the UUID was unrecognized or the _OSC revision was unsupported,
+ // return without updating capabilities.
+ //
+ If(LOr(LEqual(STS0,0x6),LEqual(STS0,0xA)))
+ {
+ Return()
+ }
+
+ //
+ // Check if this is a query (BIT0 of Status = 1).
+ // If so, mask off the bits we support and return.
+ //
+ if (And(STS0, 1))
+ {
+ And(CAP0, 0xBFF, CAP0)
+ Return()
+ }
+
+ //
+ // Store result of PDC. (We clear out the MSB, which was just
+ // used as a placeholder for the compiler; and then "OR" the
+ // value in case we get multiple calls, each of which only
+ // reports partial support.)
+ //
+ Or(And(PDC0, 0x7FFFFFFF), CAP0, PDC0)
+
+ //
+ // Check IF the IST SSDTs should be loaded.
+ //
+ // CFGD[0] = GV3 Capable/Enabled
+ //
+ If(And(CFGD,0x01))
+ {
+ //
+ // Load the IST SSDTs if:
+ // (1) CMP capable and enabled.
+ // (2) Driver supports P-States in MP configurations
+ // (3) Driver supports direct HW P-State control
+ // (4) SSDT is not already loaded
+ //
+ // CFGD[24] = Two or more cores enabled
+ // PDCx[3] = OS supports C1 and P-states in MP systems
+ // PDCx[0] = OS supports direct access of the perf MSR
+ // SDTL[0] = CPU0 IST SSDT Loaded
+ //
+ If(LAnd(LAnd(And(CFGD,0x01000000),LEqual(And(PDC0, 0x0009), 0x0009)),LNot(And(SDTL,0x01))))
+ {
+ //
+ // Flag the IST SSDT as loaded for CPU0
+ //
+ Or(SDTL, 0x01, SDTL)
+
+ OperationRegion(IST0,SystemMemory,DeRefOf(Index(SSDT,1)),DeRefOf(Index(SSDT,2)))
+ Load(IST0, HI0) // Dynamically load the CPU0IST SSDT
+ }
+ }
+
+ //
+ // Check IF the CST SSDTs should be loaded.
+ //
+ // CFGD[11,7,2,1] = C6, C4, C1E, C1 Capable/Enabled
+ //
+ If(And(CFGD,0x82))
+ {
+ //
+ // Load the CST SSDTs if:
+ // (1) CMP capable/enabled
+ // (2) Driver supports multi-processor configurations
+ // (3) CPU0 CST ISDT is not already loaded
+ //
+ // CFGD[24] = Two or more cores enabled
+ // PDCx[3] = OS supports C1 and P-states in MP systems
+ // PDCx[4] = OS supports ind. C2/C3 in MP systems
+ // SDTL[1] = CPU0 CST SSDT Loaded
+ //
+ If(LAnd(LAnd(And(CFGD,0x01000000),And(PDC0,0x0018)),LNot(And(SDTL,0x02))))
+ {
+ //
+ // Flag the CST SSDT as loaded for CPU0
+ //
+ Or(SDTL, 0x02, SDTL)
+
+ OperationRegion(CST0,SystemMemory,DeRefOf(Index(SSDT,7)),DeRefOf(Index(SSDT,8)))
+ Load(CST0, HC0) // Dynamically load the CPU0CST SSDT
+ }
+ }
+
+ Return ()
+ }
+ }
+
+
+ Scope(\_PR.CPU1)
+ {
+ //
+ // Define handles for opregions (used by load.)
+ //
+ Name(HI1,0) // Handle to APIST
+ Name(HC1,0) // Handle to APCST
+
+ Method(_PDC,1)
+ {
+ //
+ // Refer to \_PR.CPU0._PDC for description.
+ //
+ Store(\_PR.CPU0.CPDC(Arg0), Local0)
+ GCAP(Local0)
+ //Return (Local0)
+ }
+
+ Method(_OSC, 4)
+ {
+ //
+ // Refer to \_PR.CPU0._OSC for description.
+ //
+ Store(\_PR.CPU0.COSC(Arg0, Arg1, Arg2, Arg3), Local0)
+ GCAP(Local0)
+ Return (Local0)
+ }
+
+ //
+ // Get the capability information and load appropriate tables as needed.
+ //
+ Method(GCAP, 1)
+ {
+ //
+ // Point to Status DWORD in the Arg0 buffer (STATUS)
+ //
+ CreateDWordField(Arg0, 0, STS1)
+ //
+ // Point to Caps DWORDs of the Arg0 buffer (CAPABILITIES)
+ //
+ CreateDwordField(Arg0, 4, CAP1)
+ //
+ // If the UUID was unrecognized or the _OSC revision was unsupported,
+ // return without updating capabilities.
+ //
+ If(LOr(LEqual(STS1,0x6),LEqual(STS1,0xA)))
+ {
+ Return()
+ }
+
+ //
+ // Check if this is a query (BIT0 of Status = 1).
+ // If so, mask off the bits we support and return.
+ //
+ if (And(STS1, 1))
+ {
+ And(CAP1, 0xBFF, CAP1)
+ Return()
+ }
+
+ //
+ // Store result of PDC. (We clear out the MSB, which was just
+ // used as a placeholder for the compiler; and then "OR" the
+ // value in case we get multiple calls, each of which only
+ // reports partial support.)
+ //
+ Or(And(PDC1, 0x7FFFFFFF), CAP1, PDC1)
+
+ //
+ // Attempt to dynamically load the IST SSDTs if:
+ // (1) Driver supports P-States in MP configurations
+ // (2) Driver supports direct HW P-State control
+ //
+ // PDCx[3] = OS supports C1 and P-states in MP systems
+ // PDCx[0] = OS supports direct access of the perf MSR
+ //
+ If(LEqual(And(PDC0, 0x0009), 0x0009))
+ {
+ APPT()
+ }
+
+ //
+ // Load the CST SSDTs if:
+ // (1) Driver supports multi-processor configurations
+ //
+ // PDCx[3] = OS supports C1 and P-states in MP systems
+ // PDCx[4] = OS supports ind. C2/C3 in MP systems
+ //
+ If(And(PDC0,0x0018))
+ {
+ APCT()
+ }
+
+ Return()
+ }
+
+ //
+ // Dynamically load the CST SSDTs if:
+ // (1) C-States are enabled
+ // (2) SSDT is not already loaded
+ //
+ // CFGD[11,7,2,1] = C6, C4, C1E, C1 Capable/Enabled
+ // SDTL[5] = AP CST SSDT Loaded
+ //
+ Method(APCT,0)
+ {
+ If(LAnd(And(CFGD,0x82),LNot(And(SDTL,0x20))))
+ {
+ //
+ // Flag the CST SSDT as loaded for the AP's
+ //
+ Or(SDTL, 0x20, SDTL)
+ //
+ // Dynamically load the APCST SSDT
+ //
+ OperationRegion(CST1,SystemMemory,DeRefOf(Index(SSDT,10)),DeRefOf(Index(SSDT,11)))
+ Load(CST1, HC1)
+ }
+ }
+
+ //
+ // Dynamically load the IST SSDTs if:
+ // (1) If GV3 capable and enabled
+ // (2) SSDT is not already loaded
+ //
+ // CFGD[0] = GV3 Capable/Enabled
+ // SDTL[4] = AP IST SSDT Loaded
+ //
+ Method(APPT,0)
+ {
+ If(LAnd(And(CFGD,0x01),LNot(And(SDTL,0x10))))
+ {
+ //
+ // Flag the IST SSDT as loaded for CPU0
+ //
+ Or(SDTL, 0x10, SDTL)
+
+ OperationRegion(IST1,SystemMemory,DeRefOf(Index(SSDT,4)),DeRefOf(Index(SSDT,5)))
+ Load(IST1, HI1) // Dynamically load the CPU1IST SSDT
+ }
+ }
+ } // End CPU1
+
+ Scope(\_PR.CPU2)
+ {
+ //
+ // Define handles for opregions (used by load.)
+ //
+ Name(HI1,0) // Handle to APIST
+ Name(HC1,0) // Handle to APCST
+
+ Method(_PDC,1)
+ {
+ //
+ // Refer to \_PR.CPU0._PDC for description.
+ //
+ Store(\_PR.CPU0.CPDC(Arg0), Local0)
+ GCAP(Local0)
+ //Return (Local0)
+ }
+
+ Method(_OSC, 4)
+ {
+ //
+ // Refer to \_PR.CPU0._OSC for description.
+ //
+ Store(\_PR.CPU0.COSC(Arg0, Arg1, Arg2, Arg3), Local0)
+ GCAP(Local0)
+ Return (Local0)
+ }
+
+ //
+ // Get the capability information and load appropriate tables as needed.
+ //
+ Method(GCAP, 1)
+ {
+ //
+ // Point to Status DWORD in the Arg0 buffer (STATUS)
+ //
+ CreateDWordField(Arg0, 0, STS1)
+ //
+ // Point to Caps DWORDs of the Arg0 buffer (CAPABILITIES)
+ //
+ CreateDwordField(Arg0, 4, CAP1)
+ //
+ // If the UUID was unrecognized or the _OSC revision was unsupported,
+ // return without updating capabilities.
+ //
+ If(LOr(LEqual(STS1,0x6),LEqual(STS1,0xA)))
+ {
+ Return()
+ }
+
+ //
+ // Check if this is a query (BIT0 of Status = 1).
+ // If so, mask off the bits we support and return.
+ //
+ if (And(STS1, 1))
+ {
+ And(CAP1, 0xBFF, CAP1)
+ Return()
+ }
+
+ //
+ // Store result of PDC. (We clear out the MSB, which was just
+ // used as a placeholder for the compiler; and then "OR" the
+ // value in case we get multiple calls, each of which only
+ // reports partial support.)
+ //
+ Or(And(PDC1, 0x7FFFFFFF), CAP1, PDC1)
+
+ //
+ // Attempt to dynamically load the IST SSDTs if:
+ // (1) Driver supports P-States in MP configurations
+ // (2) Driver supports direct HW P-State control
+ //
+ // PDCx[3] = OS supports C1 and P-states in MP systems
+ // PDCx[0] = OS supports direct access of the perf MSR
+ //
+ If(LEqual(And(PDC0, 0x0009), 0x0009))
+ {
+ APPT()
+ }
+
+ //
+ // Load the CST SSDTs if:
+ // (1) Driver supports multi-processor configurations
+ //
+ // PDCx[3] = OS supports C1 and P-states in MP systems
+ // PDCx[4] = OS supports ind. C2/C3 in MP systems
+ //
+ If(And(PDC0,0x0018))
+ {
+ APCT()
+ }
+
+ Return()
+ }
+
+ //
+ // Dynamically load the CST SSDTs if:
+ // (1) C-States are enabled
+ // (2) SSDT is not already loaded
+ //
+ // CFGD[11,7,2,1] = C6, C4, C1E, C1 Capable/Enabled
+ // SDTL[5] = AP CST SSDT Loaded
+ //
+ Method(APCT,0)
+ {
+ If(LAnd(And(CFGD,0x82),LNot(And(SDTL,0x20))))
+ {
+ //
+ // Flag the CST SSDT as loaded for the AP's
+ //
+ Or(SDTL, 0x20, SDTL)
+ //
+ // Dynamically load the APCST SSDT
+ //
+ OperationRegion(CST1,SystemMemory,DeRefOf(Index(SSDT,10)),DeRefOf(Index(SSDT,11)))
+ Load(CST1, HC1)
+ }
+ }
+
+ //
+ // Dynamically load the IST SSDTs if:
+ // (1) If GV3 capable and enabled
+ // (2) SSDT is not already loaded
+ //
+ // CFGD[0] = GV3 Capable/Enabled
+ // SDTL[4] = AP IST SSDT Loaded
+ //
+ Method(APPT,0)
+ {
+ If(LAnd(And(CFGD,0x01),LNot(And(SDTL,0x10))))
+ {
+ //
+ // Flag the IST SSDT as loaded for CPU0
+ //
+ Or(SDTL, 0x10, SDTL)
+
+ OperationRegion(IST1,SystemMemory,DeRefOf(Index(SSDT,4)),DeRefOf(Index(SSDT,5)))
+ Load(IST1, HI1) // Dynamically load the CPU1IST SSDT
+ }
+ }
+ } // End CPU1
+
+ Scope(\_PR.CPU3)
+ {
+ //
+ // Define handles for opregions (used by load.)
+ //
+ Name(HI1,0) // Handle to APIST
+ Name(HC1,0) // Handle to APCST
+
+ Method(_PDC,1)
+ {
+ //
+ // Refer to \_PR.CPU0._PDC for description.
+ //
+ Store(\_PR.CPU0.CPDC(Arg0), Local0)
+ GCAP(Local0)
+ //Return (Local0)
+ }
+
+ Method(_OSC, 4)
+ {
+ //
+ // Refer to \_PR.CPU0._OSC for description.
+ //
+ Store(\_PR.CPU0.COSC(Arg0, Arg1, Arg2, Arg3), Local0)
+ GCAP(Local0)
+ Return (Local0)
+ }
+
+ //
+ // Get the capability information and load appropriate tables as needed.
+ //
+ Method(GCAP, 1)
+ {
+ //
+ // Point to Status DWORD in the Arg0 buffer (STATUS)
+ //
+ CreateDWordField(Arg0, 0, STS1)
+ //
+ // Point to Caps DWORDs of the Arg0 buffer (CAPABILITIES)
+ //
+ CreateDwordField(Arg0, 4, CAP1)
+ //
+ // If the UUID was unrecognized or the _OSC revision was unsupported,
+ // return without updating capabilities.
+ //
+ If(LOr(LEqual(STS1,0x6),LEqual(STS1,0xA)))
+ {
+ Return()
+ }
+
+ //
+ // Check if this is a query (BIT0 of Status = 1).
+ // If so, mask off the bits we support and return.
+ //
+ if (And(STS1, 1))
+ {
+ And(CAP1, 0xBFF, CAP1)
+ Return()
+ }
+
+ //
+ // Store result of PDC. (We clear out the MSB, which was just
+ // used as a placeholder for the compiler; and then "OR" the
+ // value in case we get multiple calls, each of which only
+ // reports partial support.)
+ //
+ Or(And(PDC1, 0x7FFFFFFF), CAP1, PDC1)
+
+ //
+ // Attempt to dynamically load the IST SSDTs if:
+ // (1) Driver supports P-States in MP configurations
+ // (2) Driver supports direct HW P-State control
+ //
+ // PDCx[3] = OS supports C1 and P-states in MP systems
+ // PDCx[0] = OS supports direct access of the perf MSR
+ //
+ If(LEqual(And(PDC0, 0x0009), 0x0009))
+ {
+ APPT()
+ }
+
+ //
+ // Load the CST SSDTs if:
+ // (1) Driver supports multi-processor configurations
+ //
+ // PDCx[3] = OS supports C1 and P-states in MP systems
+ // PDCx[4] = OS supports ind. C2/C3 in MP systems
+ //
+ If(And(PDC0,0x0018))
+ {
+ APCT()
+ }
+
+ Return()
+ }
+
+ //
+ // Dynamically load the CST SSDTs if:
+ // (1) C-States are enabled
+ // (2) SSDT is not already loaded
+ //
+ // CFGD[11,7,2,1] = C6, C4, C1E, C1 Capable/Enabled
+ // SDTL[5] = AP CST SSDT Loaded
+ //
+ Method(APCT,0)
+ {
+ If(LAnd(And(CFGD,0x82),LNot(And(SDTL,0x20))))
+ {
+ //
+ // Flag the CST SSDT as loaded for the AP's
+ //
+ Or(SDTL, 0x20, SDTL)
+ //
+ // Dynamically load the APCST SSDT
+ //
+ OperationRegion(CST1,SystemMemory,DeRefOf(Index(SSDT,10)),DeRefOf(Index(SSDT,11)))
+ Load(CST1, HC1)
+ }
+ }
+
+ //
+ // Dynamically load the IST SSDTs if:
+ // (1) If GV3 capable and enabled
+ // (2) SSDT is not already loaded
+ //
+ // CFGD[0] = GV3 Capable/Enabled
+ // SDTL[4] = AP IST SSDT Loaded
+ //
+ Method(APPT,0)
+ {
+ If(LAnd(And(CFGD,0x01),LNot(And(SDTL,0x10))))
+ {
+ //
+ // Flag the IST SSDT as loaded for CPU0
+ //
+ Or(SDTL, 0x10, SDTL)
+
+ OperationRegion(IST1,SystemMemory,DeRefOf(Index(SSDT,4)),DeRefOf(Index(SSDT,5)))
+ Load(IST1, HI1) // Dynamically load the CPU1IST SSDT
+ }
+ }
+ } // End CPU3
+} // End of Definition Block
+
+
+