diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2010-02-22 04:33:13 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-02-22 04:33:13 +0000 |
commit | d650e9934ff8da9b9cb69e42e642c0ee6d390bf6 (patch) | |
tree | 8c6982efa868e828c21d4d427d2678e7e0804668 /util/x86emu/yabel/io.c | |
parent | 30b90fe4f0b31aa6676f507d3913579453942ba8 (diff) |
YABEL update
- drop x86emu + old biosemu in favor of YABEL
- Add YABEL_DIRECTHW to get the old biosemu behavior
- add support for vesa console using YABEL
- add coreboot table entry with console information
- add bootsplash support (reads /bootsplash.jpg from CBFS)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Pattrick Hueper <phueper@hueper.net>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5135 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/x86emu/yabel/io.c')
-rw-r--r-- | util/x86emu/yabel/io.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/util/x86emu/yabel/io.c b/util/x86emu/yabel/io.c index fd205e4dd6..9bb2df4960 100644 --- a/util/x86emu/yabel/io.c +++ b/util/x86emu/yabel/io.c @@ -80,6 +80,76 @@ inl(u16 port) return 0; } #endif + +#if defined(CONFIG_YABEL_DIRECTHW) && (CONFIG_YABEL_DIRECTHW == 1) +u8 my_inb(X86EMU_pioAddr addr) +{ + u8 val; + + val = inb(addr); +#ifdef CONFIG_DEBUG + if ((debug_flags & DEBUG_IO) && (addr != 0x40)) + printk("inb(0x%04x) = 0x%02x\n", addr, val); +#endif + + return val; +} + +u16 my_inw(X86EMU_pioAddr addr) +{ + u16 val; + + val = inw(addr); + +#ifdef CONFIG_DEBUG + if (debug_flags & DEBUG_IO) + printk("inw(0x%04x) = 0x%04x\n", addr, val); +#endif + return val; +} + +u32 my_inl(X86EMU_pioAddr addr) +{ + u32 val; + + val = inl(addr); + +#ifdef CONFIG_DEBUG + if (debug_flags & DEBUG_IO) + printk("inl(0x%04x) = 0x%08x\n", addr, val); +#endif + return val; +} + +void my_outb(X86EMU_pioAddr addr, u8 val) +{ +#ifdef CONFIG_DEBUG + if ((debug_flags & DEBUG_IO) && (addr != 0x43)) + printk("outb(0x%02x, 0x%04x)\n", val, addr); +#endif + outb(val, addr); +} + +void my_outw(X86EMU_pioAddr addr, u16 val) +{ +#ifdef CONFIG_DEBUG + if (debug_flags & DEBUG_IO) + printk("outw(0x%04x, 0x%04x)\n", val, addr); +#endif + outw(val, addr); +} + +void my_outl(X86EMU_pioAddr addr, u32 val) +{ +#ifdef CONFIG_DEBUG + if (debug_flags & DEBUG_IO) + printk("outl(0x%08x, 0x%04x)\n", val, addr); +#endif + outl(val, addr); +} + +#else + u32 pci_cfg_read(X86EMU_pioAddr addr, u8 size); void pci_cfg_write(X86EMU_pioAddr addr, u32 val, u8 size); u8 handle_port_61h(void); @@ -479,3 +549,4 @@ handle_port_61h(void) //finally read the value from the io_buffer return *((u8 *) (bios_device.io_buffer + 0x61)); } +#endif |