1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
5 #include <acpi/acpigen.h>
6 #include <device/device.h>
9 static void generate_cpu_entry(int cpu
)
11 acpigen_write_processor_device(cpu
);
13 /* bit 1:3 in PCNTRL reg (pmbase+0x10) */
14 acpigen_write_PTC(3, 1, DEFAULT_PMBASE
+ PCNTRL
);
16 acpigen_write_processor_device_end();
19 void generate_cpu_entries(const struct device
*device
)
22 int numcpus
= dev_count_cpu();
24 printk(BIOS_DEBUG
, "Found %d CPU(s).\n", numcpus
);
26 /* without the outer scope, further ssdt addition will end up
27 * within the processor statement */
28 acpigen_write_scope("\\_SB");
30 for (cpu
= 0; cpu
< numcpus
; cpu
++)
31 generate_cpu_entry(cpu
);