Kernel/Bootloader: banan-os can now be booted with my bootloader :D

This commit is contained in:
2023-11-17 20:33:02 +02:00
parent d1444761a3
commit cb5a5d3ed1
5 changed files with 75 additions and 2 deletions

View File

@@ -108,7 +108,16 @@ protected_mode:
movw %bx, %fs
movw %bx, %gs
movw %bx, %ss
jmp *%eax
movl %eax, %ecx
movl $0xD3C60CFF, %eax
movl $banan_boot_info, %ebx
xorl %edx, %edx
xorl %esi, %esi
xorl %edi, %edi
jmp *%ecx
.code16
@@ -154,3 +163,9 @@ gdt:
gdtr:
.short . - gdt - 1
.quad gdt
banan_boot_info:
boot_command_line:
.long command_line
boot_memory_map:
.long memory_map

View File

@@ -68,6 +68,8 @@ command_line_enter_msg:
.section .bss
.global command_line
command_line:
# 100 character command line
command_line_buffer:
.skip 100

View File

@@ -122,6 +122,8 @@ memory_map_error_msg:
.section .bss
.global memory_map
memory_map:
memory_map_entry_count:
.skip 4
# 100 entries should be enough...