Implement many process syscalls.
This commit is contained in:
parent
81bef97f09
commit
3642f9c56d
20 changed files with 383 additions and 88 deletions
|
@ -7,12 +7,6 @@ pub const PAGE_SIZE_BITS: usize = 0xc;
|
|||
|
||||
pub const TRAMPOLINE: usize = usize::MAX - PAGE_SIZE + 1;
|
||||
pub const TRAP_CONTEXT: usize = TRAMPOLINE - PAGE_SIZE;
|
||||
/// Return (bottom, top) of a kernel stack in kernel space.
|
||||
pub fn kernel_stack_position(app_id: usize) -> (usize, usize) {
|
||||
let top = TRAMPOLINE - app_id * (KERNEL_STACK_SIZE + PAGE_SIZE);
|
||||
let bottom = top - KERNEL_STACK_SIZE;
|
||||
(bottom, top)
|
||||
}
|
||||
|
||||
#[cfg(feature = "board_k210")]
|
||||
pub const CPU_FREQ: usize = 10000000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue