1 /*-----------------------------------------------------------------------------
2 -------------------------------------------------------------------------------
5 Intel Silvermont Processor Power Management BIOS Reference Code
7 Copyright (c) 2006 - 2014, Intel Corporation
9 SPDX-License-Identifier: BSD-2-Clause-Patent
14 Revision: Refer to Readme
18 --------------------------------------------------------------------------------
19 -------------------------------------------------------------------------------
21 This Processor Power Management BIOS Source Code is furnished under license
22 and may only be used or copied in accordance with the terms of the license.
23 The information in this document is furnished for informational use only, is
24 subject to change without notice, and should not be construed as a commitment
25 by Intel Corporation. Intel Corporation assumes no responsibility or liability
26 for any errors or inaccuracies that may appear in this document or any
27 software that may be provided in association with this document.
29 Except as permitted by such license, no part of this document may be
30 reproduced, stored in a retrieval system, or transmitted in any form or by
31 any means without the express written consent of Intel Corporation.
33 WARNING: You are authorized and licensed to install and use this BIOS code
34 ONLY on an IST PC. This utility may damage any system that does not
35 meet these requirements.
37 An IST PC is a computer which
38 (1) Is capable of seamlessly and automatically transitioning among
39 multiple performance states (potentially operating at different
40 efficiency ratings) based upon power source changes, end user
41 preference, processor performance demand, and thermal conditions; and
42 (2) Includes an Intel Pentium II processors, Intel Pentium III
43 processor, Mobile Intel Pentium III Processor-M, Mobile Intel Pentium 4
44 Processor-M, Intel Pentium M Processor, or any other future Intel
45 processors that incorporates the capability to transition between
46 different performance states by altering some, or any combination of,
47 the following processor attributes: core voltage, core frequency, bus
48 frequency, number of processor cores available, or any other attribute
49 that changes the efficiency (instructions/unit time-power) at which the
52 -------------------------------------------------------------------------------
53 -------------------------------------------------------------------------------
56 (1) <TODO> - IF the trap range and port definitions do not match those
57 specified by this reference code, this file must be modified IAW the
58 individual implmentation.
60 --------------------------------------------------------------------------------
61 ------------------------------------------------------------------------------*/
72 External(\_PR.CPU0, DeviceObj)
79 Name(_TPC, 0) // All T-States are available
82 // T-State Control/Status interface
87 // IF OSPM is capable of direct access to MSR
88 // Report MSR interface
90 // Report I/O interface
92 // PDCx[2] = OSPM is capable of direct access to On
93 // Demand throttling MSR
95 If(And(PDC0, 0x0004)) {
97 ResourceTemplate(){Register(FFixedHW, 0, 0, 0)},
98 ResourceTemplate(){Register(FFixedHW, 0, 0, 0)}
104 // _TSS package for I/O port based T-State control
105 // "Power" fields are replaced with real values by the first
106 // call of _TSS method.
108 Name(TSSI, Package() {
109 Package(){100, 1000, 0, 0x00, 0},
110 Package(){ 88, 875, 0, 0x0F, 0},
111 Package(){ 75, 750, 0, 0x0E, 0},
112 Package(){ 63, 625, 0, 0x0D, 0},
113 Package(){ 50, 500, 0, 0x0C, 0},
114 Package(){ 38, 375, 0, 0x0B, 0},
115 Package(){ 25, 250, 0, 0x0A, 0},
116 Package(){ 13, 125, 0, 0x09, 0}
119 // _TSS package for MSR based T-State control
120 // "Power" fields are replaced with real values by the first
121 // call of _TSS method.
123 Name(TSSM, Package() {
124 Package(){100, 1000, 0, 0x00, 0},
125 Package(){ 88, 875, 0, 0x1E, 0},
126 Package(){ 75, 750, 0, 0x1C, 0},
127 Package(){ 63, 625, 0, 0x1A, 0},
128 Package(){ 50, 500, 0, 0x18, 0},
129 Package(){ 38, 375, 0, 0x16, 0},
130 Package(){ 25, 250, 0, 0x14, 0},
131 Package(){ 13, 125, 0, 0x12, 0}
134 Name(TSSF, 0) // Flag for TSSI/TSSM initialization
138 // Update "Power" fields of TSSI/TSSM with the LFM
139 // power data IF _PSS is available
141 IF (LAnd(LNot(TSSF),CondRefOf(_PSS)))
144 Store(SizeOf(Local0), Local1) // _PSS size
145 Decrement(Local1) // Index of LFM
146 Store(DerefOf(Index(DerefOf(Index(Local0,Local1)),1)), Local2) // LFM Power
149 While(LLess(Local3, SizeOf(TSSI)))
151 Store(Divide(Multiply(Local2, Subtract(8, Local3)), 8),
152 Local4) // Power for this TSSI/TSSM entry
153 Store(Local4,Index(DerefOf(Index(TSSI,Local3)),1))
154 Store(Local4,Index(DerefOf(Index(TSSM,Local3)),1))
157 Store(Ones, TSSF) // TSSI/TSSM are updated
160 // IF OSPM is capable of direct access to MSR
165 If(And(PDC0, 0x0004))
174 Store ("Cpu0: _TDL Called", Debug)
176 Store (SizeOf(TSSM), LFMI)
177 Decrement(LFMI) // Index of LFM entry in TSSM
182 // T-State Dependency
187 // IF four cores are supported/enabled && !(direct access to MSR)
188 // Report 4 processors and SW_ANY as the coordination type
189 // ELSE IF two cores are supported/enabled && !(direct access to MSR)
190 // Report 2 processors and SW_ANY as the coordination type
192 // Report 1 processor and SW_ALL as the coordination type
194 // CFGD[23] = Four cores enabled
195 // CFGD[24] = Two or more cores enabled
196 // PDCx[2] = OSPM is capable of direct access to On
197 // Demand throttling MSR
199 If(LAnd(And(CFGD,0x0800000),LNot(And(PDC0,4))))
201 Return(Package(){ // SW_ANY
206 0xFD, // Coord Type- SW_ANY
211 If(LAnd(And(CFGD,0x1000000),LNot(And(PDC0,4))))
213 Return(Package(){ // SW_ANY
218 0xFD, // Coord Type- SW_ANY
223 Return(Package(){ // SW_ALL
228 0xFC, // Coord Type- SW_ALL
234 } // End of Definition Block