File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
awkernel_lib/src/arch/rv64 Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,19 @@ impl MemorySet {
260260 None ,
261261 ) ;
262262
263+ unsafe {
264+ unsafe_puts ( "Mapping physical memory...\r \n " ) ;
265+ }
266+ memory_set. push (
267+ MapArea :: new (
268+ VirtAddr :: from_usize ( ekernel as * const ( ) as usize ) ,
269+ VirtAddr :: from_usize ( super :: address:: MEMORY_END as usize ) ,
270+ MapType :: Identical ,
271+ MapPermission :: R | MapPermission :: W ,
272+ ) ,
273+ None ,
274+ ) ;
275+
263276 // Note: Heap mapping is created separately in calculate_dynamic_heap_size()
264277 memory_set
265278 }
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ unsafe fn init_heap_allocation() {
156156 fn ekernel ( ) ;
157157 }
158158
159- let heap_start = ( ekernel as usize + 0xfff ) & !0xfff ; // Align to 4K
159+ let heap_start = ( ekernel as * const ( ) as usize + 0xfff ) & !0xfff ; // Align to 4K
160160 let backup_size = BACKUP_HEAP_SIZE ;
161161 let total_heap_size = awkernel_lib:: arch:: rv64:: get_heap_size ( ) ;
162162
You can’t perform that action at this time.
0 commit comments