diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2018-11-28 13:18:57 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-11-29 12:19:31 +0000 |
commit | 8f05527485776aab00115cfcb627c5eeb6debcde (patch) | |
tree | 0412937a9227802f36c2c5cee17a0a736a0705a0 /src/arch/x86/acpigen.c | |
parent | 6df3b64c77a868ab8526b980561ed2be3fe392b6 (diff) |
arch/x86/acpigen.c: Add a method to notify all CPU cores
Change-Id: If8b07fdcec51c344a82309d4af3b6127ad758baf
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/29895
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/arch/x86/acpigen.c')
-rw-r--r-- | src/arch/x86/acpigen.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c index 426a5426b7..290893d719 100644 --- a/src/arch/x86/acpigen.c +++ b/src/arch/x86/acpigen.c @@ -369,6 +369,23 @@ void acpigen_write_processor_package(const char *const name, acpigen_pop_len(); } +/* Method to notify all CPU cores */ +void acpigen_write_processor_cnot(const unsigned int number_of_cores) +{ + int core_id; + + acpigen_write_method("\\_PR.CNOT", 1); + for (core_id = 0; core_id < number_of_cores; core_id++) { + char buffer[DEVICE_PATH_MAX]; + snprintf(buffer, sizeof(buffer), CONFIG_ACPI_CPU_STRING, + core_id); + acpigen_emit_byte(NOTIFY_OP); + acpigen_emit_namestring(buffer); + acpigen_emit_byte(ARG0_OP); + } + acpigen_pop_len(); +} + /* * Generate ACPI AML code for OperationRegion * Arg0: Pointer to struct opregion opreg = OPREGION(rname, space, offset, len) |