diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-01-19 19:56:07 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-01-19 19:56:07 -0500 |
commit | 273e8ae57159d69db504fabe70b0724de5297161 (patch) | |
tree | dd23a30d0584cebc9438426b6e9ba411b2623251 /src/util.c | |
parent | 8b267cb8a739576cd08c82d0ee75d6b14407c09c (diff) | |
download | seabios-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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); } |