- Factoring of auto.c

- Implementation of fallback/normal support for the amd solo board
- Minor bugfix in romcc


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@867 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Eric Biederman
2003-06-11 21:55:00 +00:00
parent c927b022c2
commit 05f26fcb57
13 changed files with 1822 additions and 1629 deletions

View File

@@ -53,6 +53,9 @@ static void wrmsr(unsigned long index, msr_t msr)
(((FN) & 0x07) << 8) | \
((WHERE) & 0xFF))
#define PCI_ID(VENDOR_ID, DEVICE_ID) \
((((DEVICE_ID) & 0xFFFF) << 16) | ((VENDOR_ID) & 0xFFFF))
static unsigned char pci_read_config8(unsigned addr)
{
outl(0x80000000 | (addr & ~3), 0xCF8);
@@ -88,3 +91,16 @@ static void pci_write_config32(unsigned addr, unsigned int value)
outl(0x80000000 | (addr & ~3), 0xCF8);
outl(value, 0xCFC);
}
static unsigned pci_locate_device(unsigned pci_id, unsigned addr)
{
addr &= ~0xff;
for(; addr <= PCI_ADDR(255, 31, 7, 0); addr += PCI_ADDR(0,0,1,0)) {
unsigned int id;
id = pci_read_config32(addr);
if (id == pci_id) {
return addr;
}
}
return ~0U;
}

View File

@@ -136,3 +136,12 @@ static void console_init(void)
" starting...\r\n";
print_info(console_test);
}
static void die(const char *str)
{
print_emerg(str);
do {
hlt();
} while(1);
}