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
4lDO2
79381249a2
Implement a TLB shootdown draft.
2024-03-04 19:03:00 +01:00
Jeremy Soller
45f1c4e29e
Add rustfmt from relibc and apply it with cargo fmt
2024-01-17 13:52:01 -07:00
4lDO2
ee3aafa1d9
Remove PhysBorrowed hacks.
2023-12-15 15:14:40 +01:00
4lDO2
875a130843
Remove SYS_PHYSALLOC* and SYS_PHYSFREE.
2023-12-15 15:14:40 +01:00
bjorn3
2d065083df
Use HashMap instead of BTreeMap where possible
...
This shrinks the kernel from 905840 bytes to 862408 bytes.
2023-12-13 19:55:20 +01:00
bjorn3
2aea52a94b
Remove the sole usage of the const_option feature
2023-12-12 20:21:31 +00:00
bjorn3
82a87be7d5
Avoid usage of the unstable Allocator trait
...
And also optimize init_sections to use the fact that allocate_frames
returns zeroed frames.
2023-12-12 20:21:31 +00:00
bjorn3
017702d3d2
Remove a lot of dead code
2023-12-12 15:01:29 +00:00
4lDO2
0c90802ae0
Fix RaiiFrame deallocation.
2023-08-08 11:57:57 +02:00
4lDO2
4688090dea
Fix RaiiFrame typo.
2023-08-03 16:46:42 +02:00
4lDO2
fe88b23d09
Use a single cow zeroed page for RO maps + eager mapping.
2023-08-01 13:11:00 +02:00
4lDO2
1e670645e4
Bypass kernel heap for storing PageInfo.
...
Since these are stored in arrays that are typically 512 KiB each
(i.e. which in turn typically store metadata for 128 MiB), they will
certainly be a page-size multiple, and large contiguous allocations are
allowed at least at boot time. Not only is the linked-list allocator
less efficient for that, but this change will also help reduce TLB
overhead.
2023-08-01 11:22:42 +02:00
4lDO2
8a8c04685e
Merge adjacent frame sections.
2023-08-01 10:55:01 +02:00
4lDO2
f454df38eb
Fix get_page_info.
2023-07-28 10:47:18 +02:00
4lDO2
8b7fc8a468
Compile and mostly run properly on i686.
2023-07-27 16:45:36 +02:00
4lDO2
25d26b3b93
Arch-independent x86-modeled page fault handler.
2023-07-27 15:56:45 +02:00
4lDO2
37579601b2
Remove one level of indirection in get_page_info.
2023-07-25 10:52:24 +02:00
4lDO2
e2b736140f
Make PageInfo atomic once again.
2023-07-25 10:52:24 +02:00
4lDO2
d58ddc35fe
Complete PageInfo cleanup.
...
This enables proper CoW ^ shared enforcement, so that e.g. acquiring a
new CoW page from already shared memory, or vice versa, will enforce
that they aren't both simultaneously.
2023-07-25 10:52:23 +02:00
4lDO2
0f1b5b9b6f
WIP: Make cow/shared refcounts mutually exclusive.
2023-07-25 10:52:23 +02:00
4lDO2
02f04752e8
Use proper locks for PageInfo.
2023-07-25 10:52:23 +02:00
4lDO2
f0341280f7
Fix frame deallocation.
2023-07-25 10:52:23 +02:00
4lDO2
e34a3cee42
Fix mmap/munmap, invert borrowed/owned refcount.
2023-07-25 10:52:19 +02:00
4lDO2
45ec3ecc70
Track Allocated and CoW External the same way.
2023-07-25 10:52:19 +02:00
4lDO2
a599d9b389
WIP: Store PageInfo in separate data structure.
2023-07-25 10:52:19 +02:00
4lDO2
760fc2ba5a
WIP: Global page info structs.
2023-07-25 10:52:19 +02:00
4lDO2
0a5b6ce656
Reach proc:memory access in userspace.
2023-07-25 10:52:19 +02:00
4lDO2
8cfbc39b9f
Get further in userspace.
2023-07-25 10:52:18 +02:00
Jeremy Soller
8e0f54cb31
Clippy fixes
2022-11-11 13:19:14 -07:00
4lDO2
e60321d4a0
Partial: migrate remaining parts to RMM.
2022-07-27 10:52:23 +02:00
4lDO2
351d77ad9b
Improve floating point handling.
2022-07-27 10:52:22 +02:00
Jeremy Soller
933b3b8fc0
Respect min flag to allocate_frames_complex
2022-02-14 10:29:12 -07:00
4lDO2
d6e1797620
Make Mapper::map fallible.
2021-08-11 17:46:40 +02:00
Jeremy Soller
334584b3d5
Use rmm::PhysicalAddress and rmm::VirtualAddress directly
2021-01-09 21:16:11 -07:00
Jeremy Soller
f5ac405db6
Support for RMM
2020-11-27 16:49:39 +00:00
Jeremy Soller
1baeb5a891
Format memory entries using hex
2020-08-27 09:43:39 -06:00
Wren Turkal
5301057324
Convert some println -> log::info!.
...
Signed-off-by: Wren Turkal <wt@penguintechs.org >
2020-08-08 21:18:18 -07:00
4lDO2
003bd6a0d2
More complex physalloc
2020-06-16 21:20:00 +00:00
Jeremy Soller
63e2a835e0
Fix clippy.sh script and fix a number of clippy warnings
2019-10-06 11:04:06 -06:00
jD91mZM2
fe705d9b63
Switch to 2018 edition
...
Most of this was generated by the absolutely extraordinary `cargo fix`
subcommand. There were still 2 errors and a few warnings to patch up,
but compared to the normal 600+ errors, I'd say the fixer did a damn
good job! I'm also amazed that I could still start the VM after this,
I half expected some kinds of runtime failure...
2019-06-21 12:12:01 +02:00
Jeremy Soller
5b31bf57be
Update to latest rust
2018-11-08 17:25:57 -07:00
Jeremy Soller
761fe30bf3
Add linked list allocator with automatic resizing
...
Fix memory leaks in exec
Remove warnings
2018-01-29 21:29:24 -07:00
Robert Węcławski
3e06a37215
Use slab allocator for kernel heap
2018-01-17 23:31:27 +01:00
Tibor Nagy
e6b9f850d1
Migrate from collections
2017-10-28 02:42:08 +02:00
Jeremy Soller
a5f3e5057b
Remove warnings
...
Improve error information
Cleanup interrupt macros
2017-09-13 21:32:08 -06:00
bjorn3
2dcd563709
Merge branch 'master' into fix_warnings
2017-06-26 14:22:17 +02:00