Update submodules
This commit is contained in:
parent
324dbd52e4
commit
85f8500cea
|
@ -25,6 +25,16 @@ pub const MEMORY_AREA_RESERVED: u32 = 2;
|
|||
/// Memory is used by ACPI, and can be reclaimed
|
||||
pub const MEMORY_AREA_ACPI: u32 = 3;
|
||||
|
||||
/// A memory map area
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
#[repr(packed)]
|
||||
pub struct MemoryArea {
|
||||
pub base_addr: u64,
|
||||
pub length: u64,
|
||||
pub _type: u32,
|
||||
pub acpi: u32
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct MemoryAreaIter {
|
||||
_type: u32,
|
||||
|
@ -62,6 +72,9 @@ pub unsafe fn init(kernel_start: usize, kernel_end: usize) {
|
|||
// Copy memory map from bootloader location
|
||||
for (i, mut entry) in MEMORY_MAP.iter_mut().enumerate() {
|
||||
*entry = *(0x500 as *const MemoryArea).offset(i as isize);
|
||||
if entry._type != MEMORY_AREA_NULL {
|
||||
println!("{:?}", entry);
|
||||
}
|
||||
}
|
||||
|
||||
*ALLOCATOR.lock() = Some(AreaFrameAllocator::new(kernel_start, kernel_end, MemoryAreaIter::new(MEMORY_AREA_FREE)));
|
||||
|
@ -95,16 +108,6 @@ pub fn deallocate_frames(frame: Frame, count: usize) {
|
|||
}
|
||||
}
|
||||
|
||||
/// A memory map area
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
#[repr(packed)]
|
||||
pub struct MemoryArea {
|
||||
pub base_addr: u64,
|
||||
pub length: u64,
|
||||
pub _type: u32,
|
||||
pub acpi: u32
|
||||
}
|
||||
|
||||
/// A frame, allocated by the frame allocator.
|
||||
/// Do not add more derives, or make anything `pub`!
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
|
|
2
libstd
2
libstd
|
@ -1 +1 @@
|
|||
Subproject commit b42d1d72320a5f75e547d1dbfc8b9cf9fa124056
|
||||
Subproject commit 143f2661eb12c7ee68b7e2ca69df6ac1377ae861
|
|
@ -1 +1 @@
|
|||
Subproject commit a6e4162839279e639057b616ac79d34421f85754
|
||||
Subproject commit ac4e49f5e012476d75ea1e96283b4e32e57b374e
|
|
@ -1 +1 @@
|
|||
Subproject commit 0014090747a3007e4ffc8fd3c7da018d0409ae3f
|
||||
Subproject commit 5c578a59b32e298ec68218270fba0f48d9d37979
|
|
@ -1 +1 @@
|
|||
Subproject commit fb96856201b20979ec3cb508d7d152a8e9889c51
|
||||
Subproject commit 5b3b4165516f837818962198bd453085f3c43a10
|
|
@ -1 +1 @@
|
|||
Subproject commit 92eb75026fc1f6236d2c610115a02998cb5bf215
|
||||
Subproject commit 1b36c22c40a3ed9cc8b613b97a52ea97b38c8097
|
|
@ -1 +1 @@
|
|||
Subproject commit ad314add6a51dc16ca63b596b0ae7da3b6bf29b5
|
||||
Subproject commit 5ae17129d3124b990b38391c60b1b4ad150b3112
|
2
rust
2
rust
|
@ -1 +1 @@
|
|||
Subproject commit 123d08b3d3901d5725af8303c1329b007089cde5
|
||||
Subproject commit 07436946b6ee6345509b73c6e4dafb38b6a243f1
|
|
@ -1 +1 @@
|
|||
Subproject commit a5b6dcc0c009e0786b2957baf1bb955eb65e50af
|
||||
Subproject commit 3a58139e5762b18fd3af399f8276ec44e7ab0978
|
Loading…
Reference in a new issue