fix(uefi): zero only 8KB page tables, reload 64-bit lgdt, glowing cyan splash & keep gfxpayload
This commit is contained in:
1 parent
97acc141f0
commit
8316265048
3 files changed
+27
-20
No files matched your search
+6
-5
@@ -72,11 +72,9 @@ _start:
|
|||||||
movl %eax, %ebp
|
movl %eax, %ebp
|
||||||
movl %ebx, %esi
|
movl %ebx, %esi
|
||||||
|
|
||||||
/* Zero out the entire .bss section (clears page tables, stacks, global state) */
|
/* Zero out ONLY the PML4 and PDPT page tables (8KB = 2048 dwords) */
|
||||||
movl $_bss_start, %edi
|
movl $pml4_table, %edi
|
||||||
movl $_bss_end, %ecx
|
movl $2048, %ecx
|
||||||
subl %edi, %ecx
|
|
||||||
shrl $2, %ecx /* Number of 4-byte dwords */
|
|
||||||
xorl %eax, %eax
|
xorl %eax, %eax
|
||||||
rep stosl
|
rep stosl
|
||||||
|
|
||||||
@@ -182,6 +180,9 @@ halt_loop:
|
|||||||
.global long_mode_entry
|
.global long_mode_entry
|
||||||
.type long_mode_entry, @function
|
.type long_mode_entry, @function
|
||||||
long_mode_entry:
|
long_mode_entry:
|
||||||
|
/* Reload GDT in 64-bit mode to guarantee 64-bit canonical GDTR base */
|
||||||
|
lgdt (gdt64_pointer)
|
||||||
|
|
||||||
/* Reload data segment registers */
|
/* Reload data segment registers */
|
||||||
movw $0x10, %ax
|
movw $0x10, %ax
|
||||||
movw %ax, %ds
|
movw %ax, %ds
|
||||||
|
|||||||
+7
-2
@@ -48,12 +48,17 @@ void vbe_allocate_backbuffer(void) {
|
|||||||
void vbe_early_boot_splash(void) {
|
void vbe_early_boot_splash(void) {
|
||||||
if (!s_screen.initialized || !s_screen.front_buffer) return;
|
if (!s_screen.initialized || !s_screen.front_buffer) return;
|
||||||
|
|
||||||
/* Fill screen with deep obsidian */
|
/* Fill screen with vibrant deep cyber navy & bright glowing cyan border */
|
||||||
for (uint32_t y = 0; y < s_screen.height; y++) {
|
for (uint32_t y = 0; y < s_screen.height; y++) {
|
||||||
uint8_t* row = ((uint8_t*)s_screen.front_buffer) + (y * s_screen.pitch);
|
uint8_t* row = ((uint8_t*)s_screen.front_buffer) + (y * s_screen.pitch);
|
||||||
uint32_t* pixels = (uint32_t*)row;
|
uint32_t* pixels = (uint32_t*)row;
|
||||||
|
bool is_border_y = (y < 8 || y >= s_screen.height - 8);
|
||||||
for (uint32_t x = 0; x < s_screen.width; x++) {
|
for (uint32_t x = 0; x < s_screen.width; x++) {
|
||||||
pixels[x] = COLOR_OBSIDIAN;
|
if (is_border_y || x < 8 || x >= s_screen.width - 8) {
|
||||||
|
pixels[x] = COLOR_CYAN_GLOW;
|
||||||
|
} else {
|
||||||
|
pixels[x] = 0xFF0B1426;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-13
@@ -27,22 +27,15 @@ insmod efi_uga
|
|||||||
insmod font
|
insmod font
|
||||||
|
|
||||||
set gfxmode=1920x1080x32,1024x768x32,auto
|
set gfxmode=1920x1080x32,1024x768x32,auto
|
||||||
set gfxpayload=1920x1080x32,1024x768x32,auto
|
set gfxpayload=keep
|
||||||
|
|
||||||
set timeout=5
|
set timeout=5
|
||||||
set default=0
|
set default=0
|
||||||
|
|
||||||
menuentry "Airlys Sovereign OS (Acer Nitro Bare Metal & UEFI GOP)" {
|
menuentry "Airlys Sovereign OS (Acer Nitro Bare Metal - Keep Active GOP)" {
|
||||||
insmod all_video
|
insmod all_video
|
||||||
insmod efi_gop
|
insmod efi_gop
|
||||||
set gfxpayload=1920x1080x32,1024x768x32,auto
|
set gfxpayload=keep
|
||||||
multiboot2 /boot/airlys.elf
|
|
||||||
boot
|
|
||||||
}
|
|
||||||
|
|
||||||
menuentry "Airlys Sovereign OS (1024x768 TrueColor Framebuffer)" {
|
|
||||||
insmod all_video
|
|
||||||
set gfxpayload=1024x768x32,auto
|
|
||||||
multiboot2 /boot/airlys.elf
|
multiboot2 /boot/airlys.elf
|
||||||
boot
|
boot
|
||||||
}
|
}
|
||||||
@@ -50,15 +43,23 @@ menuentry "Airlys Sovereign OS (1024x768 TrueColor Framebuffer)" {
|
|||||||
menuentry "Airlys Sovereign OS (1920x1080 Native FHD Framebuffer)" {
|
menuentry "Airlys Sovereign OS (1920x1080 Native FHD Framebuffer)" {
|
||||||
insmod all_video
|
insmod all_video
|
||||||
insmod efi_gop
|
insmod efi_gop
|
||||||
set gfxpayload=1920x1080x32,auto
|
set gfxpayload=1920x1080x32,keep,auto
|
||||||
multiboot2 /boot/airlys.elf
|
multiboot2 /boot/airlys.elf
|
||||||
boot
|
boot
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Airlys Sovereign OS (Fallback Multiboot 1)" {
|
menuentry "Airlys Sovereign OS (1024x768 TrueColor Framebuffer)" {
|
||||||
|
insmod all_video
|
||||||
|
insmod efi_gop
|
||||||
|
set gfxpayload=1024x768x32,keep,auto
|
||||||
|
multiboot2 /boot/airlys.elf
|
||||||
|
boot
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "Airlys Sovereign OS (Fallback Auto Mode)" {
|
||||||
insmod all_video
|
insmod all_video
|
||||||
set gfxpayload=auto
|
set gfxpayload=auto
|
||||||
multiboot /boot/airlys.elf
|
multiboot2 /boot/airlys.elf
|
||||||
boot
|
boot
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in new issue
Block a user