Skip to content

Commit faaf549

Browse files
author
Ian Seyler
committed
Expanded debugging
- 8 dots instead of 4
1 parent e755548 commit faaf549

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

src/init/hpet.asm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
init_hpet:
1010
; Verify there is a valid HPET address
1111
mov rax, [p_HPET_Address]
12+
cmp rax, 0
1213
jz os_hpet_init_error
1314

1415
; Verify the capabilities of HPET

src/pure64.asm

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ start64:
255255
mov eax, 0x00404040
256256
rep stosd
257257

258-
; Visual Debug (1/4)
258+
; Visual Debug (1/8)
259259
mov ebx, 0
260260
call debug_block
261261

@@ -394,7 +394,7 @@ clearcs64:
394394

395395
lgdt [GDTR64] ; Reload the GDT
396396

397-
; Visual Debug (2/4)
397+
; Visual Debug (2/8)
398398
mov ebx, 2
399399
call debug_block
400400

@@ -712,15 +712,29 @@ pde_end:
712712
mov byte [p_x2APIC], cl
713713

714714
call init_acpi ; Find and process the ACPI tables
715+
716+
; Visual Debug (3/8)
717+
mov ebx, 4
718+
call debug_block
719+
715720
call init_cpu ; Configure the BSP CPU
721+
722+
; Visual Debug (4/8)
723+
mov ebx, 6
724+
call debug_block
725+
716726
call init_hpet ; Configure the HPET
717727

718-
; Visual Debug (3/4)
719-
mov ebx, 4
728+
; Visual Debug (5/8)
729+
mov ebx, 8
720730
call debug_block
721731

722732
call init_smp ; Init of SMP, deactivate interrupts
723733

734+
; Visual Debug (6/8)
735+
mov ebx, 10
736+
call debug_block
737+
724738
; Reset the stack to the proper location (was set to 0x8000 previously)
725739
mov rsi, [p_LocalAPICAddress] ; We would call p_smp_get_id here but the stack is not ...
726740
add rsi, 0x20 ; ... yet defined. It is safer to find the value directly.
@@ -810,6 +824,10 @@ no_address_size:
810824
mov al, [p_x2APIC]
811825
stosb
812826

827+
; Visual Debug (7/8)
828+
mov ebx, 12
829+
call debug_block
830+
813831
; Set the Linear Frame Buffer to use write-combining
814832
mov eax, 0x80000001
815833
cpuid
@@ -864,8 +882,8 @@ lfb_wc_end:
864882
mov ecx, ((32768 - PURE64SIZE) / 8)
865883
rep movsq ; Copy 8 bytes at a time
866884

867-
; Visual Debug (4/4)
868-
mov ebx, 6
885+
; Visual Debug (8/8)
886+
mov ebx, 14
869887
call debug_block
870888

871889
%ifdef BIOS
@@ -938,7 +956,7 @@ debug_block:
938956
xor ecx, ecx
939957
mov cx, [0x00005F00 + 0x10] ; Screen X
940958
shr cx, 4 ; CX = total amount of 8-pixel wide blocks
941-
sub cx, 4
959+
sub cx, 8
942960
add ebx, ecx
943961
shl ebx, 5 ; Quick multiply by 32 (8 pixels by 4 bytes each)
944962
add rdi, rbx

0 commit comments

Comments
 (0)