summaryrefslogtreecommitdiff
path: root/src/include/adainit.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2020-04-29 00:04:14 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-05-01 06:53:57 +0000
commitc1adeb68a0228a514f68baec89994ec77a1311fe (patch)
treef4dfe3b6208187760c92ce6533cf8f7a20f43d56 /src/include/adainit.h
parent7d18f88c6da0333848ca9ff86fedb1e9e7c4338c (diff)
arch/x86/acpi_device: Allow empty child references
Currently if a child table is created and added to a property list without adding any properties to that child it will generate an empty package. For example: struct acpi_dp *dsd = acpi_dp_new_table("_DSD"); struct acpi_dp *prop = acpi_dp_new_table("PROP"); acpi_dp_add_child(dsd, "dsd-prop", prop); acpi_dp_write(dsd); Results in an empty PROP package: Name (_DSD, Package (2) { ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b") Package (1) { Package (2) { "dsd-prop", "PROP" } } } Name (PROP, Package (0) { } Empty packages don't seem to be explicitly forbidden, but they don't serve a purpose with device properties. Instead, if packages without any properties or children are skipped then this empty package is not written and the added child property can refer to another property that is already defined. This allows creating property references to existing tables, which can save duplication and namespace collision issues with nested properties. BUG=b:146482091 Signed-off-by: Duncan Laurie <dlaurie@google.com> Change-Id: I9fee2ceb8a4496b90c7210533eee8c2b186cdfff Reviewed-on: https://review.coreboot.org/c/coreboot/+/40880 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/include/adainit.h')
0 files changed, 0 insertions, 0 deletions