diff options
| author | Bobby <[email protected]> | 2026-02-20 18:56:01 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-02-20 18:56:01 +0530 |
| commit | 143a912d8dba41ca3b13c491f5bcb094dd8b567e (patch) | |
| tree | 5053fcd91cfb989e4a67373922973d937bbca080 | |
| parent | c78f416d7de64a6ffb1b27faef62c9ca9b7c1322 (diff) | |
| download | akiba-143a912d8dba41ca3b13c491f5bcb094dd8b567e.tar.xz akiba-143a912d8dba41ca3b13c491f5bcb094dd8b567e.zip | |
fix: Update memory section start address in linker script to 512MB
| -rw-r--r-- | mirai/kata/memory.zig | 8 | ||||
| -rw-r--r-- | toolchain/linker/akiba.binary.linker | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/mirai/kata/memory.zig b/mirai/kata/memory.zig index 1ec8ef0..9d29758 100644 --- a/mirai/kata/memory.zig +++ b/mirai/kata/memory.zig @@ -95,10 +95,10 @@ pub fn setup(kata: *types.Kata, framebuffer_phys: u64, framebuffer_size: u64) !v const first_page = pmm.alloc_page() orelse return error.OutOfMemory; const kernel_stack_base = first_page; - // Identity map first page in kata's page table + // Identity map first page _ = try paging.map_page_in_table(kata.page_table, first_page, first_page, paging.PAGE_WRITABLE); - // Zero the page (via higher-half which kernel always has mapped) + // Zero the page var page_ptr: [*]volatile u8 = @ptrFromInt(first_page + HIGHER_HALF); for (0..PAGE_SIZE) |j| { page_ptr[j] = 0; @@ -116,7 +116,7 @@ pub fn setup(kata: *types.Kata, framebuffer_phys: u64, framebuffer_size: u64) !v break; } - // Identity map this page in kata's page table + // Identity map this page _ = try paging.map_page_in_table(kata.page_table, page, page, paging.PAGE_WRITABLE); // Zero the page @@ -126,7 +126,7 @@ pub fn setup(kata: *types.Kata, framebuffer_phys: u64, framebuffer_size: u64) !v } } - // Stack top uses IDENTITY address (not higher-half) since that's what we mapped + // Stack top is at the end of allocated contiguous pages (identity address) const actual_stack_size = i * PAGE_SIZE; kata.stack_top = kernel_stack_base + actual_stack_size; diff --git a/toolchain/linker/akiba.binary.linker b/toolchain/linker/akiba.binary.linker index 1ef6085..7a5a72d 100644 --- a/toolchain/linker/akiba.binary.linker +++ b/toolchain/linker/akiba.binary.linker @@ -4,7 +4,7 @@ ENTRY(_start) SECTIONS { - . = 0x1000000; /* Start at 16MB (after kernel) */ + . = 0x20000000; /* Start at 512MB (above kernel identity-mapped region) */ .text : { *(.text) |
