Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
f8d1b2d
fixed find_available_page function
sagi21805 Dec 24, 2025
768ed98
renamed and added doc
sagi21805 Dec 24, 2025
bef5611
added a function to get the index in the table of an entry
sagi21805 Dec 24, 2025
16dec01
dump commit of working command sending
sagi21805 Dec 26, 2025
caa31a8
commited changes before rebase
sagi21805 Dec 30, 2025
94905e1
started writing buddy allocator
sagi21805 Dec 30, 2025
ebb3c7e
added some buddy allocator data
sagi21805 Jan 1, 2026
93abeb6
implement initialization for page map
sagi21805 Jan 1, 2026
dbc2b61
implemented deref and derefmut
sagi21805 Jan 1, 2026
6137774
added simple init to the buddy allocator
sagi21805 Jan 3, 2026
ee9d9d9
added multiple util functions for the page allocator
sagi21805 Jan 3, 2026
3cdd0ac
renamed
sagi21805 Jan 3, 2026
5725b3d
added a file for the buddy order enum
sagi21805 Jan 3, 2026
ac8aafd
finished untested implementation of buddy allocator
sagi21805 Jan 4, 2026
648868c
fixed some bugs on buddy allocator, still has some to fix
sagi21805 Jan 5, 2026
95c390e
mapped more memory so the buddy allocator would be happy.
sagi21805 Jan 5, 2026
f35c51d
fixed stupid bugs on the buddy allocation, seems to work now.
sagi21805 Jan 7, 2026
40415ee
slight changes
sagi21805 Jan 8, 2026
1d01045
fixed a bug where the found half of a page would be wrong on a split
sagi21805 Jan 9, 2026
914c174
currently disabled scan because allocator is not implemented on the b…
sagi21805 Jan 9, 2026
4ec0bad
separated buddy allocator to a different file
sagi21805 Jan 9, 2026
8a21efa
used buddy allocator instead of the bitmap allocator
sagi21805 Jan 9, 2026
29a186f
separated late init into a different file
sagi21805 Jan 9, 2026
69cf55f
added some of the slab allocator structures
sagi21805 Jan 10, 2026
143b456
added slab structs
sagi21805 Jan 11, 2026
5c73aa5
added an alloc function and used nonmax crate
sagi21805 Jan 11, 2026
ecf0701
added default trait implementation
sagi21805 Jan 12, 2026
8963857
derived copy and clone for unassigned
sagi21805 Jan 12, 2026
c717c9a
added utility function and moved references into nonnull pointers
sagi21805 Jan 12, 2026
9af1cc8
added a macro to generate slabs, slab array, and position trait.
sagi21805 Jan 13, 2026
d7b295e
remove slab caches union as it is not needed, and added assign and un…
sagi21805 Jan 13, 2026
fd8775f
Changed T to implement SlabPosition
sagi21805 Jan 14, 2026
8c2a249
more progress!
sagi21805 Jan 14, 2026
c69a8bb
split slab allocation into files for organization and fixed paths tha…
sagi21805 Jan 14, 2026
28ce7b8
added generic slab types
sagi21805 Jan 14, 2026
f5417a0
added alloc function
sagi21805 Jan 14, 2026
192f31a
fixed message on debug print
sagi21805 Jan 14, 2026
f628485
added implementation of the init function for all the slabs the are c…
sagi21805 Jan 14, 2026
f172370
changed function name into alloc, and now returns the address without…
sagi21805 Jan 15, 2026
31961c2
removed regular allocator and switched to using nonnull
sagi21805 Jan 17, 2026
7fd37f6
fixed a bug where prev was not treated on next and prev
sagi21805 Jan 17, 2026
19d4f8b
initial draft for fixed initialization of the buddy allocator to igno…
sagi21805 Jan 17, 2026
724c2e7
tests and fixes
sagi21805 Jan 19, 2026
399066f
added some function templates that should be implemented.
sagi21805 Jan 20, 2026
8088b9a
added a macro to generate generic struct and implement the generic tr…
sagi21805 Jan 21, 2026
4adc63a
added macro implementation of the generic structs and traits via macro
sagi21805 Jan 21, 2026
3224d64
changed implementation of the allocator trait to the slab allocator s…
sagi21805 Jan 21, 2026
50336de
added a note on dealloc function
sagi21805 Jan 21, 2026
301171e
changed constant address into the one saved in the static because it …
sagi21805 Jan 22, 2026
7e95dda
moved page map and page meta to their own modules
sagi21805 Jan 23, 2026
cf4dc4f
added assign and unassign traits for slabs
sagi21805 Jan 23, 2026
7781894
changed to full specialization
sagi21805 Jan 24, 2026
637858e
moved functions from page into buddy
sagi21805 Jan 24, 2026
26fffca
added traits
sagi21805 Jan 24, 2026
77589ce
added page flags to slab
sagi21805 Jan 24, 2026
0929350
changed to div ceil
sagi21805 Jan 24, 2026
9b7ad7d
added initi function to here
sagi21805 Jan 24, 2026
c8c44a9
made meta fields public
sagi21805 Jan 24, 2026
c33f194
made allocator virtual address
sagi21805 Jan 24, 2026
1bb6bb4
removed legacy mapping
sagi21805 Jan 24, 2026
d5a4ff8
changed the set flags function to accept page size and number of page…
sagi21805 Jan 25, 2026
ac83bd8
derived copy
sagi21805 Jan 25, 2026
6fcbd7e
used net set flags definition
sagi21805 Jan 25, 2026
9050cfa
added a new slab trait
sagi21805 Jan 28, 2026
fe2358b
added new nightly feature
sagi21805 Jan 28, 2026
ef5fa1f
used new slab trait, and added a grow function
sagi21805 Jan 28, 2026
5afa822
changed name of position into slab_position for clarity
sagi21805 Jan 30, 2026
7e4acba
initialized the page od the initial descriptor in the constructor of …
sagi21805 Jan 30, 2026
305058c
Added some useful functions to translate between virtual address, page
sagi21805 Jan 31, 2026
3d2167c
Change the grow function, and used take_ownership on the initial
sagi21805 Jan 31, 2026
e40432f
improved trait implementation
sagi21805 Jan 31, 2026
5db72a6
added page size field to SlabFlags trait
sagi21805 Jan 31, 2026
b945393
used new functionality
sagi21805 Jan 31, 2026
755d0c0
replaced unassigned with ()
sagi21805 Feb 1, 2026
c55ccee
started implementing a walk function for virtual address
sagi21805 Feb 2, 2026
85ef13c
addde translate and walk function
sagi21805 Feb 2, 2026
7027ade
started changing &'static mut into NonNull
sagi21805 Feb 2, 2026
f8031ab
Changed necessary fields to non_null and the fields that are actually…
sagi21805 Feb 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"fbss",
"FDDI",
"firewire",
"freelist",
"FXSR",
"Gameport",
"GPIB",
Expand All @@ -69,6 +70,7 @@
"Hotplug",
"hpcp",
"HPET",
"ilog",
"infe",
"infs",
"inval",
Expand All @@ -78,20 +80,24 @@
"ipms",
"IRDA",
"ISDN",
"kfree",
"kmalloc",
"lctrl",
"Learnix",
"lgdt",
"ljmp",
"lshift",
"mdat",
"metavar",
"mmap",
"MOVBE",
"mpsp",
"mpss",
"mrsm",
"MTRR",
"Multiport",
"nomem",
"nonmax",
"nostack",
"notif",
"NVME",
Expand All @@ -106,6 +112,7 @@
"PCLMUL",
"PDCM",
"PDPT",
"peekable",
"PICMG",
"PICPI",
"PIIX",
Expand Down Expand Up @@ -157,8 +164,10 @@
"tfee",
"tfes",
"thiserror",
"udma",
"ufis",
"UHCI",
"Unassignment",
"Uninit",
"USBPI",
"virt",
Expand All @@ -171,7 +180,7 @@
],
"rust-analyzer.inlayHints.chainingHints.enable": true,
"rust-analyzer.check.command": "clippy",
"rust-analyzer.cargo.extraArgs": [
"rust-analyzer.check.extraArgs": [
"--release"
],
"rust-analyzer.cargo.extraEnv": {
Expand Down
2 changes: 1 addition & 1 deletion build/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn main() -> io::Result<()> {
"targets/32bit_target.json",
"release",
);
build_stage("../kernel", "targets/64bit_target.json", &profile);
build_stage("../kernel", "targets/64bit_target.json", "release");

// Combine binaries into one image
let input_dir = PathBuf::from("bin");
Expand Down
2 changes: 1 addition & 1 deletion build/runner/runner.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
qemu-system-x86_64 ^
-M q35 ^
-drive id=disk0,file=build/image.bin,if=none,format=raw ^
-device ide-hd,drive=disk0,bus=ide.0 ^
-device ide-hd,drive=disk0,bus=ide.0,rotation_rate=1 ^
-monitor stdio
7 changes: 6 additions & 1 deletion build/targets/64bit_target.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
"position-independent-executables": true,
"relro-level": "off",
"stack-probes": {
"kind": "call"
"kind": "inline-or-call",
"min-llvm-version-for-inline": [
16,
0,
0
]
},
"static-position-independent-executables": true,
"target-pointer-width": 64,
Expand Down
1 change: 1 addition & 0 deletions kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ extend = "1.2.0"
learnix-macros = { path = "../learnix-macros" }
strum_macros = { version = "0.27", default-features = false }
strum = { version = "0.27", default-features = false }
nonmax = { version = "0.5.5", default-features = false }
Loading