Multiboot Memory Map get copied to a "safe" place

This commit is contained in:
2022-08-23 21:35:19 +02:00
parent 5051b8903c
commit 59ba41f3d2
5 changed files with 151 additions and 43 deletions

View File

@ -0,0 +1,15 @@
/*
* Multiboot
*/
.set ALIGN, 1<<0 /* align loaded modules on page boundaries */
.set MEMINFO, 1<<1 /* provide memory map */
.set FLAGS, ALIGN | MEMINFO /* this is the Multiboot 'flag' field */
.set MAGIC, 0x1BADB002 /* 'magic number' lets bootloader find the header */
.set CHECKSUM, -(MAGIC + FLAGS) /* checksum of above, to prove we are multiboot */
.section .multiboot.data, "aw"
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM

View File

@ -1,18 +1,4 @@
/*
* Multiboot
*/
.set ALIGN, 1<<0 /* align loaded modules on page boundaries */
.set MEMINFO, 1<<1 /* provide memory map */
.set FLAGS, ALIGN | MEMINFO /* this is the Multiboot 'flag' field */
.set MAGIC, 0x1BADB002 /* 'magic number' lets bootloader find the header */
.set CHECKSUM, -(MAGIC + FLAGS) /* checksum of above, to prove we are multiboot */
.section .multiboot.data, "aw"
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
.include "./source/kernel/Boot/Multiboot.S"
/*
* Allocate initial stack
*/
@ -120,14 +106,8 @@ isPaging:
pushl $0
popf
call early_main
cli
1: hlt
jmp 1b