From 040e30c87a6f695f5d5c27435982f0723b924369 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 27 Aug 2021 21:37:09 +0800 Subject: [PATCH] Update memory.md --- docs/memory.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/memory.md b/docs/memory.md index 9e43fbf93..3d3db32c1 100644 --- a/docs/memory.md +++ b/docs/memory.md @@ -67,6 +67,21 @@ assigned to every process simply by mapping megapage 1023 (`0xffc00000`). Note that the stack pointer is not necessarily fixed, and may be changed in a later revision. +Other addresses can be [found in Xous](https://github.com/betrusted-io/xous-core/blob/main/kernel/src/arch/riscv/mem.rs#L10-L18): + +```rust +// pub const DEFAULT_STACK_TOP: usize = 0x8000_0000; +pub const DEFAULT_HEAP_BASE: usize = 0x2000_0000; +pub const DEFAULT_MESSAGE_BASE: usize = 0x4000_0000; +pub const DEFAULT_BASE: usize = 0x6000_0000; + +pub const USER_AREA_END: usize = 0xff00_0000; +pub const EXCEPTION_STACK_TOP: usize = 0xffff_0000; +pub const PAGE_SIZE: usize = 4096; +const PAGE_TABLE_OFFSET: usize = 0xff40_0000; +const PAGE_TABLE_ROOT_OFFSET: usize = 0xff80_0000; +``` + ## Special Physical Memory Addresses | Address | Description