fix(baremetal): 512GB identity paging, early GOP splash, dual-output console & COM1/RTC timeout guards
- arch/x86_64/boot.s: Map 8GB..512GB using 1GB huge pages in PDPT; set Multiboot2 FB tag to required native 32bpp - drivers/serial.c: Add scratch register hardware probe & 50k timeout guard to prevent infinite polling hang on modern AMD chipsets - drivers/rtc.c: Add timeout guard to CMOS status register polling - drivers/vga.c: Bypass legacy 0x3D4/0x3D5 CRT ports in GOP mode; mirror all characters to active hardware framebuffer - drivers/vbe.c: Implement vbe_early_boot_splash, direct front-buffer console rendering & dynamic backbuffer allocation - kernel/kmain.c: Initialize GOP linear framebuffer at Step 0 for instant physical screen illumination; use pause+counter in render loop - scripts/build_iso.sh: Support universal GOP/VBE/VGA multi-resolution auto-detect for both bare metal and VirtualBox
This commit is contained in:
1 parent
6165197d0a
commit
da3f0788d0
11 files changed
+274
-57
No files matched your search
+19
-4
@@ -26,13 +26,13 @@ multiboot2_header:
|
||||
.long MB2_LENGTH
|
||||
.long MB2_CHECKSUM
|
||||
|
||||
/* Framebuffer Request Tag (Type 5) - Requests UEFI GOP / VBE 1024x768 @ 32bpp */
|
||||
/* Framebuffer Request Tag (Type 5) - Requests UEFI GOP / VBE native @ 32bpp */
|
||||
.align 8
|
||||
.short 5 /* type = 5 (Framebuffer) */
|
||||
.short 1 /* flags = 1 (Optional, safe on all firmware) */
|
||||
.short 0 /* flags = 0 (Required graphics mode) */
|
||||
.long 20 /* size = 20 bytes */
|
||||
.long 1024 /* width = 1024 */
|
||||
.long 768 /* height = 768 */
|
||||
.long 0 /* width = 0 (no preference / native panel) */
|
||||
.long 0 /* height = 0 (no preference / native panel) */
|
||||
.long 32 /* depth = 32bpp */
|
||||
|
||||
/* End tag */
|
||||
@@ -122,6 +122,21 @@ map_pd_loop:
|
||||
cmpl $4096, %ecx
|
||||
jne map_pd_loop
|
||||
|
||||
/* Identity map entries 8..511 of PDPT using 1GB huge pages (8GB .. 512GB) */
|
||||
movl $8, %ecx
|
||||
map_1gb_loop:
|
||||
movl %ecx, %eax
|
||||
shll $30, %eax
|
||||
orl $0x83, %eax /* Present + Writable + Huge 1GB Page (bit 7) */
|
||||
movl %ecx, %edx
|
||||
shrl $2, %edx
|
||||
movl $pdpt_table, %ebx
|
||||
movl %eax, (%ebx, %ecx, 8)
|
||||
movl %edx, 4(%ebx, %ecx, 8)
|
||||
incl %ecx
|
||||
cmpl $512, %ecx
|
||||
jne map_1gb_loop
|
||||
|
||||
/* Load CR3 with physical address of PML4 */
|
||||
movl $pml4_table, %eax
|
||||
movl %eax, %cr3
|
||||
|
||||
Reference in new issue
Block a user