coreboot-kgpe-d16/src/acpi
Felix Held b57b12f729 acpi/acpigen: factor out acpigen_write_processor_namestring
This functionality is used in multiple places, so factor it out into a
function. Compared to acpigen_write_processor_cnot, the buffer size is
decreased from 40 to 16 bytes, but the format string specified by
CONFIG_ACPI_CPU_STRING results in 9 chars and a NULL byte which will fit
into the buffer without any issue. I've seen the CPU devices being put
into another scope within \_SB, but even in that case that would be 14
chars and a NULL byte whist still fits into the 16 byte buffer. For
acpigen_write_processor and acpigen_write_processor_package this doesn't
change any edge case behavior. In the unrealistic case of the format
string resulting in a longer CPU device string, this would have been a
problem before this patch too.

Also drop the curly braces of the for loop in
acpigen_write_processor_package. This makes the code a bit harder to
read and isn't a very good idea, but with the curly braces in place, the
linter breaks the build :(

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I5d8291a2aaae2011cb185d72c7f7864b6e2220ec
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72452
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-01-28 18:50:10 +00:00
..
Kconfig acpi/Kconfig: improve description of ACPI_CPU_STRING config option 2023-01-28 18:34:58 +00:00
Makefile.inc
acpi.c acpi/acpi.c: Add a method to generate IOAPIC DMAR entries from hw 2022-12-06 17:44:20 +00:00
acpi_pm.c acpi/acpi_pm.c: refactor acpi_pm_state_for_* functions 2022-09-27 14:19:01 +00:00
acpigen.c acpi/acpigen: factor out acpigen_write_processor_namestring 2023-01-28 18:50:10 +00:00
acpigen_dptf.c Revert "drivers/intel/dptf: Add multiple fan support under dptf" 2022-10-20 14:54:09 +00:00
acpigen_dsm.c drivers/usb/acpi: Add USB _DSM method to enable/disable USB LPM per port 2023-01-19 05:58:33 +00:00
acpigen_extern.asl
acpigen_pci.c
acpigen_ps2_keybd.c arch/x86/acpi: Add code for KEY_MENU 2022-02-18 20:18:41 +00:00
acpigen_usb.c ec/google/chromeec: Add retimer handle to Type C conn 2022-05-04 13:15:30 +00:00
device.c acpi: Helper functions to add certain _DSD properties 2022-12-05 14:30:57 +00:00
dsdt_top.asl tree/acpi: Replace constant "Zero" with actual number 2022-12-27 09:06:47 +00:00
gnvs.c lib/hardwaremain.c: Move creating ACPI structs to bootstate hooks 2022-04-27 10:56:47 +00:00
pld.c
sata.c
soundwire.c src: Remove unused <stdbool> 2022-01-19 15:15:50 +00:00