arch/x86/acpigen: Add function to write a CPU package
Emits a list of CPU cores, e.g. Name (PPKG, Package (2) { \_PR.CP00, \_PR.CP01 }) Tested on Lenovo Thinkpad T500. Change-Id: I10e9ebad84343d1fb282b3fbb28f5f014f664f14 Signed-off-by: Nico Huber <nico.h@gmx.de> Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/21324 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Patrick Rudolph
parent
b2b2015be0
commit
4d211ac08d
@@ -353,6 +353,22 @@ void acpigen_write_processor(u8 cpuindex, u32 pblock_addr, u8 pblock_len)
|
||||
acpigen_emit_byte(pblock_len);
|
||||
}
|
||||
|
||||
void acpigen_write_processor_package(const char *const name,
|
||||
const unsigned int first_core,
|
||||
const unsigned int core_count)
|
||||
{
|
||||
unsigned int i;
|
||||
char pscope[16];
|
||||
|
||||
acpigen_write_name(name);
|
||||
acpigen_write_package(core_count);
|
||||
for (i = first_core; i < first_core + core_count; ++i) {
|
||||
snprintf(pscope, sizeof(pscope), CONFIG_ACPI_CPU_STRING, i);
|
||||
acpigen_emit_namestring(pscope);
|
||||
}
|
||||
acpigen_pop_len();
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate ACPI AML code for OperationRegion
|
||||
* Arg0: Pointer to struct opregion opreg = OPREGION(rname, space, offset, len)
|
||||
|
@@ -219,6 +219,9 @@ typedef enum { CSD_HW_ALL = 0xfe } CSD_coord;
|
||||
void acpigen_write_CSD_package(u32 domain, u32 numprocs, CSD_coord coordtype,
|
||||
u32 index);
|
||||
void acpigen_write_processor(u8 cpuindex, u32 pblock_addr, u8 pblock_len);
|
||||
void acpigen_write_processor_package(const char *name,
|
||||
unsigned int first_core,
|
||||
unsigned int core_count);
|
||||
void acpigen_write_TSS_package(int entries, acpi_tstate_t *tstate_list);
|
||||
void acpigen_write_TSD_package(u32 domain, u32 numprocs, PSD_coord coordtype);
|
||||
void acpigen_write_mem32fixed(int readwrite, u32 base, u32 size);
|
||||
|
Reference in New Issue
Block a user