Multiboot Memory Map get copied to a "safe" place
This commit is contained in:
15
source/kernel/Boot/Multiboot.S
Normal file
15
source/kernel/Boot/Multiboot.S
Normal 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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user