Andrius Štikonas
04e8f7190a
Update bootstrap-seeds submodule.
2022-10-11 21:21:10 +01:00
Andrius Štikonas
dbc06eff76
Make hex0 one byte smaller.
2022-10-11 00:59:36 +01:00
Andrius Štikonas
d518c45e8d
Backport PE32 header changes to all early stage0-uefi programs.
2022-10-11 00:55:46 +01:00
Andrius Štikonas
9876a5e51c
Update PE32 header.
...
* Use hex2 %label1>label2 to calculate SizeOfHeaders and SizeOfOptionalHeader.
* Rename PE32_end to ELF_end for compatibility with stage0-posix.
* Zero ImageBase field.
* Zero BaseOfCode field.
2022-10-11 00:49:17 +01:00
Andrius Štikonas
c34e2a61ac
Add kaem commands to build M2-Planet (for now POSIX version).
2022-10-11 00:13:04 +01:00
Andrius Štikonas
a73e927536
Allocate more memory in M0.
2022-10-10 23:58:23 +01:00
Andrius Štikonas
9a6c1a0efa
Allocate more memory in cc_amd64, without it it tends to hang when building M2-Planet.
2022-10-10 23:43:36 +01:00
Andrius Štikonas
21262116e0
Add M2libc and M2-Planet as submodules.
2022-10-10 19:18:28 +01:00
Andrius Štikonas
a4905777c9
Fix a bug in kaem read_byte function.
2022-10-09 21:35:00 +01:00
Andrius Štikonas
0400521170
Switch cc_amd64 to output new defines and position independent code.
2022-10-09 15:55:28 +01:00
Andrius Štikonas
7f17d4a475
Reorder M1 defines.
2022-10-08 20:52:11 +01:00
Andrius Štikonas
ecca40494a
Fix another cc_amd64 bug. cc_amd64 should be functional now.
2022-10-08 20:26:50 +01:00
Andrius Štikonas
92bebbf2cb
Whitespace fix.
2022-10-08 19:46:08 +01:00
Andrius Štikonas
92ffae0dbe
Fix a typo in cc_amd64.M1 that prevented it from working.
2022-10-08 19:33:25 +01:00
Andrius Štikonas
b18a371718
Actually commit cc_amd64.M1 which was forgotten in the previous commit.
2022-10-08 01:20:46 +01:00
Andrius Štikonas
41393adeae
Initial version of cc_amd64.M1.
...
Currently broken, possibly due to problems in PE header.
2022-10-06 22:49:57 +01:00
Andrius Štikonas
fd021cef8f
Fix a bug in exit_uefi_stack.
2022-10-02 14:46:21 +01:00
Andrius Štikonas
d6d8b2b707
cc_amd64.S: implement user stack.
2022-10-02 14:38:20 +01:00
Andrius Štikonas
b46ba0d078
Initial port of cc_amd64.S to UEFI.
...
It can build some simple stuff but fails to build M2-Planet
due to stack overflow. UEFI guarantees only 128 KiB of stack
space but we need about 2MiB.
2022-10-02 12:09:31 +01:00
Andrius Štikonas
89771b3fc7
cc_amd64.S: Simplify fixup_type function.
2022-10-01 17:31:58 +01:00
Andrius Štikonas
da7132246a
Add relocatable POSIX version of cc_amd64.S.
2022-10-01 15:15:57 +01:00
Andrius Štikonas
999a4b5148
Use .intel_syntax directive instead of Makefile option in .S files.
2022-09-27 22:52:18 +01:00
Andrius Štikonas
d647ffa3a6
Add M0.hex2.
2022-09-25 23:01:25 +01:00
Andrius Štikonas
cf07861e37
Update bootstrap-seeds submodule.
2022-09-17 15:06:33 +01:00
Andrius Štikonas
a4fdf03827
Rename kaem-minimal->kame-optional to be consistent with bootstrap seeds.
2022-09-17 14:29:58 +01:00
Andrius Štikonas
cc85d5f8db
kame-minimal: Implement various improvements:
...
* Make sure to close all protocols before exit.
* Use more sophisticated command line argument processing
that pushes command line arguments onto stack.
* Switch to more readable M1 defines.
2022-09-17 14:18:59 +01:00
Andrius Štikonas
32deb0ffaf
hex0: Implement various improvements:
...
* Make sure to close all protocols before exit.
* Use more sophisticated command line argument processing
that pushes command line arguments onto stack.
* Switch to more readable M1 defines.
2022-09-10 23:57:31 +01:00
Andrius Štikonas
9b9ff9ac52
hex1: Implement various improvements:
...
* Make sure to close all protocols before exit.
* Use more sophisticated command line argument processing
that pushes command line arguments onto stack.
* Switch to more readable M1 defines.
2022-09-07 22:32:18 +01:00
Andrius Štikonas
7020101bd7
Remove a separate .data section in assembly prototypes to match what we are doing in hex/M1.
2022-09-04 00:45:13 +01:00
Andrius Štikonas
d39dbc3484
Reorder some calls in C prototypes to match what assembly programs are doing.
2022-09-04 00:42:19 +01:00
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