diff options
author | David Hendricks <dhendrix@chromium.org> | 2012-11-16 14:48:22 -0800 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-11-30 00:42:31 +0100 |
commit | 90ca3b6bd7d7849898fe2363a9e6d0e002c95943 (patch) | |
tree | be21c4f63d3f01afa0ec98018d83131c4f150f52 /documentation/cbfs.txt | |
parent | 11a20b614e708582ebd7607d39487938f35f2550 (diff) | |
download | coreboot-90ca3b6bd7d7849898fe2363a9e6d0e002c95943.tar.xz |
Add multi-architecture support to cbfstool
This is an initial re-factoring of CBFS code to enable multiple
architectures. To achieve a clean solution, an additional field
describing the architecture has to be added to the master header.
Hence we also increase the version number in the master header.
Change-Id: Icda681673221f8c27efbc46f16c2c5682b16a265
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/1944
Tested-by: build bot (Jenkins)
Diffstat (limited to 'documentation/cbfs.txt')
-rw-r--r-- | documentation/cbfs.txt | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/documentation/cbfs.txt b/documentation/cbfs.txt index 61f9f794e7..4b266f2d77 100644 --- a/documentation/cbfs.txt +++ b/documentation/cbfs.txt @@ -144,11 +144,15 @@ need to read the pointer and do the appropriate math to locate the header. The following is the structure of the master header: struct cbfs_header { - unsigned int magic; - unsigned int size; - unsigned int align; - unsigned int offset; -}; + u32 magic; + u32 version; + u32 romsize; + u32 bootblocksize; + u32 align; + u32 offset; + u32 architecture; + u32 pad[1]; +} __attribute__((packed)); The meaning of each member is as follows: @@ -156,9 +160,14 @@ The meaning of each member is as follows: magic number is 0x4F524243, which is 'ORBC' in ASCII. -'size' is the size of the ROM in bytes. Coreboot will subtract 'size' from +'version' is a version number for CBFS header. cbfs_header structure may be +different if version is not matched. + +'romsize' is the size of the ROM in bytes. Coreboot will subtract 'size' from 0xFFFFFFFF to locate the beginning of the ROM in memory. +'bootblocksize' is the size of bootblock reserved in firmware image. + 'align' is the number of bytes that each component is aligned to within the ROM. This is used to make sure that each component is aligned correctly with @@ -169,6 +178,9 @@ component at runtime without disturbing the others. the ROM). This is to allow for arbitrary space to be left at the beginning of the ROM for things like embedded controller firmware. +'architecture' describes which architecture (x86, arm, ...) this CBFS is created +for. + = Bootblock = The bootblock is a mandatory component in the ROM. It is located in the last |