aboutsummaryrefslogtreecommitdiff
path: root/Cargo.toml
Commit message (Collapse)AuthorAge
* mm: use linked-list-allocator as kmallocTianhao Wang2024-06-11
| | | | | | | | | | | | | | | | | | | | | | | | I'll implement my own allocator later. Currently using linked-list allocator [1] to manage the kernel heap (as in kmalloc, not vmalloc). It manages the ID-mapped region (from VA 0xffff_8000_0000_0000). This allocator is initialized to use the _largest_ physical memory block. If the kernel image (text and data) live in this zone then skip the occupied part. Key difference between kmalloc and vmalloc: - kmalloc pretty much manages the physical memory: the allocated address are within the id-mapped region (see above) therefore the allocated memory must also be contigous in physical memory. Such memory MUST NOT page fault. This is prone to fragmentation, so do not use kmalloc to allocate big objects (e.g. bigger than one 4k page). - vmalloc manages kernel heap memory and the mapping is managed by paging. Such memory could trigger pagefault in kernel mode. Note that the kmalloc conflicts with the previous used stack based PMA as they operates on the same VM zone. References: [1] https://github.com/rust-osdev/linked-list-allocator Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
* toolchain: replace xbuild with build-stdTianhao Wang2024-06-11
| | | | | | | | | | | for a no_std build with custom target, we need to build the rust compoments including core, alloc and compiler builtins. Previously we do this with the cargo xbuild tool. however it has some bugs with newer toolchains. The official build-std feature is not stable but looks promising! Also we could reduce a lot of build dependencies. References: https://github.com/rust-in-action/code/issues/14 Signed-off-by: Tianhao Wang <shrik3@mailbox.org>
* chore: remove unused depsTianhao Wang2024-06-11
|
* license: use EUPLTianhao Wang2024-06-11
|
* choreTianhao Wang2024-06-11
|
* paging: add basic bitmap frame allocatorTianhao Wang2024-06-11
|
* include bit-vecTianhao Wang2024-06-11
|
* PS/2 Keyboard controller: baselineTianhao Wang2024-06-11
|
* keyctl: use bitflags for key modifiersTianhao Wang2024-06-11
| | | | Merge key modifier getters and setters
* add println! and panic! macroTianhao Wang2024-02-01
| | | | | The rust lazy_static requires interior mutability. I have to include a Mutex impl (spin::Mutex). But I'd like to implement my own primitives.
* fix linkingTianhao Wang2023-03-11
|
* a minimal working demo on bare metalTianhao Wang2023-03-10
|
* init repoTianhao Wang2023-03-10