Files
system76-coreboot/src/southbridge/intel/i82371eb/acpi_tables.c
Kyösti Mälkki 5fc0afbc17 asus/p2b, emu/qemu-i440fx: Use acpigen_write_processor_device()
FADT duty_width/duty_offset fields, together with P_CNT (previously
P_BLK) IO address are provided with _PTC entry.

FADT p_lvl2/3_lat fields had values that disabled C2/C3 state
transitions so _CST entries are not required.

Change-Id: I629cd0793f6a64e955e197400efaa7d9d898e775
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74440
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-04-29 02:36:27 +00:00

35 lines
764 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
#include <acpi/acpi.h>
#include <acpi/acpigen.h>
#include <device/device.h>
#include "i82371eb.h"
static void generate_cpu_entry(int cpu)
{
acpigen_write_processor_device(cpu);
/* bit 1:3 in PCNTRL reg (pmbase+0x10) */
acpigen_write_PTC(3, 1, DEFAULT_PMBASE + PCNTRL);
acpigen_write_processor_device_end();
}
void generate_cpu_entries(const struct device *device)
{
int cpu;
int numcpus = dev_count_cpu();
printk(BIOS_DEBUG, "Found %d CPU(s).\n", numcpus);
/* without the outer scope, further ssdt addition will end up
* within the processor statement */
acpigen_write_scope("\\_SB");
for (cpu = 0; cpu < numcpus; cpu++)
generate_cpu_entry(cpu);
acpigen_pop_len();
}