diff options
author | Patrick Georgi <patrick.georgi@secunet.com> | 2012-11-22 12:46:12 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-11-24 20:11:46 +0100 |
commit | 199b09cb7a3c590ccbf8d705c98cfde101378f20 (patch) | |
tree | 058511a1a638aa892c836a584633e155aaf0ebe6 /src/mainboard/technexion/tim5690/vgabios.c | |
parent | 503af721a1f2c831fb360d1c1b2af38e0866fc35 (diff) |
x86 realmode: Use x86emu register file + defines
By using the (global) register file as defined by x86emu,
we can use the same register access for YABEL and realmode
interrupt handlers.
- the x86 realmode interrupt handlers changed in signature
- to access registers, use X86_$REGNAME now (eg. X86_EAX)
- x86_exception_handler still uses struct eregs *regs to
avoid spilling the x86emu register file stuff everywhere
Coccinelle script that handled most of this commit:
@ inthandler @
identifier FUNC, regs;
@@
int FUNC(
-struct eregs *regs
+void
)
{ ... }
@ depends on inthandler @
identifier regs;
@@
-regs->eax
+X86_EAX
@ depends on inthandler @
identifier regs;
@@
-regs->ebx
+X86_EBX
@ depends on inthandler @
identifier regs;
@@
-regs->ecx
+X86_ECX
@ depends on inthandler @
identifier regs;
@@
-regs->edx
+X86_EDX
@ depends on inthandler @
identifier regs;
@@
-regs->esi
+X86_ESI
@ depends on inthandler @
identifier regs;
@@
-regs->edi
+X86_EDI
@ depends on inthandler @
identifier regs;
@@
-regs->eflags
+X86_EFLAGS
@ depends on inthandler @
identifier regs;
@@
-regs->vector
+M.x86.intno
Change-Id: I60cc2c36646fe4b7f97457b1e297e3df086daa36
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/1891
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/technexion/tim5690/vgabios.c')
-rw-r--r-- | src/mainboard/technexion/tim5690/vgabios.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mainboard/technexion/tim5690/vgabios.c b/src/mainboard/technexion/tim5690/vgabios.c index 6c9b45e639..46a9b58441 100644 --- a/src/mainboard/technexion/tim5690/vgabios.c +++ b/src/mainboard/technexion/tim5690/vgabios.c @@ -24,9 +24,10 @@ #include <console/console.h> #include <arch/interrupt.h> #include "vgabios.h" +#include <x86emu/regs.h> -int tim5690_int15_handler(struct eregs *regs); +int tim5690_int15_handler(void); static rs690_vbios_regs vbios_regs_local; @@ -38,30 +39,30 @@ static void vbios_fun_init(rs690_vbios_regs *vbios_regs) } /* BIOS int15 function */ -int tim5690_int15_handler(struct eregs *regs) +int tim5690_int15_handler(void) { int res = 0; printk(BIOS_DEBUG, "tim5690_int15_handler\n"); - switch (regs->eax & 0xffff) { + switch (X86_EAX & 0xffff) { case AMD_RS690_INT15: - switch (regs->ebx & 0xff) { + switch (X86_EBX & 0xff) { case 0x00: - regs->eax &= ~(0xff); - regs->ebx = (regs->ebx & ~(0xff)) | vbios_regs_local.int15_regs.fun00_panel_id; + X86_EAX &= ~(0xff); + X86_EBX = (X86_EBX & ~(0xff)) | vbios_regs_local.int15_regs.fun00_panel_id; res = 1; break; case 0x05: - regs->eax &= ~(0xff); - regs->ebx = (regs->ebx & ~(0xff)) | vbios_regs_local.int15_regs.fun05_tv_standard; + X86_EAX &= ~(0xff); + X86_EBX = (X86_EBX & ~(0xff)) | vbios_regs_local.int15_regs.fun05_tv_standard; res = 1; break; } break; default: printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", - regs->eax & 0xffff); + X86_EAX & 0xffff); break; } |