boot.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Boot | NebOS Architecture</title>
  7. <meta name="description" content="NebOS boot chain: BIOS boot sector and VESA stage, UEFI loader, kexec reload, boot-info handoff and disk image layout.">
  8. <link rel="icon" href="favicon.svg" type="image/svg+xml">
  9. <link rel="stylesheet" href="style.css">
  10. </head>
  11. <body>
  12. <a class="skip" href="#main">Skip to content</a>
  13. <header class="site-header">
  14. <a class="brand" href="index.html">
  15. <span class="brand-mark" aria-hidden="true"></span>
  16. <span>NebOS <span class="brand-sub">Architecture</span></span>
  17. </a>
  18. <nav class="site-nav" aria-label="Architecture sections">
  19. <a href="index.html">Overview</a>
  20. <a href="boot.html" aria-current="page">Boot</a>
  21. <a href="memory.html">Memory</a>
  22. <a href="cpu.html">CPU</a>
  23. <a href="drivers.html">Drivers</a>
  24. <a href="filesystems.html">Filesystems</a>
  25. <a href="graphics.html">Graphics</a>
  26. <a href="network.html">Network</a>
  27. <a href="userland.html">Userland</a>
  28. <a href="development.html">Development</a>
  29. </nav>
  30. </header>
  31. <main id="main" class="page">
  32. <div class="page-head">
  33. <p class="kicker">Boot &amp; firmware</p>
  34. <h1>Three ways into the same kernel.</h1>
  35. <p class="lede">
  36. A legacy BIOS floppy, a dual-boot USB image under UEFI, and a live
  37. serial or network reload all converge on <code>kernel_entry</code>.
  38. They must agree on three things: the low-memory boot structures, the
  39. rootfs pack location, and a 32-bit flat protected-mode environment.
  40. </p>
  41. <div class="meta">
  42. <span class="pill">512-byte boot sector</span>
  43. <span class="pill">real-mode VESA stage</span>
  44. <span class="pill">x86-64 UEFI loader</span>
  45. <span class="pill">kexec hot reload</span>
  46. </div>
  47. </div>
  48. <nav class="toc" aria-label="On this page">
  49. <h2>On this page</h2>
  50. <ul>
  51. <li><a href="#overview">Boot paths</a></li>
  52. <li><a href="#bios">BIOS path</a></li>
  53. <li><a href="#uefi">UEFI path</a></li>
  54. <li><a href="#kexec">kexec path</a></li>
  55. <li><a href="#handoff">Handoff contract</a></li>
  56. <li><a href="#images">Image layout</a></li>
  57. <li><a href="#init">Kernel init order</a></li>
  58. <li><a href="#failures">Failure modes</a></li>
  59. <li><a href="#sources">Source map</a></li>
  60. </ul>
  61. </nav>
  62. <section id="overview">
  63. <h2>Three paths, one entry point</h2>
  64. <p>
  65. The boot code is deliberately split by execution mode. The BIOS path
  66. starts in 16-bit real mode, the UEFI path starts in 64-bit long mode,
  67. and the kexec path starts in the running 32-bit kernel. All three end
  68. at <code>kernel_entry</code> in <span class="file">entry.S</span>,
  69. which immediately re-points <code>ESP</code> at the new image's own
  70. boot stack before calling <code>kernel_main</code>.
  71. </p>
  72. <figure class="figure">
  73. <svg viewBox="0 0 920 390" role="img" aria-labelledby="paths-title paths-desc">
  74. <title id="paths-title">Three NebOS boot paths</title>
  75. <desc id="paths-desc">BIOS boot sector to VESA stage to kernel entry; UEFI BOOTX64.EFI to trampoline to kernel entry; kexec receiver to trampoline to kernel entry.</desc>
  76. <rect class="svg-box blue" x="16" y="18" width="250" height="76" rx="8"/>
  77. <text class="svg-text" x="36" y="46">BIOS · floppy / USB</text>
  78. <text class="svg-sub" x="36" y="66">boot.S at 0x7C00 → vesa_stage.S</text>
  79. <text class="svg-sub" x="36" y="82">real mode → protected mode</text>
  80. <rect class="svg-box green" x="16" y="152" width="250" height="76" rx="8"/>
  81. <text class="svg-text" x="36" y="180">UEFI · usb-efi.img</text>
  82. <text class="svg-sub" x="36" y="200">BOOTX64.EFI · x86-64</text>
  83. <text class="svg-sub" x="36" y="216">GOP + GetMemoryMap</text>
  84. <rect class="svg-box amber" x="16" y="286" width="250" height="76" rx="8"/>
  85. <text class="svg-text" x="36" y="314">kexec · make dev / net-dev</text>
  86. <text class="svg-sub" x="36" y="334">KXE2 serial · KXN2 UDP</text>
  87. <text class="svg-sub" x="36" y="350">running kernel receives image</text>
  88. <path class="svg-line blue" d="M266 56h94"/>
  89. <path class="svg-line blue" d="M354 50l7 6-7 6"/>
  90. <path class="svg-line green" d="M266 190h94"/>
  91. <path class="svg-line green" d="M354 184l7 6-7 6"/>
  92. <path class="svg-line amber" d="M266 324h94"/>
  93. <path class="svg-line amber" d="M354 318l7 6-7 6"/>
  94. <rect class="svg-box" x="360" y="18" width="228" height="76" rx="8"/>
  95. <text class="svg-text" x="380" y="46">VESA stage</text>
  96. <text class="svg-sub" x="380" y="66">E820 · VBE mode · rootfs</text>
  97. <text class="svg-sub" x="380" y="82">0x500 / 0x600 / 0x1000</text>
  98. <rect class="svg-box" x="360" y="152" width="228" height="76" rx="8"/>
  99. <text class="svg-text" x="380" y="180">UEFI trampoline</text>
  100. <text class="svg-sub" x="380" y="200">0x800 · leave IA-32e</text>
  101. <text class="svg-sub" x="380" y="216">kernel copy to 0x7E00</text>
  102. <rect class="svg-box" x="360" y="286" width="228" height="76" rx="8"/>
  103. <text class="svg-text" x="380" y="314">kexec trampoline</text>
  104. <text class="svg-sub" x="380" y="334">APs parked · copy kernel</text>
  105. <text class="svg-sub" x="380" y="350">keep framebuffer</text>
  106. <path class="svg-line accent" d="M588 56h110v139"/>
  107. <path class="svg-line accent" d="M588 190h110v5"/>
  108. <path class="svg-line accent" d="M588 324h110v-129"/>
  109. <path class="svg-line accent" d="M692 188l6 7 6-7"/>
  110. <rect class="svg-box accent" x="620" y="136" width="280" height="108" rx="9"/>
  111. <text class="svg-text" x="642" y="166">kernel_entry · entry.S</text>
  112. <text class="svg-sub" x="642" y="188">ESP = __boot_stack_top</text>
  113. <text class="svg-sub" x="642" y="208">jmp kernel_main</text>
  114. <text class="svg-sub" x="642" y="228">32-bit flat · paging off</text>
  115. </svg>
  116. <figcaption>
  117. <strong>Every path hands off in the same shape:</strong> flat
  118. 32-bit segments, paging off, the framebuffer block at
  119. <code>0x600</code>, the boot-info block at <code>0x500</code>, and
  120. the kernel loaded at <code>0x7E00</code>.
  121. </figcaption>
  122. </figure>
  123. </section>
  124. <section id="bios">
  125. <h2>BIOS path</h2>
  126. <h3><span class="file">boot.S</span> — the 512-byte boot sector</h3>
  127. <p>
  128. The boot sector carries a FAT16 BPB, loads the contiguous kernel
  129. directly after itself to <code>0x7E00</code>, and jumps there.
  130. Floppy drives use CHS; fixed disks use <code>INT 13h AH=42h</code>
  131. (EDD LBA). The sector count and the rootfs LBA are patched into the
  132. boot sector by the Makefile.
  133. </p>
  134. <p>
  135. On the USB image, <span class="file">mbr.S</span> runs first and
  136. loads the active partition's boot sector at LBA 63. From there the
  137. path is identical.
  138. </p>
  139. <h3><span class="file">vesa_stage.S</span> — the real-mode setup</h3>
  140. <p>
  141. The VESA stage is the busiest piece of the legacy chain. It runs in
  142. real mode at <code>0x7E00</code> and performs five jobs:
  143. </p>
  144. <ol>
  145. <li>Probe the <code>INT 15h</code> E820 memory map into <code>0x1000</code>.</li>
  146. <li>Read the <code>NBROOT1</code> rootfs header at the boot sector's <code>pack_lba</code> field.</li>
  147. <li>Stage the compressed pack in the low gap <code>0x60000..0x9FBFF</code>, using 16 KB staging chunks at <code>0x3000</code> and <code>rep movsb</code>. No protected-mode BIOS call is required.</li>
  148. <li>Pick the best VBE mode: at least 16 bpp, a linear framebuffer, it must fit the card's VRAM, and the width must be at most 1280 pixels. Mode information is written to <code>0x600</code>; the 12-dword boot-info block goes to <code>0x500</code>.</li>
  149. <li>Enable A20, enter protected mode, copy the pack to <code>0x900000</code> above the 8 MB VGA-shadow reserve, rewrite the boot-info pack address, and jump to <code>kernel_entry</code>.</li>
  150. </ol>
  151. <p>
  152. The staging gap is why the compressed pack has a hard cap of
  153. <code>0x3FBFF</code> (~255 KB), ending below the EBDA at
  154. <code>0x9FC00</code>. The kernel image itself must stay below the
  155. same gap, which <span class="file">kernel.ld</span> enforces with
  156. link-time assertions.
  157. </p>
  158. <div class="note">
  159. <p><strong>Why copy the pack again?</strong> The low gap is temporary:
  160. the kernel BSS and boot stack may extend past <code>0x60000</code>.
  161. Moving the pack to <code>0x900000</code> before <code>kernel_main</code>
  162. keeps it safe until <span class="file">ramfs.c</span> takes a private
  163. page-allocated copy and releases the boot region.</p>
  164. </div>
  165. </section>
  166. <section id="uefi">
  167. <h2>UEFI path</h2>
  168. <p>
  169. <span class="file">efi/main.c</span> is a freestanding x86-64 PE32+
  170. application built with <code>x86_64-w64-mingw32-gcc</code>. It does
  171. not execute any of the legacy boot chain. Instead it:
  172. </p>
  173. <ol>
  174. <li>Selects a GOP mode with BGRX or RGBX 32bpp, width at most 1280, <code>pitch × height</code> at most 8 MB, and a framebuffer below 4 GB.</li>
  175. <li>Calls <code>GetMemoryMap</code> and converts the firmware map into the kernel's E820 format at <code>0x1000</code>.</li>
  176. <li>Stages the kernel image below 4 GB and writes the boot-info and framebuffer blocks.</li>
  177. <li>Calls <code>ExitBootServices</code>, copies the embedded rootfs pack to the top of RAM below 128 MB, and copies a 192-byte trampoline to <code>0x800</code>.</li>
  178. <li>Leaves IA-32e mode (clears <code>CR0.PG</code>, <code>EFER.LME</code>, <code>CR4.PAE/PGE/PCIDE/SMEP/SMAP/LA57</code>), copies the kernel to <code>0x7E00</code>, and jumps to <code>kernel_entry</code>.</li>
  179. </ol>
  180. <p>
  181. <span class="file">efi/payload.S</span> embeds the compressed
  182. kernel, the gzip rootfs pack and the trampoline inside
  183. <code>BOOTX64.EFI</code>, so the ESP is self-contained. Secure Boot
  184. must be off; the loader is unsigned.
  185. </p>
  186. <div class="warn">
  187. <p><strong>No GOP, no video.</strong> If the loader cannot satisfy the
  188. mode constraints it still boots, but the kernel starts headless and
  189. only the serial log is available.</p>
  190. </div>
  191. </section>
  192. <section id="kexec">
  193. <h2>kexec path</h2>
  194. <p>
  195. kexec is the normal development loop: it replaces the running kernel
  196. without rebooting, reflashing or re-running the firmware. The
  197. framebuffer and its mode stay in place; only the image changes.
  198. </p>
  199. <ul>
  200. <li><strong>Serial.</strong> The WM loop watches the COM1 ring buffer for the <code>KXE2</code> magic. The header carries entry, kernel size, pack size and a checksum; <code>pack_size == 0</code> keeps the running rootfs.</li>
  201. <li><strong>Network.</strong> The same transfer runs over UDP port 19288 with the <code>KXN2</code> magic. The board acknowledges every datagram with the next expected offset and verifies a 32-bit checksum.</li>
  202. <li><strong>Runtime pack only.</strong> <code>KXNP</code> over serial or network replaces <code>/ramfs</code> in place without touching the kernel.</li>
  203. </ul>
  204. <p>
  205. Before jumping, <span class="file">kexec.c</span> calls
  206. <code>smp_stop_aps()</code>: every AP receives an INIT and is parked in
  207. the wait-for-SIPI state before the trampoline overwrites the kernel
  208. they were executing. The trampoline runs with interrupts off, resets
  209. <code>sched_lock</code> (an AP may have been inside a scheduler
  210. critical section), and jumps to <code>kernel_entry</code>.
  211. </p>
  212. <p>
  213. Because <span class="file">entry.S</span> re-points <code>ESP</code>
  214. before any stack use, a reload between builds with different memory
  215. maps cannot inherit a stale stack inside the new image.
  216. </p>
  217. </section>
  218. <section id="handoff">
  219. <h2>Handoff contract</h2>
  220. <p>
  221. <span class="file">bootinfo.h</span> defines the 12-dword block at
  222. <code>0x500</code>. The checksum is chosen so all twelve words sum to
  223. zero; that keeps stale low memory from being mistaken for a valid
  224. block after a kexec or legacy boot.
  225. </p>
  226. <div class="table-wrap">
  227. <table>
  228. <thead>
  229. <tr><th>Offset</th><th>Field</th><th>Meaning</th></tr>
  230. </thead>
  231. <tbody>
  232. <tr><td><code>+0</code></td><td><code>magic</code></td><td><code>0x4E425349</code> (<code>"NBSI"</code>)</td></tr>
  233. <tr><td><code>+4</code></td><td><code>version</code></td><td>Currently 2.</td></tr>
  234. <tr><td><code>+8</code></td><td><code>checksum</code></td><td>Makes the 12-word sum zero.</td></tr>
  235. <tr><td><code>+12</code></td><td><code>rsdp</code></td><td>ACPI RSDP physical address; zero means scan.</td></tr>
  236. <tr><td><code>+16</code></td><td><code>flags</code></td><td>EFI, RGBX pixel order, retained network config.</td></tr>
  237. <tr><td><code>+20</code></td><td><code>pack_addr</code></td><td>Boot-time rootfs pack address, zero if none.</td></tr>
  238. <tr><td><code>+24</code></td><td><code>pack_size</code></td><td>Exact gzip or raw pack byte count.</td></tr>
  239. <tr><td><code>+28</code></td><td><code>reserved[5]</code></td><td>Reserved; the kexec path stores retained IP/mask/gateway/DNS here.</td></tr>
  240. </tbody>
  241. </table>
  242. </div>
  243. <p>
  244. The framebuffer block at <code>0x600</code> is a
  245. <code>struct vga_boot_fb_info</code> (<span class="file">vga.h</span>):
  246. valid flag, LFB base, pitch, width, height, bpp and the RGBX flag.
  247. The E820 map at <code>0x1000</code> is a
  248. <code>struct e820_map</code> (<span class="file">mm.h</span>): magic,
  249. count and up to 32 entries.
  250. </p>
  251. </section>
  252. <section id="images">
  253. <h2>Disk image layout</h2>
  254. <p>
  255. The build produces several images from the same boot sector, kernel
  256. and rootfs. The layouts are intentionally conservative: the first
  257. 1.44 MB must remain readable by a CHS-only BIOS.
  258. </p>
  259. <figure class="figure">
  260. <svg viewBox="0 0 920 342" role="img" aria-labelledby="images-title images-desc">
  261. <title id="images-title">NebOS disk image layouts</title>
  262. <desc id="images-desc">Floppy image: boot sector, kernel, rootfs, padding to 1.44 MB. USB image: MBR and boot partition, rootfs at LBA 1088, 9 MB total. Dual-boot image: the same 9 MB plus an 8 MB EFI system partition at LBA 18432.</desc>
  263. <text class="svg-text" x="12" y="30">floppy.img</text>
  264. <text class="svg-tiny" x="908" y="30" text-anchor="end">1.44 MB</text>
  265. <rect class="svg-box accent" x="160" y="42" width="14" height="24" rx="3"/>
  266. <rect class="svg-box blue" x="178" y="42" width="250" height="24" rx="3"/>
  267. <rect class="svg-box green" x="432" y="42" width="210" height="24" rx="3"/>
  268. <rect class="svg-box" x="646" y="42" width="244" height="24" rx="3"/>
  269. <text class="svg-tiny" x="186" y="59">kernel</text>
  270. <text class="svg-tiny" x="440" y="59">rootfs.bin</text>
  271. <text class="svg-tiny" x="654" y="59">zero padding</text>
  272. <text class="svg-text" x="12" y="106">usb.img</text>
  273. <text class="svg-tiny" x="908" y="106" text-anchor="end">9 MB</text>
  274. <rect class="svg-box amber" x="160" y="118" width="184" height="24" rx="3"/>
  275. <rect class="svg-box green" x="416" y="118" width="474" height="24" rx="3"/>
  276. <text class="svg-tiny" x="176" y="135">P1 · boot + kernel</text>
  277. <text class="svg-tiny" x="424" y="135">partition 2 · rootfs · LBA 1088 · 8 MB</text>
  278. <text class="svg-text" x="12" y="182">usb-efi.img</text>
  279. <text class="svg-tiny" x="908" y="182" text-anchor="end">17 MB</text>
  280. <rect class="svg-box amber" x="160" y="194" width="184" height="24" rx="3"/>
  281. <rect class="svg-box green" x="416" y="194" width="250" height="24" rx="3"/>
  282. <rect class="svg-box accent" x="670" y="194" width="220" height="24" rx="3"/>
  283. <text class="svg-tiny" x="176" y="211">partition 1</text>
  284. <text class="svg-tiny" x="424" y="211">partition 2 · rootfs</text>
  285. <text class="svg-tiny" x="678" y="211">partition 3 · FAT16 ESP</text>
  286. <text class="svg-text" x="12" y="258">rootfs container</text>
  287. <text class="svg-tiny" x="908" y="258" text-anchor="end">8 MB cmds.img</text>
  288. <rect class="svg-box amber" x="160" y="270" width="56" height="26" rx="3"/>
  289. <rect class="svg-box green" x="220" y="270" width="670" height="26" rx="3"/>
  290. <text class="svg-tiny" x="172" y="288">header</text>
  291. <text class="svg-tiny" x="232" y="288">gzip command pack</text>
  292. <line class="svg-line" x1="160" y1="314" x2="890" y2="314"/>
  293. <text class="svg-tiny" x="160" y="334">Schematic, not to scale. The first 1.44 MB keeps the pack reachable by CHS-only USB BIOSes.</text>
  294. </svg>
  295. <figcaption>
  296. <strong>Three images, one source tree.</strong> The dual-boot image
  297. clears one BPB byte in the fake FAT16 header of partition 1 so UEFI
  298. firmware does not mount the raw kernel blob as a volume and overwrite
  299. it.
  300. </figcaption>
  301. </figure>
  302. <div class="table-wrap">
  303. <table>
  304. <thead>
  305. <tr><th>Image</th><th>Size</th><th>Use</th></tr>
  306. </thead>
  307. <tbody>
  308. <tr><td><code>floppy.img</code></td><td>1.44 MB</td><td>Floppy boot; boot sector + kernel + appended rootfs.</td></tr>
  309. <tr><td><code>usb.img</code></td><td>9 MB</td><td>Legacy BIOS USB/IDE disk; MBR, boot partition at LBA 63, rootfs at LBA 1088.</td></tr>
  310. <tr><td><code>usb-efi.img</code></td><td>17 MB</td><td>Dual boot; adds an 8 MB FAT16 ESP at LBA 18432 with <code>BOOTX64.EFI</code>.</td></tr>
  311. <tr><td><code>final.bin</code></td><td>Varies</td><td>Raw boot sector + kernel + rootfs, written directly to a device.</td></tr>
  312. <tr><td><code>root.img</code></td><td>1.44 MB</td><td>FAT12 second floppy with the browser/gallery disk fallbacks and its test page/images.</td></tr>
  313. </tbody>
  314. </table>
  315. </div>
  316. </section>
  317. <section id="init">
  318. <h2>Kernel init order</h2>
  319. <p>
  320. <code>kernel_main</code> is a single linear bring-up. The order is
  321. constrained by what each step needs: GDT/TSS before <code>current_proc()</code>,
  322. paging before ACPI table access, process setup before the PIT can
  323. context-switch, and a ticking timer before AP bring-up can time out.
  324. </p>
  325. <ol>
  326. <li>Clear BSS; initialise the boot console straight into the framebuffer.</li>
  327. <li>Bring up COM1 and the network-console ring buffer.</li>
  328. <li>Install the GDT/TSS and per-CPU GS base.</li>
  329. <li>Parse E820, build the frame bitmap and initialise <code>kmalloc</code>.</li>
  330. <li>Enable paging; keep a RAM copy of the boot log; enable SSE state if present.</li>
  331. <li>Parse ACPI/MADT; initialise I/O, power, idle, thermal and board sensors.</li>
  332. <li>Create the process table, then start the PIT and verify it ticks.</li>
  333. <li>Start APs through INIT-SIPI-SIPI (they idle until scheduling is enabled).</li>
  334. <li>Initialise PS/2, USB HID and the VGA shadow buffer.</li>
  335. <li>Inflate the command pack into <code>/ramfs</code>; start the WM and the first frame.</li>
  336. <li>Probe the NIC, restore retained network config, start the kworker.</li>
  337. <li>Mount FAT devices; call <code>wm_server_boot_ready()</code> so the WM spawns the first terminal; run DHCP if needed.</li>
  338. <li>Enable scheduling on the APs and enter the kernel idle loop.</li>
  339. </ol>
  340. <p>
  341. The boot trace lines written along the way (<code>boot_trace</code>,
  342. <code>boot_val</code>) go to the framebuffer console and COM1, so a
  343. machine without serial still shows where a boot stopped. The WM
  344. disables the boot console when it attaches; <code>bootlog</code>
  345. prints the saved text.
  346. </p>
  347. </section>
  348. <section id="failures">
  349. <h2>Failure modes to know</h2>
  350. <ul>
  351. <li><strong>No VBE mode.</strong> The legacy stage cannot produce a framebuffer; the kernel may start headless or the boot stops in the stage.</li>
  352. <li><strong>Pack larger than the low gap.</strong> The legacy path rejects a compressed pack above <code>PACK_LOW_MAX</code>. UEFI and kexec can carry more.</li>
  353. <li><strong>PIT not ticking.</strong> <code>kernel_main</code> prints <code>*** PIT NOT TICKING ***</code> and halts; no process scheduling is possible.</li>
  354. <li><strong>UEFI Secure Boot.</strong> The unsigned <code>BOOTX64.EFI</code> is rejected before any NebOS code runs.</li>
  355. <li><strong>Stale boot info.</strong> The checksum makes an invalid <code>0x500</code> block read as absent rather than as a bogus pack or RSDP.</li>
  356. </ul>
  357. </section>
  358. <section id="sources">
  359. <h2>Source map</h2>
  360. <ul class="filelist">
  361. <li><code>boot.S</code> — boot sector</li>
  362. <li><code>mbr.S</code> — USB/HDD MBR</li>
  363. <li><code>vesa_stage.S</code> — real-mode VESA stage</li>
  364. <li><code>entry.S</code> — canonical kernel entry</li>
  365. <li><code>bootinfo.h</code> — 0x500 block</li>
  366. <li><code>vga.h</code> — 0x600 framebuffer block</li>
  367. <li><code>efi/main.c</code> — UEFI loader</li>
  368. <li><code>efi/tramp.S</code> — long-mode exit</li>
  369. <li><code>kexec.c</code>, <code>kexec_tramp.S</code> — serial reload</li>
  370. <li><code>netkexec.c</code> — network reload</li>
  371. <li><code>kernel.c</code> — init order</li>
  372. <li><code>kernel.ld</code> — image limits</li>
  373. <li><code>Makefile</code> — image sizes and layout rules</li>
  374. </ul>
  375. </section>
  376. </main>
  377. <footer class="site-footer">
  378. <div class="inner">
  379. <p><strong>NebOS 0.2.0</strong> · Architecture documentation · <a href="index.html">overview</a></p>
  380. <p>Maintain alongside <code>AGENTS.md</code> and the source files listed on each page.</p>
  381. </div>
  382. </footer>
  383. </body>
  384. </html>