boot.S Multiboot entry Declares the Multiboot header, sets up the stack, initializes serial output, and jumps to kernel_main. This is the first code the loader runs.
// architecture
The whole kernel is eight files of substance. There is no dynamic linking, no module loader, no plugin surface, and no host OS. Every layer has a single owner and you can read the entire control flow top to bottom.
+-----------------------------------------------------------+
| QEMU / Bare Metal (x86, Multiboot) |
+-----------------------------------------------------------+
| boot.S Multiboot entry, stack, serial init |
| kernel.c Kernel main, VGA terminal, serial I/O |
| memory.c Heap allocator (malloc/free) |
| string.c libc subset (snprintf, memcpy, ...) |
| network.c PCI enumeration + e1000 NIC driver |
| http.c / api.c HTTP server, request routing |
| api_v1.c llama.cpp-compatible REST API |
| llm.c Model loading and inference interface |
+-----------------------------------------------------------+ boot.S Multiboot entry Declares the Multiboot header, sets up the stack, initializes serial output, and jumps to kernel_main. This is the first code the loader runs.
kernel.c Kernel main Brings up the VGA terminal and serial I/O, then enters the main loop. There is no scheduler — this loop owns the CPU.
memory.c Heap allocator Manages a statically-allocated 4 MB arena with malloc and free. Flat 32-bit addressing, no paging, no virtual memory manager.
string.c libc subset snprintf, memcpy, memset, strncmp and the handful of string routines the rest of the kernel needs. No external C library.
network.c PCI + e1000 Walks the PCI bus, claims the Intel e1000 NIC, brings up the descriptor rings, and moves raw Ethernet frames in and out.
http.c / api.c HTTP server + router Parses HTTP/1.1 requests off the wire and routes them to handlers. The server is the packet-processing loop, not a daemon on an OS.
api_v1.c v1 REST API Implements the llama.cpp-shaped v1 endpoints: completions, chat, embeddings, models, tokenize, detokenize.
llm.c Inference seam The interface where model loading and the inference engine plug in. Handlers dispatch here; responses are stubs until the llama.cpp path is integrated.
// memory & concurrency model