mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
update comments and add license headers
This commit is contained in:
parent
dcef549099
commit
a07ab0e121
4 changed files with 16 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
// SPDX-FileCopyrightText: 2022 Foundation Devices, Inc. <hello@foundationdevices.com>
|
||||
// SPDX-FileCopyrightText: 2024 bunnie <bunnie@kosagi.com>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pub mod rand;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// SPDX-FileCopyrightText: 2020 Sean Cross <sean@xobs.io>
|
||||
// SPDX-FileCopyrightText: 2022 Foundation Devices, Inc. <hello@foundationdevices.com>
|
||||
// SPDX-FileCopyrightText: 2024 bunnie <bunnie@kosagi.com>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use cramium_hal::sce;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// SPDX-FileCopyrightText: 2020 Sean Cross <sean@xobs.io>
|
||||
// SPDX-FileCopyrightText: 2022 Foundation Devices, Inc. <hello@foundationdevices.com>
|
||||
// SPDX-FileCopyrightText: 2024 bunnie <bunnie@kosagi.com>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use utralib::generated::*;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: 2024 bunnie <bunnie@kosagi.com>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use loader::swap::SWAP_FLG_WIRED;
|
||||
use loader::swap::SWAP_RPT_VADDR;
|
||||
use xous_kernel::SWAPPER_PID;
|
||||
|
|
@ -9,6 +12,16 @@ use crate::arch::mem::PAGE_SIZE;
|
|||
use crate::mem::MemoryManager;
|
||||
use crate::services::SystemServices;
|
||||
|
||||
/// This structure is a copy of what's defined in the loader's swap module. The reason
|
||||
/// we can't condense the two APIs is because PID is actually defined differently in the
|
||||
/// kernel than in the loader: a PID for the loader is a `u8`. A PID for the kernel is a
|
||||
/// NonZeroU8. Thus the APIs are not compatible, and we have to maintain two sets of
|
||||
/// calls.
|
||||
///
|
||||
/// Also, critically, `SwapAlloc` in the kernel needs an `update` and `reparent` call,
|
||||
/// which increments `next_epoch` -- these can't be migrated into the swapper, and Rust
|
||||
/// does not allow extensions to types that aren't native to your crate. So, we're left
|
||||
/// with redundant copies of the structure definition.
|
||||
pub struct SwapAlloc {
|
||||
timestamp: u32,
|
||||
/// virtual_page_number[19:0] | flags[3:0] | pid[7:0]
|
||||
|
|
|
|||
Loading…
Reference in a new issue