coreboot-kgpe-d16/util
Stefan Reinauer 57879c9bd1 Make the device tree available in the rom stage
We thought about two ways to do this change. The way we decided to try
was to
1. drop all ops from devices in romstage
2. constify all devices in romstage (make them read-only) so we can
   compile static.c into romstage
3. the device tree "devices" can be used to read configuration from
   the device tree (and nothing else, really)
4. the device tree devices are accessed through struct device * in
   romstage only. device_t stays the typedef to int in romstage
5. Use the same static.c file in ramstage and romstage

We declare structs as follows:
ROMSTAGE_CONST struct bus dev_root_links[];
ROMSTAGE_CONST is const in romstage and empty in ramstage; This
forces all of the device tree into the text area.

So a struct looks like this:
static ROMSTAGE_CONST struct device _dev21 = {
 #ifndef __PRE_RAM__
        .ops = 0,
 #endif
        .bus = &_dev7_links[0],
        .path = {.type=DEVICE_PATH_PCI,{.pci={ .devfn = PCI_DEVFN(0x1c,3)}}},
        .enabled = 0,
        .on_mainboard = 1,
        .subsystem_vendor = 0x1ae0,
        .subsystem_device = 0xc000,
        .link_list = NULL,
        .sibling = &_dev22,
 #ifndef __PRE_RAM__
        .chip_ops = &southbridge_intel_bd82x6x_ops,
 #endif
        .chip_info = &southbridge_intel_bd82x6x_info_10,
        .next=&_dev22
};

Change-Id: I722454d8d3c40baf7df989f5a6891f6ba7db5727
Signed-off-by: Ronald G. Minnich <rminnich@chromium.org>
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/1398
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2012-08-04 18:05:39 +02:00
..
abuild Improve parsing of --cpu parameter in abuild script. 2012-06-04 16:19:45 +02:00
acpi Remove whitespace. 2012-02-17 19:04:31 +01:00
amdtools Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
cbfstool cbfstool: signed vs. unsigned fixes 2012-07-18 00:15:35 +02:00
cbmem Revamp cbmem.py to use the coreboot tables. 2012-03-30 17:46:26 +02:00
crossgcc crossgcc: Test for m4 and bison 2012-05-14 18:33:41 +02:00
dumpmmcr dumpmmcr: Fix compilation warnings in printf 2012-01-26 09:57:56 +01:00
ectool ectool: Allow build under Cygwin 2012-04-28 02:46:54 +02:00
genprof Add support utils for tracing 2011-09-07 01:27:57 +02:00
getpir Cut the crap. 2010-09-21 21:16:27 +00:00
gitconfig gitconfig: Improve commit-msg hook 2012-03-25 20:20:41 +02:00
i915tool Add a tool to work on i915 hardware in user mode 2012-05-08 00:40:36 +02:00
ifdtool ifdtool: Use perror for file write errors 2012-07-24 10:13:33 +02:00
inteltool inteltool: Add support for H65 Express chipset 2012-07-21 16:06:41 +02:00
k8resdump add license headers to some trivial files and pc87427.h 2010-12-17 00:13:54 +00:00
kconfig kconfig: Fix 'make gconfig'. 2012-04-13 10:51:40 +02:00
lbtdump Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
lint Make the device tree available in the rom stage 2012-08-04 18:05:39 +02:00
mkelfImage mkelfimage: pkgdata directory created but never used 2012-07-09 22:18:37 +02:00
mptable mptable: realign comments with code 2012-06-20 12:46:55 +02:00
msrtool msrtool: Factor out cpuid() from target probe functions into main() 2012-07-21 17:35:46 +02:00
nrv2b Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
nvramtool nvramtool: use C99 PRIx64 / PRId64 for uint64_t variables 2012-05-25 08:01:37 +02:00
optionlist Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
resetcf Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
romcc ROMCC: fix unused attribute lookup 2012-06-22 09:19:37 +02:00
sconfig Make the device tree available in the rom stage 2012-08-04 18:05:39 +02:00
superiotool superiotool: Dump data registers for Nuvoton chips 2012-07-12 08:13:21 +02:00
vgabios Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
xcompile Update xcompile to search for x86_64 toolchain. 2012-03-31 12:49:45 +02:00