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
4lDO2
4fccc4b87b
Some of userspace now boots!
2024-03-22 13:26:03 +01:00
4lDO2
bb01f0af66
More allocation progress
2024-03-22 13:26:03 +01:00
4lDO2
cfe153eb85
Fix section creation.
2024-03-22 13:25:57 +01:00
4lDO2
fe7244a8cd
Ensure both set_next and set_prev are called.
2024-03-22 13:25:08 +01:00
4lDO2
2ba9ff720c
Doubly-linked list.
2024-03-22 13:25:07 +01:00
4lDO2
0e8c187a50
WIP: Implement more of deallocate_p2frame.
2024-03-22 13:21:52 +01:00
4lDO2
fc19d63af9
Store aligned addrs rather than PFNs in Frame.
2024-03-22 13:19:19 +01:00
4lDO2
fd86bb4860
Try to naturally align sections.
2024-03-22 13:18:07 +01:00
4lDO2
d5b1ad2cd5
WIP: Improve allocation performance
2024-03-22 13:17:59 +01:00
bjorn3
e81113349c
Fix get_page_info for frames in the last memory section
2024-03-13 19:41:24 +01:00