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

View file

@ -2041,6 +2041,9 @@ get_memory_map:
}
// --- 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
status = uefi_call_wrapper(BS->ExitBootServices, 2, image, map_key);
if(EFI_ERROR(status)){
@ -2050,6 +2053,10 @@ get_memory_map:
}
#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
if(bootboot->numcores > 1) {
// send Broadcast INIT IPI