Skip to main content

Crate starry_kernel

Crate starry_kernel 

Source
Expand description

The core functionality of a monolithic kernel, including loading user programs and managing processes.

Published page tables have no external mutable escape hatch. Callers must use the address-space mutation APIs, which own TLB invalidation and deferred reclaim:

fn bypass_mm_owner(aspace: &mut starry_kernel::mm::AddrSpace) {
    let _page_table = aspace.page_table_mut();
}

Modules§

dyn_debug
entry
kprobe
Kernel probe (kprobe) subsystem for StarryOS.

Macros§

debug
Dynamic debug macro. When dynamic_debug feature is enabled, uses per-callsite static key for runtime control via /proc/dynamic_debug/control. Otherwise falls back to log::debug!.
debug_fn
Dynamic debug macro. When dynamic_debug feature is enabled, uses per-callsite static key for runtime control via /proc/dynamic_debug/control, and also prints the function name of the callsite. Otherwise falls back to log::debug!.

Structs§

ActivationLease
A per-CPU activation. The scheduler owns the value and must consume/drop it only after installing another root or the kernel root.
AddressSpaceCpuState
Scheduler-visible per-CPU state. active_cpus means that translations for this address space may still exist in those CPUs’ TLBs; it is deliberately not an affinity mask.
AddressSpaceId
Monotonic identity independent from a page-table root physical address.
AddressSpaceTag
Hardware TLB tag plus software generation.
AnonymousSource
AppliedMutation
Errno
EvictionLease
Ownership token held while a page’s reverse mappings are being revoked.
ExternalSource
FileSource
FrameLease
A bounded capability for a physical frame range owned by a PageObject. Allocation/deallocation policy remains in the architecture allocator; the MM layer never treats a bare PhysAddr as ownership.
InstalledPageTableRoot
Root and identity installed by the scheduler on one CPU.
LinearSource
MappingDelta
MappingGroup
MappingId
MappingPermissions
Permission views carried by one mapping operation. Keeping current, user-visible and maximum rights together prevents a caller from accidentally treating a lowered permission as the immutable VM envelope.
MappingSlot
Ownership record for one installed PTE.
MappingSlotKey
MmHandle
Explicit process ownership of an address space.
MmPin
Short-lived kernel ownership. It is safe to drop in IRQ context because only counters and preallocated queue links are touched; actual page-table destruction belongs to the sleepable reclaimer.
MutationGate
Serialization point for all VMA/PTE publication.
MutationReceipt
PageId
PageObject
PageOffset
PageOrder
PreparedMutation
Pre-publication transaction. Dropping this value is an abort and never changes the published address-space epoch.
PteDelta
PublishedMutation
PublishedPendingTlb
QuarantineFailure
Failure to record a TLB obligation while retaining ownership of the frame that must not be released yet.
RepairPermit
Returns address spaces whose last reclaim attempt entered NeedsRepair. The caller may repair the backend and invoke RepairPermit::retry for each returned permit; no cleanup is attempted implicitly.
ResidentDelta
RetirePermit
Permission to perform potentially sleeping destruction after quiescence.
RmapSet
Reverse mappings are explicit records rather than an implicit scan of all VMAs. A slot remains in this set until its PTE invalidation is acknowledged.
SwapToken
A stable token identifying a future swap-cache entry.
TlbQuarantine
Holds detached frames until every CPU named by a shootdown acknowledges it.
TlbRange
TlbRequest
A shootdown obligation. It is deliberately independent of the platform IPI implementation so a timeout cannot be mistaken for a completed flush.
UnsupportedSwap
Default provider used until a swap device is wired into Starry.
VmaDelta
VmaId
VmaMap
A persistent, path-copy interval tree.
VmaSnapshot
Stable metadata copied out of the mutable legacy backend. A snapshot may safely cross a lock boundary or a sleeping page-cache operation.
WritebackLease
Pins a PageObject while one dirty-generation snapshot is protected.

Enums§

ActivationError
CloneUserRefError
DmaOperation
The operation that gives a DMA-domain failure its Linux ABI meaning.
EvictionError
EvictionResult
MappingSource
Origin of a mapping. The payload types keep source-specific metadata out of the VMA interval tree while still making a source transition explicit.
MmState
MutationError
MutationState
PageSizePolicy
PageState
PinError
PublishEvent
QuarantineError
ReclaimError
SlotState
StarryError
Errors owned by the Starry kernel below the Linux syscall ABI boundary.
SwapError
TagMode
WritebackError

Traits§

SwapProvider
Capability boundary for anonymous swap.

Functions§

allocate_vma_id
Creates a process-wide unique VMA identifier.
request_repair_retry
Requests one explicit repair retry pass on the sleepable reclaimer.
take_repair_candidates

Type Aliases§

CpuMask
Architecture-neutral active-CPU bitset. Platform code can replace this alias with a wider mask without changing the ownership API.
InstalledAddressSpace
Name used by scheduler code that treats the root, identity, tag and epoch as one installed context.
MappingRights
Stable name for the permissions carried by a VMA. The architecture mapping implementation still supplies the bit layout, while callers no longer need to depend on the page-table module’s concrete type.
StarryResult
A result returned by Starry-owned kernel operations.
Vma
Public name used by callers that do not need to know that snapshots are copied out of the publication root.