Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40880 )
Change subject: arch/x86/acpi_device: Allow empty child references
......................................................................
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(a)google.com>
Change-Id: I9fee2ceb8a4496b90c7210533eee8c2b186cdfff
---
M src/arch/x86/acpi_device.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/40880/1
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c
index b4016ef..f3ee1e7 100644
--- a/src/arch/x86/acpi_device.c
+++ b/src/arch/x86/acpi_device.c
@@ -665,7 +665,7 @@
char *dp_count, *prop_count = NULL;
int child_count = 0;
- if (!table || table->type != ACPI_DP_TYPE_TABLE)
+ if (!table || table->type != ACPI_DP_TYPE_TABLE || !table->next)
return;
/* Name (name) */
--
To view, visit https://review.coreboot.org/c/coreboot/+/40880
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9fee2ceb8a4496b90c7210533eee8c2b186cdfff
Gerrit-Change-Number: 40880
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-MessageType: newchange
Hello build bot (Jenkins), Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40625
to look at the new patch set (#7).
Change subject: [WIP] skl: PEG for Optimus
......................................................................
[WIP] skl: PEG for Optimus
Creates PEG ACPI device for Optimus.
Optimus is not working (dGPU does not appear in the OS; perhaps an issue
with optimus_mb.asl - implementation of dGPU power functions).
Change-Id: I107bd5f7c192b8ffc83de6d8f1ac314bb5dcbfbd
Signed-off-by: Benjamin Doron <benjamin.doron00(a)gmail.com>
---
A src/soc/intel/skylake/acpi/peg.asl
M src/soc/intel/skylake/acpi/systemagent.asl
2 files changed, 158 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/40625/7
--
To view, visit https://review.coreboot.org/c/coreboot/+/40625
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I107bd5f7c192b8ffc83de6d8f1ac314bb5dcbfbd
Gerrit-Change-Number: 40625
Gerrit-PatchSet: 7
Gerrit-Owner: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset