Skip to content

Commit 9ceb17f

Browse files
authored
[bsp][qemu-virt64-riscv]修正内存大小超限制的问题
1 parent 2322f01 commit 9ceb17f

File tree

1 file changed

+3
-1
lines changed
  • bsp/qemu-virt64-riscv/driver

1 file changed

+3
-1
lines changed

bsp/qemu-virt64-riscv/driver/board.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ extern unsigned int __bss_end;
2020
#define KERNEL_VADDR_START 0x0
2121
#endif
2222

23+
#define VIRT64_SBI_MEMSZ (0x200000)
24+
2325
#define RT_HW_HEAP_BEGIN ((void *)&__bss_end)
2426
#define RT_HW_HEAP_END ((void *)(RT_HW_HEAP_BEGIN + 64 * 1024 * 1024))
2527
#define RT_HW_PAGE_START RT_HW_HEAP_END
26-
#define RT_HW_PAGE_END ((void *)(KERNEL_VADDR_START + 256 * 1024 * 1024))
28+
#define RT_HW_PAGE_END ((void *)(KERNEL_VADDR_START + (256 * 1024 * 1024 - VIRT64_SBI_MEMSZ)))
2729

2830
void rt_hw_board_init(void);
2931
void rt_init_user_mem(struct rt_thread *thread, const char *name,

0 commit comments

Comments
 (0)