diff options
author | Patrick Georgi <patrick.georgi@secunet.com> | 2011-01-13 11:38:46 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2011-01-13 11:38:46 +0000 |
commit | 9144304771be6cc89fcd010a0c8bc123bb750cfc (patch) | |
tree | 1ad3642b709324c910e6fffbb677698c6937b189 /src/devices/oprom/yabel/io.c | |
parent | fe7d6b9a4a784f0b92b3c9dc5b6c6070b4c2e10c (diff) |
Improve compatibility of YABEL with real-world VGABIOSes
Some of them do weird things to the option rom region (mapping
registers there or so) which failed as we handled these memory
region in emulation. As they were copied back to real memory
after the emulation was done, we can just as well use real
memory directly for these regions.
This affects IVT, BDA, and option ROM space.
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Joseph Smith <joe@settoplinux.org>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6251 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/oprom/yabel/io.c')
-rw-r--r-- | src/devices/oprom/yabel/io.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/devices/oprom/yabel/io.c b/src/devices/oprom/yabel/io.c index 88a3570cf4..20340470b0 100644 --- a/src/devices/oprom/yabel/io.c +++ b/src/devices/oprom/yabel/io.c @@ -22,6 +22,7 @@ #ifdef CONFIG_PCI_OPTION_ROM_RUN_YABEL #include <device/pci.h> #include <device/pci_ops.h> +#include <device/resource.h> #endif #ifdef CONFIG_ARCH_X86 @@ -181,7 +182,7 @@ my_inb(X86EMU_pioAddr addr) { u8 rval = 0xFF; unsigned long translated_addr = addr; - u8 translated = biosemu_dev_translate_address(&translated_addr); + u8 translated = biosemu_dev_translate_address(IORESOURCE_IO, &translated_addr); if (translated != 0) { //translation successfull, access Device I/O (BAR or Legacy...) DEBUG_PRINTF_IO("%s(%x): access to Device I/O\n", __func__, @@ -231,7 +232,7 @@ u16 my_inw(X86EMU_pioAddr addr) { unsigned long translated_addr = addr; - u8 translated = biosemu_dev_translate_address(&translated_addr); + u8 translated = biosemu_dev_translate_address(IORESOURCE_IO, &translated_addr); if (translated != 0) { //translation successfull, access Device I/O (BAR or Legacy...) DEBUG_PRINTF_IO("%s(%x): access to Device I/O\n", __func__, @@ -276,7 +277,7 @@ u32 my_inl(X86EMU_pioAddr addr) { unsigned long translated_addr = addr; - u8 translated = biosemu_dev_translate_address(&translated_addr); + u8 translated = biosemu_dev_translate_address(IORESOURCE_IO, &translated_addr); if (translated != 0) { //translation successfull, access Device I/O (BAR or Legacy...) DEBUG_PRINTF_IO("%s(%x): access to Device I/O\n", __func__, @@ -322,7 +323,7 @@ void my_outb(X86EMU_pioAddr addr, u8 val) { unsigned long translated_addr = addr; - u8 translated = biosemu_dev_translate_address(&translated_addr); + u8 translated = biosemu_dev_translate_address(IORESOURCE_IO, &translated_addr); if (translated != 0) { //translation successfull, access Device I/O (BAR or Legacy...) DEBUG_PRINTF_IO("%s(%x, %x): access to Device I/O\n", @@ -354,7 +355,7 @@ void my_outw(X86EMU_pioAddr addr, u16 val) { unsigned long translated_addr = addr; - u8 translated = biosemu_dev_translate_address(&translated_addr); + u8 translated = biosemu_dev_translate_address(IORESOURCE_IO, &translated_addr); if (translated != 0) { //translation successfull, access Device I/O (BAR or Legacy...) DEBUG_PRINTF_IO("%s(%x, %x): access to Device I/O\n", @@ -395,7 +396,7 @@ void my_outl(X86EMU_pioAddr addr, u32 val) { unsigned long translated_addr = addr; - u8 translated = biosemu_dev_translate_address(&translated_addr); + u8 translated = biosemu_dev_translate_address(IORESOURCE_IO, &translated_addr); if (translated != 0) { //translation successfull, access Device I/O (BAR or Legacy...) DEBUG_PRINTF_IO("%s(%x, %x): access to Device I/O\n", |