Commit Graph

36 Commits

Author SHA1 Message Date
Mintsuki
104399fe43 lib/misc: Remove dead overflow check in ALIGN_UP macro 2026-04-19 00:27:41 +02:00
Mintsuki
bfe3544c13 lib/misc: Use overflow-checked multiply in ALIGN_UP macro 2026-04-04 15:34:07 +02:00
Mintsuki
a24f496c2e Revert "misc: Enforce hash verification when UEFI Secure Boot is active"
This reverts commit 9e2f3e7587.
2026-04-04 15:02:58 +02:00
Mintsuki
9e2f3e7587 misc: Enforce hash verification when UEFI Secure Boot is active 2026-04-02 22:21:54 +02:00
Mintsuki
1b5b8e4620 misc: Add CHECKED_MUL macro, use it for all overflow-checked multiplications 2026-04-02 01:44:58 +02:00
Mintsuki
eb071a0121 misc: Add overflow checking to ALIGN_UP and DIV_ROUNDUP macros 2026-04-02 01:44:58 +02:00
Mintsuki
3a73ecf5bd mm: Add CHECKED_ADD macro, use it for all base+length computations 2026-03-31 15:31:50 +02:00
Mintsuki
102449250d protos/limine: Implement aarch64 EL2 entry request 2026-03-15 09:58:07 +01:00
Mintsuki
1a2da65c75 lib/misc: Remove unused oct2bin and hex2bin 2026-02-16 13:08:01 +01:00
Mintsuki
a2c37bab88 misc: Add bounds checking to get_absolute_path() 2026-01-11 23:45:22 +01:00
sanana
c411051252 lib/bli: Implement LoaderTimeInitUSec and LoaderTimeExecUSec
These are variables used by `systemd-analyze` and is useful for boot performance
metrics.
2025-07-03 11:02:54 +03:00
Mintsuki
3e9f2e030d lib: Add MIN and MAX macros 2025-03-25 21:39:16 +01:00
mintsuki
2d404d6fc1 misc: Do not attempt to use serial if not detected on EFI
This addresses an issue reported on Macs that lack a serial port and also lack a working ConOut screen console, resulting in nothing but a blank screen instead of the menu
2025-03-09 23:42:43 +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
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
mintsuki
8e935f509e build: Updates for latest limine-efi 2024-08-22 16:32:47 +02:00
mintsuki
16c7c69b42 build: Updates for latest limine-efi 2024-08-22 06:50:50 +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
Keegan Saunders
d9a2fb95a9 Add LoongArch support 2024-07-31 23:05:27 -04:00
mintsuki
45e036275a dtb: Optionally reallocate and expand DTB memory as needed 2024-06-28 00:43:27 +02:00
mintsuki
50b147cbd7 lib/mem: Remove unused memcpy32to64() function 2024-06-26 20:00:26 +02:00
xvanc
65e2c1b4d8 riscv: add support for device tree 2024-05-30 10:53:21 -05:00
mintsuki
baae33f713 misc: Remove unused extern variable declaration 2024-03-28 05:19:47 +01:00
cospplredman
ba5c0004e6 fixed header guard names
made them more standard compliant
2024-03-20 03:06:55 +01:00
mintsuki
1c51ef85b0 Revert "misc/efi: Call SetVirtualAddressMap when exiting boot services"
This reverts commit 0a27376a2b.
2023-12-07 00:37:08 +01:00
48cf
0a27376a2b misc/efi: Call SetVirtualAddressMap when exiting boot services 2023-12-07 00:31:17 +01:00
mintsuki
2c8c0c3deb Revert "misc: Converge with 5.x"
This reverts commit f9682543fd.
2023-11-03 06:24:58 +01:00
mintsuki
c5c43cb0fd misc: aarch64: Remove unused enter_in_current_el() function 2023-09-16 14:28:33 -05:00
mekb
820d4751d3 menu: Add option to hide help text 2023-08-08 14:09:11 -05:00
xvanc
9274ee656e Initial riscv64 port (#274)
* initial riscv64 port

* enable Paging Mode feature for all architectures

* riscv: add missing protocol docs

* riscv: fix tests

* docs: clarify `LIMINE_PAGING_MODE_DEFAULT` macro

* build: fix whitespace in common/GNUmakefile

* riscv: default to Sv48 paging when supported

* vmm: make `VMM_MAX_LEVEL` 1-indexed

* limine: do not call `reported_addr()` before finaling paging mode

smp/riscv: do not overwrite the argument passed to APs

* limine/riscv: update default paging mode in limine.h

* test/riscv: pad OVMF.fd when downloading it
2023-06-04 01:36:06 +02:00
mintsuki
886523359c efi/disk: Use blake2b to calculate unique sector hash 2022-09-15 12:53:47 +02:00
czapek1337
9680a1ad51 uri: Add checksum validation 2022-09-13 01:14:55 +02:00
mintsuki
c44f514738 misc: Rename UEFI and BIOS define macros 2022-09-02 02:29:12 +02:00
mintsuki
07080dcbc2 misc: blib.h -> misc.h 2022-08-26 23:44:47 +02:00