fix: capacities single-sourced in types (display MAX_WINDOWS/BUFFER_PAGES, storage MAX_CLIENTS), display + storage budgets derived from them, const asserts on VA layouts; kernel regions 64 -> 256
This commit is contained in:
@@ -16,8 +16,11 @@ use crate::windows::MAX_WINDOWS;
|
||||
/// a 1280x800 window; high, clear of the GPU's mappings and of the heap,
|
||||
/// which grows from the bottom.
|
||||
const BUFFERS_VA: usize = 0x1000_0000;
|
||||
const BUFFER_SPAN: usize = 0x0040_0000;
|
||||
const PAGE: usize = 4096;
|
||||
const BUFFER_SPAN: usize = types::display::window::BUFFER_PAGES * PAGE;
|
||||
// Every window's buffer fits between here and the themes' reading buffer
|
||||
// (0x1800_0000), below the heap's end.
|
||||
const _: () = assert!(BUFFERS_VA + MAX_WINDOWS * BUFFER_SPAN <= 0x1800_0000 && 0x1800_0000 < types::layout::HEAP_END);
|
||||
|
||||
pub struct KernelHost {
|
||||
/// The display's own endpoint, which window capabilities are minted
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
use types::display::window::{BADGE, NAME_BYTES};
|
||||
|
||||
pub const MAX_WINDOWS: usize = 8;
|
||||
pub use types::display::window::MAX_WINDOWS;
|
||||
/// Events received and not yet polled by the window in front.
|
||||
const QUEUED: usize = 32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user