Finsish loading disk module in bootloader
This commit is contained in:
parent
a6636df6fa
commit
b8934b5c4c
|
|
@ -320,6 +320,7 @@ part_2:
|
||||||
jc load_fail
|
jc load_fail
|
||||||
; debug
|
; debug
|
||||||
mov esi, [kload_paddr]
|
mov esi, [kload_paddr]
|
||||||
|
; jmp $
|
||||||
call load_elf
|
call load_elf
|
||||||
; debug
|
; debug
|
||||||
push eax
|
push eax
|
||||||
|
|
@ -329,18 +330,20 @@ part_2:
|
||||||
; debug
|
; debug
|
||||||
cmp eax, -1
|
cmp eax, -1
|
||||||
je .find_fs_driver_no_disk
|
je .find_fs_driver_no_disk
|
||||||
mov eax, esi
|
mov esi, eax
|
||||||
and edx, 0xfffffc00
|
and edx, 0xfffffc00
|
||||||
add edx, 0x1000
|
add edx, 0x1000
|
||||||
add [kload_paddr], edx
|
add [kload_paddr], edx
|
||||||
; debug
|
; debug
|
||||||
|
|
||||||
; mov edi, edx
|
mov edi, [kload_paddr]
|
||||||
debug
|
|
||||||
mov [disk_module_struct.ptr], edi
|
|
||||||
call read_file
|
call read_file
|
||||||
debug
|
mov esi, [kload_paddr]
|
||||||
|
; call load_elf
|
||||||
|
mov [disk_module_struct.ptr], edi
|
||||||
|
; debug
|
||||||
jc load_fail
|
jc load_fail
|
||||||
|
jmp .find_fs_driver
|
||||||
.find_fs_driver_no_disk:
|
.find_fs_driver_no_disk:
|
||||||
mov ax, 0xe44
|
mov ax, 0xe44
|
||||||
int 0x10
|
int 0x10
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ extern void kmain(kernel_info_t *kernel_info){
|
||||||
//TODO: Map and load filesystem and disk modules
|
//TODO: Map and load filesystem and disk modules
|
||||||
//TODO: Start Initial Process
|
//TODO: Start Initial Process
|
||||||
|
|
||||||
printf("%x", kernel_info->loaded_modules->type);
|
printf("%x", kernel_info->loaded_modules->ptr);
|
||||||
|
printf("%x", kmain);
|
||||||
|
|
||||||
init_scheduler();
|
init_scheduler();
|
||||||
thread_start(pid0);
|
thread_start(pid0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue