swap order of entering Unreal mode and getting an E820
also InitFATDriver should be ok to add to the start process again.
This commit is contained in:
@@ -86,14 +86,6 @@ main:
|
|||||||
call PrintString
|
call PrintString
|
||||||
add sp, 0x2
|
add sp, 0x2
|
||||||
|
|
||||||
; get system memory map
|
|
||||||
call GetMemoryMap
|
|
||||||
|
|
||||||
lea ax, [MemoryMap_OK_cstr]
|
|
||||||
push ax
|
|
||||||
call PrintString
|
|
||||||
add sp, 0x2
|
|
||||||
|
|
||||||
; enter unreal mode
|
; enter unreal mode
|
||||||
call EnterUnrealMode
|
call EnterUnrealMode
|
||||||
|
|
||||||
@@ -102,13 +94,20 @@ main:
|
|||||||
call PrintString
|
call PrintString
|
||||||
add sp, 0x2
|
add sp, 0x2
|
||||||
|
|
||||||
ERROR STEVIA_DEBUG_HALT
|
; get system memory map
|
||||||
|
call GetMemoryMap
|
||||||
|
|
||||||
|
lea ax, [MemoryMap_OK_cstr]
|
||||||
|
push ax
|
||||||
|
call PrintString
|
||||||
|
add sp, 0x2
|
||||||
|
|
||||||
; FAT Driver setup
|
; FAT Driver setup
|
||||||
push bp
|
push bp
|
||||||
mov bp, sp
|
mov bp, sp
|
||||||
call InitFATDriver
|
call InitFATDriver
|
||||||
|
|
||||||
|
ERROR STEVIA_DEBUG_HALT
|
||||||
;
|
;
|
||||||
; Find first cluster of bootable file
|
; Find first cluster of bootable file
|
||||||
;
|
;
|
||||||
@@ -150,8 +149,8 @@ hcf:
|
|||||||
|
|
||||||
; TODO: fix the prolog, epilog and stack usage to confirm with cdecl16
|
; TODO: fix the prolog, epilog and stack usage to confirm with cdecl16
|
||||||
InitFATDriver:
|
InitFATDriver:
|
||||||
push bx
|
__CDECL16_ENTRY
|
||||||
|
.func:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov dword [fat32_state + FAT32_State_t.active_cluster_32], eax
|
mov dword [fat32_state + FAT32_State_t.active_cluster_32], eax
|
||||||
mov dword [fat32_state + FAT32_State_t.active_FAT_cluster_32], eax
|
mov dword [fat32_state + FAT32_State_t.active_FAT_cluster_32], eax
|
||||||
@@ -190,7 +189,7 @@ InitFATDriver:
|
|||||||
.error:
|
.error:
|
||||||
ERROR STAGE2_FAT32_INIT_ERROR
|
ERROR STAGE2_FAT32_INIT_ERROR
|
||||||
.endp:
|
.endp:
|
||||||
pop bx
|
__CDECL16_EXIT
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; TODO: fix the prolog, epilog and stack usage to confirm with cdecl16
|
; TODO: fix the prolog, epilog and stack usage to confirm with cdecl16
|
||||||
@@ -773,11 +772,8 @@ disable_cursor:
|
|||||||
; Bit 3 - power on password bytes (CMOS bytes 0x38-0x3f or 0x36-0x3f). 0: accessible, 1: inaccessible
|
; Bit 3 - power on password bytes (CMOS bytes 0x38-0x3f or 0x36-0x3f). 0: accessible, 1: inaccessible
|
||||||
; Bits 4-5 - Manufacturer defined
|
; Bits 4-5 - Manufacturer defined
|
||||||
; Bits 6-7 - 00: HDD activity LED off; any other value is "on"
|
; Bits 6-7 - 00: HDD activity LED off; any other value is "on"
|
||||||
;
|
|
||||||
; TODO: fix the prolog, epilog and stack usage to confirm with cdecl16
|
|
||||||
EnableA20:
|
EnableA20:
|
||||||
__CDECL16_ENTRY
|
__CDECL16_ENTRY
|
||||||
|
|
||||||
push ds
|
push ds
|
||||||
push es
|
push es
|
||||||
pushf ; save data and extra segment since we touch them and save flags
|
pushf ; save data and extra segment since we touch them and save flags
|
||||||
@@ -850,7 +846,6 @@ EnableA20:
|
|||||||
__CDECL16_EXIT
|
__CDECL16_EXIT
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; TODO: fix the prolog, epilog and stack usage to confirm with cdecl16
|
|
||||||
EnterUnrealMode:
|
EnterUnrealMode:
|
||||||
__CDECL16_ENTRY
|
__CDECL16_ENTRY
|
||||||
.func:
|
.func:
|
||||||
|
|||||||
Reference in New Issue
Block a user