Commit Graph

42 Commits

Author SHA1 Message Date
mintsuki
042a6e9554 misc: Backports from trunk 2023-09-16 15:12:14 -05:00
xvanc
90b82dc43f riscv/vmm: use Svpbmt extension when available 2023-09-16 11:28:15 -05:00
mintsuki
0ebf0245df misc: Misc EFI linker script improvements and drop .sbat 2023-09-11 17:16:19 -05:00
xvanc
030242d69a vmm/riscv: fix bug in vmm_max_paging_mode() 2023-08-03 20:12:51 -05:00
Kacper Słomiński
a2e502328d limine: Adjust higher half offsets for AArch64 2023-07-26 17:05:43 -05:00
mintsuki
66268f7d7f pmm: Use fixed value of 1024 for recl entries count 2023-06-15 13:06:52 +02:00
mintsuki
cb14f44eb3 pmm: Fix change-memmap-in-use bug 2023-06-15 12:54:36 +02:00
mintsuki
910a0d84a0 vmm: Fix page_sizes values and move declaration to top 2023-06-15 08:21:48 +02:00
xvanc
1f01ddfc6d
limine: scale the maximum KASLR offset based on the address space size 2023-06-04 13:50:26 -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
49f4ccd312 pmm: Work around potential memmap data race in EFI init_memmap() 2022-10-17 06:28:53 +02:00
mintsuki
09faf82bc4 pmm: Fix AllocatePages() call to take pages count; remove useless alignment check 2022-10-17 04:41:11 +02:00
mintsuki
d8193abc98 pmm: Avoid throwing away big memory ranges that fail to AllocatePages() indiscriminately 2022-10-17 04:34:27 +02:00
mintsuki
e466501f92 pmm: Misc bug fixes in pmm 2022-09-28 01:16:39 +02:00
mintsuki
c849bfc10b pmm: Obtain raw memmap from untouched_memmap rather than EFI memmap. Addresses #222 and https://forum.puppylinux.com/viewtopic.php?t=6881 2022-09-27 04:59:29 +02:00
mintsuki
bd7c3602bb pmm: Keep first page on sanitiser call in get_raw_memmap() 2022-09-26 02:42:32 +02:00
mintsuki
97c928a354 pmm: Backport some other stuff reverted in 4a4409e1 2022-09-25 23:10:58 +02:00
mintsuki
64c897a82d pmm: Backport fa6f6077 and 74a3a1c6 2022-09-25 20:37:17 +02:00
mintsuki
4a4409e1b2 pmm: Undo most of what was done between 85603ec8 and 74a3a1c6 2022-09-24 03:57:55 +02:00
mintsuki
d3385da3e3 limine: Make NX feature not mandatory 2022-09-02 03:31:22 +02:00
mintsuki
c44f514738 misc: Rename UEFI and BIOS define macros 2022-09-02 02:29:12 +02:00
mintsuki
fb372e6db7 pmm: Make code to reserve page 0 uniform between BIOS and UEFI 2022-09-01 04:58:18 +02:00
mintsuki
07080dcbc2 misc: blib.h -> misc.h 2022-08-26 23:44:47 +02:00
Kacper Słomiński
e1f6ac8860
Initial AArch64 port (#205)
* Initial aarch64 port

* Enable chainload on aarch64

No changes necessary since it's all UEFI anyway.

* Add specification for Limine protocol for aarch64

* PROTOCOL: Specify state of information in DT /chosen node

* common: Add spinup code for aarch64

* common: Port elf and term to aarch64

* common: Port vmm to aarch64

Also prepare to drop VMM_FLAG_PRESENT on x86.

* protos: Port limine boot protocol to aarch64

Also drop VMM_FLAG_PRESENT since we never unmap pages anyway.

* test: Add DTB request

* PROTOCOL: Port SMP request to aarch64

* cpu: Add cache maintenance functions for aarch64

* protos/limine, sys: Port SMP to aarch64

Also move common asm macros into a header file.

* test: Start up APs

* vmm: Unify get_next_level and implement large page splitting

* protos/limine: Map framebuffer using correct caching mode on AArch64

* CI: Fix GCC build for aarch64

* entry, menu: Replace uses of naked attribute with separate asm file

GCC does not understand the naked attribute on aarch64, and didn't
understand it for x86 in older versions.
2022-08-18 17:32:54 +02:00
mintsuki
7ade45b230 misc: struct e820_entry_t -> struct memmap_entry 2022-08-13 19:54:49 +02:00
mintsuki
71fd2d2516 pmm: Properly handle memory map entries that cross 4GiB on UEFI 2022-08-13 17:52:01 +02:00
mintsuki
74a3a1c6b6 pmm: General tyding up of pmm code (2) 2022-08-11 20:20:16 +02:00
mintsuki
fa6f607769 pmm: General tyding up of pmm code 2022-08-11 09:41:07 +02:00
mintsuki
4b55b45382 pmm: Fix a handful of GCC warnings 2022-08-04 13:04:55 +02:00
mintsuki
0ef0c3adc5 linux, pmm: Get a boot with 32-bit UEFI. Addresses #185 2022-08-04 12:56:46 +02:00
mintsuki
cd1107abe2 limine: Specify that memory between 0 and 0x1000 is never to be marked usable 2022-07-29 00:42:47 +02:00
mintsuki
0a2c2896b7 Revert "pmm: Fix issue with get_memmap() that could cause page table corruption"
This reverts commit 9c180b4008.
2022-07-26 20:02:57 +02:00
mintsuki
fb5d903ccf pmm: Reclaim bootservices entries last and disallow allocations after 2022-07-26 19:55:18 +02:00
mintsuki
7bfa2cd775 pmm: Fix bugs introduced in 85603ec 2022-07-26 11:01:00 +02:00
mintsuki
85603ec8db pmm: Simplify handling EFI memory acquisition and release 2022-07-26 08:09:50 +02:00
mintsuki
b92d48e44f multiboot(2): Initial support for arbitrary kernel load addresses 2022-06-27 10:55:57 +02:00
mintsuki
0836a62fbd pmm: Minor overhaul to try and fix #185 2022-06-26 04:23:13 +02:00
mintsuki
9c180b4008 pmm: Fix issue with get_memmap() that could cause page table corruption 2022-06-22 22:28:43 +02:00
mintsuki
df7e43df7f efi: Adjust for new reduced-gnu-efi 2022-04-20 04:00:00 +02:00
mintsuki
1af09d0749 mm/efi: Fix issue where in-use bootloader memory may be erroneously allocated 2022-04-19 22:28:21 +02:00
mintsuki
1d2cb8e400 pmm: Fix alignment issue introduced in 3fe8217 2022-02-28 08:24:44 +01:00
mintsuki
400202d926 misc: stage23 -> common 2022-02-03 10:38:43 +01:00