diff --git a/.claude/memory/MEMORY.md b/.claude/memory/MEMORY.md index 5a4187b..41be22d 100644 --- a/.claude/memory/MEMORY.md +++ b/.claude/memory/MEMORY.md @@ -19,7 +19,7 @@ - [SchFS phase 2: real mount](schfs-phase2-mount.md) — mkschfs writes images, the kernel mounts them read-only; `make schfs-check`, plus four traps worth remembering. - [SchFS phase 3: writes](schfs-phase3-writes.md) — full write API, free map derived not stored, and `mount -t schfs` works; the VFS now dispatches through `struct fs_ops`. - [DIRSIZ 14 -> 30](schunix-dirsiz-14.md) — filenames used to truncate silently; fixed by holding the HTree bucket at 256 bytes. -- [Linux open flags](schunix-linux-open-flags.md) — include/fcntl.h must hold Linux's values; a mismatch made `>>` truncate. +- [Linux open flags](schunix-linux-open-flags.md) — include/uapi/fcntl.h must hold Linux's values; a mismatch made `>>` truncate. - [Shared memory and mmap](schunix-shm-and-mmap.md) — shm + file-backed mmap work; pages you don't own must never reach kfree. - [Wall clock](schunix-wall-clock.md) — the RTC was never read, so `date` said 1970; kernel/core/time.c fixes it, plus the stale-image trap. - [TTF rasteriser](schunix-ttf-rasteriser.md) — glyf outlines (not CFF, and why); the composite-glyph trap that loses the letter "i". diff --git a/.claude/memory/schfs-btree-phase1.md b/.claude/memory/schfs-btree-phase1.md index 3f3505c..27746c0 100644 --- a/.claude/memory/schfs-btree-phase1.md +++ b/.claude/memory/schfs-btree-phase1.md @@ -13,7 +13,7 @@ The filesystem is called **SchFS** — not "SchFS v2". Design: `docs/architectur **Phase 1 is done** (2026-08-01): the copy-on-write B-tree exists and passes its torture harness. -- `include/schfs.h` — on-disk format: 4096-byte blocks, 24-byte +- `include/fs/schfs.h` — on-disk format: 4096-byte blocks, 24-byte `(objectid, type, offset)` keys, node header with a self-pointer, uberblock ring. - `kernel/fs/schfs/btree.{c,h}` — portable C against an abstract `struct schfs_bdev`, so the same code runs on a host file and in the kernel. diff --git a/.claude/memory/schfs-phase3-writes.md b/.claude/memory/schfs-phase3-writes.md index cfdb83a..669d5da 100644 --- a/.claude/memory/schfs-phase3-writes.md +++ b/.claude/memory/schfs-phase3-writes.md @@ -17,7 +17,7 @@ mkdir /mnt && mount -t schfs /dev/hdb /mnt then ordinary `ls`/`cat`/`>`/`>>`/`mkdir`/`cp`/`rm`/`rmdir` all work on it. -**The VFS now has a real dispatch layer**: `struct fs_ops` in `include/file.h`, +**The VFS now has a real dispatch layer**: `struct fs_ops` in `include/fs/file.h`, one table per filesystem, chosen by `iget()` from the device number and hung off the inode. v1's implementations kept their bodies and are named `v1_*`; SchFS's live in `kernel/fs/schfs/vfs.c`. **Adding a filesystem is a new table, not @@ -105,7 +105,7 @@ retry. if (dev == PROCFS_DEV) return &procfs_ops; return &v1_ops; // legacy, only because it is the default -`struct fs_ops` (include/file.h:35) is a complete vtable -- iload, istore, +`struct fs_ops` (include/fs/file.h:35) is a complete vtable -- iload, istore, ifree, read, write, truncate, dirops -- and **SchFS implements all of it**. So `fs.c` is no longer "the filesystem"; it is the fallback branch. Killing it is three edits, not a rewrite: diff --git a/.claude/memory/schos-performance-and-init.md b/.claude/memory/schos-performance-and-init.md index 1cbd168..2313ec3 100644 --- a/.claude/memory/schos-performance-and-init.md +++ b/.claude/memory/schos-performance-and-init.md @@ -27,7 +27,7 @@ the bug. Three coupled changes, all required together: -1. `BSIZE` 1024 → 4096 (`include/fs.h`). Keep it equal to `SCHFS_BLKSIZE`. +1. `BSIZE` 1024 → 4096 (`include/fs/fs.h`). Keep it equal to `SCHFS_BLKSIZE`. 2. `NBUF` 90 → 256 blocks (1 MB). At 90 KB the cache was **smaller than the binary every command execs**, so nothing was ever resident on the next command. This is what makes the *second* command fast. diff --git a/.claude/memory/schos-schinit.md b/.claude/memory/schos-schinit.md index c5adf80..e265a22 100644 --- a/.claude/memory/schos-schinit.md +++ b/.claude/memory/schos-schinit.md @@ -32,7 +32,7 @@ clone has no `/etc/passwd` or `/etc/motd` (still an open gap). malloc, no printf, no strlen. Static storage and hand-rolled helpers only. **`getdents64` was exposed for this.** The kernel has had syscall 96/217 since -the Linux ABI landed, but nothing declared it in `include/user.h` or +the Linux ABI landed, but nothing declared it in `include/uapi/user.h` or `lib/usys.S`, so first-party programs could not list a directory at all. Step records by `d_reclen`, never `sizeof`. diff --git a/.claude/memory/schos-uefi-loader.md b/.claude/memory/schos-uefi-loader.md index ebed542..52250eb 100644 --- a/.claude/memory/schos-uefi-loader.md +++ b/.claude/memory/schos-uefi-loader.md @@ -25,7 +25,7 @@ hands over long mode already, and dropping back down to climb out again is a mode switch whose failure mode is a triple fault with no console. So entry.S publishes a 64-bit entry the same way it publishes the multiboot header: magic `SCH64BOO`, 8-byte aligned in the first 16 KB, then a 64-bit physical address. -`include/schboot.h` owns the constants so loader and kernel cannot disagree — +`include/arch/schboot.h` owns the constants so loader and kernel cannot disagree — the first attempt defined them twice and searched for `SCH6` while the assembler had written `6HCS`. diff --git a/.claude/memory/schunix-boot-splash-logo.md b/.claude/memory/schunix-boot-splash-logo.md index 8f7248a..0b280b9 100644 --- a/.claude/memory/schunix-boot-splash-logo.md +++ b/.claude/memory/schunix-boot-splash-logo.md @@ -24,10 +24,10 @@ deleting the loader's copy. **Pipeline:** `tools/mklogo.py` (host Python, has its own PNG inflate + un-filter) crops to the mark, box-downscales, normalises to full strength, packs -to a 4-bit coverage mask, and writes `include/logo.h`. Run `make logo` — it is -*not* a build dependency, and `include/logo.h` is committed, on the same -reasoning as `include/font.h`. The mask is coverage, not colour, so the palette -stays in [[schunix-console-tty]]'s `include/theme.h`; the loader composites it in +to a 4-bit coverage mask, and writes `include/gfx/logo.h`. Run `make logo` — it is +*not* a build dependency, and `include/gfx/logo.h` is committed, on the same +reasoning as `include/gfx/font.h`. The mask is coverage, not colour, so the palette +stays in [[schunix-console-tty]]'s `include/gfx/theme.h`; the loader composites it in `SCH_FG` because the source art is a silver gradient and the accent is reserved for the one rule. 4 bits rather than 8 because the header is included by the *bootloader*, where size is a boot constraint. diff --git a/.claude/memory/schunix-build-speed.md b/.claude/memory/schunix-build-speed.md index 96fb79c..8b2d12c 100644 --- a/.claude/memory/schunix-build-speed.md +++ b/.claude/memory/schunix-build-speed.md @@ -35,7 +35,7 @@ Two real bugs found in the Makefile while doing this: - **`$(BUILD)/kernel/**/*.d` only matched one directory level.** make's wildcard has no recursive `**`. `arch/x86_64/` and `fs/schfs/` therefore had **no - header dependency tracking at all** — editing `include/schfs.h` left stale + header dependency tracking at all** — editing `include/fs/schfs.h` left stale objects that linked fine. It uses `$(shell find ...)` now. - **`CFLAGS` is recursively expanded and had a `$(shell)` appended**, so the stack-protector probe re-ran on every expansion: one extra gcc per object diff --git a/.claude/memory/schunix-console-tty.md b/.claude/memory/schunix-console-tty.md index e501181..373d3b6 100644 --- a/.claude/memory/schunix-console-tty.md +++ b/.claude/memory/schunix-console-tty.md @@ -19,7 +19,7 @@ you whether the escape parser works; it holds the raw bytes either way. Use `pwsh -File tools/ttyshot.ps1`, which drives colour/cursor/erase/UTF-8 and screendumps the result. -**The font is CP437, not Latin-1.** `include/font.h`'s per-glyph comments +**The font is CP437, not Latin-1.** `include/gfx/font.h`'s per-glyph comments label index N with Unicode codepoint N, which is fiction above 127: index 0xE9 is annotated "e-acute" and draws a capital theta. Trusting it turned "café" into "caf" + theta. `console.c` maps Unicode through `latin1_to_cp437[]` plus diff --git a/.claude/memory/schunix-crash-screen.md b/.claude/memory/schunix-crash-screen.md index 2e56600..eca7c64 100644 --- a/.claude/memory/schunix-crash-screen.md +++ b/.claude/memory/schunix-crash-screen.md @@ -60,7 +60,7 @@ framebuffer. See [[schunix-verify-by-driving-shell]]. ## 2026-09-21: the face is gone, and a bug it exposed PSOGM draws **Shift**, the system logo, where the Guru face used to be — -`gfx_draw_logo()` from `include/logo.h`, the same mask the loader splash and +`gfx_draw_logo()` from `include/gfx/logo.h`, the same mask the loader splash and the boot console use, at its native 128 px. `draw_guru()` and its geometry constants are deleted; so are `docs/branding/guru.svg` and the mascot brief. The *name* "Purple Screen of Guru Meditation" stays — that is the Amiga nod, diff --git a/.claude/memory/schunix-device-model.md b/.claude/memory/schunix-device-model.md index c6160b0..5aac9d5 100644 --- a/.claude/memory/schunix-device-model.md +++ b/.claude/memory/schunix-device-model.md @@ -8,7 +8,7 @@ metadata: modified: 2026-08-08T18:05:13.551Z --- -Built 2026-08-08. `include/device.h` + `kernel/dev/device.c`, readable at +Built 2026-08-08. `include/dev/device.h` + `kernel/dev/device.c`, readable at `/proc/devices`. Written up in `docs/architecture/devices.md`. Supersedes the two separate arrays in `kernel/drivers/registry.c` as the answer to "what is attached". @@ -35,7 +35,7 @@ break both assumptions** and needs a spinlock plus a reader lock in procfs. ## The display class -`include/display.h` + ops in `kernel/dev/vga.c`, published on the device by +`include/gfx/display.h` + ops in `kernel/dev/vga.c`, published on the device by `vga_pci_driver.ops`. `struct pci_driver` gained an `ops` field for this — **it has to live on the driver, not be set inside probe()**, because `pci_bind()` registers the device *after* probe returns. diff --git a/.claude/memory/schunix-dirsiz-14.md b/.claude/memory/schunix-dirsiz-14.md index ed9d49e..5739d65 100644 --- a/.claude/memory/schunix-dirsiz-14.md +++ b/.claude/memory/schunix-dirsiz-14.md @@ -5,7 +5,7 @@ metadata: type: project --- -Found 2026-08-09 while staging fonts. `DIRSIZ` in `include/fs.h` is **14**, an +Found 2026-08-09 while staging fonts. `DIRSIZ` in `include/fs/fs.h` is **14**, an xv6 inheritance, and the v1 filesystem truncates to it **silently**. `JetBrainsMono-Regular.ttf` was stored as `JetBrainsMono-`. Two consequences, @@ -30,7 +30,7 @@ of every directory. DIRSIZ 30 makes `struct dirent` exactly **32 bytes**, so a 256-byte bucket holds **8** slots instead of 16 and **every byte offset in the layout is unchanged**. -`DIRENT_BUCKET_BYTES` in `include/fs.h` is now the constant the maths is written +`DIRENT_BUCKET_BYTES` in `include/fs/fs.h` is now the constant the maths is written against; `kernel/fs/fs.c` and `tools/mkfs.c` both use it instead of `16 * sizeof(struct dirent)`. Cost: more overflow use in heavily collided directories. diff --git a/.claude/memory/schunix-driver-infrastructure.md b/.claude/memory/schunix-driver-infrastructure.md index 0392561..b79e603 100644 --- a/.claude/memory/schunix-driver-infrastructure.md +++ b/.claude/memory/schunix-driver-infrastructure.md @@ -11,7 +11,7 @@ metadata: **Built 2026-08-04**, before USB, because xHCI, any NIC and virtio-gpu all need the same three things and none of them existed. -- **`kernel/dev/irq.c` + `include/irq.h`** — `irq_register(irq, fn, arg, +- **`kernel/dev/irq.c` + `include/core/irq.h`** — `irq_register(irq, fn, arg, name, level_low)`. `trap.c` used to be a switch listing every interrupt by name, which cannot work for a PCI device: its line comes out of config space at probe time, so there is no constant to write a `case` label for. @@ -19,7 +19,7 @@ need the same three things and none of them existed. handler must recognise that its own device is idle and return. Registration publishes an entry then bumps `n` with a barrier, so dispatch needs no lock. `/proc/interrupts` (minor 12) shows counts and trigger mode. -- **`kernel/core/dma.c` + `include/dma.h`** — `dma_alloc(size, align)` / +- **`kernel/core/dma.c` + `include/core/dma.h`** — `dma_alloc(size, align)` / `dma_free(p, size)` (Linux's contract: caller remembers the size). Carved off the top of physical memory in `main.c` *before* `kinit1`, because kalloc's free list makes no contiguity promise. x86 PCI is cache coherent diff --git a/.claude/memory/schunix-e1000-and-driver-layout.md b/.claude/memory/schunix-e1000-and-driver-layout.md index f89075d..0fd6054 100644 --- a/.claude/memory/schunix-e1000-and-driver-layout.md +++ b/.claude/memory/schunix-e1000-and-driver-layout.md @@ -23,7 +23,7 @@ One directory per *driver*, not per class (Nexoniarz asked for this specifically), so a driver that grows a register header, a second source file or a firmware blob has somewhere to put it. -Matches `DEVCLASS_*` in `include/device.h`. Flat was eight files with four +Matches `DEVCLASS_*` in `include/dev/device.h`. Flat was eight files with four called `usb_something`, and each driver added made it worse. **Makefile note:** the compile rule is now diff --git a/.claude/memory/schunix-framebuffer-device.md b/.claude/memory/schunix-framebuffer-device.md index c535865..634259e 100644 --- a/.claude/memory/schunix-framebuffer-device.md +++ b/.claude/memory/schunix-framebuffer-device.md @@ -10,10 +10,10 @@ metadata: **`/dev/fb0` (major 2) is a real framebuffer device** as of 2026-08-04: `kernel/dev/fb.c` (read/write by byte offset, plus `fb_ioctl`), declared in -`include/fb.h`. Before this it was wired to `{ nullread, nullwrite }` — writing +`include/gfx/fb.h`. Before this it was wired to `{ nullread, nullwrite }` — writing pixels to it succeeded and did nothing. -**`include/fb.h` holds Linux's fbdev request numbers and struct layouts** +**`include/gfx/fb.h` holds Linux's fbdev request numbers and struct layouts** (`FBIOGET_VSCREENINFO` 0x4600, `fb_var_screeninfo` 160 bytes, `fb_fix_screeninfo` 80 bytes). Same reasoning as [[schunix-linux-open-flags]]: a shared number must mean the shared thing, or a diff --git a/.claude/memory/schunix-ioremap-and-bars.md b/.claude/memory/schunix-ioremap-and-bars.md index 9852f1e..cff1f40 100644 --- a/.claude/memory/schunix-ioremap-and-bars.md +++ b/.claude/memory/schunix-ioremap-and-bars.md @@ -9,7 +9,7 @@ metadata: --- **Never reach a device's registers with `P2V(bar.base)`.** Use -`ioremap(pa, size)` from `kernel/arch/x86_64/vm.c` (declared in `include/defs.h`). +`ioremap(pa, size)` from `kernel/arch/x86_64/vm.c` (declared in `include/core/defs.h`). Every driver used to do the `P2V` thing, which silently assumes the BAR lands inside the 0-4 GB that `kvmalloc()` direct-maps with four 1 GB pages. Under diff --git a/.claude/memory/schunix-linux-open-flags.md b/.claude/memory/schunix-linux-open-flags.md index 0136bd6..aa6a67c 100644 --- a/.claude/memory/schunix-linux-open-flags.md +++ b/.claude/memory/schunix-linux-open-flags.md @@ -1,6 +1,6 @@ --- name: schunix-linux-open-flags -description: "include/fcntl.h must hold Linux's open-flag values — the userland is all Linux-ABI, and a mismatch silently corrupts files" +description: "include/uapi/fcntl.h must hold Linux's open-flag values — the userland is all Linux-ABI, and a mismatch silently corrupts files" metadata: node_type: memory type: project @@ -8,7 +8,7 @@ metadata: modified: 2026-08-03T13:59:19.392Z --- -**`include/fcntl.h` holds Linux x86-64 open-flag values, and must keep holding +**`include/uapi/fcntl.h` holds Linux x86-64 open-flag values, and must keep holding them.** Every program in the userland is built against a libc that sends Linux values; the kernel reads them with these constants. Do not "tidy" them into a neat sequence — they are an external interface. diff --git a/.claude/memory/schunix-pci-drivers.md b/.claude/memory/schunix-pci-drivers.md index 8f2bccb..f301aed 100644 --- a/.claude/memory/schunix-pci-drivers.md +++ b/.claude/memory/schunix-pci-drivers.md @@ -40,6 +40,6 @@ driver in brackets (`[-]` when unclaimed). Under QEMU's default i440fx it should show six devices; `tools/bootcheck.ps1` asserts on the host bridge and the IDE controller by ID, and on `[vga]` having bound. -`inl`/`outl` were added to include/x86.h for this — config space is only +`inl`/`outl` were added to include/arch/x86.h for this — config space is only reachable in dwords, so `pci_read16`/`pci_read8` shift and mask the containing dword rather than doing a narrower bus cycle. diff --git a/.claude/memory/schunix-qr-encoder.md b/.claude/memory/schunix-qr-encoder.md index 990b207..cce2e32 100644 --- a/.claude/memory/schunix-qr-encoder.md +++ b/.claude/memory/schunix-qr-encoder.md @@ -8,7 +8,7 @@ metadata: modified: 2026-08-08T16:22:01.468Z --- -Built 2026-08-08. `kernel/core/qr.c` + `include/qr.h`, the Phase 8 crash channel +Built 2026-08-08. `kernel/core/qr.c` + `include/gfx/qr.h`, the Phase 8 crash channel (see [[schunix-crash-screen]] and `docs/plan/roadmap.md`). **Wired into the crash screen the same day.** `panic.c` builds a compact payload diff --git a/.claude/memory/schunix-sockets-and-evdev.md b/.claude/memory/schunix-sockets-and-evdev.md index fb9541c..ad1c570 100644 --- a/.claude/memory/schunix-sockets-and-evdev.md +++ b/.claude/memory/schunix-sockets-and-evdev.md @@ -8,8 +8,8 @@ metadata: modified: 2026-08-05T07:12:20.950Z --- -Unix domain sockets (`kernel/net/unix.c`, `include/socket.h`, `kernel/sys/sys_net.c`) -and raw input events (`kernel/dev/input.c`, `include/input.h`) are both done and +Unix domain sockets (`kernel/net/unix.c`, `include/net/socket.h`, `kernel/sys/sys_net.c`) +and raw input events (`kernel/dev/input.c`, `include/dev/input.h`) are both done and verified — `tools\bootcheck.ps1 -Sock` and `-Evdev`. **One lock for the whole socket table, deliberately.** A pipe gets a lock per diff --git a/.claude/memory/schunix-syscall-single-table.md b/.claude/memory/schunix-syscall-single-table.md index 90b6646..da06d73 100644 --- a/.claude/memory/schunix-syscall-single-table.md +++ b/.claude/memory/schunix-syscall-single-table.md @@ -17,7 +17,7 @@ SYSCALL_ALIAS(linux_nr, name) // extra Linux number -> existing handler and implemented as `SYSCALL_DEFINE(name) { ... }` in a `kernel/sys/sys_*.c`. -Generated from that one line: the `SYS_*` enum (`include/syscall.h`), the +Generated from that one line: the `SYS_*` enum (`include/core/syscall.h`), the dispatch table (`kernel/sys/syscall.c`), and the Linux ABI translation map (`kernel/sys/linux_abi.c`). diff --git a/.claude/memory/schunix-text-rendering.md b/.claude/memory/schunix-text-rendering.md index 673e922..629b110 100644 --- a/.claude/memory/schunix-text-rendering.md +++ b/.claude/memory/schunix-text-rendering.md @@ -8,7 +8,7 @@ metadata: modified: 2026-08-08T22:45:34.934Z --- -Built 2026-08-09. `include/text.h` + `kernel/dev/text.c`. Nexoniarz: "using ANSI +Built 2026-08-09. `include/gfx/text.h` + `kernel/dev/text.c`. Nexoniarz: "using ANSI fonts in 2026 is a not funny joke." **The font was never the problem — the grid was.** The console indexes @@ -44,7 +44,7 @@ a useful side-by-side. ## Traps hit -- `include/font.h` **defines** `font_data` rather than declaring it, so +- `include/gfx/font.h` **defines** `font_data` rather than declaring it, so including it from a second file duplicates the symbol under `-fno-common`. text.c declares `extern unsigned char font_data[256][16];` instead; the header is generated data and is better left alone. diff --git a/.claude/memory/schunix-ttf-rasteriser.md b/.claude/memory/schunix-ttf-rasteriser.md index 1648565..f1415a5 100644 --- a/.claude/memory/schunix-ttf-rasteriser.md +++ b/.claude/memory/schunix-ttf-rasteriser.md @@ -5,7 +5,7 @@ metadata: type: project --- -Built 2026-08-09. `include/ttf.h` + `kernel/dev/ttf.c`, the second `font_ops` +Built 2026-08-09. `include/gfx/ttf.h` + `kernel/dev/ttf.c`, the second `font_ops` provider behind [[schunix-text-rendering]]. Host harness: `tools/ttftest.c` → `build/tools/ttftest font.ttf px "text" out.pgm`. diff --git a/.claude/memory/schunix-virtio-gpu.md b/.claude/memory/schunix-virtio-gpu.md index 2fbf62a..c59878a 100644 --- a/.claude/memory/schunix-virtio-gpu.md +++ b/.claude/memory/schunix-virtio-gpu.md @@ -9,7 +9,7 @@ metadata: --- Written 2026-08-08 from the OASIS virtio 1.1 specification (chapters 2, 4.1, -5.7). `include/virtio.h` + `kernel/drivers/virtio_gpu.c`. Worked on the first +5.7). `include/dev/virtio.h` + `kernel/drivers/virtio_gpu.c`. Worked on the first boot. virtio-gpu: 1280x800, 4000 KB framebuffer, queue 64 diff --git a/Makefile b/Makefile index e6455d7..d35058d 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ KERN_DEV = $(addprefix $(BUILD)/kernel/dev/, \ # # drivers/// -- one directory per driver, so a driver that grows # a register header, a second source file or a firmware blob has somewhere to -# put it. Classes match include/device.h's DEVCLASS_*. Everything flat was +# put it. Classes match include/dev/device.h's DEVCLASS_*. Everything flat was # already eight files with four called usb_something, and each driver added made # the directory harder to read. The compile rule uses `mkdir -p $(dir $@)`, so # the depth costs nothing. @@ -563,7 +563,7 @@ kernel: $(BUILD)/kernel/kernel # make DEBUG=1 # # What it turns on is the *boot menu's* remote-debugging entry, and nothing -# else -- see SCHBOOT_DEBUG_FLAG in include/schboot.h. A release build has no +# else -- see SCHBOOT_DEBUG_FLAG in include/arch/schboot.h. A release build has no # way to switch a network debugger on, because the code that would set the flag # is not compiled into it. That is the point: a menu item that is present and # refuses is an invitation to find out how to make it not refuse. @@ -599,9 +599,9 @@ UEFI_CFLAGS = $(UEFI_DEBUG_FLAGS) --target=x86_64-unknown-windows -ffreestanding # looking at the wrong thing. # # Hence the check and the message. It is worth the four lines. -$(BUILD)/uefi/BOOTX64.EFI: boot/uefi/main.c boot/uefi/efi.h include/schboot.h \ +$(BUILD)/uefi/BOOTX64.EFI: boot/uefi/main.c boot/uefi/efi.h include/arch/schboot.h \ boot/common/ui.c boot/common/ui.h \ - include/logo.h include/theme.h include/font.h + include/gfx/logo.h include/gfx/theme.h include/gfx/font.h @mkdir -p $(BUILD)/uefi @command -v clang >/dev/null 2>&1 || { \ echo ""; \ @@ -1085,7 +1085,7 @@ SCHFS_SRC = kernel/fs/schfs/btree.c kernel/fs/schfs/btree.h \ kernel/fs/schfs/space.c kernel/fs/schfs/vol.c \ kernel/fs/schfs/obj.c kernel/fs/schfs/objw.c \ kernel/fs/schfs/attr.c \ - kernel/fs/schfs/schfs_int.h include/schfs.h + kernel/fs/schfs/schfs_int.h include/fs/schfs.h # -iquote, not -I: include/ has its own errno.h, stat.h, fcntl.h and types.h, # and -I would put them ahead of the system ones for a host program that needs @@ -1115,7 +1115,7 @@ schfs-objtest: $(SCHFS_OBJT) # page-to-cache lookup, and whether pages actually come back -- is asserted in # a second rather than in a boot. KMEMTEST = $(BUILD)/tools/kmemtest$(EXE) -$(KMEMTEST): tools/kmemtest.c kernel/core/kmem.c include/kmem.h +$(KMEMTEST): tools/kmemtest.c kernel/core/kmem.c include/core/kmem.h @mkdir -p $(BUILD)/tools $(HOSTCC) $(HOSTCFLAGS) -I include -o $@ tools/kmemtest.c @@ -1239,9 +1239,9 @@ ldls-unstage: ldls-check: $(LDLS_INSPECT) $(LDLS_RUN) $(LDLS_TYPES) $(LDLS_REFMOD) $(PYTHON) tools/python/ldls_check.py $(LDLS_INSPECT) $(LDLS_REFMOD) $(LDLS_RUN) -$(MKFS): tools/mkfs.c include/fs.h include/stat.h include/param.h +$(MKFS): tools/mkfs.c include/fs/fs.h include/uapi/stat.h include/core/param.h @mkdir -p $(BUILD)/tools - $(HOSTCC) $(HOSTWARN) -I. -o $(MKFS) tools/mkfs.c + $(HOSTCC) $(HOSTWARN) -I. -iquote ./include -o $(MKFS) tools/mkfs.c # Stage everything a running system needs into sysroot/, then image it. # @@ -1504,7 +1504,7 @@ qemu-schfs: esp $(BUILD)/schfs.img $(OVMF_CODE) $(OVMF_VARS) # re-run its four dd commands -- including zeroing five megabytes -- on every # single invocation, including ones where nothing had changed. The file is gone # with the BIOS loader, but the rule it taught applies to whatever replaces it. -# include/logo.h is generated but committed, exactly as include/font.h is: it +# include/gfx/logo.h is generated but committed, exactly as include/gfx/font.h is: it # derives from art that changes about never, and making it a build dependency # would put Python on the critical path of every clean build for no benefit. # Run this by hand after changing the art. @@ -1515,7 +1515,7 @@ LOGO_SRC = docs/branding/shift-mask.png LOGO_PX = 128 logo: - $(PYTHON) tools/python/mklogo.py "$(LOGO_SRC)" include/logo.h $(LOGO_PX) + $(PYTHON) tools/python/mklogo.py "$(LOGO_SRC)" include/gfx/logo.h $(LOGO_PX) # The USB vendor/product name database, from linux-usb.org. # @@ -1559,7 +1559,7 @@ hwdata: usb-ids pci-ids # verified mechanically and the PNG covers the rest: point a phone at it. QRTEST = $(BUILD)/tools/qrtest$(EXE) -$(QRTEST): tools/qrtest.c kernel/core/qr.c include/qr.h +$(QRTEST): tools/qrtest.c kernel/core/qr.c include/gfx/qr.h @mkdir -p $(BUILD)/tools $(HOSTCC) $(HOSTWARN) -I./include -o $@ tools/qrtest.c @@ -1599,6 +1599,6 @@ distclean: clean # exactly one level, so build/kernel/core/*.d was picked up while # build/kernel/arch/x86_64/*.d and build/kernel/fs/schfs/*.d were not. # Everything under arch/ and schfs/ therefore had NO header dependency -# tracking at all -- editing include/schfs.h or include/mmu.h left stale +# tracking at all -- editing include/fs/schfs.h or include/arch/mmu.h left stale # objects that linked without complaint. find actually recurses. -include $(shell find $(BUILD) -name '*.d' 2>/dev/null) diff --git a/README.md b/README.md index 903f868..6ca2b7b 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ make schfs-check # SchFS B-tree, object and image suites ``` kernel/ arch/ core/ dev/ drivers/ fs/ net/ proc/ sys/ fs/schfs/ the filesystem -- same source the host tools compile -include/ kernel and userland headers +include/ kernel and userland headers, by subsystem (arch/ core/ fs/ dev/ ...) boot/ uefi/ (PE loader) common/ (shared loader UI) lib/ cmd/ first-party userland runtime and programs ports/ third-party software built from source diff --git a/boot/README.md b/boot/README.md index a0babf9..f327603 100644 --- a/boot/README.md +++ b/boot/README.md @@ -39,7 +39,7 @@ a second loader is correct exactly when it satisfies it. | Framebuffer | `VBE_INFO_ADDR` | address, pitch, width, height, depth | | Verbose flag | `BOOT_VERBOSE_FLAG_ADDR` | set by the F8 menu | -The addresses are defined once, in `include/memlayout.h` and `include/schboot.h`. +The addresses are defined once, in `include/arch/memlayout.h` and `include/arch/schboot.h`. The kernel does not care which firmware produced them. ## The entry point @@ -50,7 +50,7 @@ triple fault with no console, so the kernel publishes an entry that takes the machine as it already is. `kernel/arch/x86_64/entry.S` carries a `sch64_header` — magic `SCH64BOO`, 8-byte aligned within the first 16 KB, followed by a 64-bit physical address — -found by scanning. `include/schboot.h` holds the magic so loader and kernel +found by scanning. `include/arch/schboot.h` holds the magic so loader and kernel cannot disagree. The 32-bit multiboot entry is still in `entry.S` and now has no caller: the diff --git a/boot/common/ui.c b/boot/common/ui.c index 8a11f73..7723faa 100644 --- a/boot/common/ui.c +++ b/boot/common/ui.c @@ -10,9 +10,9 @@ */ #include "ui.h" -#include "../../include/theme.h" -#include "../../include/font.h" -#include "../../include/logo.h" +#include "../../include/gfx/theme.h" +#include "../../include/gfx/font.h" +#include "../../include/gfx/logo.h" /* "Draw the glyph, leave the background alone." Not a colour anyone can mean: * the palette is 24-bit, so the high byte is free for a sentinel. */ diff --git a/boot/uefi/main.c b/boot/uefi/main.c index 4f849b3..31c0a28 100644 --- a/boot/uefi/main.c +++ b/boot/uefi/main.c @@ -25,7 +25,7 @@ // computed before. #include "efi.h" -#include "../../include/schboot.h" +#include "../../include/arch/schboot.h" #include "../common/ui.h" // Where the kernel expects to find things comes from schboot.h, included @@ -108,7 +108,7 @@ static int VERBOSE_BOOT; // Remote debugging, off unless somebody picks it out of the boot menu -- and // the entry that picks it only exists in a build made with DEBUG=1. See -// SCHBOOT_DEBUG_FLAG in include/schboot.h for why the consent is asked for at +// SCHBOOT_DEBUG_FLAG in include/arch/schboot.h for why the consent is asked for at // this particular moment. static int DEBUG_BOOT; @@ -395,7 +395,7 @@ open_kernel(EFI_HANDLE image) // --------------------------------------------------------------------------- // The console typeface // -// See SCHBOOT_FONT_ADDR in include/schboot.h for why this is the loader's job +// See SCHBOOT_FONT_ADDR in include/arch/schboot.h for why this is the loader's job // and not the kernel's. Everything here is best-effort: a machine with no // console.ttf on its ESP boots with the font in the kernel image, which is // the same font, and says nothing about it. diff --git a/cmd/chvt/main.c b/cmd/chvt/main.c index 446d4cb..aa78fc6 100644 --- a/cmd/chvt/main.c +++ b/cmd/chvt/main.c @@ -27,10 +27,10 @@ // Whatever the modifiers are, they also bind minus and equals to the previous // and next terminal in use -- AltGr+- and AltGr+= by default. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "posix.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/posix.h" // No printf in lib/, and this needs one string and two small numbers. static void diff --git a/cmd/fbinfo/main.c b/cmd/fbinfo/main.c index bfc5ed8..7cbafe5 100644 --- a/cmd/fbinfo/main.c +++ b/cmd/fbinfo/main.c @@ -16,12 +16,12 @@ // if it is the other way round, the reverse. Having both makes a failure say // which half broke. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "fb.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "gfx/fb.h" -#include "posix.h" /* PROT_*, MAP_* -- one definition, shared */ +#include "uapi/posix.h" /* PROT_*, MAP_* -- one definition, shared */ static void puts(const char *s) diff --git a/cmd/httpd/main.c b/cmd/httpd/main.c index 6ef505c..a242b96 100644 --- a/cmd/httpd/main.c +++ b/cmd/httpd/main.c @@ -20,12 +20,12 @@ // **The path check is the only security-relevant code here**, and it is done // by rejecting rather than by normalising. See resolve() below. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "stat.h" -#include "socket.h" -#include "posix.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/stat.h" +#include "net/socket.h" +#include "uapi/posix.h" #define DEFAULT_PORT 80 #define DEFAULT_ROOT "/srv" diff --git a/cmd/hwreport/main.c b/cmd/hwreport/main.c index bb07a38..e7011f1 100644 --- a/cmd/hwreport/main.c +++ b/cmd/hwreport/main.c @@ -22,11 +22,11 @@ // kernel does not publish them), and the MSDM and SLIC tables, which hold a // Windows licence key. A report is meant to be handed to somebody. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "posix.h" -#include "stat.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/posix.h" +#include "uapi/stat.h" // --------------------------------------------------------------------------- // Small things a libc would have diff --git a/cmd/inputtest/main.c b/cmd/inputtest/main.c index 84a7173..bdd700c 100644 --- a/cmd/inputtest/main.c +++ b/cmd/inputtest/main.c @@ -12,10 +12,10 @@ // Prints one line per event: type, code and value, decoded where there is a // name for it. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "input.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "dev/input.h" static void puts_(const char *s) diff --git a/cmd/ldlsd/main.c b/cmd/ldlsd/main.c index 41f19ce..379ace4 100644 --- a/cmd/ldlsd/main.c +++ b/cmd/ldlsd/main.c @@ -19,16 +19,16 @@ // is L3c. So the useful output here is the same as `ldls-run`'s: what the // driver asks for, in what order, and how far it gets. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "posix.h" -#include "stat.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/posix.h" +#include "uapi/stat.h" #include "ko.h" #include "stub.h" #include "btf.h" -#include "pciuser.h" +#include "dev/pciuser.h" #include "kpi/kpi.h" extern void kpi_unregister_netdev(void *dev); extern void *kpi_skb_alloc(unsigned int len); diff --git a/cmd/loadkeys/main.c b/cmd/loadkeys/main.c index 94ee8d9..35b1e23 100644 --- a/cmd/loadkeys/main.c +++ b/cmd/loadkeys/main.c @@ -16,10 +16,10 @@ // The setting is machine-wide, not per-terminal: there is one keyboard, and // switching to tty3 does not move anybody's fingers. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "posix.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/posix.h" // No printf, memset or strcpy in lib/; this needs a little of each. static void diff --git a/cmd/memfdtest/main.c b/cmd/memfdtest/main.c index 9a21ee4..75b721d 100644 --- a/cmd/memfdtest/main.c +++ b/cmd/memfdtest/main.c @@ -17,12 +17,12 @@ // and the reason it had to wait for SCM_RIGHTS is that the *other* process // gets the same object by being handed the descriptor, not by naming it. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "stat.h" -#include "posix.h" -#include "socket.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/stat.h" +#include "uapi/posix.h" +#include "net/socket.h" static int failures; diff --git a/cmd/netecho/main.c b/cmd/netecho/main.c index 6ebb5ac..6233276 100644 --- a/cmd/netecho/main.c +++ b/cmd/netecho/main.c @@ -22,10 +22,10 @@ // ARP (RFC 826), IPv4 (RFC 791), ICMP (RFC 792), DHCP (RFC 2131). All // published, all specifications, which is docs/licensing.md §5. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "netuser.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "net/netuser.h" // Us, and the address we hand out. Numbers chosen not to collide with QEMU's // 10.0.2.0/24 user network, so both interfaces can be up at once. diff --git a/cmd/nettest/main.c b/cmd/nettest/main.c index ab6b884..8bd762c 100644 --- a/cmd/nettest/main.c +++ b/cmd/nettest/main.c @@ -22,9 +22,9 @@ // host$ nc -u -l -p 9000 // guest# nettest -u 10.0.2.2 9000 -#include "types.h" -#include "user.h" -#include "socket.h" +#include "core/types.h" +#include "uapi/user.h" +#include "net/socket.h" static void puts_(const char *s) diff --git a/cmd/pcitest/main.c b/cmd/pcitest/main.c index fcf6686..78a5387 100644 --- a/cmd/pcitest/main.c +++ b/cmd/pcitest/main.c @@ -18,11 +18,11 @@ // like from the kernel's side, and the case that used to // leave a level-triggered line asserted with no handler -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "posix.h" -#include "pciuser.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/posix.h" +#include "dev/pciuser.h" static void puts(const char *s) diff --git a/cmd/ping/main.c b/cmd/ping/main.c index 785d07c..3d18ffa 100644 --- a/cmd/ping/main.c +++ b/cmd/ping/main.c @@ -17,9 +17,9 @@ // the IP header and the caller reads and writes the ICMP message alone. See // inet_icmp_recv_cb in kernel/net/inet.c. -#include "types.h" -#include "user.h" -#include "socket.h" +#include "core/types.h" +#include "uapi/user.h" +#include "net/socket.h" #define ICMP_ECHO 8 #define ICMP_ECHOREPLY 0 diff --git a/cmd/reflink/main.c b/cmd/reflink/main.c index 19d7ff2..7b66d65 100644 --- a/cmd/reflink/main.c +++ b/cmd/reflink/main.c @@ -10,9 +10,9 @@ // Uses FICLONE, which is Linux's ioctl for exactly this, so the same call works // against any filesystem that supports cloning. -#include "types.h" -#include "user.h" -#include "fcntl.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" #define FICLONE 0x40049409 diff --git a/cmd/resolvconf/main.c b/cmd/resolvconf/main.c index 98e5431..4918033 100644 --- a/cmd/resolvconf/main.c +++ b/cmd/resolvconf/main.c @@ -24,9 +24,9 @@ // policy question. A machine with a hand-written one should keep it, which is // why -f exists and why it is not the default. -#include "types.h" -#include "user.h" -#include "fcntl.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" #define SRC "/proc/resolv.conf" #define DST "/etc/resolv.conf" diff --git a/cmd/schattr/main.c b/cmd/schattr/main.c index 4b28291..593af71 100644 --- a/cmd/schattr/main.c +++ b/cmd/schattr/main.c @@ -14,8 +14,8 @@ // Indexing covers values written *after* the index is declared. There is no // reindexing pass, so declare the index first. -#include "types.h" -#include "user.h" +#include "core/types.h" +#include "uapi/user.h" static void puts_(const char *s) diff --git a/cmd/schdbg/main.c b/cmd/schdbg/main.c index f936cb7..600820a 100644 --- a/cmd/schdbg/main.c +++ b/cmd/schdbg/main.c @@ -20,9 +20,9 @@ // which is the point, and is what you fall back to on a system where this // program is one of the things that is broken. -#include "types.h" -#include "user.h" -#include "fcntl.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" static void puts_(const char *s) diff --git a/cmd/schdbgd/main.c b/cmd/schdbgd/main.c index 1b9bb4a..fc3989c 100644 --- a/cmd/schdbgd/main.c +++ b/cmd/schdbgd/main.c @@ -44,16 +44,16 @@ // register, and arming one is a fine thing for a debugger to do and not a thing // for a stranger on a socket to do. The refusal is in the kernel, driven by the // view's own registration, so it cannot be got round from here and does not go -// stale when a new view is added. See include/dbg.h. +// stale when a new view is added. See include/core/dbg.h. // // One connection at a time, because /dev/dbg holds one answer at a time: two // clients would read each other's. A second caller waits rather than // interleaving. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "socket.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "net/socket.h" #define DEFAULT_PORT 4444 diff --git a/cmd/schinit/main.c b/cmd/schinit/main.c index 3977197..f583f1b 100644 --- a/cmd/schinit/main.c +++ b/cmd/schinit/main.c @@ -28,12 +28,12 @@ // nothing -- it comes back, reads /proc/schinit, and finds the world exactly // as it left it. A supervisor that forked its own jobs could not have that. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "posix.h" -#include "socket.h" -#include "schinit.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/posix.h" +#include "net/socket.h" +#include "uapi/schinit.h" #define SUPERVISOR "/bin/schinitd" diff --git a/cmd/schinitd/main.c b/cmd/schinitd/main.c index 0b8d917..08ccebe 100644 --- a/cmd/schinitd/main.c +++ b/cmd/schinitd/main.c @@ -18,12 +18,12 @@ // either losing them to reparenting or racing the new copy to adopt them -- // the split-brain failure docs/architecture/init.md rejects the two-init scheme for. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "posix.h" -#include "socket.h" -#include "schinit.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/posix.h" +#include "net/socket.h" +#include "uapi/schinit.h" #define JOBDIR "/etc/schinit" @@ -103,7 +103,7 @@ out(const char *s) static int verbose_boot; // Whether the boot menu was asked for a network debugger. See -// SCHBOOT_DEBUG_FLAG in include/schboot.h -- the kernel only publishes it, and +// SCHBOOT_DEBUG_FLAG in include/arch/schboot.h -- the kernel only publishes it, and // this is what acts on it, because what it turns on is a job. static int debug_boot; diff --git a/cmd/schmode/main.c b/cmd/schmode/main.c index cb28e6c..b308ddc 100644 --- a/cmd/schmode/main.c +++ b/cmd/schmode/main.c @@ -17,9 +17,9 @@ // schmode 1024 768 set it // schmode 1024x768 the same -#include "types.h" -#include "user.h" -#include "socket.h" +#include "core/types.h" +#include "uapi/user.h" +#include "net/socket.h" #define VGPUD_SOCKET "/run/vgpud" diff --git a/cmd/shmtest/main.c b/cmd/shmtest/main.c index a77020f..519591d 100644 --- a/cmd/shmtest/main.c +++ b/cmd/shmtest/main.c @@ -11,9 +11,9 @@ // // Prints one line per check, and a final verdict a script can grep for. -#include "types.h" -#include "user.h" -#include "fcntl.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" #define PROT_READ 0x1 #define PROT_WRITE 0x2 diff --git a/cmd/sigtest/main.c b/cmd/sigtest/main.c index 929155f..6cac5a0 100644 --- a/cmd/sigtest/main.c +++ b/cmd/sigtest/main.c @@ -24,9 +24,9 @@ // Getting that backwards is a real bug this tree has had, so the masks below // are spelled out rather than built by a macro. -#include "types.h" -#include "user.h" -#include "posix.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/posix.h" #define U_SIGCHLD_BIT (1ULL << (SIGCHLD - 1)) diff --git a/cmd/socktest/main.c b/cmd/socktest/main.c index d50b819..f026818 100644 --- a/cmd/socktest/main.c +++ b/cmd/socktest/main.c @@ -9,11 +9,11 @@ // // Prints one line per check and a final verdict a script can grep for. -#include "types.h" -#include "user.h" -#include "socket.h" -#include "stat.h" -#include "fcntl.h" +#include "core/types.h" +#include "uapi/user.h" +#include "net/socket.h" +#include "uapi/stat.h" +#include "uapi/fcntl.h" static int failures; diff --git a/cmd/tone/main.c b/cmd/tone/main.c index be72fa0..f0e1cbf 100644 --- a/cmd/tone/main.c +++ b/cmd/tone/main.c @@ -11,11 +11,11 @@ // Deliberately not a WAV player. A player has to parse a header, and a header // is a second thing to get wrong while testing the first. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "audio.h" -#include "errno.h" +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "dev/audio.h" +#include "uapi/errno.h" // A quarter-amplitude sine, from a table rather than a libm that does not // exist here. 64 points is audibly a sine and arithmetically exact. diff --git a/cmd/vgpud/main.c b/cmd/vgpud/main.c index 7c0de9b..e727891 100644 --- a/cmd/vgpud/main.c +++ b/cmd/vgpud/main.c @@ -20,20 +20,20 @@ // over a PCI device and this decided it was a GPU, which is the property that // makes the interface general rather than a hole shaped like one thing. -#include "types.h" -#include "user.h" -#include "fcntl.h" -#include "posix.h" -#include "pciuser.h" -#include "virtio.h" -#include "schinit.h" -#include "socket.h" -#include "theme.h" // SCH_BG, SCH_ACCENT -- one palette, see docs/branding -#include "logo.h" // the mark, the same bytes the loader and console draw -#include "fb.h" // the console framebuffer, which this mirrors +#include "core/types.h" +#include "uapi/user.h" +#include "uapi/fcntl.h" +#include "uapi/posix.h" +#include "dev/pciuser.h" +#include "dev/virtio.h" +#include "uapi/schinit.h" +#include "net/socket.h" +#include "gfx/theme.h" // SCH_BG, SCH_ACCENT -- one palette, see docs/branding +#include "gfx/logo.h" // the mark, the same bytes the loader and console draw +#include "gfx/fb.h" // the console framebuffer, which this mirrors // lib/glue.c has these -- they exist because the compiler emits calls to them -// whether or not anything asks -- but include/user.h never declared them. +// whether or not anything asks -- but include/uapi/user.h never declared them. void *memcpy(void *, const void *, unsigned long); int memcmp(const void *, const void *, unsigned long); @@ -114,7 +114,7 @@ die(const char *why) // Not a failure: a report. There is no virtio-gpu here, or the kernel will not // give it up, and neither of those changes by trying again -- so this tells the // supervisor to stop, rather than being restarted every three seconds for the -// rest of the uptime. See SCHINIT_EXIT_NORESTART in include/schinit.h. +// rest of the uptime. See SCHINIT_EXIT_NORESTART in include/uapi/schinit.h. static void nothing_to_do(const char *why) { @@ -625,7 +625,7 @@ present(void) // // The mark answers the same question a black screen cannot -- something is // driving this device -- and answers it as the system rather than as a test -// rig. Same include/logo.h the loader splash and the kernel console draw, so +// rig. Same include/gfx/logo.h the loader splash and the kernel console draw, so // there is one mark and one set of bytes. static void draw_mark(void) @@ -812,7 +812,7 @@ mirror_pass(void) // // So the kernel is told, in advance, where to paint: it writes the report into // this framebuffer and asks the kernel driver it took this device from to -// reset it and flush one frame. See PCIIOC_PANICFB in include/pciuser.h. +// reset it and flush one frame. See PCIIOC_PANICFB in include/dev/pciuser.h. // // Called again after every modeset, because the size is half of what was // registered. Failing is not fatal to anything: it costs the crash screen on diff --git a/docs/Website/Assets/uberblock.svg b/docs/Website/Assets/uberblock.svg index ff67457..2a60242 100644 --- a/docs/Website/Assets/uberblock.svg +++ b/docs/Website/Assets/uberblock.svg @@ -17,7 +17,7 @@ It is marked twice over: it carries the accent, the same colour as the root at the centre, and it reaches outward past the ring while sharing the inner edge with every other slot. The colour is the reading on screen; the size is what - survives include/logo.h, which is a single coverage channel and keeps no + survives include/gfx/logo.h, which is a single coverage channel and keeps no colour at all. Stands alone, with no reference to SchOS, as projects/schfs-linux/README.md diff --git a/docs/Website/README.md b/docs/Website/README.md index e7e8d6f..d9081c1 100644 --- a/docs/Website/README.md +++ b/docs/Website/README.md @@ -30,7 +30,7 @@ is a token. A hex value in that file means the system is missing something, and the answer is to add it to Niveus rather than to work around it here. What that replaced was a 21 KB `style.css` that transcribed -[`include/theme.h`](../../include/theme.h) by hand — palette, type scale, +[`include/gfx/theme.h`](../../include/theme.h) by hand — palette, type scale, shadows, the lot. The intent was right and the mechanism was a copy: two files that had to be kept in step by remembering to. Now the whole identity is one declaration, in the `` of each page: diff --git a/docs/Website/app.css b/docs/Website/app.css index 4d0473b..596cc53 100644 --- a/docs/Website/app.css +++ b/docs/Website/app.css @@ -9,7 +9,7 @@ answer is to add one rather than to work around it. The one exception is `--nv-brand`, which is declared in the pages: it is - SCH_ACCENT from include/theme.h, and it is an input to the system rather + SCH_ACCENT from include/gfx/theme.h, and it is an input to the system rather than a restatement of it. ========================================================================== */ diff --git a/docs/Website/index.html b/docs/Website/index.html index dea19e1..4ec9018 100644 --- a/docs/Website/index.html +++ b/docs/Website/index.html @@ -26,7 +26,7 @@