r/lowlevel • u/HopefulCarry8357 • 8h ago
r/lowlevel • u/detetivefontes • 8h ago
FydelisTechOS do zero funcionando
youtu.beMeu sistema operacional que estou desenvolvendo do zero. No momento testando no QEMU, logo em cima em hardware de verdade! Cada passo é aprendizado, cada linha é minha. Obrigado por acompanhar!
r/lowlevel • u/nurdek1 • 8h ago
Running Google Antigravity on legacy pre-AES-NI CPUs (Pentium N3540) by patching .init_array and central AES hash routine
Hit a
go/sigill-fail-fastcrash trying to run Google Antigravity on an older Bay Trail laptop (lacks AES-NI and AVX). StandardGODEBUGflags didn't work because thecpuid+raise(SIGILL)check runs inside.init_arrayduring_dl_init.
After NOPing the constructor abort and replacing the centralaesdec-based hash function (0x810a910) with a branchless, memory-safe 64-bit ALU stub, the IDE and AI agents work cleanly without anySIGILLorSIGSEGV.
Full technical write-up (GDB backtraces, ASLR offset math, and a reproducible Python patcher) is here:https://github.com/nuraddin557/antigravity-legacy-cpu-fix
r/lowlevel • u/IEEENaN0S • 9h ago
NaN/0S

I've been building NaN/0S, a bare-metal OS in a custom 16-bit-word ISA (NaN16), custom NaNIX shell, nearly have ISO C parity, and I'm working on formally verifying the stack from the bottom up. There's no C or PY or Assembly that's not NaN Native. This is a milestone, with the limits stated up front.
What's proved (Coq 8.20.1, coqchk-checked, closed under the global context, no Admitted/Axiom/Parameter):
A fixed 23-state × 8-symbol Turing machine, with its 184-row transition table, is simulated on a Coq model of the NaN16 VM. For every state width, every nonempty well-formed program, and every left-infinite configuration, the source machine halts iff the VM run halts. The proof is about 156 files and 59k lines, and the raw certificate and coqchk transcript are checked in with a reproduce.sh.
What it does not claim:
• It's a theorem about the Coq model of the fixture, not the assembled .nas image or the host C oracle. That bridge is a separate obligation. Right now only a Python mnemonic comparison covers it.
• It does not show "NaN0S is a UTM" in general.
• Finite guest memory isn't an unbounded tape. The statement uses an existential left-window depth K to handle that.
I also included negative results, such as certified obstruction theorems showing exactly where earlier tape layouts break.
The bigger system: NaN/0S has an x86_64 kernel with a 1024-slot process table, timer preemption, a NANIX shell and GUI, and PAE tests up to 16 GiB. The Coq side there covers the mirrored-lattice memory model (32,896 canonical cells, signed addressing, write commutativity). The open work is proving that the real kernel implementation refines these models.
Repos:
• https://github.com/shemshallah/NaNLMind (see formal/utm)
r/lowlevel • u/Gloomy-Animator-2778 • 9h ago
🦀 Looking for 3–4 Like-Minded People to Build a Rust & Systems Programming Study Group!
reddit.comr/lowlevel • u/Adventurous_Hippo692 • 10h ago
A configurable microcontroller bootloader, unified across boards, inspired by kconfig
github.comr/lowlevel • u/masiroo • 9h ago
HimitsuObfuscator: a gpl-free c/c++ obfuscator (llvm 17 based, whitelist-driven)
github.comr/lowlevel • u/detetivefontes • 13h ago
FydelisTechOS — a bare-metal OS written in Assembly & C (no libc)
Hello everyone!
I'd like to share FydelisTechOS, an independent operating system I'm building from scratch in Salvador, Brazil. It's a bare-metal kernel written in Assembly and C — no libc, no dependencies on any existing OS.
Current features:
- ✅ Boot sequence in text and VGA graphics mode (1280×1024)
- ✅ Hardware detection and real-time monitoring
- ✅ Custom filesystem with BMP/JSON support
- ✅ Native GUI, crypto module, and basic network support
- 🔧 In progress: firewall, network stack, and AI-driven anomaly detection
Tech stack:
- Architecture: x86
- Toolchain: GNU GCC / LD / NASM
- Emulation: QEMU
- License: open-source
Repository & documentation:
- GitHub: https://github.com/fydelis2025/FydelisTechOS-V4/tree/FydelisTechOS-V4
- Zenodo documentation: https://zenodo.org/records/24500979
This is a learning and research project focused on transparency, security, and understanding how an OS works at the lowest level. Feedback, questions, and suggestions are very welcome!
Thanks for reading! 😊
r/lowlevel • u/Budget_Ad_2544 • 1d ago
Mapreduce implementation using boost asio , asio-grpc
Built an asynchronous distributed MapReduce in C++23
A non-blocking, data sharing distributed engine using boost asio C++20 coroutines and asio-grpc
How Map & Reduce works:
- Map: Workers execute user mappers, and partition intermediate data into binary hashed shards.
- Reduce: Workers sort shards in-place and run an external K-way min-heap merge to stream ordered keys to reducers .
How Data Sharing happens:
- Map Phase (Coord ➔ Worker): Coordinator streams 64KB split chunks over gRPC, decoupled by 4MB concurrent channels.
- Reduce Phase (Worker ➔ Worker): Peer-to-peer shuffle. If a shard was produced locally on the same host, it uses zero-copy atomic hard-linking (link()) to bypass the network entirely.
Fault Tolerance (SHUFFLEFIX):
- During Map Phase,
- If a map worker dies , coodinator check the heartbeat if it is more than some time T , it invalids the task, and give to other worker polling it
- During Reduce Phase
- Since we use P2P network, map -> reduce phase worker to share data, If a map worker dies mid download phase, the coordinator invalidates only that task and has a spare worker recompute it.
- Reducers keep their existing shards, wait for the new endpoint, and resume without restarting the job
r/lowlevel • u/amgcr7adm10 • 1d ago
Hey everyone, I'm a 2nd-year engineering student and just wrapped up my first RTL processor project—a basic 3-stage pipelined RISC-V core (Fetch, Decode/Execute, Memory/Write-Back) written in Verilog and simulated in AMD Vivado (xsim) targeting the Artix-7 (xc7a35tcpg236-1).
github.comr/lowlevel • u/HopefulCarry8357 • 2d ago
HELLCORE OS: Building a freestanding x86-64 UEFI kernel from Termux on a Galaxy A27 (1,037 host tests, ASan/UBSan, QEMU/OVMF boot)
reddit.comr/lowlevel • u/alberthemagician • 3d ago
The first step for the riscv optimiser.
(I am the author of ciforth, a ISO compatible Forth model that has implementations for linux, windows, 32 and 64 bit, I86, arm and riscv).
I have given up on the x86 optimiser for ciforth, as the 86 will be history before long. The instruction set is too barocque.
As the first part of the riscv optimiser I made the forth aware of the stack effects words have, counting POP's and PUSH's. This hinges on the ciasdis object oriented disassembler. FILL-ALL fills all words as best it can, but skips what you have filled in beforehand. Also a host of other optimisation relevant properties of Forth words are analysed. E.g. it is important if a word has no so called "side effect" that means storing and fetching. An example is the word SQUARE that squares a number. If the input is known at compile time, SQUARE can be executed at compile time. See also lecture 5 en lecture 14 in
https://home.hccnet.nl/a.w.m.van.der.horst/forthlectures.html
Lecture 14 contains an old example of coloring on the now vintage 32 bit x86 processor. If you have a linux that can run 32 bit programms you can try it out. The experience is more or less the same what I want to show here. A useful visualisation is coloring the stack effect of each word. aqua is one, green is two, orange is three, above three is red. For an unknown stack effect the whole words is printed in blue.
https://home.hccnet.nl/a.w.m.van.der.horst/words.png
The stack effect is useful to understand words better. E.g. (D.R) takes a double word and a box length (orange) and generates a string (green). You can ask the analysis of a word like so
https://home.hccnet.nl/a.w.m.van.der.horst/decompile_ddot.png
And you can spot the mistake Apparently +LOOP takes one argument not zero. These things must be added manually. ~
I have prepared the pictures, but I don't know how to publishit in this forum. So I put a link to my personal website.
~
r/lowlevel • u/tinymoat • 5d ago
Can't call subroutine from a linked in object file in GBA assembly
reddit.comr/lowlevel • u/Early-Toe646 • 5d ago
I emulated a Realtek Smart TV SoC in QEMU and booted full Android TV 9
github.comI reversed a TCL Smart TV board (Realtek RTD2841 / RTK284x SoC, AArch32) with no public datasheets and wrote a custom QEMU machine model to boot its commercial Android 9 Pie firmware.
I just reached the milestone where the full 1080p launcher boots and can be navigated with a host mouse and IR remote.
The big hurdles I had to solve:
- Hardware Timer Reversal Realtek's timer registers count down, breaking Linux's monotonic sched_clock. I patched the QEMU model to expose limit - count
- Freestanding PID 1: Built mini_init in pure ARM32 syscalls without glibc to manage Android cgroups, permissions, and bypass crashing OEM telemetry daemons.
- Mali GPU Replacement**: With no proprietary GPU drivers, I debloated the ROM and bound ARM32 Google SwiftShader so SurfaceFlinger could render the entire desktop on the CPU.
- Native Input: Added a virtual USB OHCI controller and mapped Venus IR scancodes for direct mouse and keyboard navigation in the host window.
Demo video is in the repo:
r/lowlevel • u/razecrsx • 5d ago
GitHub - razecrs/windissect: Turns Windows binaries and their PDBs into proven C, C++ and Rust interfaces, with per-build history and diffs.
github.comr/lowlevel • u/DataBaeBee • 5d ago
Inventing Your Own Math As A Computer Programmer
leetarxiv.substack.comr/lowlevel • u/lynxbossx • 6d ago
Hi friends, I'd like to show you my Rust-based operating system and I'm looking for testers and ideas
Hi friends,
I'd like to show you my operating system, AriCodeOS. It's written in Rust: a `no_std` microkernel with UEFI boot on x86-64. The current version is 0.11.0 and it runs in QEMU and on one real laptop (keyboard, USB stick as the system disk and wired networking already work).
I'm looking for people who want to try it, tell me what breaks, and suggest ideas and improvements. Any feedback is welcome, including harsh feedback.
- Repository (Apache 2.0): https://github.com/AriCodeLabs/AriCodeOS
- Website: https://www.aricodeos.org/
Thank you to the Rust community for the language that made this possible.
r/lowlevel • u/EBIOSSANTO • 7d ago
Pedido de ajuda: Olá não sou desenvolvedor, mas com ajuda de IA consegui dar forma a uma idéia, gostaria de pedir a colaboração dos colegas com sua analise e opinião. Desde já fico agradecido. Prova: A formally verified, S-expression language for AI synthesis & bare-metal kernels (MLIR backend + Z3/
https://github.com/ebiossanto/prova.git
I’ve been working on Prova, an experimental verified programming language designed around a specific premise: humans shouldn't write low-level boilerplate, and LLMs shouldn't be trusted with system invariants.
Instead of adapting human-centric languages for AI, Prova combines three layers into a single pipeline:
- Syntax for LLMs: S-expressions backed by a GBNF grammar (
spec/prova.gbnf) for constrained decoding (e.g.,llama.cpp), eliminating syntax errors at generation time. - Semantics & Locked Contracts: Mandatory
pre/postcontracts, strict types with no implicit conversions, linear ownership (own/drop, no mutable aliasing), and explicit effects (syscall,atomic,mmio). - Hardware & MLIR Backend: Memory region tracking (
deny-flow), static stack budgeting, and direct MLIR emission targeting x86-64, AArch64, and RISC-V bare-metal ELFs.
The Core Workflow (audit + fix)
The human audits only the specification (prova.py audit), while the AI iterates on the function body (prova.py fix --model-cmd ...). The compiler feeds structured JSON counterexamples back to the LLM on failure, while strictly locking signatures, contracts, effects, and memory flow rules—if the AI tries to weaken a pre/post condition to make it compile, the candidate is rejected.
Here is a quick look at a verified packet inspector example (examples/packet_inspector.prova) enforcing a deny-flow policy so raw network bytes cannot leak to u/write:
lisp
(region net-rx)
(deny-flow net-rx u/write)
(fn checksum ((buf (slice u8 n)) (n u64)) u64
(pre (<= n 65535))
(post (<= result (* 255 n)))
...)r/lowlevel • u/Cool-Conflict8299 • 8d ago
System Architecture & Subsystem Pipelines for a Zero-Abstraction Lambda Calculus Transpiler & Monotonic Memory Manager & End-to-End Architectural Blueprints: Subsystem Topology of a Zero-Abstraction Lambda Calculus Transpiler & Monotonic Arena Manager
galleryTitle:
End-to-End Architectural Blueprints: Subsystem Topology of a Zero-Abstraction Lambda Calculus Transpiler & Monotonic Arena Manager
Description:
Here is an exhaustive, granular breakdown of the architectural pipeline mapped out in the subsystem flowcharts for OCHR-X, detailing how abstract symbolic reduction bridges directly down to physical memory allocation and native executable emission[span_0](start_span)[span_0](end_span)[span_1](start_span)[span_1](end_span)[span_2](start_span)[span_2](end_span):
1. Lambda Symbols & Intermediate Representation (IR) Pipeline (lambda_symbols_IR_new)
* Execution Entry & Initialization: The runtime environment boots via `Start proc()`, systematically resolving target offsets and initializing the core event handler (`event handler()`)[span_3](start_span)[span_3](end_span). Argument vectors are ingested and split into value handles (`argv[val]_a_handle`) and character passes (`argv[char]-pass`) for precise parsing[span_4](start_span)[span_4](end_span).
* Symbolic Management & Import: The Intermediate Representation Generation Management unit (IRGM) acts as the central coordinator, interfacing directly with a dedicated `symb importer` and the `lambda IR symbols library` to pull raw tokens into the pipeline[span_5](start_span)[span_5](end_span).
* Evaluation & Error Correction Loop: The parsed structures are passed into the `Symbolic IR generator` and routed directly to GIREVL (the IR Evaluator)[span_6](start_span)[span_6](end_span). The evaluation block continuously validates structural integrity via an explicit conditional check (`if GIR is correct?`)[span_7](start_span)[span_7](end_span). Valid states immediately trigger code generation (`generate IR`), while non-conforming states are safely funneled into IRGERC (Intermediate Representation Generation Error Corrector) to resolve symbolic divergence before re-evaluation[span_8](start_span)[span_8](end_span).
2. Memory Allocator & FFI Pipeline (memory_allocator_manager)
* Program Entry & Header Binding: Execution begins by ingesting command-line arguments and binding compiler functions directly from header references (`pass args to compiler and call functions from in r.h (header)`), feeding straight into the primary compiler driver[span_9](start_span)[span_9](end_span).
* Monotonic Arena Memory Management (PMA): Rather than leaning on standard dynamic heap allocation, the architecture routes memory requests through a specialized PMA / arena memory allocator & mgmt module[span_10](start_span)[span_10](end_span). This coordinates zero-overhead bump pointer allocations and phase resets (`std::pmr::monotonic_buffer_resource`-style dynamics) to eliminate garbage collection latency[span_11](start_span)[span_11](end_span)[span_12](start_span)[span_12](end_span)[span_13](start_span)[span_13](end_span).
* Foreign Function Interface (FFI) & IMACA Evaluation: Foreign function interfaces are transpiled via `FFI (transpiler) via gtms p` and evaluated under IMACA (Intermediate Memory & Scope/Den Evaluation Architecture), generating low-level intermediate representations across control flow graphs, abstract syntax trees, static single assignment (SSIR), or directed acyclic graphs (DAGs) before passing to the library manager (`librmanger`)[span_14](start_span)[span_14](end_span)[span_15](start_span)[span_15](end_span).
* Linker, Emission & Leak Verification: The compiled modules are routed through the system `linker`, generating native object files (`.obj` or `.o`) and assembling a fully realized `executable`[span_16](start_span)[span_16](end_span). Before final output emission, automated validation checks run to confirm memory integrity and detect leaks (`check for memory leaks`)[span_17](start_span)[span_17](end_span).
Thought I’d share the complete structural blueprint for anyone working on custom compiler backends, explicit term-graph substitution engines, or bare-metal runtime architectures. Happy to discuss the interaction between the GIREVL evaluation loops and the memory manager if anyone is exploring similar low-level optimizations!
r/lowlevel • u/Majestic_Tension_860 • 8d ago
xcomm: I built a minicom replacement that lets an AI agent drive the board's console while you watch
I spend a lot of time on serial consoles: U-Boot, boot logs, a shell on the
board. I wanted something that keeps minicom's everyday keys and common options but
lets a script or a coding agent use the same console I am looking at, so I
wrote xcomm (Rust, Linux and macOS, GPL-2.0-only):
- `xcomm ctl` talks to a running session: send a command and wait for a
prompt with a regex, read output by offset, toggle DTR/RTS, send a break,
change the baud, run zmodem/ymodem/xmodem through lrzsz. What a client
sends shows in your terminal as a dim `[ctl]` line.
- It survives the bench: unplug the adapter or power-cycle the board and the
session waits and reopens the port (on Linux, by the USB port it is plugged
into).
- minicom's common options and everyday Ctrl-A keys (Alt-A inside tmux,
screen or zellij); Ctrl-A d and t toggle DTR and RTS.
- UUCP locks compatible with minicom on Linux, and an exclusive open
everywhere, so two programs never share a port by accident.
- It ships an agent skill (stop U-Boot, log in, run commands, parse the
output); a test runs every example in it against a real session.
Numbers, through a pty with the same harness for each tool (median of 9 runs;
method and command lines in the README): 434 MiB/s on 1.84 ms of CPU per MiB,
against minicom's 10.5 MiB/s on 95 ms. On a real UART the baud rate is the
limit, so what you get is CPU left free. Keystroke latency is level with
minicom (within a microsecond either way).
`brew install cantona/tap/xcomm` or `cargo install --locked xcomm`
(`xcomm man` shows the manual where cargo installs none).
GitHub: https://github.com/cantona/xcomm
Happy to hear what breaks on your adapters.
r/lowlevel • u/Apart_Case4994 • 8d ago
SysArmor: A lightweight Linux system hardening tool written in pure C and Assembly (zero dependencies)
Hey everyone! I built **SysArmor**, a zero-dependency system hardening and security miffing tool written entirely in pure C and Assembly.
It uses POSIX system calls (like `open` with `O_NOFOLLOW` and `fstat`) to protect critical system paths against symlink attacks, race conditions, and unauthorized modifications across all standard Linux distros (Ubuntu, Debian, Fedora, Arch, etc.).
If you're into low-level systems programming, terminal utilities, or want to check it out, the repository is here:
👉 **https://github.com/error0941/sysarmor**
I’d love to hear your feedback, code reviews, or suggestions!
r/lowlevel • u/Apart_Case4994 • 8d ago
SysArmor: A lightweight Linux system hardening tool written in pure C and Assembly (zero dependencies)
Hey everyone! I built **SysArmor**, a zero-dependency system hardening and security tool written entirely in pure C and Assembly.
It uses POSIX system calls (like `open` with `O_NOFOLLOW` and `fstat`) to protect critical system paths against symlink attacks, race conditions, and unauthorized modifications across all standard Linux distros (Ubuntu, Debian, Fedora, Arch, etc.).
If you're into low-level systems programming or terminal utilities, the repository is here:
👉 **https://github.com/error0941/sysarmor**
I’d love to hear your feedback, code reviews, or suggestions!
NOT:Başlıkta Assembly yazmışım ama şu anki sürüm tamamen saf C ve POSIX sistem çağrıları ile çalışıyor. İlerleyen sürümlerde kritik syscall'lar için inline assembly ekleyeceğim.
NOT:Assembly eklenmiştir.