From 040e30c87a6f695f5d5c27435982f0723b924369 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 27 Aug 2021 21:37:09 +0800 Subject: [PATCH 1/3] 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 From bc78e9145215ab9379a9b0d56b92f6ca967954a7 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 27 Aug 2021 23:21:05 +0800 Subject: [PATCH 2/3] Update memory.md --- docs/memory.md | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/docs/memory.md b/docs/memory.md index 3d3db32c1..d6a28f92f 100644 --- a/docs/memory.md +++ b/docs/memory.md @@ -1,6 +1,8 @@ # Memory Layout +You definitely want to refer to the [Xous Book](https://betrusted.io/xous-book/ch03-01-memory-layout.html) if you're trying to debug a kernel panic, before reading on here. + Xous assumes a memory-mapped IO system. Furthermore, it assumes there is one section of "general-purpose RAM", and zero or more additional memory sections. Finally, it assumes there is an MMU. @@ -67,21 +69,6 @@ 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 From 57c504af493d62898a8c9ae4f8bb29f0c5ed238b Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 27 Aug 2021 23:21:37 +0800 Subject: [PATCH 3/3] Update memory.md --- docs/memory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/memory.md b/docs/memory.md index d6a28f92f..0ff8842c2 100644 --- a/docs/memory.md +++ b/docs/memory.md @@ -1,7 +1,7 @@ # Memory Layout -You definitely want to refer to the [Xous Book](https://betrusted.io/xous-book/ch03-01-memory-layout.html) if you're trying to debug a kernel panic, before reading on here. +You definitely want to refer to the [Xous Book](https://betrusted.io/xous-book/ch03-01-memory-layout.html#virtual-memory-regions) if you're trying to debug a kernel panic, before reading on here. Xous assumes a memory-mapped IO system. Furthermore, it assumes there is one section of "general-purpose RAM", and zero or more additional