diff options
author | Patrick Georgi <patrick.georgi@secunet.com> | 2012-11-22 10:48:18 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-11-24 20:06:24 +0100 |
commit | 503af721a1f2c831fb360d1c1b2af38e0866fc35 (patch) | |
tree | 9dc68c4b43e29ce22d66247f0c2bafcbce5a4fe7 /src/devices/oprom/realmode/x86.c | |
parent | 3e77eb6d1e0a3ff9c0a32504a5221dc57b10506c (diff) | |
download | coreboot-503af721a1f2c831fb360d1c1b2af38e0866fc35.tar.xz |
x86 realmode: Adapt to x86emu/YABEL style return codes
realmode int handlers must return the same codes as the YABEL
int handlers now: 1 for "interrupt handled", 0 for "not handled"
(ie. error).
Change-Id: Idc01cf64e2c97150fc4643671a0bc4cca2ae6668
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/1890
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/devices/oprom/realmode/x86.c')
-rw-r--r-- | src/devices/oprom/realmode/x86.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/devices/oprom/realmode/x86.c b/src/devices/oprom/realmode/x86.c index 32d24ec1c3..2e016176f9 100644 --- a/src/devices/oprom/realmode/x86.c +++ b/src/devices/oprom/realmode/x86.c @@ -402,7 +402,7 @@ int __attribute__((regparm(0))) interrupt_handler(u32 intnumber, u32 ip; u32 cs; u32 flags; - int ret = -1; + int ret = 0; struct eregs reg_info; ip = cs_ip & 0xffff; @@ -455,15 +455,17 @@ int __attribute__((regparm(0))) interrupt_handler(u32 intnumber, *(volatile u32 *)&edi = reg_info.edi; flags = reg_info.eflags; - /* Pass errors back to our caller via the CARRY flag */ + /* Pass success or error back to our caller via the CARRY flag */ if (ret) { + flags &= ~1; // no error: clear carry + }else{ printk(BIOS_DEBUG,"int%02x call returned error.\n", intnumber); flags |= 1; // error: set carry - }else{ - flags &= ~1; // no error: clear carry } *(volatile u16 *)&stackflags = flags; + /* The assembler code doesn't actually care for the return value, + * but keep it around so its expectations are met */ return ret; } |