diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-01-24 19:31:00 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-01-28 18:50:10 +0000 |
commit | b57b12f729947c83515b96e45885b69d73027d79 (patch) | |
tree | 7a51066bdaf0142f4c60277f45e7f8da588c7a3a /src/soc/intel/alderlake/lockdown.c | |
parent | 2fc2758e51d844b6759759b2d6931717ab9f7ca2 (diff) |
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>
Diffstat (limited to 'src/soc/intel/alderlake/lockdown.c')
0 files changed, 0 insertions, 0 deletions