aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86/acpigen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/acpigen.c')
-rw-r--r--src/arch/x86/acpigen.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c
index 758386d8a8..9637b7de96 100644
--- a/src/arch/x86/acpigen.c
+++ b/src/arch/x86/acpigen.c
@@ -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)