On 17.03.2009 15:43 Uhr, Kevin O'Connor wrote:
> One suggestion - instead of making the "floating table" be a sub-table
> of a coreboot-table, make it a stand alone data structure.  As it
> stands, I think existing code might get confused when it finds a
> coreboot table without any real data in it.
>   
No worries about that, almost all existing code is fixed up by now.
Also, the existing implementations are not less confused if they don't
find a table at all. The format was designed to be flexible enough to
handle any number of subtables dynamically.

Attached  is the patch against libpayload.

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: [email protected]http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

Add high coreboot table support to libpayload

Signed-off-by: Stefan Reinauer <[email protected]>

Index: include/coreboot_tables.h
===================================================================
--- include/coreboot_tables.h   (revision 1300)
+++ include/coreboot_tables.h   (working copy)
@@ -128,6 +128,14 @@
 #define CB_TAG_CONSOLE_SROM       4
 #define CB_TAG_CONSOLE_EHCI       5
 
+#define CB_TAG_FORWARD       0x00011
+
+struct cb_forward {
+       u32 tag;
+       u32 size;
+       u64 forward;
+};
+
 #define CB_TAG_CMOS_OPTION_TABLE 0x00c8
 struct cb_cmos_option_table {
        u32 tag;
Index: i386/coreboot.c
===================================================================
--- i386/coreboot.c     (revision 1300)
+++ i386/coreboot.c     (working copy)
@@ -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
@@ -125,6 +126,9 @@
 
                /* 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;
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to