aboutsummaryrefslogtreecommitdiff
path: root/util/x86emu/x86.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-10-25 19:50:47 +0000
committerStefan Reinauer <stepan@openbios.org>2009-10-25 19:50:47 +0000
commit074356ec819be284fb1e8d18a68678b72c5282da (patch)
tree9f92a9da412d3cb8be7958390164fe44d4b7ec16 /util/x86emu/x86.c
parent46a895e633a6b4bd3f4a8391529cc069a8a8d04b (diff)
Option ROM init x86/x86emu update
- use default display in int 15 5f35 - move REALMODE_BASE to 0x600, 0x500 can be BDA - add regparm for assembler functions - use memset instead of own implementation - YABEL: copy back the IVT, BDA and VBIOS. Some Xorg drivers require this. - YABEL: use hardware timer instead of emulated timer, because the emulated timer's base is never initialized (leading to division by zero if the timer is really used) Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4852 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/x86emu/x86.c')
-rw-r--r--util/x86emu/x86.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/util/x86emu/x86.c b/util/x86emu/x86.c
index 5c0422e826..af8bb1c8b2 100644
--- a/util/x86emu/x86.c
+++ b/util/x86emu/x86.c
@@ -29,7 +29,7 @@
#include <console.h>
#endif
-#define REALMODE_BASE ((void *)0x500)
+#define REALMODE_BASE ((void *)0x600)
struct realmode_idt {
u16 offset, cs;
@@ -41,8 +41,8 @@ extern unsigned char __idt_handler, __idt_handler_size;
extern unsigned char __realmode_code, __realmode_code_size;
extern unsigned char __run_optionrom, __run_interrupt;
-void (*run_optionrom)(u32 devfn) = (void *)&__run_optionrom;
-void (*vga_enable_console)(void) = (void *)&__run_interrupt;
+void (*run_optionrom)(u32 devfn) __attribute__((regparm(0))) = (void *)&__run_optionrom;
+void (*vga_enable_console)(void) __attribute__((regparm(0))) = (void *)&__run_interrupt;
int (*intXX_handler[256])(struct eregs *regs) = { NULL };
@@ -127,9 +127,7 @@ void run_bios(struct device *dev, unsigned long addr)
int i;
/* clear vga bios data area */
- for (i = 0x400; i < 0x500; i++) {
- *(unsigned char *) i = 0;
- }
+ memset(0x400, 0, 0x200);
/* Set up C interrupt handlers */
setup_interrupt_handlers();