interrupt fails, after enable paging
Posted: Fri May 29, 2009 8:53 am
Hi,
after move kernel to virtual address 0x80000000+, and clear low half PD,
I got page fault, when interrupt fires. If I don't clear the low half PD, it runs well. From CR2, It seems something accessed low half space.
I load IDT before initial identity paging, IDTR base address is linear addr, IDT descriptor offset is virtual addr. keyboard ISR is set to "jmp $". when I press a key, It didn't go to KB ISR, just reset.
00067001000i[CPU0 ] CPU is in protected mode (active)
00067001000i[CPU0 ] CS.d_b = 32 bit
00067001000i[CPU0 ] SS.d_b = 32 bit
00067001000i[CPU0 ] EFER = 0x00000000
00067001000i[CPU0 ] | RAX=00000000000007ff RBX=0000000000001000
00067001000i[CPU0 ] | RCX=0000000000000200 RDX=00000000000003d5
00067001000i[CPU0 ] | RSP=000000008009ffff RBP=00000000800087f8
00067001000i[CPU0 ] | RSI=00000000000e0000 RDI=000000008000ef12
00067001000i[CPU0 ] | R8=0000000000000000 R9=0000000000000000
00067001000i[CPU0 ] | R10=0000000000000000 R11=0000000000000000
00067001000i[CPU0 ] | R12=0000000000000000 R13=0000000000000000
00067001000i[CPU0 ] | R14=0000000000000000 R15=0000000000000000
00067001000i[CPU0 ] | IOPL=0 id vip vif ac vm RF nt of df IF tf SF zf af PF cf
00067001000i[CPU0 ] | SEG selector base limit G D
00067001000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00067001000i[CPU0 ] | CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | SS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | MSR_FS_BASE:0000000000000000
00067001000i[CPU0 ] | MSR_GS_BASE:0000000000000000
00067001000i[CPU0 ] | RIP=0000000080008327 (0000000080008327)
00067001000i[CPU0 ] | CR0=0xe0000011 CR2=0x0000000000007feb
00067001000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
00067001000i[CPU0 ] 0x0000000080008327>> mov byte ptr ds:0x8000eced, 0x00 : C605EDEC008000
00067001000e[CPU0 ] exception(): 3rd (14) exception with no resolution, shutdown status is 00h, resetting
00067001000i[SYS ] bx_pc_system_c::Reset(HARDWARE) called
after move kernel to virtual address 0x80000000+, and clear low half PD,
I got page fault, when interrupt fires. If I don't clear the low half PD, it runs well. From CR2, It seems something accessed low half space.
I load IDT before initial identity paging, IDTR base address is linear addr, IDT descriptor offset is virtual addr. keyboard ISR is set to "jmp $". when I press a key, It didn't go to KB ISR, just reset.
00067001000i[CPU0 ] CPU is in protected mode (active)
00067001000i[CPU0 ] CS.d_b = 32 bit
00067001000i[CPU0 ] SS.d_b = 32 bit
00067001000i[CPU0 ] EFER = 0x00000000
00067001000i[CPU0 ] | RAX=00000000000007ff RBX=0000000000001000
00067001000i[CPU0 ] | RCX=0000000000000200 RDX=00000000000003d5
00067001000i[CPU0 ] | RSP=000000008009ffff RBP=00000000800087f8
00067001000i[CPU0 ] | RSI=00000000000e0000 RDI=000000008000ef12
00067001000i[CPU0 ] | R8=0000000000000000 R9=0000000000000000
00067001000i[CPU0 ] | R10=0000000000000000 R11=0000000000000000
00067001000i[CPU0 ] | R12=0000000000000000 R13=0000000000000000
00067001000i[CPU0 ] | R14=0000000000000000 R15=0000000000000000
00067001000i[CPU0 ] | IOPL=0 id vip vif ac vm RF nt of df IF tf SF zf af PF cf
00067001000i[CPU0 ] | SEG selector base limit G D
00067001000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00067001000i[CPU0 ] | CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | SS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067001000i[CPU0 ] | MSR_FS_BASE:0000000000000000
00067001000i[CPU0 ] | MSR_GS_BASE:0000000000000000
00067001000i[CPU0 ] | RIP=0000000080008327 (0000000080008327)
00067001000i[CPU0 ] | CR0=0xe0000011 CR2=0x0000000000007feb
00067001000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
00067001000i[CPU0 ] 0x0000000080008327>> mov byte ptr ds:0x8000eced, 0x00 : C605EDEC008000
00067001000e[CPU0 ] exception(): 3rd (14) exception with no resolution, shutdown status is 00h, resetting
00067001000i[SYS ] bx_pc_system_c::Reset(HARDWARE) called