diff --git a/ChangeLog b/ChangeLog index 04f8c6193..3c158b1a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-10-25 OKUJI Yoshinori + + * 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 Add the prototype of a function to probe I/O ports used for a diff --git a/stage2/asm.S b/stage2/asm.S index 0a6d652a9..0996acffa 100644 --- a/stage2/asm.S +++ b/stage2/asm.S @@ -226,16 +226,17 @@ ENTRY(track_int13) movl %eax, 0x3 * 4 /* read the MBR to call int13 successfully */ + movb 4(%ebp), %dl + + call prot_to_real + .code16 + movw $SCRATCHSEG, %ax movw %ax, %es xorw %bx, %bx movw $1, %cx - xorb %dl, %dl - movb 4(%ebp), %dl + xorb %dh, %dh - call prot_to_real - - .code16 movw $0x201, %ax int $0x13 @@ -380,17 +381,17 @@ int3_handler: /* set the TF flag in the stack */ movw 6(%bp), %ax orw $0x100, %ax - movw %ax, 4(%bp) + movw %ax, 6(%bp) /* restore the first instruction */ movb ABS(int13_first_instruction), %al movw 4(%bp), %bx movw %bx, %ds movw 2(%bp), %bx + decw %bx movb %al, (%bx) /* re-execute the first instruction */ - decw %bx movw %bx, 2(%bp) popw %ds