mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
extract reserved pages from board files
This commit is contained in:
parent
1eb1a1a671
commit
d3691a556c
1 changed files with 13 additions and 8 deletions
|
|
@ -102,19 +102,24 @@ fn main() {
|
|||
ifram_allocs[0].push(None);
|
||||
ifram_allocs[1].push(None);
|
||||
}
|
||||
// Top page of IFRAM0 is occupied by the log server's Tx buffer. We can't know the
|
||||
// `Sender` of it, so fill it with a value for `Some` that can't map to any PID.
|
||||
ifram_allocs[0][31] = Some(Sender::from_usize(usize::MAX));
|
||||
// mark loader-hardwired pages for IFRAM0
|
||||
for i in
|
||||
cramium_hal::board::IFRAM0_RESERVED_PAGE_RANGE[0]..=cramium_hal::board::IFRAM0_RESERVED_PAGE_RANGE[1]
|
||||
{
|
||||
ifram_allocs[0][i] = Some(Sender::from_usize(usize::MAX));
|
||||
}
|
||||
// mark loader-hardwired pages for IFRAM1
|
||||
for i in
|
||||
cramium_hal::board::IFRAM1_RESERVED_PAGE_RANGE[0]..=cramium_hal::board::IFRAM1_RESERVED_PAGE_RANGE[1]
|
||||
{
|
||||
ifram_allocs[1][i] = Some(Sender::from_usize(usize::MAX));
|
||||
}
|
||||
// Second page from top of IFRAM0 is occupied by the swap handler. This was allocated
|
||||
// by the loader, before the kernel even started.
|
||||
// by the loader, before the kernel even started. Mark the PID properly.
|
||||
#[cfg(feature = "swap")]
|
||||
{
|
||||
ifram_allocs[0][30] = Some(Sender::from_usize(SWAPPER_PID as usize));
|
||||
}
|
||||
#[cfg(feature = "app-uart")]
|
||||
{
|
||||
ifram_allocs[0][29] = Some(Sender::from_usize(usize::MAX));
|
||||
}
|
||||
|
||||
let iox_page = xous::syscall::map_memory(
|
||||
xous::MemoryAddress::new(utralib::generated::HW_IOX_BASE),
|
||||
|
|
|
|||
Loading…
Reference in a new issue