feat: room for many apps: qemu 512M, pool sized from RAM (448M, 114688 frames), user VA 32M -> 1G, display 8 windows (buffers at 0x1000_0000, stack 14 pages), pm app budget 24 MiB, init 16 children (notif bits moved)

This commit is contained in:
2026-10-28 15:31:30 +01:00
parent 8c518b84aa
commit c3eb70191b
11 changed files with 30 additions and 23 deletions

View File

@@ -1,13 +1,14 @@
pub const RAM_BASE: usize = 0x80000000;
pub const RAM_SIZE: usize = 128 * 1024 * 1024;
/// What the Makefile and scripts give QEMU (`-m 512M`).
pub const RAM_SIZE: usize = 512 * 1024 * 1024;
pub const UART_BASE: usize = 0x10000000;
pub const VIRTIO_BASE: usize = 0x10001000;
pub const VIRTIO_SIZE: usize = 0x8000;
pub const PLIC_BASE: usize = 0x0C000000;
pub const CLINT_BASE: usize = 0x02000000;
pub const USER_POOL_BASE: usize = 0x84000000;
/// 64 MiB, up to the end of RAM (QEMU virt's default 128 MiB).
pub const USER_POOL_PAGES: usize = 16384;
/// The rest of RAM, from `USER_POOL_BASE` (448 MiB).
pub const USER_POOL_PAGES: usize = (RAM_BASE + RAM_SIZE - USER_POOL_BASE) / 4096;
pub const TICK_INTERVAL: u64 = 10_000_000;
/// QEMU virt's PLIC lines.

View File

@@ -1,9 +1,10 @@
use super::pte::{PAGE_SIZE, PageTable, PageTableEntry, Sv39Flags, table_at, vpn};
use platform::{FrameSource, MapError};
/// User mappings live in root slot 0, in a private L1 per address space.
/// User mappings live in root slot 0, in a private L1 per address space:
/// all of its 1 GiB (leaf tables are made as pages are mapped).
pub const USER_VA_START: usize = 0x1000;
pub const USER_VA_END: usize = 0x0200_0000;
pub const USER_VA_END: usize = 0x4000_0000;
fn fresh_table(frames: &mut dyn FrameSource) -> Result<usize, MapError> {
let pa = frames