diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
commit | beb116954b9b7f3bb56412b2494b562f02b864b1 (patch) | |
tree | 120e997879884e1b9d93b265221b939d2ef1ade1 /arch/i386/kernel/bios32.c | |
parent | 908d4681a1dc3792ecafbe64265783a86c4cccb6 (diff) |
Import of Linux/MIPS 2.1.14
Diffstat (limited to 'arch/i386/kernel/bios32.c')
-rw-r--r-- | arch/i386/kernel/bios32.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/arch/i386/kernel/bios32.c b/arch/i386/kernel/bios32.c index 8cc3d76fa..a1b49a3ae 100644 --- a/arch/i386/kernel/bios32.c +++ b/arch/i386/kernel/bios32.c @@ -55,6 +55,7 @@ #include <linux/bios32.h> #include <linux/pci.h> +#include <asm/page.h> #include <asm/segment.h> #define PCIBIOS_PCI_FUNCTION_ID 0xb1XX @@ -164,7 +165,7 @@ extern unsigned long check_pcibios(unsigned long memory_start, unsigned long mem int pack; if ((pcibios_entry = bios32_service(PCI_SERVICE))) { - pci_indirect.address = pcibios_entry; + pci_indirect.address = pcibios_entry | PAGE_OFFSET; __asm__("lcall (%%edi)\n\t" "jc 1f\n\t" @@ -363,7 +364,7 @@ int pcibios_write_config_dword (unsigned char bus, return (int) (ret & 0xff00) >> 8; } -char *pcibios_strerror (int error) +const char *pcibios_strerror (int error) { static char buf[80]; @@ -383,6 +384,12 @@ char *pcibios_strerror (int error) case PCIBIOS_BAD_REGISTER_NUMBER: return "BAD_REGISTER_NUMBER"; + case PCIBIOS_SET_FAILED: + return "SET_FAILED"; + + case PCIBIOS_BUFFER_TOO_SMALL: + return "BUFFER_TOO_SMALL"; + default: sprintf (buf, "UNKNOWN RETURN 0x%x", error); return buf; @@ -411,7 +418,9 @@ unsigned long pcibios_init(unsigned long memory_start, unsigned long memory_end) * */ - for (check = (union bios32 *) 0xe0000; check <= (union bios32 *) 0xffff0; ++check) { + for (check = (union bios32 *) __va(0xe0000); + check <= (union bios32 *) __va(0xffff0); + ++check) { if (check->fields.signature != BIOS32_SIGNATURE) continue; length = check->fields.length * 16; @@ -432,17 +441,10 @@ unsigned long pcibios_init(unsigned long memory_start, unsigned long memory_end) if (check->fields.entry >= 0x100000) { printk("pcibios_init: entry in high memory, unable to access\n"); } else { - bios32_indirect.address = bios32_entry = check->fields.entry; + bios32_entry = check->fields.entry; printk ("pcibios_init : BIOS32 Service Directory entry at 0x%lx\n", bios32_entry); + bios32_indirect.address = bios32_entry + PAGE_OFFSET; } - } else { - printk ("pcibios_init : multiple entries, mail drew@colorado.edu\n"); - /* - * Jeremy Fitzhardinge reports at least one PCI BIOS - * with two different service directories, and as both - * worked for him, we'll just mention the fact, and - * not actually disallow it.. - */ } } #ifdef CONFIG_PCI @@ -452,6 +454,3 @@ unsigned long pcibios_init(unsigned long memory_start, unsigned long memory_end) #endif return memory_start; } - - - |