v86 0.3.7 → 0.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/Readme.md +64 -108
  2. package/build/libv86-debug.js +12677 -0
  3. package/build/libv86-debug.mjs +732 -0
  4. package/build/libv86.js +710 -0
  5. package/build/libv86.mjs +636 -0
  6. package/build/v86-debug.wasm +0 -0
  7. package/build/v86-fallback.wasm +0 -0
  8. package/build/v86.wasm +0 -0
  9. package/package.json +12 -35
  10. package/bios/.gitignore +0 -1
  11. package/bios/COPYING.LESSER +0 -165
  12. package/bios/bochs-bios.bin +0 -0
  13. package/bios/bochs-vgabios.bin +0 -0
  14. package/bios/fetch-and-build-seabios.sh +0 -13
  15. package/bios/seabios/.config +0 -113
  16. package/bios/seabios/.config.old +0 -114
  17. package/bios/seabios/.gitignore +0 -4
  18. package/bios/seabios/COPYING +0 -674
  19. package/bios/seabios/COPYING.LESSER +0 -165
  20. package/bios/seabios/Makefile +0 -286
  21. package/bios/seabios/README +0 -17
  22. package/bios/seabios/docs/Build_overview.md +0 -104
  23. package/bios/seabios/docs/Contributing.md +0 -20
  24. package/bios/seabios/docs/Debugging.md +0 -111
  25. package/bios/seabios/docs/Developer_Documentation.md +0 -25
  26. package/bios/seabios/docs/Developer_links.md +0 -86
  27. package/bios/seabios/docs/Download.md +0 -27
  28. package/bios/seabios/docs/Execution_and_code_flow.md +0 -178
  29. package/bios/seabios/docs/Linking_overview.md +0 -160
  30. package/bios/seabios/docs/Mailinglist.md +0 -8
  31. package/bios/seabios/docs/Memory_Model.md +0 -253
  32. package/bios/seabios/docs/README +0 -5
  33. package/bios/seabios/docs/Releases.md +0 -482
  34. package/bios/seabios/docs/Runtime_config.md +0 -193
  35. package/bios/seabios/docs/SeaBIOS.md +0 -17
  36. package/bios/seabios/docs/SeaVGABIOS.md +0 -39
  37. package/bios/seabios/out/autoconf.h +0 -117
  38. package/bios/seabios/out/include/config/acpi/dsdt.h +0 -0
  39. package/bios/seabios/out/include/config/acpi.h +0 -0
  40. package/bios/seabios/out/include/config/ahci.h +0 -0
  41. package/bios/seabios/out/include/config/apmbios.h +0 -0
  42. package/bios/seabios/out/include/config/ata/dma.h +0 -0
  43. package/bios/seabios/out/include/config/ata/pio32.h +0 -0
  44. package/bios/seabios/out/include/config/ata.h +0 -0
  45. package/bios/seabios/out/include/config/auto.conf +0 -69
  46. package/bios/seabios/out/include/config/auto.conf.cmd +0 -9
  47. package/bios/seabios/out/include/config/boot.h +0 -0
  48. package/bios/seabios/out/include/config/bootorder.h +0 -0
  49. package/bios/seabios/out/include/config/build/vgabios.h +0 -0
  50. package/bios/seabios/out/include/config/call32/smm.h +0 -0
  51. package/bios/seabios/out/include/config/cdrom/boot.h +0 -0
  52. package/bios/seabios/out/include/config/cdrom/emu.h +0 -0
  53. package/bios/seabios/out/include/config/debug/level.h +0 -0
  54. package/bios/seabios/out/include/config/drives.h +0 -0
  55. package/bios/seabios/out/include/config/entry/extrastack.h +0 -0
  56. package/bios/seabios/out/include/config/esp/scsi.h +0 -0
  57. package/bios/seabios/out/include/config/flash/floppy.h +0 -0
  58. package/bios/seabios/out/include/config/floppy.h +0 -0
  59. package/bios/seabios/out/include/config/fw/romfile/load.h +0 -0
  60. package/bios/seabios/out/include/config/hardware/irq.h +0 -0
  61. package/bios/seabios/out/include/config/kbd/call/int15/4f.h +0 -0
  62. package/bios/seabios/out/include/config/keyboard.h +0 -0
  63. package/bios/seabios/out/include/config/lpt.h +0 -0
  64. package/bios/seabios/out/include/config/lsi/scsi.h +0 -0
  65. package/bios/seabios/out/include/config/malloc/uppermemory.h +0 -0
  66. package/bios/seabios/out/include/config/megasas.h +0 -0
  67. package/bios/seabios/out/include/config/mouse.h +0 -0
  68. package/bios/seabios/out/include/config/mpt/scsi.h +0 -0
  69. package/bios/seabios/out/include/config/mptable.h +0 -0
  70. package/bios/seabios/out/include/config/mtrr/init.h +0 -0
  71. package/bios/seabios/out/include/config/optionroms.h +0 -0
  72. package/bios/seabios/out/include/config/override/pci/id.h +0 -0
  73. package/bios/seabios/out/include/config/pcibios.h +0 -0
  74. package/bios/seabios/out/include/config/pirtable.h +0 -0
  75. package/bios/seabios/out/include/config/pmm.h +0 -0
  76. package/bios/seabios/out/include/config/pmtimer.h +0 -0
  77. package/bios/seabios/out/include/config/pnpbios.h +0 -0
  78. package/bios/seabios/out/include/config/ps2port.h +0 -0
  79. package/bios/seabios/out/include/config/pvscsi.h +0 -0
  80. package/bios/seabios/out/include/config/qemu/hardware.h +0 -0
  81. package/bios/seabios/out/include/config/qemu.h +0 -0
  82. package/bios/seabios/out/include/config/rom/size.h +0 -0
  83. package/bios/seabios/out/include/config/rtc/timer.h +0 -0
  84. package/bios/seabios/out/include/config/s3/resume.h +0 -0
  85. package/bios/seabios/out/include/config/sdcard.h +0 -0
  86. package/bios/seabios/out/include/config/serial.h +0 -0
  87. package/bios/seabios/out/include/config/tcgbios.h +0 -0
  88. package/bios/seabios/out/include/config/threads.h +0 -0
  89. package/bios/seabios/out/include/config/tristate.conf +0 -4
  90. package/bios/seabios/out/include/config/tsc/timer.h +0 -0
  91. package/bios/seabios/out/include/config/use/smm.h +0 -0
  92. package/bios/seabios/out/include/config/vga/allocate/extra/stack.h +0 -0
  93. package/bios/seabios/out/include/config/vga/bochs/stdvga.h +0 -0
  94. package/bios/seabios/out/include/config/vga/bochs.h +0 -0
  95. package/bios/seabios/out/include/config/vga/did.h +0 -0
  96. package/bios/seabios/out/include/config/vga/extra/stack/size.h +0 -0
  97. package/bios/seabios/out/include/config/vga/fixup/asm.h +0 -0
  98. package/bios/seabios/out/include/config/vga/pci.h +0 -0
  99. package/bios/seabios/out/include/config/vga/stdvga/ports.h +0 -0
  100. package/bios/seabios/out/include/config/vga/vbe.h +0 -0
  101. package/bios/seabios/out/include/config/vga/vid.h +0 -0
  102. package/bios/seabios/out/include/config/vgahooks.h +0 -0
  103. package/bios/seabios/out/include/config/virtio/blk.h +0 -0
  104. package/bios/seabios/out/include/config/virtio/scsi.h +0 -0
  105. package/bios/seabios/out/include/config/xen.h +0 -0
  106. package/bios/seabios/out/scripts/kconfig/conf +0 -0
  107. package/bios/seabios/out/scripts/kconfig/conf.o +0 -0
  108. package/bios/seabios/out/scripts/kconfig/zconf.hash.c +0 -289
  109. package/bios/seabios/out/scripts/kconfig/zconf.lex.c +0 -2420
  110. package/bios/seabios/out/scripts/kconfig/zconf.tab.c +0 -2538
  111. package/bios/seabios/out/scripts/kconfig/zconf.tab.o +0 -0
  112. package/bios/seabios/scripts/acpi_extract.py +0 -366
  113. package/bios/seabios/scripts/acpi_extract_preprocess.py +0 -41
  114. package/bios/seabios/scripts/buildrom.py +0 -56
  115. package/bios/seabios/scripts/buildversion.py +0 -134
  116. package/bios/seabios/scripts/checkrom.py +0 -95
  117. package/bios/seabios/scripts/checkstack.py +0 -226
  118. package/bios/seabios/scripts/checksum.py +0 -16
  119. package/bios/seabios/scripts/encodeint.py +0 -21
  120. package/bios/seabios/scripts/gen-offsets.sh +0 -17
  121. package/bios/seabios/scripts/kconfig/.gitignore +0 -22
  122. package/bios/seabios/scripts/kconfig/Makefile +0 -331
  123. package/bios/seabios/scripts/kconfig/POTFILES.in +0 -12
  124. package/bios/seabios/scripts/kconfig/check.sh +0 -13
  125. package/bios/seabios/scripts/kconfig/conf.c +0 -718
  126. package/bios/seabios/scripts/kconfig/confdata.c +0 -1250
  127. package/bios/seabios/scripts/kconfig/expr.c +0 -1168
  128. package/bios/seabios/scripts/kconfig/expr.h +0 -241
  129. package/bios/seabios/scripts/kconfig/gconf.c +0 -1542
  130. package/bios/seabios/scripts/kconfig/gconf.glade +0 -661
  131. package/bios/seabios/scripts/kconfig/images.c +0 -326
  132. package/bios/seabios/scripts/kconfig/kxgettext.c +0 -235
  133. package/bios/seabios/scripts/kconfig/lex.zconf.c +0 -2430
  134. package/bios/seabios/scripts/kconfig/list.h +0 -131
  135. package/bios/seabios/scripts/kconfig/lkc.h +0 -200
  136. package/bios/seabios/scripts/kconfig/lkc_proto.h +0 -57
  137. package/bios/seabios/scripts/kconfig/lxdialog/.gitignore +0 -4
  138. package/bios/seabios/scripts/kconfig/lxdialog/BIG.FAT.WARNING +0 -4
  139. package/bios/seabios/scripts/kconfig/lxdialog/check-lxdialog.sh +0 -87
  140. package/bios/seabios/scripts/kconfig/lxdialog/checklist.c +0 -332
  141. package/bios/seabios/scripts/kconfig/lxdialog/dialog.h +0 -257
  142. package/bios/seabios/scripts/kconfig/lxdialog/inputbox.c +0 -301
  143. package/bios/seabios/scripts/kconfig/lxdialog/menubox.c +0 -437
  144. package/bios/seabios/scripts/kconfig/lxdialog/textbox.c +0 -408
  145. package/bios/seabios/scripts/kconfig/lxdialog/util.c +0 -713
  146. package/bios/seabios/scripts/kconfig/lxdialog/yesno.c +0 -114
  147. package/bios/seabios/scripts/kconfig/mconf.c +0 -1036
  148. package/bios/seabios/scripts/kconfig/menu.c +0 -697
  149. package/bios/seabios/scripts/kconfig/merge_config.sh +0 -150
  150. package/bios/seabios/scripts/kconfig/nconf.c +0 -1556
  151. package/bios/seabios/scripts/kconfig/nconf.gui.c +0 -656
  152. package/bios/seabios/scripts/kconfig/nconf.h +0 -96
  153. package/bios/seabios/scripts/kconfig/qconf.cc +0 -1795
  154. package/bios/seabios/scripts/kconfig/qconf.h +0 -338
  155. package/bios/seabios/scripts/kconfig/streamline_config.pl +0 -647
  156. package/bios/seabios/scripts/kconfig/symbol.c +0 -1373
  157. package/bios/seabios/scripts/kconfig/util.c +0 -157
  158. package/bios/seabios/scripts/kconfig/zconf.gperf +0 -48
  159. package/bios/seabios/scripts/kconfig/zconf.hash.c_shipped +0 -289
  160. package/bios/seabios/scripts/kconfig/zconf.l +0 -363
  161. package/bios/seabios/scripts/kconfig/zconf.lex.c_shipped +0 -2420
  162. package/bios/seabios/scripts/kconfig/zconf.tab.c_shipped +0 -2538
  163. package/bios/seabios/scripts/kconfig/zconf.y +0 -733
  164. package/bios/seabios/scripts/layoutrom.py +0 -705
  165. package/bios/seabios/scripts/python23compat.py +0 -14
  166. package/bios/seabios/scripts/readserial.py +0 -190
  167. package/bios/seabios/scripts/tarball.sh +0 -36
  168. package/bios/seabios/scripts/test-build.sh +0 -90
  169. package/bios/seabios/scripts/transdump.py +0 -53
  170. package/bios/seabios/scripts/vgafixup.py +0 -96
  171. package/bios/seabios/src/Kconfig +0 -579
  172. package/bios/seabios/src/apm.c +0 -215
  173. package/bios/seabios/src/asm-offsets.c +0 -23
  174. package/bios/seabios/src/biosvar.h +0 -130
  175. package/bios/seabios/src/block.c +0 -623
  176. package/bios/seabios/src/block.h +0 -121
  177. package/bios/seabios/src/bmp.c +0 -117
  178. package/bios/seabios/src/boot.c +0 -793
  179. package/bios/seabios/src/bootsplash.c +0 -255
  180. package/bios/seabios/src/bregs.h +0 -80
  181. package/bios/seabios/src/byteorder.h +0 -71
  182. package/bios/seabios/src/cdrom.c +0 -322
  183. package/bios/seabios/src/clock.c +0 -506
  184. package/bios/seabios/src/code16gcc.s +0 -1
  185. package/bios/seabios/src/config.h +0 -108
  186. package/bios/seabios/src/cp437.c +0 -275
  187. package/bios/seabios/src/cp437.h +0 -1
  188. package/bios/seabios/src/disk.c +0 -779
  189. package/bios/seabios/src/e820map.c +0 -152
  190. package/bios/seabios/src/e820map.h +0 -26
  191. package/bios/seabios/src/entryfuncs.S +0 -165
  192. package/bios/seabios/src/farptr.h +0 -208
  193. package/bios/seabios/src/font.c +0 -139
  194. package/bios/seabios/src/fw/acpi-dsdt-cpu-hotplug.dsl +0 -78
  195. package/bios/seabios/src/fw/acpi-dsdt-dbug.dsl +0 -26
  196. package/bios/seabios/src/fw/acpi-dsdt-hpet.dsl +0 -36
  197. package/bios/seabios/src/fw/acpi-dsdt-isa.dsl +0 -102
  198. package/bios/seabios/src/fw/acpi-dsdt-pci-crs.dsl +0 -90
  199. package/bios/seabios/src/fw/acpi-dsdt.dsl +0 -342
  200. package/bios/seabios/src/fw/acpi-dsdt.hex +0 -554
  201. package/bios/seabios/src/fw/acpi.c +0 -685
  202. package/bios/seabios/src/fw/biostables.c +0 -491
  203. package/bios/seabios/src/fw/coreboot.c +0 -569
  204. package/bios/seabios/src/fw/csm.c +0 -347
  205. package/bios/seabios/src/fw/dev-pci.h +0 -52
  206. package/bios/seabios/src/fw/dev-piix.h +0 -29
  207. package/bios/seabios/src/fw/dev-q35.h +0 -52
  208. package/bios/seabios/src/fw/lzmadecode.c +0 -398
  209. package/bios/seabios/src/fw/lzmadecode.h +0 -67
  210. package/bios/seabios/src/fw/mptable.c +0 -197
  211. package/bios/seabios/src/fw/mtrr.c +0 -105
  212. package/bios/seabios/src/fw/multiboot.c +0 -111
  213. package/bios/seabios/src/fw/paravirt.c +0 -624
  214. package/bios/seabios/src/fw/paravirt.h +0 -63
  215. package/bios/seabios/src/fw/pciinit.c +0 -1187
  216. package/bios/seabios/src/fw/pirtable.c +0 -103
  217. package/bios/seabios/src/fw/q35-acpi-dsdt.dsl +0 -450
  218. package/bios/seabios/src/fw/romfile_loader.c +0 -259
  219. package/bios/seabios/src/fw/romfile_loader.h +0 -91
  220. package/bios/seabios/src/fw/shadow.c +0 -208
  221. package/bios/seabios/src/fw/smbios.c +0 -585
  222. package/bios/seabios/src/fw/smm.c +0 -269
  223. package/bios/seabios/src/fw/smp.c +0 -194
  224. package/bios/seabios/src/fw/ssdt-misc.dsl +0 -104
  225. package/bios/seabios/src/fw/ssdt-misc.hex +0 -88
  226. package/bios/seabios/src/fw/ssdt-pcihp.dsl +0 -36
  227. package/bios/seabios/src/fw/ssdt-pcihp.hex +0 -38
  228. package/bios/seabios/src/fw/ssdt-proc.dsl +0 -48
  229. package/bios/seabios/src/fw/ssdt-proc.hex +0 -35
  230. package/bios/seabios/src/fw/xen.c +0 -149
  231. package/bios/seabios/src/fw/xen.h +0 -125
  232. package/bios/seabios/src/gen-defs.h +0 -19
  233. package/bios/seabios/src/hw/ahci.c +0 -697
  234. package/bios/seabios/src/hw/ahci.h +0 -201
  235. package/bios/seabios/src/hw/ata.c +0 -1046
  236. package/bios/seabios/src/hw/ata.h +0 -163
  237. package/bios/seabios/src/hw/blockcmd.c +0 -372
  238. package/bios/seabios/src/hw/blockcmd.h +0 -114
  239. package/bios/seabios/src/hw/dma.c +0 -67
  240. package/bios/seabios/src/hw/esp-scsi.c +0 -241
  241. package/bios/seabios/src/hw/esp-scsi.h +0 -8
  242. package/bios/seabios/src/hw/floppy.c +0 -741
  243. package/bios/seabios/src/hw/lsi-scsi.c +0 -221
  244. package/bios/seabios/src/hw/lsi-scsi.h +0 -8
  245. package/bios/seabios/src/hw/megasas.c +0 -405
  246. package/bios/seabios/src/hw/megasas.h +0 -8
  247. package/bios/seabios/src/hw/mpt-scsi.c +0 -319
  248. package/bios/seabios/src/hw/mpt-scsi.h +0 -8
  249. package/bios/seabios/src/hw/nvme-int.h +0 -199
  250. package/bios/seabios/src/hw/nvme.c +0 -708
  251. package/bios/seabios/src/hw/nvme.h +0 -17
  252. package/bios/seabios/src/hw/pci.c +0 -133
  253. package/bios/seabios/src/hw/pci.h +0 -47
  254. package/bios/seabios/src/hw/pci_ids.h +0 -2632
  255. package/bios/seabios/src/hw/pci_regs.h +0 -556
  256. package/bios/seabios/src/hw/pcidevice.c +0 -192
  257. package/bios/seabios/src/hw/pcidevice.h +0 -76
  258. package/bios/seabios/src/hw/pic.c +0 -115
  259. package/bios/seabios/src/hw/pic.h +0 -60
  260. package/bios/seabios/src/hw/ps2port.c +0 -543
  261. package/bios/seabios/src/hw/ps2port.h +0 -67
  262. package/bios/seabios/src/hw/pvscsi.c +0 -333
  263. package/bios/seabios/src/hw/pvscsi.h +0 -8
  264. package/bios/seabios/src/hw/ramdisk.c +0 -108
  265. package/bios/seabios/src/hw/rtc.c +0 -100
  266. package/bios/seabios/src/hw/rtc.h +0 -75
  267. package/bios/seabios/src/hw/sdcard.c +0 -572
  268. package/bios/seabios/src/hw/serialio.c +0 -113
  269. package/bios/seabios/src/hw/serialio.h +0 -29
  270. package/bios/seabios/src/hw/timer.c +0 -259
  271. package/bios/seabios/src/hw/tpm_drivers.c +0 -636
  272. package/bios/seabios/src/hw/tpm_drivers.h +0 -127
  273. package/bios/seabios/src/hw/usb-ehci.c +0 -650
  274. package/bios/seabios/src/hw/usb-ehci.h +0 -177
  275. package/bios/seabios/src/hw/usb-hid.c +0 -442
  276. package/bios/seabios/src/hw/usb-hid.h +0 -29
  277. package/bios/seabios/src/hw/usb-hub.c +0 -205
  278. package/bios/seabios/src/hw/usb-hub.h +0 -64
  279. package/bios/seabios/src/hw/usb-msc.c +0 -222
  280. package/bios/seabios/src/hw/usb-msc.h +0 -10
  281. package/bios/seabios/src/hw/usb-ohci.c +0 -568
  282. package/bios/seabios/src/hw/usb-ohci.h +0 -144
  283. package/bios/seabios/src/hw/usb-uas.c +0 -289
  284. package/bios/seabios/src/hw/usb-uas.h +0 -9
  285. package/bios/seabios/src/hw/usb-uhci.c +0 -571
  286. package/bios/seabios/src/hw/usb-uhci.h +0 -128
  287. package/bios/seabios/src/hw/usb-xhci.c +0 -1161
  288. package/bios/seabios/src/hw/usb-xhci.h +0 -133
  289. package/bios/seabios/src/hw/usb.c +0 -499
  290. package/bios/seabios/src/hw/usb.h +0 -254
  291. package/bios/seabios/src/hw/virtio-blk.c +0 -211
  292. package/bios/seabios/src/hw/virtio-blk.h +0 -43
  293. package/bios/seabios/src/hw/virtio-pci.c +0 -501
  294. package/bios/seabios/src/hw/virtio-pci.h +0 -151
  295. package/bios/seabios/src/hw/virtio-ring.c +0 -147
  296. package/bios/seabios/src/hw/virtio-ring.h +0 -121
  297. package/bios/seabios/src/hw/virtio-scsi.c +0 -220
  298. package/bios/seabios/src/hw/virtio-scsi.h +0 -47
  299. package/bios/seabios/src/jpeg.c +0 -1055
  300. package/bios/seabios/src/kbd.c +0 -599
  301. package/bios/seabios/src/list.h +0 -91
  302. package/bios/seabios/src/malloc.c +0 -561
  303. package/bios/seabios/src/malloc.h +0 -70
  304. package/bios/seabios/src/memmap.h +0 -21
  305. package/bios/seabios/src/misc.c +0 -195
  306. package/bios/seabios/src/mouse.c +0 -342
  307. package/bios/seabios/src/optionroms.c +0 -475
  308. package/bios/seabios/src/output.c +0 -584
  309. package/bios/seabios/src/output.h +0 -68
  310. package/bios/seabios/src/pcibios.c +0 -241
  311. package/bios/seabios/src/pmm.c +0 -176
  312. package/bios/seabios/src/pnpbios.c +0 -88
  313. package/bios/seabios/src/post.c +0 -337
  314. package/bios/seabios/src/resume.c +0 -157
  315. package/bios/seabios/src/romfile.c +0 -146
  316. package/bios/seabios/src/romfile.h +0 -21
  317. package/bios/seabios/src/romlayout.S +0 -698
  318. package/bios/seabios/src/sercon.c +0 -677
  319. package/bios/seabios/src/serial.c +0 -317
  320. package/bios/seabios/src/sha1.c +0 -147
  321. package/bios/seabios/src/sha1.h +0 -8
  322. package/bios/seabios/src/stacks.c +0 -771
  323. package/bios/seabios/src/stacks.h +0 -68
  324. package/bios/seabios/src/std/LegacyBios.h +0 -985
  325. package/bios/seabios/src/std/acpi.h +0 -323
  326. package/bios/seabios/src/std/bda.h +0 -174
  327. package/bios/seabios/src/std/disk.h +0 -175
  328. package/bios/seabios/src/std/mptable.h +0 -77
  329. package/bios/seabios/src/std/multiboot.h +0 -260
  330. package/bios/seabios/src/std/optionrom.h +0 -59
  331. package/bios/seabios/src/std/pirtable.h +0 -35
  332. package/bios/seabios/src/std/pmm.h +0 -19
  333. package/bios/seabios/src/std/pnpbios.h +0 -24
  334. package/bios/seabios/src/std/smbios.h +0 -167
  335. package/bios/seabios/src/std/tcg.h +0 -554
  336. package/bios/seabios/src/std/vbe.h +0 -156
  337. package/bios/seabios/src/std/vga.h +0 -63
  338. package/bios/seabios/src/string.c +0 -251
  339. package/bios/seabios/src/string.h +0 -31
  340. package/bios/seabios/src/system.c +0 -357
  341. package/bios/seabios/src/tcgbios.c +0 -2014
  342. package/bios/seabios/src/tcgbios.h +0 -19
  343. package/bios/seabios/src/types.h +0 -156
  344. package/bios/seabios/src/util.h +0 -251
  345. package/bios/seabios/src/version.c +0 -5
  346. package/bios/seabios/src/vgahooks.c +0 -355
  347. package/bios/seabios/src/x86.c +0 -23
  348. package/bios/seabios/src/x86.h +0 -277
  349. package/bios/seabios/vgasrc/Kconfig +0 -211
  350. package/bios/seabios/vgasrc/bochsdisplay.c +0 -59
  351. package/bios/seabios/vgasrc/bochsvga.c +0 -447
  352. package/bios/seabios/vgasrc/bochsvga.h +0 -57
  353. package/bios/seabios/vgasrc/cbvga.c +0 -337
  354. package/bios/seabios/vgasrc/clext.c +0 -627
  355. package/bios/seabios/vgasrc/geodevga.c +0 -434
  356. package/bios/seabios/vgasrc/geodevga.h +0 -89
  357. package/bios/seabios/vgasrc/ramfb.c +0 -163
  358. package/bios/seabios/vgasrc/stdvga.c +0 -485
  359. package/bios/seabios/vgasrc/stdvga.h +0 -81
  360. package/bios/seabios/vgasrc/stdvgaio.c +0 -186
  361. package/bios/seabios/vgasrc/stdvgamodes.c +0 -534
  362. package/bios/seabios/vgasrc/swcursor.c +0 -96
  363. package/bios/seabios/vgasrc/vbe.c +0 -432
  364. package/bios/seabios/vgasrc/vgabios.c +0 -1131
  365. package/bios/seabios/vgasrc/vgabios.h +0 -88
  366. package/bios/seabios/vgasrc/vgaentry.S +0 -161
  367. package/bios/seabios/vgasrc/vgafb.c +0 -661
  368. package/bios/seabios/vgasrc/vgafb.h +0 -42
  369. package/bios/seabios/vgasrc/vgafonts.c +0 -785
  370. package/bios/seabios/vgasrc/vgahw.h +0 -152
  371. package/bios/seabios/vgasrc/vgainit.c +0 -202
  372. package/bios/seabios/vgasrc/vgalayout.lds.S +0 -23
  373. package/bios/seabios/vgasrc/vgautil.h +0 -103
  374. package/bios/seabios/vgasrc/vgaversion.c +0 -6
  375. package/bios/seabios-debug.bin +0 -0
  376. package/bios/seabios-debug.config +0 -117
  377. package/bios/seabios.bin +0 -0
  378. package/bios/seabios.config +0 -114
  379. package/bios/vgabios-debug.bin +0 -0
  380. package/bios/vgabios.bin +0 -0
  381. package/build/binaries.js +0 -1
  382. package/build/index-debug.cjs +0 -1
  383. package/build/index-debug.js +0 -1
  384. package/build/index.cjs +0 -1
  385. package/build/index.js +0 -1
  386. package/v86.css +0 -259
@@ -1,111 +0,0 @@
1
- This page describes the process of obtaining diagnostic information
2
- from SeaBIOS and for reporting problems.
3
-
4
- Diagnostic information
5
- ======================
6
-
7
- SeaBIOS has the ability to output diagnostic messages. This is
8
- implemented in the code via calls to the "dprintf()" C function.
9
-
10
- On QEMU these messages are written to a special debug port. One can
11
- view these messages by adding '-chardev stdio,id=seabios -device
12
- isa-debugcon,iobase=0x402,chardev=seabios' to the QEMU command line.
13
- Once this is done, one should see status messages on the console.
14
-
15
- On coreboot these messages are generally written to the "cbmem"
16
- console (CONFIG_DEBUG_COREBOOT). If SeaBIOS launches a Linux operating
17
- system, one can obtain the cbmem tool from the coreboot repository and
18
- run "cbmem -c" to view the SeaBIOS diagnostic messages.
19
-
20
- Additionally, if a serial port is available, one may compile SeaBIOS
21
- to send the diagnostic messages to the serial port. See the SeaBIOS
22
- CONFIG_DEBUG_SERIAL option.
23
-
24
- Trouble reporting
25
- =================
26
-
27
- If you are experiencing problems with SeaBIOS, it's useful to increase
28
- the debugging level. This is done by running "make menuconfig" and
29
- setting CONFIG_DEBUG_LEVEL to a higher value. A debug level of 8 will
30
- show a lot of diagnostic information without flooding the serial port
31
- (levels above 8 will frequently cause too much data).
32
-
33
- To report an issue, please collect the serial boot log with SeaBIOS
34
- set to a debug level of 8 and forward the full log along with a
35
- description of the problem to the SeaBIOS [mailing list](Mailinglist).
36
-
37
- Timing debug messages
38
- =====================
39
-
40
- The SeaBIOS repository has a tool (**scripts/readserial.py**) that can
41
- timestamp each diagnostic message produced. The timestamps can provide
42
- some additional information on how long internal processes take. It
43
- also provides a simple profiling mechanism.
44
-
45
- The tool can be used on coreboot builds that have diagnostic messages
46
- sent to a serial port. Make sure SeaBIOS is configured with
47
- CONFIG_DEBUG_SERIAL and run the following on the host receiving serial
48
- output:
49
-
50
- `/path/to/seabios/scripts/readserial.py /dev/ttyS0 115200`
51
-
52
- Update the above command with the appropriate serial device and baud
53
- rate.
54
-
55
- The tool can also timestamp the messages from the QEMU debug port. To
56
- use with QEMU run the following:
57
-
58
- ```
59
- mkfifo qemudebugpipe
60
- qemu -chardev pipe,path=qemudebugpipe,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios ...
61
- ```
62
-
63
- And then in another session:
64
-
65
- `/path/to/seabios/scripts/readserial.py -nf qemudebugpipe`
66
-
67
- The mkfifo command only needs to be run once to create the pipe file.
68
-
69
- When readserial.py is running, it shows a timestamp with millisecond
70
- precision of the amount of time since the start of the log. If one
71
- presses the "enter" key in the readserial.py session it will add a
72
- blank line to the screen and also reset the time back to zero. The
73
- readserial.py program also keeps a log of all output in files that
74
- look like "seriallog-YYYYMMDD_HHMMSS.log".
75
-
76
- Debugging with gdb on QEMU
77
- ==========================
78
-
79
- One can use gdb with QEMU to debug system images. To do this, add '-s
80
- -S' to the QEMU command line. For example:
81
-
82
- `qemu -bios out/bios.bin -fda myfdimage.img -s -S`
83
-
84
- Then, in another session, run gdb with either out/rom16.o (to debug
85
- bios 16bit code) or out/rom.o (to debug bios 32bit code). For example:
86
-
87
- `gdb out/rom16.o`
88
-
89
- Once in gdb, use the command `target remote localhost:1234` to have
90
- gdb connect to QEMU. See the QEMU documentation for more information
91
- on using gdb and QEMU in this mode.
92
-
93
- When debugging 16bit code it is necessary to load the 16bit symbols
94
- twice in order for gdb to properly handle break points. To do this,
95
- run the following command `objcopy --adjust-vma 0xf0000 out/rom16.o
96
- rom16offset.o` and then run the following in gdb:
97
-
98
- ```
99
- set architecture i8086
100
- add-symbol-file rom16offset.o 0
101
- ```
102
-
103
- To debug a VGA BIOS image, run `gdb out/vgarom.o`, create a
104
- vgaromoffset.o file with offset 0xc0000, add use the gdb
105
- command `add-symbol-file out/vgaromoffset.o 0` to load the 16bit VGA
106
- BIOS symbols twice.
107
-
108
- If debugging the 32bit SeaBIOS initialization code with gdb, note that
109
- SeaBIOS does self relocation by default. This relocation will alter
110
- the location of initialization code symbols. Disable
111
- CONFIG_RELOCATE_INIT to prevent SeaBIOS from doing this.
@@ -1,25 +0,0 @@
1
- This page is intended for developers interested in understanding and
2
- enhancing SeaBIOS. Please also consider joining the [mailing
3
- list](Mailinglist).
4
-
5
- The SeaBIOS code can be obtained via the [download](Download)
6
- page. For specific information on building SeaBIOS for coreboot,
7
- please see the [coreboot SeaBIOS](http://www.coreboot.org/SeaBIOS)
8
- page.
9
-
10
- See details on [building SeaBIOS](Build overview).
11
-
12
- There is also information on the SeaBIOS [Memory Model](Memory Model).
13
- Along with information on SeaBIOS [Execution and code flow](Execution
14
- and code flow). A description of the process of linking the final
15
- SeaBIOS binary is available at [Linking overview](Linking overview).
16
-
17
- The list of available runtime configuration items is at
18
- [runtime config](Runtime_config).
19
-
20
- To debug SeaBIOS and report problems see SeaBIOS
21
- [debugging](Debugging). To contribute changes to SeaBIOS see
22
- [contributing](Contributing).
23
-
24
- Useful links to specifications is available at [Developer
25
- links](Developer links).
@@ -1,86 +0,0 @@
1
- Links to pages with more information.
2
-
3
- BIOS interfaces
4
- ===============
5
-
6
- Ralf Brown's interrupt list
7
-
8
- * <http://www.cs.cmu.edu/~ralf/files.html>
9
-
10
- Memory layout info
11
-
12
- * <http://stanislavs.org/helppc/bios_data_area.html>
13
-
14
- Old PNP BIOS spec
15
-
16
- * <ftp://download.intel.com/support/motherboards/desktop/sb/pnpbiosspecificationv10a.pdf>
17
-
18
- T13 BIOS Enhanced Disk Drive (drafts):
19
-
20
- * <http://www.t10.org/t13/#Project_drafts>
21
-
22
- Exported BIOS tables
23
- ====================
24
-
25
- ACPI spec
26
-
27
- * <http://www.acpi.info/>
28
-
29
- PCI IRQ Routing Table Specification
30
-
31
- * <http://www.microsoft.com/whdc/archive/pciirq.mspx>
32
-
33
- MP configuration table
34
-
35
- * <http://www.intel.com/design/pentium/datashts/242016.htm>
36
-
37
- SM BIOS (aka DMI):
38
-
39
- * <http://www.dmtf.org/standards/smbios/>
40
-
41
- Hardware information
42
- ====================
43
-
44
- info on PIC
45
-
46
- * <http://www.beyondlogic.org/interrupts/interupt.htm>
47
-
48
- info on kbd
49
-
50
- * <http://www.computer-engineering.org/ps2protocol/>
51
-
52
- info on vga
53
-
54
- * <http://www.osdever.net/FreeVGA/home.htm>
55
-
56
- info on lpt
57
-
58
- * <http://www.beyondlogic.org/spp/parallel.htm>
59
-
60
- info on floppy
61
-
62
- * <http://www.isdaman.com/alsos/hardware/fdc/floppy.htm>
63
-
64
- info on ata
65
-
66
- * <http://ata.wiki.kernel.org/index.php/Developer_Resources>
67
- * <http://www.t10.org/t13/#Project_drafts>
68
-
69
- info on serial
70
-
71
- * <http://www.national.com/ds/PC/PC16550D.pdf>
72
-
73
- General information
74
- ===================
75
-
76
- Bochs tech document list
77
-
78
- * <http://bochs.sourceforge.net/techdata.html>
79
-
80
- Phoenix documents
81
-
82
- * <http://www.phoenix.com/en/Customer+Services/White+Papers-Specs/PC+Industry+Specifications.htm>
83
-
84
- Dosemu information
85
-
86
- * <http://www.dosemu.org/docs/README-tech>
@@ -1,27 +0,0 @@
1
- SeaBIOS may be distributed under the terms of the [GNU
2
- LGPLv3](https://www.gnu.org/licenses/lgpl-3.0-standalone.html) license.
3
- Both source code and binaries are available.
4
-
5
- Latest source code
6
- ==================
7
-
8
- The SeaBIOS project uses the [git](https://git-scm.com/) revision
9
- control system. To download the latest source from revision control,
10
- run:
11
-
12
- ```
13
- $ git clone https://git.seabios.org/seabios.git
14
- $ cd seabios
15
- ```
16
-
17
- There's also a [website](http://git.seabios.org/) to browse the latest
18
- source code online.
19
-
20
- Released versions
21
- =================
22
-
23
- Released versions of the source code are available at:
24
-
25
- <https://www.seabios.org/downloads/>
26
-
27
- Please see [releases](Releases) for information on each release.
@@ -1,178 +0,0 @@
1
- This page provides a high-level description of some of the major code
2
- phases that SeaBIOS transitions through and general information on
3
- overall code flow.
4
-
5
- SeaBIOS code phases
6
- ===================
7
-
8
- The SeaBIOS code goes through a few distinct code phases during its
9
- execution lifecycle. Understanding these code phases can help when
10
- reading and enhancing the code.
11
-
12
- POST phase
13
- ----------
14
-
15
- The Power On Self Test (POST) phase is the initialization phase of the
16
- BIOS. This phase is entered when SeaBIOS first starts execution. The
17
- goal of the phase is to initialize internal state, initialize external
18
- interfaces, detect and setup hardware, and to then start the boot
19
- phase.
20
-
21
- On emulators, this phase starts when the CPU starts execution in 16bit
22
- mode at 0xFFFF0000:FFF0. The emulators map the SeaBIOS binary to this
23
- address, and SeaBIOS arranges for romlayout.S:reset_vector() to be
24
- present there. This code calls romlayout.S:entry_post() which then
25
- calls post.c:handle_post() in 32bit mode.
26
-
27
- On coreboot, the build arranges for romlayout.S:entry_elf() to be
28
- called in 32bit mode. This then calls post.c:handle_post().
29
-
30
- On CSM, the build arranges for romlayout.S:entry_csm() to be called
31
- (in 16bit mode). This then calls csm.c:handle_csm() in 32bit mode.
32
- Unlike on the emulators and coreboot, the SeaBIOS CSM POST phase is
33
- orchestrated with UEFI and there are several calls back and forth
34
- between SeaBIOS and UEFI via handle_csm() throughout the POST
35
- process.
36
-
37
- The POST phase itself has several sub-phases.
38
-
39
- * The "preinit" sub-phase: code run prior to [code relocation](Linking overview#Code relocation).
40
- * The "init" sub-phase: code to initialize internal variables and
41
- interfaces.
42
- * The "setup" sub-phase: code to setup hardware and drivers.
43
- * The "prepboot" sub-phase: code to finalize interfaces and prepare
44
- for the boot phase.
45
-
46
- At completion of the POST phase, SeaBIOS invokes an "int 0x19"
47
- software interrupt in 16bit mode which begins the boot phase.
48
-
49
- Boot phase
50
- ----------
51
-
52
- The goal of the boot phase is to load the first portion of the
53
- operating system's boot loader into memory and start execution of that
54
- boot loader. This phase starts when a software interrupt ("int 0x19"
55
- or "int 0x18") is invoked. The code flow starts in 16bit mode in
56
- romlayout.S:entry_19() or romlayout.S:entry_18() which then
57
- transition to 32bit mode and call boot.c:handle_19() or
58
- boot.c:handle_18().
59
-
60
- The boot phase is technically also part of the "runtime" phase of
61
- SeaBIOS. It is typically invoked immediately after the POST phase,
62
- but it can also be invoked by an operating system or be invoked
63
- multiple times in an attempt to find a valid boot media. Although the
64
- boot phase C code runs in 32bit mode it does not have write access to
65
- the 0x0f0000-0x100000 memory region and can not call the various
66
- malloc_X() calls. See [Memory Model](Memory Model) for
67
- more information.
68
-
69
- Main runtime phase
70
- ------------------
71
-
72
- The main runtime phase occurs after the boot phase starts the
73
- operating system. Once in this phase, the SeaBIOS code may be invoked
74
- by the operating system using various 16bit and 32bit calls. The goal
75
- of this phase is to support these legacy calling interfaces and to
76
- provide compatibility with BIOS standards. There are multiple entry
77
- points for the BIOS - see the entry_XXX() assembler functions in
78
- romlayout.S.
79
-
80
- Callers use most of these legacy entry points by setting up a
81
- particular CPU register state, invoking the BIOS, and then inspecting
82
- the returned CPU register state. To handle this, SeaBIOS will backup
83
- the current register state into a "struct bregs" (see romlayout.S,
84
- entryfuncs.S, and bregs.h) on call entry and then pass this struct to
85
- the C code. The C code can then inspect the register state and modify
86
- it. The assembler entry functions will then restore the (possibly
87
- modified) register state from the "struct bregs" on return to the
88
- caller.
89
-
90
- Resume and reboot
91
- -----------------
92
-
93
- As noted above, on emulators SeaBIOS handles the 0xFFFF0000:FFF0
94
- machine startup execution vector. This vector is also called on
95
- machine faults and on some machine "resume" events. It can also be
96
- called (as 0xF0000:FFF0) by software as a request to reboot the
97
- machine (on emulators, coreboot, and CSM).
98
-
99
- The SeaBIOS "resume and reboot" code handles these calls and attempts
100
- to determine the desired action of the caller. Code flow starts in
101
- 16bit mode in romlayout.S:reset_vector() which calls
102
- romlayout.S:entry_post() which calls romlayout.S:entry_resume() which
103
- calls resume.c:handle_resume(). Depending on the request the
104
- handle_resume() code may transition to 32bit mode.
105
-
106
- Technically this code is part of the "runtime" phase, so even though
107
- parts of it run in 32bit mode it still has the same limitations of the
108
- runtime phase.
109
-
110
- Threads
111
- =======
112
-
113
- Internally SeaBIOS implements a simple cooperative multi-tasking
114
- system. The system works by giving each "thread" its own stack, and
115
- the system round-robins between these stacks whenever a thread issues
116
- a yield() call. This "threading" system may be more appropriately
117
- described as [coroutines](http://en.wikipedia.org/wiki/Coroutine).
118
- These "threads" do not run on multiple CPUs and are not preempted, so
119
- atomic memory accesses and complex locking is not required.
120
-
121
- The goal of these threads is to reduce overall boot time by
122
- parallelizing hardware delays. (For example, by allowing the wait for
123
- an ATA hard drive to spin-up and respond to commands to occur in
124
- parallel with the wait for a PS/2 keyboard to respond to a setup
125
- command.) These hardware setup threads are only available during the
126
- "setup" sub-phase of the [POST phase](#POST_phase).
127
-
128
- The code that implements threads is in stacks.c.
129
-
130
- Hardware interrupts
131
- ===================
132
-
133
- The SeaBIOS C code always runs with hardware interrupts disabled. All
134
- of the C code entry points (see romlayout.S) are careful to explicitly
135
- disable hardware interrupts (via "cli"). Because running with
136
- interrupts disabled increases interrupt latency, any C code that could
137
- loop for a significant amount of time (more than about 1 ms) should
138
- periodically call yield(). The yield() call will briefly enable
139
- hardware interrupts to occur, then disable interrupts, and then resume
140
- execution of the C code.
141
-
142
- There are two main reasons why SeaBIOS always runs C code with
143
- interrupts disabled. The first reason is that external software may
144
- override the default SeaBIOS handlers that are called on a hardware
145
- interrupt event. Indeed, it is common for DOS based applications to do
146
- this. These legacy third party interrupt handlers may have
147
- undocumented expectations (such as stack location and stack size) and
148
- may attempt to call back into the various SeaBIOS software services.
149
- Greater compatibility and more reproducible results can be achieved by
150
- only permitting hardware interrupts at specific points (via yield()
151
- calls). The second reason is that much of SeaBIOS runs in 32bit mode.
152
- Attempting to handle interrupts in both 16bit mode and 32bit mode and
153
- switching between modes to delegate those interrupts is an unneeded
154
- complexity. Although disabling interrupts can increase interrupt
155
- latency, this only impacts legacy systems where the small increase in
156
- interrupt latency is unlikely to be noticeable.
157
-
158
- Extra 16bit stack
159
- =================
160
-
161
- SeaBIOS implements 16bit real mode handlers for both hardware
162
- interrupts and software request "interrupts". In a traditional BIOS,
163
- these requests would use the caller's stack space. However, the
164
- minimum amount of space the caller must provide has not been
165
- standardized and very old DOS programs have been observed to allocate
166
- very small amounts of stack space (100 bytes or less).
167
-
168
- By default, SeaBIOS now switches to its own stack on most 16bit real
169
- mode entry points. This extra stack space is allocated in ["low
170
- memory"](Memory Model). It ensures SeaBIOS uses a minimal amount of a
171
- callers stack (typically no more than 16 bytes) for these legacy
172
- calls. (More recently defined BIOS interfaces such as those that
173
- support 16bit protected and 32bit protected mode calls standardize a
174
- minimum stack size with adequate space, and SeaBIOS generally will not
175
- use its extra stack in these cases.)
176
-
177
- The code to implement this stack "hopping" is in romlayout.S and in
178
- stacks.c.
@@ -1,160 +0,0 @@
1
- This page describes the process that the SeaBIOS build uses to link
2
- the compiled code into the final binary objects.
3
-
4
- Unfortunately, the SeaBIOS linking phase is complex. This complexity
5
- is due to several unusual requirements:
6
-
7
- * Some BIOS entry points must reside at specific hardcoded memory
8
- locations. The build must support positioning code and variables at
9
- specific locations.
10
- * In order to support multiple [memory models](Memory Model) the same
11
- C code can be complied in three modes (16bit mode, 32bit segmented
12
- mode, and 32bit "flat" mode). Binary code from these three modes
13
- must be able to co-exist and on occasion reference each other.
14
- * There is a finite amount of memory available to the BIOS. The build
15
- will attempt to weed out unused code and variables from the final
16
- binary. It also supports self-relocation of one-time initialization
17
- code.
18
-
19
- Code layout
20
- ===========
21
-
22
- To support the unusual build requirements, several
23
- [gcc](http://en.wikipedia.org/wiki/GNU_Compiler_Collection) compiler
24
- options are used. The "-ffunction-sections" and "-fdata-sections"
25
- flags instruct the compiler to place each variable and function into
26
- its own
27
- [ELF](http://en.wikipedia.org/wiki/Executable_and_Linkable_Format)
28
- section.
29
-
30
- The C code is compiled three times into three separate objects for
31
- each of the major supported [memory models](Memory Model):
32
- **code16.o**, **code32seg.o**, and **code32flat.o**. Information on
33
- the sections and symbols of these three objects are extracted (using
34
- **objdump**) and passed in to the **scripts/layoutrom.py** python
35
- script. This script analyzes this information and produces gnu
36
- [ld](http://en.wikipedia.org/wiki/GNU_linker) "linker scripts" which
37
- provide precise location information to the linker. These linker
38
- scripts are then used during the link phase which produces a **rom.o**
39
- object containing all the code.
40
-
41
- Fixed location entry points
42
- ---------------------------
43
-
44
- The build supports placing code entry points and variables at fixed
45
- memory locations. This support is required in order to support the
46
- legacy BIOS standards. For example, a program might execute an "int
47
- 0x15" to request system information from the BIOS, but another old
48
- program might use "ljmpw $0xf000, $0xf859" instead. Both must provide
49
- the same results and so the build must position the 0x15 interrupt
50
- entry point in physical memory at 0xff859.
51
-
52
- This support is accomplished by placing the given code/variables into
53
- ELF sections that have a name containing the substring
54
- ".fixedaddr.0x1234" (where 0x1234 is the desired address). For
55
- variables in C code this is accomplished by marking the variables with
56
- the VARFSEGFIXED(0x1234) macro. For assembler entry points the ORG
57
- macro is used (see **romlayout.S**).
58
-
59
- During the build, the **layoutrom.py** script will detect sections
60
- that contain the ".fixedaddr." substring and will arrange for the
61
- final linker scripts to specify the desired address for the given
62
- section.
63
-
64
- Due to the sparse nature of these fixed address sections, the
65
- layoutrom.py script will also arrange to pack in other unrelated 16bit
66
- code into the free space between fixed address sections (see
67
- layoutrom.py:fitSections()). This maximizes the space available and
68
- reduces the overall size of the final binary.
69
-
70
- C code in three modes
71
- ---------------------
72
-
73
- SeaBIOS must support multiple [memory models](Memory Model). This is
74
- accomplished by compiling the C code three separate times into three
75
- separate objects.
76
-
77
- The C code within a mode must not accidentally call a C function in
78
- another mode, but multiple modes must all access the same single copy
79
- of global variables. Further, it is occasionally necessary for the C
80
- code in one mode to obtain the address of C code in another mode.
81
-
82
- In order to use the same global variables between all modes, the
83
- layoutrom.py script will detect references to global variables and
84
- emit specific symbol definitions for those global variables in the
85
- linker scripts so that all references use the same physical memory
86
- address (see layoutrom.py:outXRefs()).
87
-
88
- To ensure C code does not accidentally call C code compiled in a
89
- different mode, the build will ensure the symbols for C code in each
90
- mode are isolated from each other during the linking stage. To support
91
- those situations where an address of a C function in another mode is
92
- required the build supports symbols with a special "\_cfuncX_"
93
- prefix. The layoutrom.py script detects these references and will emit
94
- a corresponding symbol definitions in the linker script that points to
95
- the C code of the specified mode. The call32() and stack_hop_back()
96
- macros automatically add the required prefix for C code, but the
97
- prefixes need to be explicitly added in assembler code.
98
-
99
- Build garbage collection
100
- ------------------------
101
-
102
- To reduce the overall size of the final SeaBIOS binary the build
103
- supports automatically weeding out of unused code and variables. This
104
- is done with two separate processes: when supported the gcc
105
- "-fwhole-program" compilation flag is used, and the layoutrom.py
106
- script checks for unreferenced ELF sections. The layoutrom.py script
107
- builds the final linker scripts with only referenced ELF sections, and
108
- thus unreferenced sections are weeded out from the final objects.
109
-
110
- When writing C code, it is necessary to mark C functions with the
111
- VISIBLE16, VISIBLE32SEG, or VISIBLE32FLAT macros if the functions are
112
- ever referenced from assembler code. These macros ensure the
113
- corresponding C function is emitted by the C compiler when compiling
114
- for the given memory mode. These macros, however, do not affect the
115
- layoutrom.py reference check, so even a function decorated with one of
116
- the above macros can be weeded out from the final object if it is
117
- never referenced.
118
-
119
- Code relocation
120
- ---------------
121
-
122
- To further reduce the runtime memory size of the BIOS, the build
123
- supports runtime self-relocation. Normally SeaBIOS is loaded into
124
- memory in the memory region at 0xC0000-0x100000. This is convenient
125
- for initial binary deployment, but the space competes with memory
126
- requirements for Option ROMs, BIOS tables, and runtime storage. By
127
- default, SeaBIOS will self-relocate its one-time initialization code
128
- to free up space in this region.
129
-
130
- To support this feature, the build attempts to automatically detect
131
- which C code is exclusively initialization phase code (see
132
- layoutrom.py:checkRuntime()). It does this by finding all functions
133
- decorated with the VISIBLE32INIT macro and all functions only
134
- reachable via functions with that macro. These "init only" functions
135
- are then grouped together and their location and size is stored in the
136
- binary for the runtime code to relocate (see post.c:reloc_preinit()).
137
-
138
- The build also locates all cross section code references along with
139
- all absolute memory addresses in the "init only" code. These addresses
140
- need to be modified with the new run-time address in order for the
141
- code to successfully run at a new address. The build finds the
142
- location of the addresses (see layoutrom.py:getRelocs()) and stores
143
- the information in the final binary.
144
-
145
- Final binary checks
146
- ===================
147
-
148
- At the conclusion of the main linking stage, the code is contained in
149
- the file **rom.o**. This object file contains all of the assembler
150
- code, variables, and the C code from all three memory model modes.
151
-
152
- At this point the **scripts/checkrom.py** script is run to perform
153
- final checks on the code. The script performs some sanity checks, it
154
- may update some tables in the binary, and it reports some size
155
- information.
156
-
157
- After the checkrom.py script is run the final user visible binary is
158
- produced. The name of the final binary is either **bios.bin**,
159
- **Csm16.bin**, or **bios.bin.elf** depending on the SeaBIOS build
160
- requested.
@@ -1,8 +0,0 @@
1
- For questions and general information about SeaBIOS, please subscribe
2
- to the [SeaBIOS mailing
3
- list](http://www.seabios.org/mailman/listinfo/seabios). If you're not
4
- subscribed, your post will be held temporarily for moderator approval
5
- (to combat spam).
6
-
7
- A mailing list archive is available at
8
- <http://www.seabios.org/pipermail/seabios/>