Commit Graph

125 Commits

Author SHA1 Message Date
Andrius Štikonas 35dbae15a0 Further fixes to hex2 command line parsing.
Do not hang if not arguments is specified or input file does not exist.
2022-08-28 23:06:47 +01:00
Andrius Štikonas 2b25915169 hex2: implement various improvements.
* Make sure to close all protocols before exit.
 * Use more sophisticated command line argument processinh
   that pushes command line arguments onto stack.
 * Switch to more readable M1 defines
 * Handle the case when output file is not specified
2022-08-28 21:57:14 +01:00
Andrius Štikonas 8ad04157da Fix wording in readme. 2022-08-28 00:57:20 +01:00
Andrius Štikonas e14033b3d9 Make catm work when no arguments are supplied. 2022-08-24 00:17:52 +01:00
Andrius Štikonas 74a5685102 catm: Make sure we close all open protocols on exit. 2022-08-23 00:39:36 +01:00
Andrius Štikonas 3528be5b2b catm: Switch to M1 defines that are closer to intel syntax. 2022-08-22 01:30:22 +01:00
Andrius Štikonas 01fae8cd06 catm: close rootdir on exit. 2022-08-21 23:51:46 +01:00
Andrius Štikonas dcaba36d05 hex2: also close rootdir on exit. 2022-08-21 23:46:40 +01:00
Andrius Štikonas e3ccc9b046 hex2: fix free_pool bug.
r12 was not pointing towards begining of pool,
hence we were not freeing allocated memory.
2022-08-21 23:07:46 +01:00
Andrius Štikonas ce5f77ddc5 hex2: Use a single allocate_pool call. 2022-08-21 22:47:24 +01:00
Andrius Štikonas 62ba4ba253 hex.S: Fix a bug where store label was called rather than jumped into. 2022-08-20 23:11:30 +01:00
Andrius Štikonas d6800a8a9e Do not launch qemu by default. 2022-08-20 15:33:06 +01:00
Andrius Štikonas d5ce9bff72 Add exit call to silence compiler warnings. 2022-08-20 15:32:55 +01:00
Andrius Štikonas 8913822c2c Fix kaem when receiving non-zero exit code. 2022-08-20 02:22:34 +01:00
Andrius Štikonas 20b0450c8f Add hex2.c prototype. 2022-08-20 00:09:26 +01:00
Andrius Štikonas f5a38323ef Add catm.hex2 2022-08-14 22:31:13 +01:00
Andrius Štikonas f587764c81 Add catm.M1 prototype. 2022-08-14 19:49:58 +01:00
Andrius Štikonas ba541383ad Add catm.S prototype. 2022-08-14 17:25:44 +01:00
Andrius Štikonas 7b08537914 Fix load_options_size value. 2022-08-14 14:12:06 +01:00
Andrius Štikonas 1bbe85b1ab Update bootstrap-seeds submodule. 2022-08-14 00:00:15 +01:00
Andrius Štikonas baed1c2de8 Add forgotten hex2.M1 file. 2022-08-13 22:25:08 +01:00
Andrius Štikonas 761169b59a Add hex2. 2022-08-13 20:57:36 +01:00
Andrius Štikonas 1d53af842d Add hex1.hex0. 2022-08-09 20:04:52 +01:00
Andrius Štikonas 943881a73b Make hex1.S relocatable.
Also make sure we reserve memory for label table.
2022-08-08 23:55:02 +01:00
Andrius Štikonas 95ab016383 Add hex1.hex2 prototype. 2022-08-08 01:21:41 +01:00
Andrius Štikonas a4d36cc940 Add hex1.M1 prototype. 2022-08-07 23:15:34 +01:00
Andrius Štikonas 368377191b Add hex1.S prototype. 2022-08-07 21:45:05 +01:00
Andrius Štikonas 217ea25487 Add a short README. 2022-08-07 12:24:21 +01:00
Andrius Štikonas f552c166df Add Makefile for creating images and launching qemu. 2022-08-07 11:38:45 +01:00
Andrius Štikonas 129bfcbd16 Add kaem-optional.hex0. 2022-08-07 00:21:57 +01:00
Andrius Štikonas fc79b4a153 Add kaem-optional M1 and hex2 development prototypes. 2022-08-06 22:02:44 +01:00
Andrius Štikonas bb9ff366a5 Add kaem-optional.S 2022-08-01 00:30:29 +01:00
Andrius Štikonas 9af7fdf9bb kaem-minimal.S: make sure to close files and free pools when exiting. 2022-07-30 10:08:23 +01:00
Andrius Štikonas 0895da7db6 Fix kaem to work with multiple commands. 2022-07-25 19:57:44 +01:00
Andrius Štikonas e51956a58c Zero more of the PE32 header fields. 2022-07-24 22:09:44 +01:00
Andrius Štikonas e68a9cc0bb Add bootstrap-seeds submodule. 2022-07-24 21:20:02 +01:00
Andrius Štikonas e758a69d2b Zero some more DOS header fields. 2022-07-24 21:19:26 +01:00
Andrius Štikonas 9af8890ef5 Fix a comment. 2022-07-24 21:09:12 +01:00
Andrius Štikonas d15b16b729 Replace hex0_AMD64_POSIX.hex0 with efi version. 2022-07-24 13:19:01 +01:00
Andrius Štikonas 54e0c80f9f Fix remaining issues that prevented hex0 from running. 2022-07-24 13:09:34 +01:00
Andrius Štikonas c1df626dc6 Add initial (non-working) versoin of hex0.hex0. 2022-07-24 12:11:56 +01:00
Andrius Štikonas 8e22fee483 Switch to relative addressing of labels. 2022-07-24 10:11:45 +01:00
Andrius Štikonas f6cb8bbf92 Add hex0.hex2. 2022-07-23 21:28:54 +01:00
Andrius Štikonas 05556bbb96 hex0.M1: Fix position of GUID_8 labels. 2022-07-23 21:26:24 +01:00
Andrius Štikonas fe381538f9 Fix copy-paste typo in POP_RAX define. 2022-07-23 20:29:41 +01:00
Andrius Štikonas a8e0dd50a2 Make sure we use 64-bit pointers for stack address. 2022-07-23 20:14:45 +01:00
Andrius Štikonas 3317e845f5 Add hex0.M1. 2022-07-23 18:41:30 +01:00
Andrius Štikonas 93c8c5372c Swap rax and rbx to optimize machine code a bit. 2022-07-23 15:15:40 +01:00
Andrius Štikonas 7f27324a5b Port hex0.S optimizations from stage0-posix. 2022-07-20 22:48:41 +01:00
Andrius Štikonas 85e3b0caef Actually sub esp, 32 is only 3 bytes long, so undo some of the pop rax changes. 2022-07-17 13:53:31 +01:00