summaryrefslogtreecommitdiff
path: root/src/mainboard/samsung
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2012-11-22 10:48:18 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-11-24 20:06:24 +0100
commit503af721a1f2c831fb360d1c1b2af38e0866fc35 (patch)
tree9dc68c4b43e29ce22d66247f0c2bafcbce5a4fe7 /src/mainboard/samsung
parent3e77eb6d1e0a3ff9c0a32504a5221dc57b10506c (diff)
downloadcoreboot-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/mainboard/samsung')
-rw-r--r--src/mainboard/samsung/lumpy/mainboard.c18
-rw-r--r--src/mainboard/samsung/stumpy/mainboard.c18
2 files changed, 18 insertions, 18 deletions
diff --git a/src/mainboard/samsung/lumpy/mainboard.c b/src/mainboard/samsung/lumpy/mainboard.c
index a8b8b3a47e..3408248c96 100644
--- a/src/mainboard/samsung/lumpy/mainboard.c
+++ b/src/mainboard/samsung/lumpy/mainboard.c
@@ -52,7 +52,7 @@ void mainboard_suspend_resume(void)
#if defined(CONFIG_PCI_OPTION_ROM_RUN_REALMODE) && CONFIG_PCI_OPTION_ROM_RUN_REALMODE
static int int15_handler(struct eregs *regs)
{
- int res=-1;
+ int res=0;
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
__func__, regs->eax & 0xffff);
@@ -70,7 +70,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffffff00;
regs->ecx |= 0x00;
- res = 0;
+ res = 1;
break;
case 0x5f35:
/*
@@ -88,7 +88,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0000;
- res = 0;
+ res = 1;
break;
case 0x5f51:
/*
@@ -102,7 +102,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0001;
- res = 0;
+ res = 1;
break;
case 0x5f70:
switch ((regs->ecx >> 8) & 0xff) {
@@ -112,7 +112,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0000;
- res = 0;
+ res = 1;
break;
case 1:
/* Set Mux */
@@ -120,7 +120,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0000;
- res = 0;
+ res = 1;
break;
case 2:
/* Get SG/Non-SG mode */
@@ -128,13 +128,13 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0000;
- res = 0;
+ res = 1;
break;
default:
- /* Interrupt was not handled */
+ /* FIXME: Interrupt was not handled, but return success? */
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
((regs->ecx >> 8) & 0xff));
- return 0;
+ return 1;
}
break;
diff --git a/src/mainboard/samsung/stumpy/mainboard.c b/src/mainboard/samsung/stumpy/mainboard.c
index eab75f4ab1..fe70948f10 100644
--- a/src/mainboard/samsung/stumpy/mainboard.c
+++ b/src/mainboard/samsung/stumpy/mainboard.c
@@ -45,7 +45,7 @@ void mainboard_suspend_resume(void)
#if defined(CONFIG_PCI_OPTION_ROM_RUN_REALMODE) && CONFIG_PCI_OPTION_ROM_RUN_REALMODE
static int int15_handler(struct eregs *regs)
{
- int res=-1;
+ int res=0;
printk(BIOS_DEBUG, "%s: INT15 function %04x!\n",
__func__, regs->eax & 0xffff);
@@ -63,7 +63,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffffff00;
regs->ecx |= 0x01;
- res = 0;
+ res = 1;
break;
case 0x5f35:
/*
@@ -81,7 +81,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0000;
- res = 0;
+ res = 1;
break;
case 0x5f51:
/*
@@ -95,7 +95,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0003;
- res = 0;
+ res = 1;
break;
case 0x5f70:
switch ((regs->ecx >> 8) & 0xff) {
@@ -105,7 +105,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0000;
- res = 0;
+ res = 1;
break;
case 1:
/* Set Mux */
@@ -113,7 +113,7 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0000;
- res = 0;
+ res = 1;
break;
case 2:
/* Get SG/Non-SG mode */
@@ -121,13 +121,13 @@ static int int15_handler(struct eregs *regs)
regs->eax |= 0x005f;
regs->ecx &= 0xffff0000;
regs->ecx |= 0x0000;
- res = 0;
+ res = 1;
break;
default:
- /* Interrupt was not handled */
+ /* FIXME: Interrupt was not handled, but return sucess? */
printk(BIOS_DEBUG, "Unknown INT15 5f70 function: 0x%02x\n",
((regs->ecx >> 8) & 0xff));
- return 0;
+ return 1;
}
break;