feat(k-ui): text_input (label above, app owns text via on_change, caret, erase, submit, secret, placeholder); keys Left/Right/Space/Char/Erase; settings app filter; apps 8-page stack (k-ui overflowed 16K), args page -> 0x1000
This commit is contained in:
@@ -10,8 +10,11 @@ const PAGE_SIZE: usize = 4096;
|
||||
const USER_CODE_BASE: usize = 0x10000;
|
||||
/// A program's stack, below its image, unless its manifest says more.
|
||||
pub(crate) const STACK_PAGES: usize = 4;
|
||||
/// The most there is room for under the image (page 0 stays unmapped).
|
||||
const MAX_STACK_PAGES: usize = USER_CODE_BASE / PAGE_SIZE - 1;
|
||||
/// An app's: drawing (tiny-skia, fontdue) takes more than 16 KiB.
|
||||
pub(crate) const APP_STACK_PAGES: usize = 8;
|
||||
/// The most there is room for under the image, above the arguments page
|
||||
/// (page 0 stays unmapped).
|
||||
const MAX_STACK_PAGES: usize = (USER_CODE_BASE - types::start_arg::ARGS_VA) / PAGE_SIZE - 1;
|
||||
const CREATE_CAP: CapSlot = CapSlot::const_new(0);
|
||||
/// Where a program file is read through on its way into a process, a
|
||||
/// chunk at a time, so a program may be any size.
|
||||
|
||||
@@ -137,7 +137,7 @@ impl Launcher<'_> {
|
||||
// The grant is the file: its path inside it is empty.
|
||||
let found = file.open(b"").and_then(|h| file.close(h)).is_ok();
|
||||
let (_, scratch) = self.storage();
|
||||
let loaded = found.then(|| load::load_binary(&mut file, scratch, b"", r.limits, load::STACK_PAGES)).flatten();
|
||||
let loaded = found.then(|| load::load_binary(&mut file, scratch, b"", r.limits, load::APP_STACK_PAGES)).flatten();
|
||||
file.detach();
|
||||
let Some(loaded) = loaded else {
|
||||
return refused(if found { reply::ERROR } else { reply::NOT_FOUND });
|
||||
|
||||
Reference in New Issue
Block a user