fix some bugs in track_int13.
This commit is contained in:
parent
7c1baa7ada
commit
821c05373e
2 changed files with 16 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
1999-10-25 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* stage2/asm.S [DEFINE_TRACK_INT13] (int3_handler): Save the
|
||||||
|
modified FLAGS in 6(%bp) instead of 4(%bp).
|
||||||
|
Decrease %bx before restoring the first instruction.
|
||||||
|
[DEFINE_TRACK_INT13] (track_int13): Go to the real mode before
|
||||||
|
setting up the registers for the int13 call.
|
||||||
|
|
||||||
1999-10-24 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
1999-10-24 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
Add the prototype of a function to probe I/O ports used for a
|
Add the prototype of a function to probe I/O ports used for a
|
||||||
|
|
15
stage2/asm.S
15
stage2/asm.S
|
@ -226,16 +226,17 @@ ENTRY(track_int13)
|
||||||
movl %eax, 0x3 * 4
|
movl %eax, 0x3 * 4
|
||||||
|
|
||||||
/* read the MBR to call int13 successfully */
|
/* read the MBR to call int13 successfully */
|
||||||
|
movb 4(%ebp), %dl
|
||||||
|
|
||||||
|
call prot_to_real
|
||||||
|
.code16
|
||||||
|
|
||||||
movw $SCRATCHSEG, %ax
|
movw $SCRATCHSEG, %ax
|
||||||
movw %ax, %es
|
movw %ax, %es
|
||||||
xorw %bx, %bx
|
xorw %bx, %bx
|
||||||
movw $1, %cx
|
movw $1, %cx
|
||||||
xorb %dl, %dl
|
xorb %dh, %dh
|
||||||
movb 4(%ebp), %dl
|
|
||||||
|
|
||||||
call prot_to_real
|
|
||||||
|
|
||||||
.code16
|
|
||||||
movw $0x201, %ax
|
movw $0x201, %ax
|
||||||
int $0x13
|
int $0x13
|
||||||
|
|
||||||
|
@ -380,17 +381,17 @@ int3_handler:
|
||||||
/* set the TF flag in the stack */
|
/* set the TF flag in the stack */
|
||||||
movw 6(%bp), %ax
|
movw 6(%bp), %ax
|
||||||
orw $0x100, %ax
|
orw $0x100, %ax
|
||||||
movw %ax, 4(%bp)
|
movw %ax, 6(%bp)
|
||||||
|
|
||||||
/* restore the first instruction */
|
/* restore the first instruction */
|
||||||
movb ABS(int13_first_instruction), %al
|
movb ABS(int13_first_instruction), %al
|
||||||
movw 4(%bp), %bx
|
movw 4(%bp), %bx
|
||||||
movw %bx, %ds
|
movw %bx, %ds
|
||||||
movw 2(%bp), %bx
|
movw 2(%bp), %bx
|
||||||
|
decw %bx
|
||||||
movb %al, (%bx)
|
movb %al, (%bx)
|
||||||
|
|
||||||
/* re-execute the first instruction */
|
/* re-execute the first instruction */
|
||||||
decw %bx
|
|
||||||
movw %bx, 2(%bp)
|
movw %bx, 2(%bp)
|
||||||
|
|
||||||
popw %ds
|
popw %ds
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue