4lDO2
9a716604fc
Implement Copy and Clone manually for BuddyEntry.
...
This fixes a warning that may in the future become an error, about the
possibility for unaligned references, since the derive macros apparently
rely on creating references to fields. Unaligned references are direct
UB.
2020-12-20 16:36:52 +01:00
Jeremy Soller
cdbeecfffe
Remove some warnings
2020-09-14 09:47:29 -06:00
Jeremy Soller
936352a049
FrameCount::new function
2020-09-14 09:47:23 -06:00
Jeremy Soller
8e0df608e2
Add allocator usage information
2020-09-14 09:41:56 -06:00
Jeremy Soller
e94d7e7772
Rewrite buddy allocator
2020-09-14 09:41:42 -06:00
Jeremy Soller
a775c9e987
Require Arch to implement Clone and Copy
2020-09-14 09:08:28 -06:00
Jeremy Soller
a12be1b172
Keep track of last free page
2020-09-09 20:19:28 -06:00
Jeremy Soller
f17a1b52bd
Test multi-page allocation
2020-09-09 16:02:59 -06:00
Jeremy Soller
0c44dde349
Implement multi-page allocations in buddy allocator (poorly)
2020-09-09 16:02:44 -06:00
Jeremy Soller
711414223b
Fix buddy map footer read address
2020-09-09 11:11:39 -06:00
Jeremy Soller
fed3110ae8
Better unimplemented messages
2020-09-09 10:55:29 -06:00
Jeremy Soller
811dd09de4
Remove unused function for empty buddy allocator
2020-09-08 20:20:56 -06:00
Jeremy Soller
fb88d1669f
Add unmap function
2020-09-08 19:59:13 -06:00
Jeremy Soller
e6d93d5743
Allow const creation of buddy allocator
2020-09-08 15:51:13 -06:00
Jeremy Soller
5990a04e13
Rename Mapper::active to Mapper:make_current
2020-09-08 15:13:01 -06:00
Jeremy Soller
f97a80fecb
Flush user table changes
2020-09-08 15:11:26 -06:00
Jeremy Soller
e8ea483832
Add page flushing, add support for mapping anonymous pages
2020-09-08 14:56:57 -06:00
Jeremy Soller
6375c175f7
Do not zero tables when not necessary in buddy allocator
2020-09-08 13:52:45 -06:00
Jeremy Soller
db7869d995
Add table function for mapper, to get inner page table
2020-09-08 13:52:22 -06:00
Jeremy Soller
b4c8ab797d
Zero all allocations
2020-09-08 12:41:46 -06:00
Jeremy Soller
8484d4447c
Fix compilation using no_std
2020-09-08 11:16:59 -06:00
Jeremy Soller
1b58d2a956
Add FrameCount struct, improve zeroing page performance
2020-09-08 11:13:49 -06:00
Jeremy Soller
a64e790471
Fix warnings
2020-09-08 10:54:59 -06:00
Jeremy Soller
fcb64422c4
Add FrameAllocator trait, move frame allocator and mapper to library
2020-09-08 10:52:52 -06:00
Jeremy Soller
29945b84b1
no_std building support
2020-09-08 10:24:53 -06:00
Jeremy Soller
d153af8b83
Fix calculation of free areas
2020-09-08 10:24:43 -06:00
Jeremy Soller
62da3afef5
Add clearing of freed pages in BuddyAllocator
2020-09-08 09:35:34 -06:00
Jeremy Soller
52a08e70fd
Add buddy allocation
2020-09-08 09:27:40 -06:00
Jeremy Soller
57d66236b7
WIP buddy allocator free pages using bitmap
2020-09-07 22:02:52 -06:00
Jeremy Soller
4eb4f579df
Set entry when performing allocation
2020-09-07 22:02:24 -06:00
Jeremy Soller
21d7f28fdc
Allocate and clear buddy maps
2020-09-07 21:44:23 -06:00
Jeremy Soller
d752c5c91e
WIP: buddy allocator
2020-09-07 21:05:04 -06:00
Jeremy Soller
011212905d
Add WIP slab allocator
2020-09-07 20:01:40 -06:00
Jeremy Soller
d450cafad6
Add mapping functionality
2020-09-06 21:07:14 -06:00
Jeremy Soller
03d3264085
Add index_of function to PageTable
2020-09-06 21:06:58 -06:00
Jeremy Soller
d9500dc24e
Fix excess size of emulated memory, do not print emulated mapping
2020-09-06 21:06:41 -06:00
Jeremy Soller
2dc0853903
Add constants for sizes
2020-09-06 21:06:12 -06:00
Jeremy Soller
4bf43652c3
Only use offset mapping
2020-09-06 14:38:31 -06:00
Jeremy Soller
d5111d429e
Implement PHYS_OFFSET mapping
2020-09-06 14:30:50 -06:00
Jeremy Soller
a40b26293b
Do not use explicit register fo x86_64 table operations
2020-09-06 14:20:29 -06:00
Jeremy Soller
379294b59f
Implement x86_64 arch functions
2020-09-06 14:18:01 -06:00
Jeremy Soller
f801a40908
Add function for addresses
2020-09-06 14:17:49 -06:00
Jeremy Soller
5fc0a080ad
Update nightly
2020-09-06 14:17:26 -06:00
Jeremy Soller
a482e506c5
Use physical and virtual address abstraction for arch functions
2020-09-06 13:58:40 -06:00
Jeremy Soller
ab07997bbe
Add derives for physical and virtual addresses
2020-09-06 13:55:38 -06:00
Jeremy Soller
8efc425b07
Add phys_to_virt function
2020-09-06 13:54:58 -06:00
Jeremy Soller
023bb5811a
Add definition of physical address size
2020-09-06 13:25:21 -06:00
Jeremy Soller
2df212f48d
Add tests to ensure correct constant calculation
2020-09-06 13:00:01 -06:00
Jeremy Soller
f5e8c031ca
Move constants into Arch trait
2020-09-06 08:30:56 -06:00
Jeremy Soller
8c8e09d23e
Refactor, use trait for arch differences
2020-09-05 21:02:27 -06:00