aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-09-24 21:01:16 -0400
committerKevin O'Connor <kevin@koconnor.net>2009-09-24 21:01:16 -0400
commitf8e800dea4aad59c83254bddd8e9ccfcd3b45774 (patch)
tree44673b259d1dede47648e58f2aeac1352893ca4f /src
parentf416fe97ae885e97a4c9678813a6005aa83fb4b6 (diff)
downloadseabios-f8e800dea4aad59c83254bddd8e9ccfcd3b45774.tar.gz
Interrupts should be enabled when calling 16bit code.
Set most code paths to have interrupts on when calling 16bit code. This fixes at least one optionrom that needed irqs on.
Diffstat (limited to 'src')
-rw-r--r--src/boot.c3
-rw-r--r--src/optionroms.c2
-rw-r--r--src/output.c1
-rw-r--r--src/post.c1
-rw-r--r--src/ramdisk.c2
-rw-r--r--src/util.c3
6 files changed, 11 insertions, 1 deletions
diff --git a/src/boot.c b/src/boot.c
index b6afd351..7b740072 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -328,6 +328,7 @@ call_boot_entry(u16 bootseg, u16 bootip, u8 bootdrv)
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
br.code = SEGOFF(bootseg, bootip);
// Set the magic number in ax and the boot drive in dl.
br.dl = bootdrv;
@@ -344,6 +345,7 @@ boot_disk(u8 bootdrv, int checksig)
// Read sector
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
br.dl = bootdrv;
br.es = bootseg;
br.ah = 2;
@@ -459,6 +461,7 @@ do_boot(u16 seq_nr)
// Boot failed: invoke the boot recovery function
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
call16_int(0x18, &br);
}
diff --git a/src/optionroms.c b/src/optionroms.c
index 18526f4b..bdc0cb5f 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -87,6 +87,7 @@ __callrom(struct rom_header *rom, u16 offset, u16 bdf)
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
br.ax = bdf;
br.bx = 0xffff;
br.dx = 0xffff;
@@ -442,6 +443,7 @@ vga_setup()
dprintf(1, "Turning on vga console\n");
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
br.ax = 0x0003;
call16_int(0x10, &br);
diff --git a/src/output.c b/src/output.c
index 6a164e1e..da585b4f 100644
--- a/src/output.c
+++ b/src/output.c
@@ -70,6 +70,7 @@ screenc(u8 c)
return;
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
br.ah = 0x0e;
br.al = c;
call16_int(0x10, &br);
diff --git a/src/post.c b/src/post.c
index c21b46e6..45a319df 100644
--- a/src/post.c
+++ b/src/post.c
@@ -227,5 +227,6 @@ _start()
dprintf(3, "Jump to int19\n");
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
call16_int(0x19, &br);
}
diff --git a/src/ramdisk.c b/src/ramdisk.c
index 83aa7c4a..36b9f226 100644
--- a/src/ramdisk.c
+++ b/src/ramdisk.c
@@ -73,7 +73,7 @@ ramdisk_copy(struct disk_op_s *op, int iswrite)
// Call int 1587 to copy data.
struct bregs br;
memset(&br, 0, sizeof(br));
- br.flags = F_CF;
+ br.flags = F_CF|F_IF;
br.ah = 0x87;
br.es = GET_SEG(SS);
br.si = (u32)gdt;
diff --git a/src/util.c b/src/util.c
index 841c00a7..c09b8515 100644
--- a/src/util.c
+++ b/src/util.c
@@ -239,6 +239,7 @@ usleep(u32 usec)
{
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
br.ah = 0x86;
br.cx = usec >> 16;
br.dx = usec;
@@ -251,6 +252,7 @@ check_for_keystroke()
{
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
br.ah = 1;
call16_int(0x16, &br);
return !(br.flags & F_ZF);
@@ -262,6 +264,7 @@ get_raw_keystroke()
{
struct bregs br;
memset(&br, 0, sizeof(br));
+ br.flags = F_IF;
call16_int(0x16, &br);
return br.ah;
}