libpayload: Some more compatibility (for flashrom)
[coreboot.git] / payloads / coreinfo / coreboot_module.c
index e5615b332231aa89c3743a14a4201401ebc11246..c8694f460a8aeb182e09907b74ff32132bae1e9a 100644 (file)
@@ -20,6 +20,8 @@
 #include <coreboot_tables.h>
 #include "coreinfo.h"
 
+#ifdef CONFIG_MODULE_COREBOOT
+
 #define MAX_MEMORY_COUNT 5
 
 static struct {
@@ -201,6 +203,9 @@ static int parse_header(void *addr, int len)
                struct cb_record *rec = (struct cb_record *)ptr;
 
                switch (rec->tag) {
+               case CB_TAG_FORWARD:
+                       return parse_header((void *)(unsigned long)((struct cb_forward *)rec)->forward, 1);
+                       break;
                case CB_TAG_MEMORY:
                        parse_memory(ptr);
                        break;
@@ -252,3 +257,10 @@ struct coreinfo_module coreboot_module = {
        .init = coreboot_module_init,
        .redraw = coreboot_module_redraw,
 };
+
+#else
+
+struct coreinfo_module coreboot_module = {
+};
+
+#endif