feat: change font and release greate tty output

This commit is contained in:
Faynot
2026-06-26 22:07:16 +03:00
parent 3f87a93d52
commit b59779ca4a
13 changed files with 183 additions and 139 deletions

View File

@@ -49,9 +49,7 @@ use crate::mem::pmm::PAGE_SIZE;
extern crate alloc;
// ══════════════════════════════════════════════════════════════════════════════
// Message packing constants
// ══════════════════════════════════════════════════════════════════════════════
const QUEUE_SIZE: usize = 1024; // power-of-two
const QUEUE_MASK: usize = QUEUE_SIZE - 1;
@@ -67,10 +65,7 @@ mod packing {
pub const ARG_MASK: u64 = 0x000F_FFFF; // 20 bits
}
// ══════════════════════════════════════════════════════════════════════════════
// Request type
// ══════════════════════════════════════════════════════════════════════════════
/// Asynchronous request submitted to a `PMActor` inbox.
///
/// `channel_id` identifies where the response should be routed.
@@ -163,9 +158,7 @@ impl PMRequest {
}
}
// ══════════════════════════════════════════════════════════════════════════════
// Response type
// ══════════════════════════════════════════════════════════════════════════════
/// Result returned by `PMActor::process_messages()` for each completed request.
#[derive(Debug, Clone, Copy)]
@@ -194,10 +187,7 @@ pub enum PMResult {
Freed { pages_returned: usize },
}
// ══════════════════════════════════════════════════════════════════════════════
// Lock-free MPSC inbox
// ══════════════════════════════════════════════════════════════════════════════
/// MPSC ring buffer for PMRequest values.
///
/// Producers (any core, any context) call `send`; the owning PMActor calls
@@ -268,10 +258,7 @@ impl PMActorQueue {
}
}
// ══════════════════════════════════════════════════════════════════════════════
// PM Actor
// ══════════════════════════════════════════════════════════════════════════════
/// An autonomous physical-memory actor.
///
/// Owns a `BuddyAllocator` over its capital range and a lock-free MPSC inbox.
@@ -284,16 +271,12 @@ impl PMActorQueue {
pub struct PMActor {
/// Unique identity within the actor federation.
pub actor_id: u64,
/// Root strong capability over the entire managed physical range.
pub root_untyped: Capability,
/// `(inclusive_start, exclusive_end)` physical addresses.
pub managed_range: (PhysAddr, PhysAddr),
/// Inbox — producers write here, actor reads here.
queue: PMActorQueue,
/// Local buddy allocator. Only ever touched in `process_messages`.
buddy: BuddyAllocator,
}
@@ -319,7 +302,7 @@ impl PMActor {
}
}
// ─── Producer API (callable from any context) ──────────────────────────
//Producer API (callable from any context)
/// Submit a request to this actor's inbox.
///
@@ -329,7 +312,7 @@ impl PMActor {
self.queue.send(req)
}
// ─── Consumer API (actor's own scheduled context) ─────────────────────
//Consumer API (actor's own scheduled context)
/// Drain the inbox and execute all pending requests.
///
@@ -370,7 +353,7 @@ impl PMActor {
responses
}
// ─── Introspection ────────────────────────────────────────────────────
//Introspection
/// Free pages remaining in this actor's buddy pool.
#[inline]
@@ -385,7 +368,7 @@ impl PMActor {
}
}
// ── Private handler implementations ──────────────────────────────────────────
//Private handler implementations
impl PMActor {
fn handle_allocate(