aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-07-14 17:16:54 +0200
committerXander <xander@biltopia.org>2023-07-14 17:16:54 +0200
commit5ad68a0c087d21fa1d0f82bea1550169f1e4c1aa (patch)
treef9d68644254e60926e568071cfbd5fcd2dc1ad5b /arch/x86_64
parent059b5ba286b3fef4d01c3ced9cd829ace5dd6340 (diff)
downloadats-os-5ad68a0c087d21fa1d0f82bea1550169f1e4c1aa.tar.xz
ats-os-5ad68a0c087d21fa1d0f82bea1550169f1e4c1aa.zip
Preparing for multiboot information
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/boot/boot.asm3
-rw-r--r--arch/x86_64/boot/linker.ld12
2 files changed, 12 insertions, 3 deletions
diff --git a/arch/x86_64/boot/boot.asm b/arch/x86_64/boot/boot.asm
index 1abda41..3f85423 100644
--- a/arch/x86_64/boot/boot.asm
+++ b/arch/x86_64/boot/boot.asm
@@ -5,6 +5,7 @@ section .text
bits 32
start:
mov esp, stack_top
+ mov edi, ebx ;Move Multiboot info pointer to edi
call check_multiboot
call check_cpuid
@@ -150,7 +151,7 @@ p3_table:
p2_table:
resb 4096
stack_bottom:
- resb 4096
+ resb 4096 * 4
stack_top:
section .rodata
diff --git a/arch/x86_64/boot/linker.ld b/arch/x86_64/boot/linker.ld
index 5d788f1..0ad745e 100644
--- a/arch/x86_64/boot/linker.ld
+++ b/arch/x86_64/boot/linker.ld
@@ -6,11 +6,19 @@ SECTIONS {
.boot :
{
/* ensure that the multiboot header is at the beginning */
- *(.multiboot_header)
+ KEEP(*(.multiboot_header))
}
.text :
{
- *(.text)
+ *(.text .text.*)
+ }
+
+ .rodata : {
+ *(.rodata .rodata.*)
+ }
+
+ .data.rel.ro : {
+ *(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*)
}
}