Commit Graph

307 Commits

Author SHA1 Message Date
Mintsuki
80912a3d1f protos/multiboot2: Ignore top-down relocation hint as we do not properly support it 2025-03-31 02:33:54 +02:00
Mintsuki
c8cdc9e051 protos/multiboot2: Panic if EFI64 entry is required, else ignore it 2025-03-31 02:32:19 +02:00
mintsuki
c0924e6cf1 protos/chainload: Get rid of unnecessary function splits 2025-02-25 19:47:32 +01:00
mintsuki
71014d8f24 protos/chainload: Use updated protocol names in messages 2025-02-25 19:44:46 +01:00
mintsuki
50c01f010d protos/efi: Do not use EFI allocator uselessly and fix use-after-free 2025-02-25 19:25:46 +01:00
mintsuki
3e899468de protos/efi: Comment out unused debug function devpath_print() to avoid warning 2025-02-25 19:06:39 +01:00
mintsuki
84981d6ca6 protos/efi: Rework entire chainloading procedure to fix issues caused by the old method
This should fix rEFInd and potentially more EFI applications previously misbehaving.
2025-02-25 19:02:01 +01:00
mintsuki
99738edd07 protos/limine: Specify and implement executable command line feature 2025-02-17 02:14:59 +01:00
mintsuki
278881c72f protos/limine: Rename 'boot time' feature to 'date at boot' for APIv3 2025-02-16 02:58:39 +01:00
mintsuki
eaca4391d3 protos/efi: Fix 'path' option alias not working. Closes #458 2025-02-15 20:57:29 +01:00
mintsuki
e2cda1d821 protos/chainload_next: Drop protocol 2025-02-15 14:26:35 +01:00
mintsuki
6858bbf41c protos/limine: Introduce API revision 3; rename cmdline to string in file struct 2025-02-15 14:22:06 +01:00
mintsuki
db8f63bdfd config: Drop support for legacy config format 2025-02-10 13:31:18 +01:00
mintsuki
c9cc7bbb66 protos: Make 'path' option standard to pick executable to boot for all protos 2025-01-10 13:53:12 +01:00
czapek
8b01ea3430 lib: Add support for loading PE images (#442)
* lib: Add support for loading PE images

* lib/pe: Use standard integer types

* lib/pe: Fix section alignment

* lib/pe: Properly iterate base relocation blocks

* lib/pe: Add missing machine types

* protos/limine: Add kernel format detection logic

* lib/pe: Fix integer to pointer conversion errors

* lib/elf: Add previously removed check

* lib/pe: Fix base relocation block iteration code

* lib/pe: Add missing machine types to pe_bits
2025-01-08 00:35:15 +01:00
mintsuki
512da261c3 misc: Simplifications after 945c43de0 and e721cecc2 2024-12-25 18:44:10 +01:00
Kacper Słomiński
945c43de0d lib: Move DTB_PATH handling logic into common code 2024-12-24 17:10:47 +01:00
Kacper Słomiński
e721cecc25 protos/linux_risc: Don't call get_device_tree_blob if using one from a file 2024-12-24 15:56:57 +01:00
mintsuki
deefcb622d protos/linux_risc: Fix EFI memmap configuration table preparation 2024-12-24 13:32:17 +01:00
Yao Zi
240ecc29e9 protos/linux_risc: add loongarch64 support
LoongArch kernels have more address space requirements than aarch64/
riscv64. All params (commandline, initrd, etc.) should be passed
as EFI configuration tables.

This has been tested on qemu with ACPI on. DTB support isn't tested and
isn't really matter, either. Most LoongArch devices come with an
ACPI-compatible firmware.

Signed-off-by: Yao Zi <ziyao@disroot.org>
2024-12-20 20:51:26 +00:00
Yao Zi
3f57bb5a2c protos/linux_risc: pass memory map and initrd by EFI configuration table
Newer Linux kernel supports passing boot params without a devicetree. In
this case, the bootloader should register a Linux-specific EFI
configuration table, which contains memory mapping information or initrd
address.

This is the only option on some new platforms like LoongArch, and is
necessary to allow booting Linux kernel without a DTB on aarch64/riscv64.

Signed-off-by: Yao Zi <ziyao@disroot.org>
2024-12-20 20:51:23 +00:00
Yao Zi
f24e866c02 protos/linux_risc: clean up
Split architecture-dependent code and dtb-specific operations into
different functions to keep condition compilation in the leaf and
prepare for support of ACPi-only systems.

Signed-off-by: Yao Zi <ziyao@disroot.org>
2024-12-19 17:36:15 +00:00
mintsuki
da43c70a2d protos: Reduce or remove mentions of 'kernel' where unnecessary
This also introduces limine.h API revision 2
2024-12-05 09:31:59 +01:00
Marvin Friedrich
3ced8e1024 protos/limine: Add RISC-V BSP Hart ID request 2024-12-04 00:37:26 +01:00
mintsuki
0ba9919ed3 protos/limine: Rename SMP feature to MP feature 2024-11-30 02:19:31 +01:00
mintsuki
8845f97277 protos/limine: Amend base revision 3 to keep EFI memmap ptr as physical 2024-11-30 01:38:40 +01:00
mintsuki
ffbdf54f8e protos/limine: Amend base rev 3 to mandate reporting base rev used to kernels 2024-10-31 07:53:01 +01:00
mintsuki
524b34d149 Revert "protos/limine: Optimisation of the memory map before pagemap build"
This reverts commit f379a9157d.
2024-10-28 09:56:49 +01:00
mintsuki
f379a9157d protos/limine: Optimisation of the memory map before pagemap build 2024-10-28 09:04:01 +01:00
mintsuki
a82e67d9a4 protos/limine: Make some pointers physical for base rev 3 2024-10-28 07:10:54 +01:00
mintsuki
46ba9940c0 protos/limine: Fix typo 2024-10-28 04:25:20 +01:00
mintsuki
b0f94babc6 protos/limine: Sort out base revision 3 related memmap issues 2024-10-28 04:20:30 +01:00
mintsuki
99e0ba3b1f protos/limine: Only map 4 memory map entry types in the default mappings 2024-10-28 00:34:00 +01:00
mintsuki
29a2c6038f protos/limine: Begin work on base rev 3 by removing unconditional 4GiB map 2024-10-25 06:15:28 +02:00
mintsuki
3f32d802ae vmm: Automatically detect right page size to use 2024-10-25 05:26:52 +02:00
Marvin Friedrich
af488d66c8 protos/limine: Filter memory@... nodes from device trees (#421)
* protos/limine: Filter `memory@...` nodes from device trees

* docs: Mention removal of `memory@...` nodes for the DTB response
2024-10-18 21:29:17 +02:00
Marvin Friedrich
6d2995a3f1 protos/linux: Add device tree blob override config option (#420)
* protos/linux: Add device tree blob override config option

* protos/linux: Remove unnecessary UEFI check
2024-10-18 21:21:34 +02:00
Marvin Friedrich
4cdda6a272 protos/limine: Add device tree blob override config option (#419)
* protos/limine: Add dtb_path config option

* test: Add a device tree and dtb_path to the config

* docs: Add dtb_path configuration information

* protos/limine: Fix missing argument for dtb_path for x86

* protos/limine: Correct panic message argument

* protos/limine: Use freadall instead of freadall_mode
2024-10-18 20:01:24 +02:00
mintsuki
39b92df6f1 protos/limine: Work around GCC warning by initialising randomise_hhdm_base 2024-10-12 03:53:06 +02:00
mintsuki
7fc7ececbc protos/limine: Add randomise_hhdm_base config option 2024-10-12 03:47:23 +02:00
mintsuki
704dd7ee25 protos/limine: Make the PAT non-mandatory and check for support before using it
Additionally, move the PAT enabling code to the code that runs in a non-paged mode in order to avoid potential weird issues with cache flushing
2024-10-11 18:34:36 +02:00
monkuous
d46f609d79 protos/limine: bump MEMMAP_MAX to 1024 2024-09-29 21:25:11 +02:00
monkuous
f7904f8d9b protos/limine: increase MEMMAP_MAX 2024-09-28 10:45:01 +02:00
monkuous
99c94dddfc protos/multiboot2: use unsigned relocated_base 2024-09-17 22:35:15 +02:00
monkuous
6bdf6c3e58 protos/multiboot2: use signed integers for relocation 2024-09-17 22:24:32 +02:00
monkuous
337b15089f protos/multiboot2: fix incorrect calculation of reloc_slide 2024-09-17 14:41:37 +02:00
monkuous
08812292ca protos/multiboot2: fix ordering of ALIGN_* macro parameters 2024-09-17 14:39:41 +02:00
mintsuki
15f05a8b82 protos: Reduce protocol side MEMMAP_MAX values 2024-09-04 02:09:04 +02:00
mintsuki
0c2f0ddebe build: Remove custom __riscv64 define in favour of built-in __riscv define
We do not support non-64-bit RISC-V anyways
2024-08-11 20:25:01 +02:00
mintsuki
929f88a42b protos/limine: Fix off-by-1 error in HHDM MAXPHYADDR bounds check 2024-08-10 13:19:38 +02:00