Commit Graph

29 Commits

Author SHA1 Message Date
Mintsuki
6db4e3f609 protos/linux_risc: Validate kernel header before trusting image_size for allocation 2026-03-07 03:28:39 +01:00
Mintsuki
00a542f0c6 misc: Fix wrong format specifiers for 64-bit arguments in print calls 2026-02-10 11:10:02 +01:00
Mintsuki
d1ca6025cd protos/linux_risc: Allocate EFI config tables as EfiLoaderData instead of EfiLoaderCode 2026-02-10 11:10:02 +01:00
Mintsuki
81274941db protos/linux_risc: Fix wrong format specifiers for 64-bit arguments in print calls 2026-02-10 11:10:02 +01:00
Mintsuki
1f4c65c456 protos/linux_risc: Use image_size from kernel header for allocation 2026-02-10 10:58:03 +01:00
Mintsuki
e04194d3ad protos/linux: linux_direct_load() -> linux_load() 2025-09-21 21:22:12 +02:00
Mintsuki
13ccc30b23 protos/linux: linux_load() -> linux_direct_load()
Additionally make some functions static and rename linux.c -> linux_x86.c
2025-09-19 22:26:35 +02:00
Mintsuki
996a0c1801 misc: Move to using separate libfdt repository 2025-07-12 12:08:05 +02:00
mintsuki
c9cc7bbb66 protos: Make 'path' option standard to pick executable to boot for all protos 2025-01-10 13:53:12 +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
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
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
Kacper Słomiński
bb9ffd74d2 protos/linux_risc: Fix warning in table installation code 2024-07-15 01:34:04 +02:00
Kacper Słomiński
9faa0e0f0f protos/linux_risc: Install memory reservation configuration table
This gets rid of some warnings when booting Linux on systems with a GIC v3
interrupt controller.
2024-07-15 01:21:35 +02:00
mintsuki
582a86a7ef protos/linux_risc: Minor code reshuffling to get initramfs loading print to show 2024-07-14 09:32:58 +02:00
mintsuki
f0d64f30a9 protos/linux_risc: Add missing loading prints 2024-07-14 09:19:32 +02:00
Kacper Słomiński
7473bb3f8e protos/linux_risc: Document need for the linux,uefi-secure-boot property 2024-06-28 06:09:54 +02:00
Kacper Słomiński
ee5096ed84 protos/linux_risc: Tell Linux about the framebuffer 2024-06-28 04:14:31 +02:00
mintsuki
45e036275a dtb: Optionally reallocate and expand DTB memory as needed 2024-06-28 00:43:27 +02:00
Kacper Słomiński
aed3b3348e protos/linux_risc: Properly fill VirtualStart in memory map
This lets Linux use UEFI runtime services.
2024-06-16 20:46:23 +02:00
mintsuki
9fb6423002 protos/linux: riscv64: Fix protocol version check 2024-06-16 07:40:50 +02:00
mintsuki
2541760b98 protos/linux: Rename files to avoid unnecessary diffs (1) 2024-06-15 21:30:06 +02:00
mintsuki
440ba05e08 protos/linux: Rename files (2) 2024-06-12 02:07:39 +02:00
mintsuki
56b7a32dfc protos/linux: Rename files (1) 2024-06-12 02:07:12 +02:00