Angel Pons | f23ae0b | 2020-04-02 23:48:12 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 2 | |
| 3 | #include <types.h> |
| 4 | #include <console/console.h> |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame] | 5 | #include <acpi/acpi.h> |
| 6 | #include <acpi/acpigen.h> |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 7 | #include <arch/cpu.h> |
| 8 | #include <cpu/x86/msr.h> |
| 9 | #include <cpu/intel/speedstep.h> |
| 10 | #include <cpu/intel/turbo.h> |
| 11 | #include <device/device.h> |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 12 | #include "haswell.h" |
| 13 | #include "chip.h" |
| 14 | |
Duncan Laurie | 1ad5564 | 2013-03-07 14:08:04 -0800 | [diff] [blame] | 15 | #include <southbridge/intel/lynxpoint/pch.h> |
| 16 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 17 | static int get_cores_per_package(void) |
| 18 | { |
| 19 | struct cpuinfo_x86 c; |
| 20 | struct cpuid_result result; |
| 21 | int cores = 1; |
| 22 | |
| 23 | get_fms(&c, cpuid_eax(1)); |
| 24 | if (c.x86 != 6) |
| 25 | return 1; |
| 26 | |
| 27 | result = cpuid_ext(0xb, 1); |
| 28 | cores = result.ebx & 0xff; |
| 29 | |
| 30 | return cores; |
| 31 | } |
| 32 | |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 33 | static void generate_cstate_entries(acpi_cstate_t *cstates, |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 34 | int c1, int c2, int c3) |
| 35 | { |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 36 | int cstate_count = 0; |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 37 | |
| 38 | /* Count number of active C-states */ |
| 39 | if (c1 > 0) |
| 40 | ++cstate_count; |
| 41 | if (c2 > 0) |
| 42 | ++cstate_count; |
| 43 | if (c3 > 0) |
| 44 | ++cstate_count; |
| 45 | if (!cstate_count) |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 46 | return; |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 47 | |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 48 | acpigen_write_package(cstate_count + 1); |
| 49 | acpigen_write_byte(cstate_count); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 50 | |
| 51 | /* Add an entry if the level is enabled */ |
| 52 | if (c1 > 0) { |
| 53 | cstates[c1].ctype = 1; |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 54 | acpigen_write_CST_package_entry(&cstates[c1]); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 55 | } |
| 56 | if (c2 > 0) { |
| 57 | cstates[c2].ctype = 2; |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 58 | acpigen_write_CST_package_entry(&cstates[c2]); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 59 | } |
| 60 | if (c3 > 0) { |
| 61 | cstates[c3].ctype = 3; |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 62 | acpigen_write_CST_package_entry(&cstates[c3]); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 63 | } |
| 64 | |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 65 | acpigen_pop_len(); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 66 | } |
| 67 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 68 | static acpi_tstate_t tss_table_fine[] = { |
| 69 | { 100, 1000, 0, 0x00, 0 }, |
| 70 | { 94, 940, 0, 0x1f, 0 }, |
| 71 | { 88, 880, 0, 0x1e, 0 }, |
| 72 | { 82, 820, 0, 0x1d, 0 }, |
| 73 | { 75, 760, 0, 0x1c, 0 }, |
| 74 | { 69, 700, 0, 0x1b, 0 }, |
| 75 | { 63, 640, 0, 0x1a, 0 }, |
| 76 | { 57, 580, 0, 0x19, 0 }, |
| 77 | { 50, 520, 0, 0x18, 0 }, |
| 78 | { 44, 460, 0, 0x17, 0 }, |
| 79 | { 38, 400, 0, 0x16, 0 }, |
| 80 | { 32, 340, 0, 0x15, 0 }, |
| 81 | { 25, 280, 0, 0x14, 0 }, |
| 82 | { 19, 220, 0, 0x13, 0 }, |
| 83 | { 13, 160, 0, 0x12, 0 }, |
| 84 | }; |
| 85 | |
| 86 | static acpi_tstate_t tss_table_coarse[] = { |
| 87 | { 100, 1000, 0, 0x00, 0 }, |
| 88 | { 88, 875, 0, 0x1f, 0 }, |
| 89 | { 75, 750, 0, 0x1e, 0 }, |
| 90 | { 63, 625, 0, 0x1d, 0 }, |
| 91 | { 50, 500, 0, 0x1c, 0 }, |
| 92 | { 38, 375, 0, 0x1b, 0 }, |
| 93 | { 25, 250, 0, 0x1a, 0 }, |
| 94 | { 13, 125, 0, 0x19, 0 }, |
| 95 | }; |
| 96 | |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 97 | static void generate_T_state_entries(int core, int cores_per_package) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 98 | { |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 99 | /* Indicate SW_ALL coordination for T-states */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 100 | acpigen_write_TSD_package(core, cores_per_package, SW_ALL); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 101 | |
| 102 | /* Indicate FFixedHW so OS will use MSR */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 103 | acpigen_write_empty_PTC(); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 104 | |
| 105 | /* Set a T-state limit that can be modified in NVS */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 106 | acpigen_write_TPC("\\TLVL"); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 107 | |
| 108 | /* |
| 109 | * CPUID.(EAX=6):EAX[5] indicates support |
| 110 | * for extended throttle levels. |
| 111 | */ |
| 112 | if (cpuid_eax(6) & (1 << 5)) |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 113 | acpigen_write_TSS_package( |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 114 | ARRAY_SIZE(tss_table_fine), tss_table_fine); |
| 115 | else |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 116 | acpigen_write_TSS_package( |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 117 | ARRAY_SIZE(tss_table_coarse), tss_table_coarse); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 118 | } |
| 119 | |
Angel Pons | 2aaf7c0 | 2020-09-24 18:03:18 +0200 | [diff] [blame] | 120 | static void generate_C_state_entries(void) |
| 121 | { |
| 122 | struct cpu_info *info; |
| 123 | struct cpu_driver *cpu; |
| 124 | struct device *lapic; |
| 125 | struct cpu_intel_haswell_config *conf = NULL; |
| 126 | |
| 127 | /* Find the SpeedStep CPU in the device tree using magic APIC ID */ |
| 128 | lapic = dev_find_lapic(SPEEDSTEP_APIC_MAGIC); |
| 129 | if (!lapic) |
| 130 | return; |
| 131 | conf = lapic->chip_info; |
| 132 | if (!conf) |
| 133 | return; |
| 134 | |
| 135 | /* Find CPU map of supported C-states */ |
| 136 | info = cpu_info(); |
| 137 | if (!info) |
| 138 | return; |
| 139 | cpu = find_cpu_driver(info->cpu); |
| 140 | if (!cpu || !cpu->cstates) |
| 141 | return; |
| 142 | |
| 143 | acpigen_emit_byte(0x14); /* MethodOp */ |
| 144 | acpigen_write_len_f(); /* PkgLength */ |
| 145 | acpigen_emit_namestring("_CST"); |
| 146 | acpigen_emit_byte(0x00); /* No Arguments */ |
| 147 | |
| 148 | /* If running on AC power */ |
| 149 | acpigen_emit_byte(0xa0); /* IfOp */ |
| 150 | acpigen_write_len_f(); /* PkgLength */ |
| 151 | acpigen_emit_namestring("PWRS"); |
| 152 | acpigen_emit_byte(0xa4); /* ReturnOp */ |
| 153 | generate_cstate_entries(cpu->cstates, conf->c1_acpower, |
| 154 | conf->c2_acpower, conf->c3_acpower); |
| 155 | acpigen_pop_len(); |
| 156 | |
| 157 | /* Else on battery power */ |
| 158 | acpigen_emit_byte(0xa4); /* ReturnOp */ |
| 159 | generate_cstate_entries(cpu->cstates, conf->c1_battery, |
| 160 | conf->c2_battery, conf->c3_battery); |
| 161 | acpigen_pop_len(); |
| 162 | } |
| 163 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 164 | static int calculate_power(int tdp, int p1_ratio, int ratio) |
| 165 | { |
| 166 | u32 m; |
| 167 | u32 power; |
| 168 | |
| 169 | /* |
| 170 | * M = ((1.1 - ((p1_ratio - ratio) * 0.00625)) / 1.1) ^ 2 |
| 171 | * |
| 172 | * Power = (ratio / p1_ratio) * m * tdp |
| 173 | */ |
| 174 | |
| 175 | m = (110000 - ((p1_ratio - ratio) * 625)) / 11; |
| 176 | m = (m * m) / 1000; |
| 177 | |
| 178 | power = ((ratio * 100000 / p1_ratio) / 100); |
| 179 | power *= (m / 100) * (tdp / 1000); |
| 180 | power /= 1000; |
| 181 | |
| 182 | return (int)power; |
| 183 | } |
| 184 | |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 185 | static void generate_P_state_entries(int core, int cores_per_package) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 186 | { |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 187 | int ratio_min, ratio_max, ratio_turbo, ratio_step; |
| 188 | int coord_type, power_max, power_unit, num_entries; |
| 189 | int ratio, power, clock, clock_max; |
| 190 | msr_t msr; |
| 191 | |
| 192 | /* Determine P-state coordination type from MISC_PWR_MGMT[0] */ |
| 193 | msr = rdmsr(MSR_MISC_PWR_MGMT); |
| 194 | if (msr.lo & MISC_PWR_MGMT_EIST_HW_DIS) |
| 195 | coord_type = SW_ANY; |
| 196 | else |
| 197 | coord_type = HW_ALL; |
| 198 | |
| 199 | /* Get bus ratio limits and calculate clock speeds */ |
| 200 | msr = rdmsr(MSR_PLATFORM_INFO); |
| 201 | ratio_min = (msr.hi >> (40-32)) & 0xff; /* Max Efficiency Ratio */ |
| 202 | |
| 203 | /* Determine if this CPU has configurable TDP */ |
| 204 | if (cpu_config_tdp_levels()) { |
| 205 | /* Set max ratio to nominal TDP ratio */ |
| 206 | msr = rdmsr(MSR_CONFIG_TDP_NOMINAL); |
| 207 | ratio_max = msr.lo & 0xff; |
| 208 | } else { |
| 209 | /* Max Non-Turbo Ratio */ |
| 210 | ratio_max = (msr.lo >> 8) & 0xff; |
| 211 | } |
Angel Pons | ca96549 | 2020-10-28 19:15:36 +0100 | [diff] [blame] | 212 | clock_max = ratio_max * CPU_BCLK; |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 213 | |
| 214 | /* Calculate CPU TDP in mW */ |
| 215 | msr = rdmsr(MSR_PKG_POWER_SKU_UNIT); |
| 216 | power_unit = 2 << ((msr.lo & 0xf) - 1); |
| 217 | msr = rdmsr(MSR_PKG_POWER_SKU); |
| 218 | power_max = ((msr.lo & 0x7fff) / power_unit) * 1000; |
| 219 | |
| 220 | /* Write _PCT indicating use of FFixedHW */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 221 | acpigen_write_empty_PCT(); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 222 | |
| 223 | /* Write _PPC with no limit on supported P-state */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 224 | acpigen_write_PPC_NVS(); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 225 | |
| 226 | /* Write PSD indicating configured coordination type */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 227 | acpigen_write_PSD_package(core, 1, coord_type); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 228 | |
| 229 | /* Add P-state entries in _PSS table */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 230 | acpigen_write_name("_PSS"); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 231 | |
| 232 | /* Determine ratio points */ |
| 233 | ratio_step = PSS_RATIO_STEP; |
| 234 | num_entries = (ratio_max - ratio_min) / ratio_step; |
| 235 | while (num_entries > PSS_MAX_ENTRIES-1) { |
| 236 | ratio_step <<= 1; |
| 237 | num_entries >>= 1; |
| 238 | } |
| 239 | |
| 240 | /* P[T] is Turbo state if enabled */ |
| 241 | if (get_turbo_state() == TURBO_ENABLED) { |
| 242 | /* _PSS package count including Turbo */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 243 | acpigen_write_package(num_entries + 2); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 244 | |
| 245 | msr = rdmsr(MSR_TURBO_RATIO_LIMIT); |
| 246 | ratio_turbo = msr.lo & 0xff; |
| 247 | |
| 248 | /* Add entry for Turbo ratio */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 249 | acpigen_write_PSS_package( |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 250 | clock_max + 1, /*MHz*/ |
| 251 | power_max, /*mW*/ |
| 252 | PSS_LATENCY_TRANSITION, /*lat1*/ |
| 253 | PSS_LATENCY_BUSMASTER, /*lat2*/ |
| 254 | ratio_turbo << 8, /*control*/ |
| 255 | ratio_turbo << 8); /*status*/ |
| 256 | } else { |
| 257 | /* _PSS package count without Turbo */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 258 | acpigen_write_package(num_entries + 1); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | /* First regular entry is max non-turbo ratio */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 262 | acpigen_write_PSS_package( |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 263 | clock_max, /*MHz*/ |
| 264 | power_max, /*mW*/ |
| 265 | PSS_LATENCY_TRANSITION, /*lat1*/ |
| 266 | PSS_LATENCY_BUSMASTER, /*lat2*/ |
| 267 | ratio_max << 8, /*control*/ |
| 268 | ratio_max << 8); /*status*/ |
| 269 | |
| 270 | /* Generate the remaining entries */ |
| 271 | for (ratio = ratio_min + ((num_entries - 1) * ratio_step); |
| 272 | ratio >= ratio_min; ratio -= ratio_step) { |
| 273 | |
| 274 | /* Calculate power at this ratio */ |
| 275 | power = calculate_power(power_max, ratio_max, ratio); |
Angel Pons | ca96549 | 2020-10-28 19:15:36 +0100 | [diff] [blame] | 276 | clock = ratio * CPU_BCLK; |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 277 | |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 278 | acpigen_write_PSS_package( |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 279 | clock, /*MHz*/ |
| 280 | power, /*mW*/ |
| 281 | PSS_LATENCY_TRANSITION, /*lat1*/ |
| 282 | PSS_LATENCY_BUSMASTER, /*lat2*/ |
| 283 | ratio << 8, /*control*/ |
| 284 | ratio << 8); /*status*/ |
| 285 | } |
| 286 | |
| 287 | /* Fix package length */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 288 | acpigen_pop_len(); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 289 | } |
| 290 | |
Furquan Shaikh | 7536a39 | 2020-04-24 21:59:21 -0700 | [diff] [blame] | 291 | void generate_cpu_entries(const struct device *device) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 292 | { |
Duncan Laurie | 1ad5564 | 2013-03-07 14:08:04 -0800 | [diff] [blame] | 293 | int coreID, cpuID, pcontrol_blk = get_pmbase(), plen = 6; |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 294 | int totalcores = dev_count_cpu(); |
| 295 | int cores_per_package = get_cores_per_package(); |
| 296 | int numcpus = totalcores/cores_per_package; |
| 297 | |
| 298 | printk(BIOS_DEBUG, "Found %d CPU(s) with %d core(s) each.\n", |
| 299 | numcpus, cores_per_package); |
| 300 | |
Martin Roth | 9944b28 | 2014-08-11 11:24:55 -0600 | [diff] [blame] | 301 | for (cpuID = 1; cpuID <= numcpus; cpuID++) { |
Lee Leahy | 9d62e7e | 2017-03-15 17:40:50 -0700 | [diff] [blame] | 302 | for (coreID = 1; coreID <= cores_per_package; coreID++) { |
| 303 | if (coreID > 1) { |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 304 | pcontrol_blk = 0; |
| 305 | plen = 0; |
| 306 | } |
| 307 | |
Christian Walter | be3979c | 2019-12-18 15:07:59 +0100 | [diff] [blame] | 308 | /* Generate processor \_SB.CPUx */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 309 | acpigen_write_processor( |
Angel Pons | 2aaf7c0 | 2020-09-24 18:03:18 +0200 | [diff] [blame] | 310 | (cpuID - 1) * cores_per_package+coreID - 1, |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 311 | pcontrol_blk, plen); |
| 312 | |
| 313 | /* Generate P-state tables */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 314 | generate_P_state_entries( |
Angel Pons | 2aaf7c0 | 2020-09-24 18:03:18 +0200 | [diff] [blame] | 315 | coreID - 1, cores_per_package); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 316 | |
| 317 | /* Generate C-state tables */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 318 | generate_C_state_entries(); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 319 | |
| 320 | /* Generate T-state tables */ |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 321 | generate_T_state_entries( |
Angel Pons | 2aaf7c0 | 2020-09-24 18:03:18 +0200 | [diff] [blame] | 322 | cpuID - 1, cores_per_package); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 323 | |
Vladimir Serbinenko | be0fd0a | 2014-11-04 21:10:59 +0100 | [diff] [blame] | 324 | acpigen_pop_len(); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 325 | } |
| 326 | } |
Arthur Heymans | c54d14f | 2018-11-28 12:09:23 +0100 | [diff] [blame] | 327 | |
| 328 | /* PPKG is usually used for thermal management |
| 329 | of the first and only package. */ |
| 330 | acpigen_write_processor_package("PPKG", 0, cores_per_package); |
| 331 | |
| 332 | /* Add a method to notify processor nodes */ |
| 333 | acpigen_write_processor_cnot(cores_per_package); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 334 | } |
| 335 | |
| 336 | struct chip_operations cpu_intel_haswell_ops = { |
| 337 | CHIP_NAME("Intel Haswell CPU") |
| 338 | }; |