Commit Graph

112 Commits

Author SHA1 Message Date
Wildan M 40e76875d7 Prevent kstack from leaking 2026-05-20 13:35:47 +07:00
Speedy_Lex f49c7d991a RSDP validation and fixing a few clippy lints 2026-05-05 19:35:31 +02:00
bjorn3 654ee6ca3e size_of and align_of are part of the prelude nowadays 2026-04-09 15:23:34 -06:00
bjorn3 2fba663274 Fix expect message 2026-04-04 13:14:14 +02:00
bjorn3 50c68cd746 Remove ACPI search from the kernel
The bootloader provides the RSDP address to the kernel. If the
bootloader can't find it, there is no RSDP.
2026-04-04 11:50:24 +02:00
bjorn3 ab4abf63c9 Deduplicate Page and other paging related things between architectures 2026-04-03 22:15:00 +02:00
bjorn3 c8879531ae rmm: Add device_memory and uncachable flags to PageFlags 2026-03-30 20:34:45 +02:00
bjorn3 c4b064ea44 Move arch specific EntryFlags into rmm 2026-03-30 18:49:15 +02:00
bjorn3 c51aa1ef86 rmm: Make a couple of methods safe 2026-03-29 14:16:53 +02:00
bjorn3 b5603422be Check at compile time that KernelMapper is writable if necessary 2026-03-28 23:22:19 +01:00
auronandace df469ddcb3 apply is_multiple_of lint 2026-02-21 08:39:26 +00:00
4lDO2 33dbf2458e only clear RC_USED_NOT_FREE with freelist locked 2025-11-14 20:06:18 +01:00
4lDO2 96552163f6 Clear RC_USED_NOT_FREE even for contention case. 2025-11-14 20:06:18 +01:00
4lDO2 dc33c67997 Fix potential refcount underflow from fetch_sub. 2025-11-14 20:06:18 +01:00
Jeremy Soller 91b835d29f Reduce logging significantly 2025-11-01 20:24:11 -06:00
bjorn3 e101629377 Inline a bunch of functions in KernelMapper 2025-10-26 12:44:52 -06:00
bjorn3 4b89feab41 Fix a couple of dead code warnings 2025-10-26 12:07:56 +01:00
Speedy_Lex 0931a7f49f Resolve a huge portion of the clippy lints 2025-10-06 06:30:23 -06:00
Jeremy Soller 5dc6f7c3ba lock ordering 2025-09-22 07:48:48 -06:00
bjorn3 f58bcd584e Separate logical and hardware cpu ids 2025-09-20 15:33:08 +02:00
bjorn3 5a6117b5ae Replace the log crate with a custom logging system
This avoids the need to explicitly set a logger early during boot, which
reduces the amount of moving parts that could go wrong slightly. And it
cuts the kernel image size by 13kb.
2025-09-13 18:55:16 +02:00
bjorn3 cea93f7647 cargo fix --edition & rustfmt
Or to be precise:
RUST_TARGET_PATH=$(pwd)/targets cargo fix --edition \
--target targets/x86_64-unknown-kernel.json \
--target targets/i686-unknown-kernel.json \
--target targets/aarch64-unknown-kernel.json \
--target targets/riscv64-unknown-kernel.json \
-Zbuild-std=core,alloc --allow-dirty --bin kernel
cargo fmt
2025-09-10 16:44:36 +02:00
Anhad Singh 08231eb4df feat(mremap): KEEP_OLD
Signed-off-by: Anhad Singh <andypython@protonmail.com>
Co-authored-by: @4lDO2
2024-12-11 16:08:08 +11:00
Jeremy Soller 4db9673e2a Support SPCR and clean up device memory allocation 2024-10-31 10:53:58 -06:00
Andrey Turkin 0a6a90415a Refactor initial memory paging 2024-10-19 08:44:46 +03:00
IncompententPirate fc5d246b30 remove wrapper functions 2024-09-26 22:34:55 +00:00
Andrey Turkin 755694494b Factor KernelMapper out of arch
Same implementation on all the platforms. Also remove mutable Deref as it allowed circumventing RO check
2024-09-25 21:51:39 +03:00
Andrey Turkin ba154c0387 Fix a debug-build assertion
A range of usable memory could be small enough not to have any MAX_ORDER sized frames.
2024-09-04 10:55:11 +03:00
4lDO2 d94baa2712 Run rustfmt. 2024-07-15 17:50:18 +02:00
4lDO2 5e7db80285 Fix a bunch of warnings. 2024-07-15 17:48:45 +02:00
4lDO2 9b68d4de80 Fix add_ref(Shared) refcounting bug. 2024-07-15 17:20:55 +02:00
4lDO2 295cc820e6 WIP: userspace signal handling 2024-07-15 17:20:55 +02:00
Andrey Turkin 9c639af217 Fix debug assertion bug 2024-07-12 23:15:33 +03:00
4lDO2 2f1551a6bb Mark allocated p2frame used *before* freelist unlock. 2024-03-26 17:07:37 +01:00
4lDO2 b5523df187 Only support power-of-two frame allocations. 2024-03-24 14:40:15 +01:00
4lDO2 b2d52d6736 Implement allocator free/used bookkeeping. 2024-03-24 14:27:25 +01:00
4lDO2 12282439b6 Reduce dead code, fix aarch64. 2024-03-23 23:51:12 +01:00
4lDO2 7261dccb72 Fix i686. 2024-03-23 16:54:47 +01:00
4lDO2 299a829ff3 Remove debug code. 2024-03-22 17:21:17 +01:00
4lDO2 676368f5d2 Fix booting to desktop. 2024-03-22 16:35:29 +01:00
4lDO2 c0f3b6ccca Fix refcount assert 2024-03-22 13:32:14 +01:00
4lDO2 660acb4d94 Improve debugging 2024-03-22 13:32:14 +01:00
4lDO2 343f89f240 Fix unaligned section end append_pages. 2024-03-22 13:32:14 +01:00
4lDO2 baf46a3555 Far more progress 2024-03-22 13:32:13 +01:00
4lDO2 f4d270c7ce Ensure freelist does not contain used pages. 2024-03-22 13:31:24 +01:00
4lDO2 a847e4745c More progress 2024-03-22 13:31:24 +01:00
4lDO2 d2dc3302a7 Remove RefCount::Zero.
Only the allocator is allowed to switch between 0 and 1. Refcounts above
1 are however controlled by the virtual memory system.
2024-03-22 13:31:22 +01:00
4lDO2 3a8821e73b Hopefully fix most UB 2024-03-22 13:28:21 +01:00
4lDO2 08784e7166 More progress 2024-03-22 13:27:50 +01:00
4lDO2 c349e4cd83 Fix allocate_frames_complex 2024-03-22 13:26:03 +01:00