From f0c7d4bbdf4b3c033bd9f9fabe2648455681b05a Mon Sep 17 00:00:00 2001 From: d0p1 Date: Fri, 5 Jul 2024 07:46:04 +0200 Subject: [PATCH] chore: git sync --- boot/common/bootinfo.inc | 10 ++++++++-- boot/common/protocol.inc | 4 ---- boot/loader/loader.asm | 7 ++++--- boot/loader/memory.inc | 2 -- 4 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 boot/common/protocol.inc diff --git a/boot/common/bootinfo.inc b/boot/common/bootinfo.inc index 9533cd8..e889bbf 100644 --- a/boot/common/bootinfo.inc +++ b/boot/common/bootinfo.inc @@ -1,3 +1,4 @@ + ;; File: bootinfo.inc struc BootInfoRange { .base dd ? @@ -5,7 +6,9 @@ struc BootInfoRange { } 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 @@ -46,6 +49,9 @@ boot_info_add_memmap: pop ebx ret +boot_sanitize_memory_map: + ret + ;; Function: boot_info_print_mmap boot_info_print_mmap: xor ecx, ecx @@ -65,4 +71,4 @@ boot_info_print_mmap: jbe .loop ret -szMsgMemMap db 'Address: %x - Length: %x' +szMsgMemMap db 'Address: %x - Length: %x', 0 diff --git a/boot/common/protocol.inc b/boot/common/protocol.inc deleted file mode 100644 index 72e1c18..0000000 --- a/boot/common/protocol.inc +++ /dev/null @@ -1,4 +0,0 @@ -struct BootProtocol -{ - -} diff --git a/boot/loader/loader.asm b/boot/loader/loader.asm index 7e066cb..d833f70 100644 --- a/boot/loader/loader.asm +++ b/boot/loader/loader.asm @@ -99,12 +99,10 @@ _start: call memory_get_map jc .error_memory - xchg bx, bx - call boot_info_print_mmap ; video information - call video_setup + ;call video_setup ; load GDT and enter Protected-Mode lgdt [gdt_ptr] @@ -213,4 +211,7 @@ boot_page_directory: boot_768_page_table: rb 4096 +boot_0_page_table: + rb 4096 + _end: diff --git a/boot/loader/memory.inc b/boot/loader/memory.inc index 81f0364..1328ef4 100644 --- a/boot/loader/memory.inc +++ b/boot/loader/memory.inc @@ -51,7 +51,6 @@ memory_e820_get_map: xor ebx, ebx @@: clc - xchg bx, bx xor eax, eax mov es, ax mov di, pE280AddrRange @@ -59,7 +58,6 @@ memory_e820_get_map: mov eax, 0xE820 mov edx, 0x534D4150 int 0x15 - xchg bx, bx jc .error cmp eax, 0x534D4150 jne .error