1
0
Fork 0
mirror of https://gitlab.com/bztsrc/bootboot.git synced 2023-02-13 20:54:32 -05:00

BIOS service based delay and color dot status in UEFI

This commit is contained in:
bzt 2020-10-30 14:18:03 +01:00
parent d154161bea
commit 1e864acf0c
6 changed files with 27 additions and 25 deletions

BIN
dist/bootboot.bin vendored

Binary file not shown.

BIN
dist/bootboot.efi vendored

Binary file not shown.

BIN
dist/bootboot.rom vendored

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -1978,35 +1978,30 @@ end if
add esi, 300h add esi, 300h
mov eax, 0C4500h mov eax, 0C4500h
mov dword [esi], eax mov dword [esi], eax
; wait 10 millisec ; wait 10 millisec
mov cx, 10000/15 prot_realmode
in al, 61h ; ps2 control port bit 4 is oscillating at 15 usec xor cx, cx
and al, 10h mov dx, 10000
mov ah, al mov ah, 086h
@@: in al, 61h sti
and al, 10h int 15h
cmp al, ah cli
je @b real_protmode
mov ah, al
dec cx
jnz @b
; send Broadcast STARTUP IPI ; send Broadcast STARTUP IPI
mov eax, 0C4607h ; start at 0700:0000h mov eax, 0C4607h ; start at 0700:0000h
mov dword [esi], eax mov dword [esi], eax
; wait 1 millisec (should be 200 microsec minimum) ; wait 200 microsec
mov cx, 1000/15 prot_realmode
in al, 61h ; ps2 control port bit 4 is oscillating at 15 usec xor cx, cx
and al, 10h mov dx, 200
mov ah, al mov ah, 086h
@@: in al, 61h sti
and al, 10h int 15h
cmp al, ah cli
je @b real_protmode
mov ah, al
dec cx
jnz @b
mov eax, 0C4607h ; second SIPI mov eax, 0C4607h ; second SIPI
mov dword [esi], eax mov dword [esi], eax

View file

@ -2041,6 +2041,9 @@ get_memory_map:
} }
// --- NO PRINT AFTER THIS POINT --- // --- NO PRINT AFTER THIS POINT ---
// read (or blue) dot on the top left corner (sort of status report)
*((uint64_t*)(bootboot->fb_ptr)) = *((uint64_t*)(bootboot->fb_ptr + bootboot->fb_scanline)) = 0x000000FF000000FFUL;
//inform firmware that we're about to leave it's realm //inform firmware that we're about to leave it's realm
status = uefi_call_wrapper(BS->ExitBootServices, 2, image, map_key); status = uefi_call_wrapper(BS->ExitBootServices, 2, image, map_key);
if(EFI_ERROR(status)){ if(EFI_ERROR(status)){
@ -2050,6 +2053,10 @@ get_memory_map:
} }
#if !defined(USE_MP_SERVICES) || !USE_MP_SERVICES #if !defined(USE_MP_SERVICES) || !USE_MP_SERVICES
// green dot on the top left corner
*((uint64_t*)(bootboot->fb_ptr)) = *((uint64_t*)(bootboot->fb_ptr + bootboot->fb_scanline)) = 0x0000FF000000FF00UL;
// start APs // start APs
if(bootboot->numcores > 1) { if(bootboot->numcores > 1) {
// send Broadcast INIT IPI // send Broadcast INIT IPI