projects
/
bootcensus
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
11db15b
)
int86 seems to work
author
John Tsiombikas
<nuclear@member.fsf.org>
Fri, 27 Apr 2018 14:15:24 +0000
(17:15 +0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Fri, 27 Apr 2018 14:15:24 +0000
(17:15 +0300)
src/boot/boot2.s
patch
|
blob
|
history
diff --git
a/src/boot/boot2.s
b/src/boot/boot2.s
index
e4088f4
..
d44b634
100644
(file)
--- a/
src/boot/boot2.s
+++ b/
src/boot/boot2.s
@@
-584,6
+584,12
@@
int86:
sidt (saved_idtr)
lidt (rmidt)
sidt (saved_idtr)
lidt (rmidt)
+ # modify the int instruction do this here before the
+ # cs-load jumps, to let them flush the instruction cache
+ mov $int_op, %ebx
+ movb 8(%ebp), %al
+ movb %al, 1(%ebx)
+
# long jump to load code selector for 16bit code (6)
ljmp $0x30,$0f
0:
# long jump to load code selector for 16bit code (6)
ljmp $0x30,$0f
0:
@@
-601,15
+607,10
@@
int86:
mov %ax, %ss
nop
mov %ax, %ss
nop
- # modify the int instruction
- mov $int_op, %ebx
- movb 4(%ebp), %al
- movb %al, 1(%ebx)
-
# load registers from the int86regs struct
mov %esp, saved_esp
mov %ebp, saved_ebp
# load registers from the int86regs struct
mov %esp, saved_esp
mov %ebp, saved_ebp
- mov 8(%ebp), %esp
+ mov 12(%ebp), %esp
popal
mov saved_esp, %esp
popal
mov saved_esp, %esp
@@
-617,8
+618,9
@@
int86:
int_op: int $0
mov saved_ebp, %ebp
int_op: int $0
mov saved_ebp, %ebp
- mov 8(%ebp), %esp
- add $32, %esp
+ mov 12(%ebp), %esp
+ add $34, %esp
+ pushfw
pushal
mov saved_esp, %esp
pushal
mov saved_esp, %esp