Commit Graph
36 Commits
Author SHA1 Message Date
daniel abfd9de8f6 feat: add SYS_FUTEX_WAIT and SYS_FUTEX_WAKE syscalls; revamp desktop application categories 2026-10-13 07:11:39 +02:00
daniel 2aa6360b3d feat: switch text to UTF-8; add Unicode key events, dead keys & Czech layout; fix numpad navigation; add NumLock support 2026-10-03 10:11:49 +02:00
daniel ae5e84592d feat: add permission consent prompts, drop permitted capability mask 2026-09-30 08:32:48 +02:00
daniel e641500b40 feat: add kernel ACPI support for querying battery percentage, add battery indicator to desktop, move log state to 0:/state directory 2026-09-11 07:11:48 +02:00
daniel e7646bbbdb feat: implement kernel capability model 2026-08-29 16:53:04 +02:00
daniel cc90b34fdb cleanup: update stale comments 2026-08-15 21:18:03 +02:00
daniel 0f81276efc feat: add inherited sessions and desktop session teardown 2026-08-14 10:33:20 +02:00
daniel 3ef98a9fd5 fix: inherit process environment and untrack libc objects 2026-08-11 13:08:40 +02:00
daniel 9b23d99082 feat: overhaul userspace heap and virtual memory 2026-08-10 12:25:27 +02:00
daniel b1c55073c7 fix: kernel concurrency, interrupt context, and user VA safety 2026-08-01 15:43:38 +02:00
daniel 8e6b619b02 feat: port gcc to MontaukOS 2026-07-17 15:47:45 +02:00
danielandClaude Fable 5 5db2bd4c7c feat: TLS runtime - PT_TLS loading and per-thread FS base
MontaukOS binaries could not use thread-local storage: the ELF loader
ignored PT_TLS and no FS base was ever programmed, so any %fs access
(initial-exec/local-exec TLS, e.g. libbfd's _Thread_local error state)
page faulted at address 0. This is the kernel prerequisite for
cc1plus/libstdc++ in the GCC port.

ELF loader: parse PT_TLS and build the main thread's TLS block above
the loaded image (x86-64 variant II ABI: block below the thread
pointer, TP = base + align_up(memsz, align), .tdata copied from the
template, .tbss zeroed, ABI self-pointer stored at [TP]). The
template description is kept on the process for thread spawns.

Scheduler: fsBase per thread, loaded into IA32_FS_BASE at every
dispatch site through a per-CPU cache - TLS-free processes cost one
MSR write per CPU ever, and userspace cannot desync the cache since
CR4.FSGSBASE stays off. SYS_THREAD_SPAWN gives each new thread its
own TLS block copied from the template (allocated from the process
heap; reclaimed at process teardown).

Ships tls-test.elf in the SDK (built by the devkit target): checks
.tdata values, .tbss zeroing, and the %fs:0 self-pointer, exiting
nonzero on failure. Boot-smoke verified; existing TLS-free programs
are unaffected.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-16 18:48:25 +02:00
danielandClaude Fable 5 75184e0651 feat: process exit codes, posix_spawn, 4 KiB command lines
Groundwork for the GCC driver: a compiler driver must spawn cc1/as/ld
and know whether each stage succeeded.

Kernel: the scheduler keeps an exit-code ledger (pid -> code; pids are
monotonic so entries never alias), published during teardown right
before waiters wake. SYS_EXIT records main()'s return value, SYS_KILL
records 256+SIGKILL, and the exception handler records 256+signal
mapped from the fault vector (#PF/#GP -> SIGSEGV, #DE/FP -> SIGFPE,
#UD -> SIGILL). SYS_WAITPID now returns the code: 0..255 for a normal
exit, 256+signal for a violent death. Process args grow from 256
bytes to 4 KiB (cc1 invocations do not fit in 256), with crt1 now
parsing up to 255 argv entries from a static buffer.

libc: new spawn.h with posix_spawn/posix_spawnp over SYS_SPAWN -
libiberty's pex layer has a posix_spawn backend, so GCC's driver works
without fork. argv is joined into the kernel args string (spaces in
arguments rejected; no kernel quoting), envp is not transferred, and
non-empty file actions fail loudly with ENOTSUP until the kernel can
redirect stdio on spawn. waitpid() now decodes real POSIX status and
the sys/wait.h macros distinguish exited from signaled children.

Shell: prints [exit code N] after nonzero exits and [terminated by
signal N] for killed or crashed children.

Verified on the OS: cat on a missing file reports exit code 1; a
window-close (clean exit 0) stays silent as it should.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-16 16:59:17 +02:00
daniel bbb6fcf0ee feat: add support for console sessions to crashpad and crash handling in kernel 2026-06-18 12:56:29 +02:00
daniel 43d43ac9ea cleanup: namespace Montauk (capital M) => montauk::abi 2026-06-16 09:09:16 +02:00
daniel 159fea1667 feat: add threading to Scheduler, fix desktop background selection freeze issue 2026-05-23 16:08:25 +02:00
daniel d04d7194b9 fix: add start pending mode to mitigate Terminal output redirection issue 2026-05-07 07:32:44 +02:00
daniel 017a8a28ac feat: graphing in MTK toolkit, kernel exposes CPU time, Processes app Performance tab 2026-05-02 15:26:59 +02:00
daniel 38b1f8a7ef feat: further kernel power and power optimizations 2026-04-21 20:51:12 +02:00
daniel 7d6f001659 feat: various power and thermal optimizations, fix Printers app regression 2026-04-20 16:00:52 +02:00
daniel 856b431fde fix: various kernel bug fixes 2026-04-10 23:16:02 +02:00
daniel 9e04e51daa feat: add process crash popups 2026-04-07 20:15:56 +02:00
daniel fb9885819b feat: implement new IPC layer 2026-04-01 13:11:03 +02:00
daniel ada6cdff47 fix: SYS_READDIR memory leak 2026-03-27 20:15:37 +01:00
daniel 1c0db774f6 feat: add cwd tracking to kernel, remove shell hack, update system utilities to use getcwd, fix tcc libc stub, fix nonexistent directory issue 2026-03-25 15:45:22 +01:00
daniel 58a144fc1a feat: ACPI parsing improvements, username in process struct + syscalls 2026-03-24 17:17:47 +01:00
daniel 9b4dfe3e0e fix: improve scheduling, memory, timer implementations 2026-03-24 07:40:37 +01:00
daniel 41ad1f6404 feat: Symmetric Multiprocessing, text editor improvements, merge doom libc, implement math functions 2026-03-23 20:09:11 +01:00
daniel e9f0b10cb9 fix: memory and other improvements 2026-03-06 22:09:11 +01:00
daniel d98be158c8 fix: fix memory leaks 2026-03-04 07:41:40 +01:00
daniel 4ac904e565 feat: rename 'ZenithOS' => 'MontaukOS' and fix build system issues 2026-02-28 12:06:18 +01:00
daniel 1568378d04 feat: split syscalls into files, change max process ceiling 2026-02-22 17:23:35 +01:00
daniel 9e191f64a9 feat: TrueType (TTF) font rendering, many new desktop applications and DOOM support, among other improvements 2026-02-20 22:46:41 +01:00
daniel 987a85da27 feat: rudimentary userspace desktop environment 2026-02-20 00:48:51 +01:00
daniel fb8d16ee7b feat: expand user mode, add DOOM game, add manpages 2026-02-18 15:13:53 +01:00
daniel f384d4cf75 feat: scheduling, usermode, shell 2026-02-17 19:17:01 +01:00