I have a screen buffer and the framebuffer mapped similarly. Or at least I thought, but sometimes the screen is not mapped. The problem appears on qemu and on bochs as well.
Here's my log:
Code: Select all
vmm_mapbss(3E000,7FFF00000000,3CC000,2097152,800000000000001F)
vmm_mapbss(3E000,7FFF40000000,FD000000,2097152,800000000000001F)
vmm_mapbss(3E000,7FFF40200000,FD200000,2097152,800000000000001F)
vmm_mapbss(3E000,7FFF40400000,FD400000,2097152,800000000000001F)
vmm_mapbss(3E000,7FFF40600000,FD600000,2097152,800000000000001F)
OS/Z panic: --- page fault 14 --- @20A3A1 copyarea
[ Code] Data Messages TCB CCB RAM Sysinfo
[Registers]
cs=00000023 rip=000000000020A3A1
rflags=0000000000013246 excerr=0000000D
cr2=00007FFF00000000 cr3=000000000003E000
rax=00007FFF400DE400 rbx=00007FFF400DE400
rcx=0000000000000020 rdx=00007FFF00000000
rsi=00007FFF00000000 rdi=00007FFF400DE400
r8=0000000000000600 r9=000000000000011C
r10=0000000000000C80 r11=0000000000000000
r12=0000000000000020 r13=0000000000000020
r14=0000000000000C80 r15=0000000000000C80
rbp=0000000000200000 rsp=00000000001FFFA8
...
[ Code 20A3A1: copyarea +00C8]
00C6 jnz 20A3A5h ;copyarea +CC
00C8 -> repnz movsd
00CA jmp 20A3DDh ;copyarea +104
display/fb 3D dbg> x rsi
Code [Data] Messages TCB CCB RAM Sysinfo
00007FFF00000000: * not mapped 14 *
...
00007FFF000001C0: * not mapped 14 *
PML4 800000000006B01F 0.....WUW. 508 PDPE 800000000006C01F 0.....WUW. 0
PDE 80000000003CC09F 0.T...WUW. 0 (slot allocated)
display/fb 3D dbg> x rdi
Code [Data] Messages TCB CCB RAM Sysinfo
00007FFF400DE400: 00 00 40 00 00 00 40 00 00 00 40 00 00 00 40 00 ..@...@...@...@.
...
00007FFF400DE5C0: 00 00 40 00 00 00 40 00 00 00 40 00 00 00 40 00 ..@...@...@...@.
PML4 800000000006B03F 0...A.WUW. 509 PDPE 800000000006D03F 0...A.WUW. 0
PDE 80000000FD0000BF 0.T.A.WUW. 222 (slot allocated)
display/fb 3D dbg>
Same problem shown in bochs debugger:
Code: Select all
<bochs:3> page 0x7FFF00000000
PML4: 0x800000000006b01f XD ps a PCD PWT U W P
PDPE: 0x800000000006c01f XD ps a PCD PWT U W P
PDE: 0x80000000003cc09f XD PS g pat d a PCD PWT U W P
physical address not available for linear 0x00007fff00000000
<bochs:4> page 0x7FFF40000000
PML4: 0x800000000006b01f XD ps a PCD PWT U W P
PDPE: 0x800000000006d01f XD ps a PCD PWT U W P
PDE: 0x80000000e000009f XD PS g pat d a PCD PWT U W P
linear page 0x00007fff40000000 maps to physical page 0x0000e0000000
<bochs:5> creg
CR0=0xe0000011: PG CD NW ac wp ne ET ts em mp PE
CR2=page fault laddr=0x00000000c9ff6000
CR3=0x00000003e000
PCD=page-level cache disable=0
PWT=page-level write-through=0
CR4=0x000002e8: pke smap smep osxsave pcid fsgsbase smx vmx osxmmexcpt umip OSFXSR pce PGE MCE PAE pse DE tsd pvi vme
CR8: 0x0
EFER=0x00000d01: ffxsr NXE LMA LME SCE
XCR0=0x00000001: pkru hi_zmm zmm_hi256 opmask bndcfg bndregs ymm sse FPU
<bochs:6> xp 0x3cc000
[bochs]:
0x00000000003cc000 <bogus+ 0>: 0x00000000
<bochs:7> xp 0x5cc000-4
[bochs]:
0x00000000005cbffc <bogus+ 0>: 0x00000000
<bochs:8>
Btw, physical address 0x3CC000 is reported as usable RAM in E820 map. Oddly if I boot with TianoCore, the problem disappears.