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: Add support for DRHD size reporting 2024-06-28 11:27:27 +00:00
acpi_gic.c acpi_gic: Add helper for platform gicc 2024-10-08 08:58:34 +00:00
acpi_hpet.c acpi: add missing device/device.h include 2023-12-07 13:19:47 +00:00
acpi_iort.c acpi: Add IORT helper functions 2024-10-03 20:50:25 +00:00
acpi_pm.c ACPI: Add usb_charge_mode_from_gnvs() 2023-08-16 17:55:02 +00:00
acpi_pptt.c acpi: Add PPTT support 2023-12-02 19:16:26 +00:00
acpigen.c src/acpigen: support 0-initialized buffer in acpigen_write_byte_buffer 2025-03-05 16:44:43 +00:00
acpigen_dptf.c tree: Use <stdio.h> for snprintf 2024-05-29 10:33:54 +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 ChromeOS: Refactor ACPI CNVS generation 2021-12-23 21:18:25 +00:00
acpigen_pci.c acpi: Remove acpigen_write_OSC_pci_domain 2024-05-06 10:48:06 +00:00
acpigen_pci_root_resource_producer.c acpi,soc: use is_domain0 function 2024-07-25 22:54:43 +00:00
acpigen_ps2_keybd.c acpi/acpigen_ps2_keybd: Fix total keymap size calculation 2024-08-06 14:54:59 +00:00
acpigen_usb.c tree: Use <stdio.h> for snprintf 2024-05-29 10:33:54 +00:00
device.c tree: Use <stdio.h> for snprintf 2024-05-29 10:33:54 +00:00
dsdt_top.asl acpi: Enable 64bit ECAM resource 2023-11-27 21:10:41 +00:00
fadt_filler.c ACPI: Add helper fill_fadt_extended_pm_io() 2023-08-08 06:51:03 +00:00
gnvs.c acpi: Remove blank lines before '}' and after '{' 2024-03-30 07:42:12 +00:00
Kconfig acpigen_ps2_keybd: Add Fn key to linux,keymap 2024-04-19 17:22:48 +00:00
Makefile.mk acpi: Add IORT helper functions 2024-10-03 20:50:25 +00:00
pld.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
sata.c acpi/sata.c: Fix Wunterminated-string-initialization error on port_name 2024-09-01 05:34:38 +00:00
soundwire.c acpi/soundwire.[ch]: Fix dpn entry array overrun 2023-09-13 15:26:01 +00:00