aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-01-19 19:56:07 -0500
committerKevin O'Connor <kevin@koconnor.net>2009-01-19 19:56:07 -0500
commit273e8ae57159d69db504fabe70b0724de5297161 (patch)
treedd23a30d0584cebc9438426b6e9ba411b2623251 /src/util.c
parent8b267cb8a739576cd08c82d0ee75d6b14407c09c (diff)
downloadseabios-hppa-273e8ae57159d69db504fabe70b0724de5297161.zip
seabios-hppa-273e8ae57159d69db504fabe70b0724de5297161.tar.gz
seabios-hppa-273e8ae57159d69db504fabe70b0724de5297161.tar.bz2
Minor - call16 should not assume %cs==SEG_BIOS.
Should be slightly more compatible with protected mode accesses.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index 66b3343..ad918d7 100644
--- a/src/util.c
+++ b/src/util.c
@@ -4,9 +4,8 @@
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "util.h" // usleep
+#include "util.h" // call16
#include "bregs.h" // struct bregs
-#include "config.h" // SEG_BIOS
#include "farptr.h" // GET_FLATPTR
#include "biosvar.h" // get_ebda_seg
@@ -43,7 +42,10 @@ call16big(struct bregs *callregs)
inline void
__call16_int(struct bregs *callregs, u16 offset)
{
- callregs->cs = SEG_BIOS;
+ if (MODE16)
+ callregs->cs = GET_SEG(CS);
+ else
+ callregs->cs = SEG_BIOS;
callregs->ip = offset;
call16(callregs);
}