coreboot/src/acpi
Felix Held 7437c16c27 src/acpigen: support 0-initialized buffer in acpigen_write_byte_buffer
Previously, the 'acpigen_write_byte_buffer' function required both the
byte buffer length and the initialization data byte array 'arr'. The
ACPI spec however allows buffer declarations with only the length, but
without an initialization data byte array. In this case the AML
interpreter will create a buffer of the given length with all bytes
initialized to 0x00. In order to not need another function, allow the
'arr' parameter for the pointer to the initialization data byte array to
be NULL and in that case don't write the optional buffer initialization
byte array.

TEST=Calling 'acpigen_write_byte_buffer' with 'NULL' as first parameter
results in the AML code sequence being written which decompiles to ASL
as expected.

Change-Id: Ie756489e02f994c38d38907a97fb215d30f4a636
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86631
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-05 16:44:43 +00:00
..
acpi.c acpi: Fix incorrect TPM2 table generation for CRB_TPM 2025-02-25 09:03:43 +00:00
acpi_apic.c arch/x86: Enable support for IOAPIC devices 2024-12-06 20:57:44 +00:00
acpi_dmar.c
acpi_gic.c acpi_gic: Add helper for platform gicc 2024-10-08 08:58:34 +00:00
acpi_hpet.c
acpi_iort.c acpi: Add IORT helper functions 2024-10-03 20:50:25 +00:00
acpi_pm.c
acpi_pptt.c
acpigen.c src/acpigen: support 0-initialized buffer in acpigen_write_byte_buffer 2025-03-05 16:44:43 +00:00
acpigen_dptf.c
acpigen_dsm.c
acpigen_extern.asl
acpigen_pci.c
acpigen_pci_root_resource_producer.c
acpigen_ps2_keybd.c
acpigen_usb.c
device.c
dsdt_top.asl
fadt_filler.c
gnvs.c
Kconfig
Makefile.mk acpi: Add IORT helper functions 2024-10-03 20:50:25 +00:00
pld.c
sata.c
soundwire.c