coreboot-kgpe-d16/util
Ronald G. Minnich 6ce41c06cc This is transition code for cbfs to implement
cbfs files at fixed addresses.

I call this transitional as the approach I am taking is to add
capability to cbfstool but not change code in a way that will break
existing usages. Later, once we're sure nothing has broken, we can start to 
smooth the edges. 

Right now, fixed address file are only supported via the add command. 

There is one additional command syntax, so, example:
cbfstool add rom romstrap optionrom 0xffffd000

Will add the file to that fix location for a romstrap.

The assumption is that the ROM is based at the end of a 32-bit address
space. As you can see from the code, that assumption can easily be
over-ridden, if we ever need to, with a command option.

Here is one example output result.

rminnich@xcpu2:~/src/bios/coreboot-v2/util/cbfstool$ ./cbfstool x.cbf print
x.cbf: 1024 kB, bootblocksize 32768, romsize 1048576, offset 0x0
Alignment: 16 bytes

Name                           Offset     Type         Size
h                              0x0        optionrom   251
                             0x130      free         917120
h3                             0xdffe0    optionrom    251
                             0xe0110    free         97960

The way this is implemented is pretty simple. I introduce a new
operator, split, that splits an unallocated area into two unallocated
areas. Then, allocation merely becomes a matter of 0, 1, or 2 splits:
0 split -- the free area is the exact fit
1 splits -- need to split some off the front or back
2 splits -- need to split off BOTH the front and back

I think you'll be able to see what I've done. I call this transitional
because, in the end state, we only need one allocate function; for now
I've left two in, to make sure I don't break compatibilty.

Why I like this better than ldscript approach: I like having the
ROMSTRAP located by cbfs, not linker scripts. For one thing, it makes
romstrap visible as a first class object. I think I would have latched
onto a problem I was having much more quickly had I remembered the
ROMSTRAP. It gets lost in the linker scripts.

At this point, we should be able to start removing special ROMSTRAP location 
code from linker scripts. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4351 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-06-08 03:33:57 +00:00
..
ADLO Changes Makefile generation so that recursive "make" calls read 2008-06-08 23:05:24 +00:00
abuild Change the CBFS build process to use coreboot.rom 2009-06-06 07:19:53 +00:00
analysis Rename almost all occurences of LinuxBIOS to coreboot. 2008-01-18 15:08:58 +00:00
buildrom Eliminate various issues brought up by scan-build. 2009-04-21 20:14:31 +00:00
cbfstool This is transition code for cbfs to implement 2009-06-08 03:33:57 +00:00
dump_mmcr small ts5300 update, fix endian problem in dummmcr. 2006-03-18 00:10:29 +00:00
ectool Add 'install' target for ectool (trivial). 2009-04-23 22:22:47 +00:00
flashrom Flashrom is now moved over to its own repository. 2009-04-26 18:17:40 +00:00
getpir Make the getpir output look less crappy and add a license 2009-05-22 18:17:06 +00:00
inteltool mini fix to reliably compile inteltool on darwin, and on Linux both on x86/x86_64. 2009-04-22 23:17:44 +00:00
k8resdump K8 resource dump utility from Rudolf Marek 2007-10-30 01:12:20 +00:00
lbtdump Fix a typo in lbtdump output (trivial). 2008-05-07 19:21:18 +00:00
mkelfImage Add support for high coreboot table to mkelfimage 2009-03-17 15:33:41 +00:00
mptable fix typo 2008-03-15 16:30:39 +00:00
msrtool Add a note that 'modprobe msr' might be required. 2009-04-10 21:05:56 +00:00
newconfig Change the CBFS build process to use coreboot.rom 2009-06-06 07:19:53 +00:00
nrv2b don't ignore return values (trivial) 2009-04-22 12:14:39 +00:00
nvramtool This patch adds "high coreboot table support" to coreboot version 2. 2009-03-17 14:39:36 +00:00
optionlist More compact format for wiki output at 2009-06-02 23:49:00 +00:00
options Revert "CMOS: Add set_option and rework get_option." 2009-06-03 14:19:33 +00:00
resetcf epia-m support 2004-10-06 17:33:54 +00:00
romcc Various fixes to the tree to get coreboot-v2 to build on Solaris 2009-05-26 14:03:51 +00:00
superiotool Fix my last commit. I looked at the wrong dead laptop. 2009-05-07 00:21:02 +00:00
vgabios util/vgabios: build/warning fixes. 2009-05-27 11:39:16 +00:00