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>
diff --git a/src/devices/oprom/realmode/x86.c b/src/devices/oprom/realmode/x86.c
index 32d24ec..2e01617 100644
--- a/src/devices/oprom/realmode/x86.c
+++ b/src/devices/oprom/realmode/x86.c
@@ -402,7 +402,7 @@
 	u32 ip;
 	u32 cs;
 	u32 flags;
-	int ret = -1;
+	int ret = 0;
 	struct eregs reg_info;
 
 	ip = cs_ip & 0xffff;
@@ -455,15 +455,17 @@
 	*(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;
 }