diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-09-16 16:23:51 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-09-16 16:23:51 +0200 |
commit | 15c7d856bc499da0ae76d3ce9b12b952cfbe7609 (patch) | |
tree | d28cc4cb39b3f17e60212cf589aa0bf732ef3f3d /sys/src | |
parent | b5aab824886fa8f441291340bdd4e187c562ddd0 (diff) |
apm: fix wrong segment load, zero segment registers
we loaded APMDSEG instead of APMDSEL into DS. (ouch!)
its not really clear why we loaded DS (wong) in the
first place as bios is supposed to do this. for the
machines where this worked it could have no effect
anyway because it was wrong so removing the DS load
and just zero all segment registers.
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/9/pc/apmjump.s | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/src/9/pc/apmjump.s b/sys/src/9/pc/apmjump.s index 6dbd19d0b..e696bcfb6 100644 --- a/sys/src/9/pc/apmjump.s +++ b/sys/src/9/pc/apmjump.s @@ -9,19 +9,9 @@ #define SSOVERRIDE BYTE $0x36 #define CSOVERRIDE BYTE $0x2E -#define RETF BYTE $0xCB GLOBL apmjumpstruct+0(SB), $8 -TEXT fortytwo(SB), $0 - MOVL $42, AX - RETF - -TEXT getcs(SB), $0 - PUSHL CS - POPL AX - RET - TEXT apmfarcall(SB), $0 /* * We call push and pop ourselves. @@ -52,6 +42,7 @@ TEXT apmfarcall(SB), $0 * paranoia: zero the segments, since it's the * BIOS's responsibility to initialize them. * (trick picked up from Linux driver). + */ PUSHL DX XORL DX, DX PUSHL DX @@ -63,10 +54,6 @@ TEXT apmfarcall(SB), $0 PUSHL DX POPL GS POPL DX - */ - - PUSHL $APMDSEG - POPL DS /* * The actual call. |