MCPcopy Create free account
hub / github.com/Starry-OS/StarryOS / copy_from_kernel

Function copy_from_kernel

core/src/mm.rs:40–49  ·  view source on GitHub ↗

If the target architecture requires it, the kernel portion of the address space will be copied to the user address space.

(_aspace: &mut AddrSpace)

Source from the content-addressed store, hash-verified

38/// If the target architecture requires it, the kernel portion of the address
39/// space will be copied to the user address space.
40pub fn copy_from_kernel(_aspace: &mut AddrSpace) -> AxResult {
41 #[cfg(not(any(target_arch = "aarch64", target_arch = "loongarch64")))]
42 {
43 // ARMv8 (aarch64) and LoongArch64 use separate page tables for user space
44 // (aarch64: TTBR0_EL1, LoongArch64: PGDL), so there is no need to copy the
45 // kernel portion to the user page table.
46 _aspace.copy_mappings_from(&axmm::kernel_aspace().lock())?;
47 }
48 Ok(())
49}
50
51/// Map the signal trampoline to the user address space.
52pub fn map_trampoline(aspace: &mut AddrSpace) -> AxResult {

Callers 2

run_initprocFunction · 0.85
sys_cloneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected