Compare commits

..

No commits in common. "0d16e3e35a8175e21fe8085010be92f794f7acf3" and "94e5e703052c02946b6206ab2303d714fbfb6333" have entirely different histories.

2 changed files with 8 additions and 39 deletions

View File

@ -26,41 +26,13 @@ setup_drivers:
mov [esi + (64 - 16)], edx
mov [esi + (64 - 20)], edi
; [esi + 8]: Pointer to the current driver init function
; [esi + 12]L Pointer to current driver slot
; ecx: Driver slot index
xor ecx, ecx
.driver_setup_loop:
cmp ecx, DRIVER_SLOT_COUNT
jae .epilog
mov ebx, ecx
shl ebx, 2
add ebx, driver_init_functions
mov eax, [ebx]
mov [esi + 8], eax
cmp eax, 0
je .epilog
mov eax, ecx
mov edx, DRIVER_SLOT_SIZE
mul edx
mov [esi + 12], eax
push ebp
mov ebp, esp
push dword [esi + 12]
mov eax, [esi + 8]
call eax
push dword DRIVER_MEMORY_AREA
call initialize_pci_driver
mov esp, ebp
pop ebp
inc ecx
jmp .driver_setup_loop
.epilog:
mov eax, [esi + (64 - 4)]
mov ebx, [esi + (64 - 8)]
@ -73,4 +45,3 @@ setup_drivers:
ret
%include "drivers/pci/driver.asm"
%include "drivers/acpi/driver.asm"

View File

@ -46,6 +46,9 @@ stage_2_setup_entry:
cli
hlt
some_text:
db "This is some text.", 0x00
; Utilities
; Memory Management
%include "memory/a20.asm"
@ -55,18 +58,13 @@ stage_2_setup_entry:
bits 32
stage2_true_entry:
push ebp
mov ebp, esp
call setup_drivers
mov esp, ebp
pop ebp
mov [dword 0xb8000], byte 'X'
mov [dword 0xb8000 + 1], byte 0x31
cli
hlt
%include "utility/math.asm"
%include "utility/memory.asm"
%include "utility/display.asm"
; Driver Manager
%include "drivers/manager.asm"
; %include "drivers/manager.asm"