Skip to content

Commit

Permalink
Mapping RAM Disk
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Jul 20, 2023
1 parent 98e713f commit 70a7d02
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/risc-v/src/qemu-rv/qemu_rv_mm_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ void qemu_rv_kernel_mappings(void)
binfo("map kernel data\n");
map_region(KSRAM_START, KSRAM_START, KSRAM_SIZE, MMU_KDATA_FLAGS);

/* Added RAM Disk */
//// From nuttx/boards/risc-v/litex/arty_a7/include/board_memorymap.h
/* ramdisk (RW) */
extern uint8_t __ramdisk_start[];
extern uint8_t __ramdisk_size[];
_info("map RAM Disk\n");
map_region((uintptr_t)__ramdisk_start, (uintptr_t)__ramdisk_start, (uintptr_t)__ramdisk_size, MMU_KDATA_FLAGS);
_info("map RAM Disk done\n");

#ifdef CONFIG_ARCH_MMU_TYPE_SV39

/* Connect the L1 and L2 page tables for the kernel text and data */
Expand Down

0 comments on commit 70a7d02

Please sign in to comment.