[coreboot] Patch set updated for coreboot: 1c32d3a Arm architecture support in cbfs.

Ronald G. Minnich (rminnich@gmail.com) gerrit at coreboot.org
Tue Nov 27 01:43:32 CET 2012


Ronald G. Minnich (rminnich at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1917

-gerrit

commit 1c32d3a265c630939385713b486e0c55958bbf12
Author: Ronald G. Minnich <rminnich at gmail.com>
Date:   Mon Nov 26 16:12:38 2012 -0800

    Arm architecture support in cbfs.
    
    Signed-off-by: David Hendricks <dhendrix at chromium.org>
    Signed-off-by: Hung-Te Lin <hungte at chromium.org>
    Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
    
    Change-Id: I7fed081d71c24cf58d59513377224c95cf74779e
    Signed-off-by: Ronald G. Minnich <rminnich at gmail.com>
---
 src/Kconfig             |  9 +++++++++
 src/include/cbfs_core.h | 23 +++++++++++++++++------
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/src/Kconfig b/src/Kconfig
index fadcbc4..a8ae1e9 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -63,6 +63,7 @@ config COMPILER_GCC
 
 config COMPILER_LLVM_CLANG
 	bool "LLVM/clang"
+	depends on ARCH_X86
 	help
 	  Use LLVM/clang to build coreboot.
 
@@ -204,10 +205,18 @@ config ARCH_X86
 	bool
 	default n
 
+config ARCH_ARM
+	bool
+	default n
+
 if ARCH_X86
 source src/arch/x86/Kconfig
 endif
 
+if ARCH_ARM
+source src/arch/armv7/Kconfig
+endif
+
 menu "Chipset"
 
 comment "CPU"
diff --git a/src/include/cbfs_core.h b/src/include/cbfs_core.h
index 43e6b9b..7db4f6a 100644
--- a/src/include/cbfs_core.h
+++ b/src/include/cbfs_core.h
@@ -78,13 +78,19 @@
 
 /** this is the master cbfs header - it need to be
     located somewhere in the bootblock.  Where it
-    actually lives is up to coreboot. A pointer to
-    this header will live at 0xFFFFFFFc, so we can
-    easily find it. */
+    actually lives is up to coreboot. On x86, a
+    pointer to this header will live at 0xFFFFFFFC,
+    so we can easily find it. */
 
 #define CBFS_HEADER_MAGIC  0x4F524243
-#define CBFS_HEADPTR_ADDR 0xFFFFFFFc
+#if CONFIG_ARCH_X86
+#define CBFS_HEADPTR_ADDR 0xFFFFFFFC
+#elif CONFIG_ARCH_ARM
+#define CBFS_HEADPTR_ADDR 0x0000000C
+#endif
 #define VERSION1 0x31313131
+#define VERSION2 0x31313132
+#define VERSION  VERSION2
 
 struct cbfs_header {
 	uint32_t magic;
@@ -93,9 +99,15 @@ struct cbfs_header {
 	uint32_t bootblocksize;
 	uint32_t align;
 	uint32_t offset;
-	uint32_t pad[2];
+	uint32_t architecture;
+	uint32_t pad[1];
 } __attribute__((packed));
 
+// "Legacy" refers to cbfs headers before architecture is defined (i.e., X86).
+#define CBFS_ARCHITECTURE_LEGACY   0xFFFFFFFF
+#define CBFS_ARCHITECTURE_ARM      0x10
+#define CBFS_ARCHITECTURE_X86      0x20
+
 /** This is a component header - every entry in the CBFS
     will have this header.
 
@@ -180,4 +192,3 @@ void *cbfs_find_file(const char *name, int type);
 int cbfs_decompress(int algo, void *src, void *dst, int len);
 struct cbfs_header *get_cbfs_header(void);
 #endif
-




More information about the coreboot mailing list