| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernel now has the classic UNIX console split, so full-screen ANSI apps
can run in ring 0:
- vt.rs: terminal emulator owning the text screen — cell grid (char +
fg/bg), logical cursor (inverse-video), scrolling, and a small ANSI
CSI parser (cursor position H/f, erase J/K, moves A-D, SGR 16-colour
with correct ANSI→VGA mapping, cursor show/hide ?25). Blits only
changed cells; scroll shifts cell grids + pixels and re-rasterises
only the exposed bottom row. gop_println!/clear_screen now render
through the vt; gop.rs is the raw rasteriser (colored glyph blits,
pixel shift).
- tty.rs: line discipline — canonical read_line (echo, line buffer,
^C cancel, ^D EOF) moved out of the shell, and raw read_byte that
translates KeyEvents to the terminal byte protocol (arrows → ESC[A-D,
Backspace → 0x7f, ^X → 0x18, Ctrl+arrows → ESC[1;5A-D, Home/End/PgUp/
PgDn/Delete). interrupt_pressed() stays for streaming commands.
- ps2: generic Ctrl(char) + CtrlArrow events (was: only CtrlC/CtrlD).
- rsdosedit: no_std port of the RNG rsedit editor as the first real
app — undo, syntax highlighting (verified green/gray/yellow on the
framebuffer), search, word nav, smart indent, ^S save / ^X exit /
^X again to discard. termios → tty raw, stdout → vt, std::fs → VFS
(ramfs), SIGWINCH → fixed geometry, force-exit window → key counter.
- shell: 'edit <path>' command; read_line/strbuf moved to rsnix.
- CONTEXT.md: layout + milestones + known-issue perf notes.
Verified in QEMU: full edit → type → arrow-move → insert → save → exit
round trip with byte-exact file content; ANSI colors via screendump.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- ps2: Ctrl+C and Ctrl+D are now KeyEvents (ctrl modifier + c/d map);
other Ctrl+key combos are swallowed
- shell read_line: ^C clears the line and echoes '^C' (bash-style),
^D on an empty line echoes '^D' and shuts down (EOF), ^D with text
on the line is ignored
- cat/hexdump stream incrementally (was: build whole string then print)
and check for ^C between chunks, so a running dump can be aborted
- verified in QEMU: line cancel, standalone interrupt, ^C aborts an
infinite 'cat /dev/zero' stream, ^D powers off
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- fs.rs: node-table VFS (root /dev /tmp /etc). Regular files are
in-memory ramfs; char devices regenerate content on every read so
'cat /dev/rtc' shows the live time. Nodes are stable handles with
tombstone removal; . and .. path resolution.
- /dev devices: mem (raw physical RAM, offset = address), rtc, pci,
version, meminfo, null, zero, console (write prints to screen+serial),
serial. /etc/motd static file.
- shell: ls, cat, hexdump (hexdump -C style), mkdir, touch, rm; echo
gains '>' overwrite and '>>' append redirection (append bug fixed:
first '>' in '>>' was parsed as overwrite)
- boot: fs init + self-test (create/read/write/remove) before the shell
- QEMU verified: file lifecycle, redirection, console/null writes,
mkdir/touch/rm, hexdump /dev/mem and /tmp/x byte-exact
|
| |
|
|
|
|
|
|
|
|
| |
- rtc.rs: read the PC RTC via CMOS ports 0x70/0x71 (UIP wait, BCD/12h
normalization, century sanity-check with 2000+ fallback); boot prints
the wall clock, shell gains 'date'
- pci.rs: legacy config-space access (0xCF8/0xCFC) with full enumeration
of buses 0-255; boot reports device count, shell gains 'pci' (lspci
style listing with class names)
- QEMU q35 verified: Q35 host bridge, stdvga, e1000, ICH9 LPC
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
- uefi.rs: full EFI_RUNTIME_SERVICES layout with reset_system at index 10
(spec order); EfiResetSystem type + RESET_* constants
- power.rs: stash the runtime-services table pre-EBS; poweroff() calls
ResetSystem(EfiResetShutdown) — still callable after ExitBootServices
because we never call SetVirtualAddressMap, so the pointers keep
working with physical addresses; falls back to the hlt loop
- shell: 'poweroff' and 'exit' shut the machine down (QEMU exits),
'halt' keeps the plain hlt loop
|
| |
|
|
|
|
|
|
| |
- paging strategy: adopt_tables() rebuilds the firmware map into the
kernel's own tables (UEFI maps its tables read-only) and switches CR3
- physical memory: heap grows into the page allocator on demand
- milestones: paging helpers, heap growth, mmap/stress commands
- project layout: paging.rs entry
|
| |
|
|
|
|
|
|
|
|
|
| |
- cmd_mem: correct type grouping — 1|2 loader, 5|6 runtime (new line),
9|10 ACPI, 7 conventional, 11|12 MMIO (previously 6 was mislabeled
LoaderData and 5|10 were called ACPI)
- cmd_mmap: per-region dump using uefi::memory_type_name with
index/type/start/pages/size columns
- cmd_stress <chunks(1-64)> <kb>: allocate chunk Vecs via
try_reserve_exact, report heap+page stats while held and after free;
exercises heap growth past the base region
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- uefi.rs: full EfiMemoryType constants (0-14) + memory_type_name(); fix
MEMORY_TYPE_LOADER_DATA from 6 to 2 per the UEFI spec
- memory.rs: replace the bump allocator with a first-fit free-list heap
(splitting, coalescing, 8-byte back-pointer for alignment-safe free);
add a bitmap physical page allocator (heap region reserved, page-0
guard, aligned runs); grow the heap from the page allocator on demand
- paging.rs: identity page-table helpers — adopt_tables() rebuilds the
firmware map into our own tables (OVMF maps its tables read-only, so
the firmware tree can't be modified in place) and switches CR3;
map_page/unmap_page/is_mapped with 2 MB/1 GB large-page splitting
- main.rs: boot self-tests for heap, pages, and paging
|
| |
|
|
|
| |
Submodule rsboot ee1c85b — reclaimable loader scratch instead of
permanent runtime-services memory.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Architecture:
rs-dos/ (workspace root, was raisernics/)
├── rsnix/ — kernel lib crate (uefi, serial, gop, ps2, interrupts, memory)
├── shell/ — shell lib crate (prompt, commands, line input)
├── rsdos/ — binary crate (efi_main, init, panic handler)
└── rsboot/ — future git submodule
No functional changes — boots to shell prompt identically.
Version auto-pulled from Cargo.toml via env!("CARGO_PKG_VERSION").
|
| | |
|
| |
|
|
|
|
| |
Interrupts are functional: PIT timer (~100 Hz), PS/2 keyboard IRQ
with lock-free SPSC ring buffer, PIC remapped, IDT with 64-bit
interrupt gates. Kernel runs cleanly with no exceptions.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Root cause: x86_64-unknown-uefi uses the Microsoft x64 calling
convention where the first argument is passed in rcx, not rdi.
The ISR stub was setting rdi = rsp, but isr_dispatch() read
the frame pointer from rcx, getting garbage → triple fault.
Also:
- Enable PS/2 keyboard IRQ via controller config byte (bit 0).
- Expose read_scancode() and TICKS from interrupt module.
- ps2::poll_key() uses 'sti; hlt' race-free sleep pattern.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- IDT with 256 entries, loaded via lidt (CS read from current context)
- PIC 8259A remapped to vectors 32-47, timer+keyboard IRQs unmasked
- PIT channel 0 at ~100 Hz (mode 2, rate generator)
- PS/2 keyboard IRQ (IRQ1 → vector 33): reads port 0x60, pushes byte
to lock-free SPSC ring buffer
- Timer IRQ (IRQ0 → vector 32): sends EOI, increments tick counter
- ps2::poll_key() now reads from ring buffer with cli/sti+hlt for
race-free sleep (instead of busy-polling the data port)
- build.rs: use idiomatic Result<_, Box<dyn Error>> return type
- tools/qemu.sh: fix SC2207 shellcheck warning
|
|
|
- Bare-metal x86_64 UEFI kernel (PE32+, no libc)
- GOP framebuffer + 8x16 bitmap font
- PS/2 keyboard (polling, scancode set 1)
- UART 16550 serial driver (COM1, 115200 8N1)
- Bump allocator as #[global_allocator] (alloc::String, Vec, format!)
- UEFI memory map capture (static buffer, ADR 0001)
- Shell with 7 commands (help, echo, clear, hello, info, mem, halt)
- Dual output: GOP framebuffer + serial console
- Makefile: run, run-gui, debug, release, image targets
- tools/: qemu.sh, boot-image.sh, debug-kernel.py
|