coreboot-kgpe-d16/src/include
Carl-Daniel Hailfinger 00003ae712 If no pci access method has been set for the device tree so far (e.g.
during early coreboot_ram), pci_{read,write}_config{8,16,32} will die().
This patch changes pci_{read,write}_config{8,16,32} to use the existing
PCI access method autodetection infrastructure instead of die()ing.

Until r4340, any usage of pci_{read,write}_config{8,16,32} in
coreboot_ram before the device tree was set up resulted in either a
silent hang or a NULL pointer dereference. I changed the code in r4340
to die() properly with a loud error message. That still was not perfect,
but at least it allowed people to see why their new ports died.
Still, die() is not something developers like to see, and thus a patch
to automatically pick a sensible default instead of dying was created.
Of course, handling PCI access method selection automatically for
fallback purposes has certain limitations before the device tree is set
up. We only check if conf1 works and use conf2 as fallback. No further
tests are done.

This patch enables cleanups and readability improvements in early
coreboot_ram code:
Without this patch:
dword = pci_cf8_conf1.read32(&pbus, sm_dev->bus->secondary,
        sm_dev->path.pci.devfn, 0x64);
With this patch:
dword = pci_read_config32(sm_dev, 0x64);

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4646 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-09-22 00:09:41 +00:00
..
arch-generic - First stab at getting the ppc ports building and working. 2004-11-18 22:38:08 +00:00
boot This fixes a couple of issues with older Linux kernels (that expect an XSDT as 2009-07-21 21:38:33 +00:00
console Example how simple it is to use printk instead of printk_something in 2009-07-21 21:25:45 +00:00
cpu This patch unifies the use of config options in v2 to all start with CONFIG_ 2009-06-30 15:17:49 +00:00
device If no pci access method has been set for the device tree so far (e.g. 2009-09-22 00:09:41 +00:00
fs FAT big endian changes 2004-03-17 17:03:02 +00:00
part This patch unifies the use of config options in v2 to all start with CONFIG_ 2009-06-30 15:17:49 +00:00
pc80 Rewrite interrupt handling in coreboot to be more comprehensible and 2009-07-21 21:36:41 +00:00
smp - See Issue Tracker id-6 "lnxi-patch-6-replacement" 2005-10-25 21:28:41 +00:00
stream - Initial checkin of the freebios2 tree 2003-04-22 19:02:15 +00:00
assert.h This patch unifies the use of config options in v2 to all start with CONFIG_ 2009-06-30 15:17:49 +00:00
cbfs.h strdup the input of dirname, as dirname is free 2009-07-18 14:20:39 +00:00
delay.h Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-51 2005-07-06 17:17:25 +00:00
ehci.h This is (most of) the usb2 debug console code ripped out of 2007-02-28 11:17:02 +00:00
ip_checksum.h - Initial checkin of the freebios2 tree 2003-04-22 19:02:15 +00:00
sdram_mode.h Uwe Hermann: 2006-08-23 14:28:37 +00:00
spd.h Add definitions for DDR2 SPD registers. 2008-08-28 18:23:58 +00:00
spd_ddr2.h Add VIA CX700 support, plus VIA vt8454c reference board support. 2009-04-17 08:37:18 +00:00
stdlib.h The attached patch adds missing bits to ACPI to make Windows XP and Windows Vista happy. 2008-12-23 17:34:15 +00:00
string.h The file string.h is also included in romcc code, which has no malloc(). 2009-07-19 00:18:15 +00:00
swab.h byte swapping 2004-03-13 03:37:11 +00:00
types.h Some changes required to get yabel working on v2 (and they generally make 2009-03-01 10:16:01 +00:00
uart8250.h added rx support 2004-03-13 03:40:51 +00:00
usb_ch9.h This is (most of) the usb2 debug console code ripped out of 2007-02-28 11:17:02 +00:00
usbdebug_direct.h Some USB debug updates, mostly comments fixing, license header updates 2009-07-21 21:20:45 +00:00
version.h Rename almost all occurences of LinuxBIOS to coreboot. 2008-01-18 15:08:58 +00:00