| 1 |
|
| 2 |
|
| 3 |
#include <console/console.h> |
| 4 |
#include <acpi/acpi.h> |
| 5 |
#include <acpi/acpigen.h> |
| 6 |
#include <device/device.h> |
| 7 |
#include "i82371eb.h" |
| 8 |
|
| 9 |
static void generate_cpu_entry(int cpu) |
| 10 |
{ |
| 11 |
acpigen_write_processor_device(cpu); |
| 12 |
|
| 13 |
|
| 14 |
acpigen_write_PTC(3, 1, DEFAULT_PMBASE + PCNTRL); |
| 15 |
|
| 16 |
acpigen_write_processor_device_end(); |
| 17 |
} |
| 18 |
|
| 19 |
void generate_cpu_entries(const struct device *device) |
| 20 |
{ |
| 21 |
int cpu; |
| 22 |
int numcpus = dev_count_cpu(); |
| 23 |
|
| 24 |
printk(BIOS_DEBUG, "Found %d CPU(s).\n", numcpus); |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
acpigen_write_scope("\\_SB"); |
| 29 |
|
| 30 |
for (cpu = 0; cpu < numcpus; cpu++) |
| 31 |
generate_cpu_entry(cpu); |
| 32 |
|
| 33 |
acpigen_pop_len(); |
| 34 |
} |