Attention is currently required from: Arthur Heymans. Hello Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/59313
to review the following change.
Change subject: util/sconfig: Expose apic devices ......................................................................
util/sconfig: Expose apic devices
Expose apic devices in static.c such that fake 0xACAC lapics are not needed in most cases.
Change-Id: I800f089998f4a9be2216ed997cec5cedeb63f3db Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/include/device/device.h M util/sconfig/main.c 2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/59313/1
diff --git a/src/include/device/device.h b/src/include/device/device.h index 237d836..d582ed0 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -391,6 +391,7 @@ * Returns pointer to config structure of root device (B:D:F = 0:00:0) defined by * sconfig in static.{h/c}. */ +#define config_of_lapic() __apic_0000_0 #define config_of_soc() __pci_0_00_0_config
void enable_static_device(struct device *dev); diff --git a/util/sconfig/main.c b/util/sconfig/main.c index 1de98d4..94292b8 100644 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -1361,6 +1361,13 @@ ptr->path_a, ptr->path_b, ptr->name); }
+ if (ptr->bustype == APIC) { + fprintf(head, "extern DEVTREE_CONST struct device *const __apic_%04x_%d;\n", + ptr->path_a, ptr->path_b); + fprintf(fil, "DEVTREE_CONST struct device *const __apic_%04x_%d = &%s;\n", + ptr->path_a, ptr->path_b, ptr->name); + } + if (ptr->alias) { fprintf(head, "extern DEVTREE_CONST struct device *const %s_ptr;\n", ptr->name); fprintf(fil, "DEVTREE_CONST struct device *const %s_ptr = &%s;\n",