Trivial update of Config-lab.lb so that it works again.
[coreboot.git] / payloads / libpayload / i386 / coreboot.c
index d27e0f3abbe18055c876c0e9afcee0503e5f8d13..95d8f16f76cef19dd1700ba53bc383b43bf2460e 100644 (file)
@@ -2,6 +2,7 @@
  * This file is part of the libpayload project.
  *
  * Copyright (C) 2008 Advanced Micro Devices, Inc.
+ * Copyright (C) 2009 coresystems GmbH
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,7 +28,7 @@
  * SUCH DAMAGE.
  */
 
-#include <config.h>
+#include <libpayload-config.h>
 #include <libpayload.h>
 #include <coreboot_tables.h>
 
@@ -56,8 +57,10 @@ static void cb_parse_memory(unsigned char *ptr, struct sysinfo_t *info)
                struct cb_memory_range *range =
                    (struct cb_memory_range *)MEM_RANGE_PTR(mem, i);
 
+#if MEMMAP_RAM_ONLY
                if (range->type != CB_MEM_RAM)
                        continue;
+#endif
 
                info->memrange[info->n_memranges].base =
                    UNPACK_CB64(range->start);
@@ -65,6 +68,8 @@ static void cb_parse_memory(unsigned char *ptr, struct sysinfo_t *info)
                info->memrange[info->n_memranges].size =
                    UNPACK_CB64(range->size);
 
+               info->memrange[info->n_memranges].type = range->type;
+
                info->n_memranges++;
        }
 }
@@ -125,6 +130,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
 
                /* We only care about a few tags here (maybe more later). */
                switch (rec->tag) {
+               case CB_TAG_FORWARD:
+                       return cb_parse_header((void *)(unsigned long)((struct cb_forward *)rec)->forward, len, info);
+                       continue;
                case CB_TAG_MEMORY:
                        cb_parse_memory(ptr, info);
                        break;