[coreboot] Patch set updated for coreboot: e95a120 Fix SMBIOS generation
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Wed Aug 8 01:13:36 CEST 2012
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1421
-gerrit
commit e95a1204ff37ce65c9a869c206b9895c551f8f0a
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Tue Aug 7 14:50:47 2012 -0700
Fix SMBIOS generation
Dropping mainboard's chip.h broke execution of the mainboard's enable
function and the addition of mainboard specific smbios tables.
The former was fixed by Kyosti in http://review.coreboot.org/1374
This patch fixes the breakage in static.c and also backs out a small
portion of Kyosti's patch (because it's not needed anymore)
Change-Id: I6fdea9cbb8c6041663bd36f68f1cae4b435c1f9b
Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
src/devices/device.c | 4 ++--
src/include/device/device.h | 3 ++-
util/sconfig/main.c | 6 ++++++
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/devices/device.c b/src/devices/device.c
index 344f824..6b1902d 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -923,8 +923,8 @@ void dev_enumerate(void)
printk(BIOS_SPEW, "Compare with tree...\n");
show_devs_tree(root, BIOS_SPEW, 0, 0);
- if (mainboard_ops.enable_dev)
- mainboard_ops.enable_dev(root);
+ if (root->chip_ops && root->chip_ops->enable_dev)
+ root->chip_ops->enable_dev(root);
if (!root->ops || !root->ops->scan_bus) {
printk(BIOS_ERR, "dev_root missing scan_bus operation");
diff --git a/src/include/device/device.h b/src/include/device/device.h
index b44a551..772b737 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -102,7 +102,9 @@ struct device {
ROMSTAGE_CONST struct bus *link_list;
struct device_operations *ops;
+#ifndef __PRE_RAM__
const struct chip_operations *chip_ops;
+#endif
ROMSTAGE_CONST void *chip_info;
};
@@ -171,7 +173,6 @@ void show_all_devs_resources(int debug_level, const char* msg);
#define DEVICE_MEM_ALIGN 4096
extern struct device_operations default_dev_ops_root;
-extern struct chip_operations mainboard_ops;
void pci_domain_read_resources(struct device *dev);
unsigned int pci_domain_scan_bus(struct device *dev, unsigned int max);
unsigned int scan_static_bus(device_t bus, unsigned int max);
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index 82a7491..eb996a7 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -423,6 +423,10 @@ static void pass1(FILE *fil, struct device *ptr)
fprintf(fil, "\t.chip_ops = &%s_ops,\n", ptr->chip->name_underscore);
fprintf(fil, "#endif\n");
fprintf(fil, "\t.chip_info = &%s_info_%d,\n", ptr->chip->name_underscore, ptr->chip->id);
+ } else if (ptr->chip->chip == &mainboard) {
+ fprintf(fil, "#ifndef __PRE_RAM__\n");
+ fprintf(fil, "\t.chip_ops = &%s_ops,\n", ptr->chip->name_underscore);
+ fprintf(fil, "#endif\n");
}
if (ptr->nextdev)
fprintf(fil, "\t.next=&%s\n", ptr->nextdev->name);
@@ -628,6 +632,8 @@ int main(int argc, char** argv) {
"ROMSTAGE_CONST struct device * ROMSTAGE_CONST last_dev = &%s;\n", lastdev->name);
#ifdef MAINBOARDS_HAVE_CHIP_H
fprintf(autogen, "static ROMSTAGE_CONST struct mainboard_config ROMSTAGE_CONST mainboard_info_0;\n");
+#else
+ fprintf(autogen, "extern struct chip_operations mainboard_ops;\n");
#endif
walk_device_tree(autogen, &root, pass1, NULL);
More information about the coreboot
mailing list