Skip to content

Commit

Permalink
fix(aarch64): use correct dynamic memory pointer provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroening committed Dec 20, 2024
1 parent 831b983 commit 171d52a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/arch/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::os::CONSOLE;
use crate::BootInfoExt;

extern "C" {
static loader_end: u8;
static mut loader_end: u8;
static mut l0_pgtable: u64;
static mut l1_pgtable: u64;
static mut l2_pgtable: u64;
Expand All @@ -46,7 +46,7 @@ const PT_MEM_CD: u64 = 0x70F;
const PT_SELF: u64 = 1 << 55;

pub unsafe fn get_memory(_memory_size: u64) -> u64 {
(ptr::addr_of!(loader_end).addr() as u64).align_up(LargePageSize::SIZE as u64)
(ptr::addr_of_mut!(loader_end).expose_addr() as u64).align_up(LargePageSize::SIZE as u64)
}

pub fn find_kernel() -> &'static [u8] {
Expand Down

0 comments on commit 171d52a

Please sign in to comment.