chore: git sync

This commit is contained in:
d0p1 🏳️‍⚧️ 2024-07-05 07:46:04 +02:00
parent cf8449ce13
commit f0c7d4bbdf
4 changed files with 12 additions and 11 deletions

View file

@ -1,3 +1,4 @@
;; File: bootinfo.inc
struc BootInfoRange { struc BootInfoRange {
.base dd ? .base dd ?
@ -5,7 +6,9 @@ struc BootInfoRange {
} }
struc BootInfo { struc BootInfo {
.mmap dd 4*2*40 dup(0) .mmap dd 4*2*40 dup(0)
.kernel_start dd ?
.kernel_size dd ?
} }
BOOTINFO_MEMORY_LIMIT = 0xFFFFF000 BOOTINFO_MEMORY_LIMIT = 0xFFFFF000
@ -46,6 +49,9 @@ boot_info_add_memmap:
pop ebx pop ebx
ret ret
boot_sanitize_memory_map:
ret
;; Function: boot_info_print_mmap ;; Function: boot_info_print_mmap
boot_info_print_mmap: boot_info_print_mmap:
xor ecx, ecx xor ecx, ecx
@ -65,4 +71,4 @@ boot_info_print_mmap:
jbe .loop jbe .loop
ret ret
szMsgMemMap db 'Address: %x - Length: %x' szMsgMemMap db 'Address: %x - Length: %x', 0

View file

@ -1,4 +0,0 @@
struct BootProtocol
{
}

View file

@ -99,12 +99,10 @@ _start:
call memory_get_map call memory_get_map
jc .error_memory jc .error_memory
xchg bx, bx
call boot_info_print_mmap call boot_info_print_mmap
; video information ; video information
call video_setup ;call video_setup
; load GDT and enter Protected-Mode ; load GDT and enter Protected-Mode
lgdt [gdt_ptr] lgdt [gdt_ptr]
@ -213,4 +211,7 @@ boot_page_directory:
boot_768_page_table: boot_768_page_table:
rb 4096 rb 4096
boot_0_page_table:
rb 4096
_end: _end:

View file

@ -51,7 +51,6 @@ memory_e820_get_map:
xor ebx, ebx xor ebx, ebx
@@: @@:
clc clc
xchg bx, bx
xor eax, eax xor eax, eax
mov es, ax mov es, ax
mov di, pE280AddrRange mov di, pE280AddrRange
@ -59,7 +58,6 @@ memory_e820_get_map:
mov eax, 0xE820 mov eax, 0xE820
mov edx, 0x534D4150 mov edx, 0x534D4150
int 0x15 int 0x15
xchg bx, bx
jc .error jc .error
cmp eax, 0x534D4150 cmp eax, 0x534D4150
jne .error jne .error