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