diff --git a/arch/x86_64/src/memory/mod.rs b/arch/x86_64/src/memory/mod.rs index f7f5048..bffe9ab 100644 --- a/arch/x86_64/src/memory/mod.rs +++ b/arch/x86_64/src/memory/mod.rs @@ -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)] diff --git a/libstd b/libstd index b42d1d7..143f266 160000 --- a/libstd +++ b/libstd @@ -1 +1 @@ -Subproject commit b42d1d72320a5f75e547d1dbfc8b9cf9fa124056 +Subproject commit 143f2661eb12c7ee68b7e2ca69df6ac1377ae861 diff --git a/programs/coreutils b/programs/coreutils index a6e4162..ac4e49f 160000 --- a/programs/coreutils +++ b/programs/coreutils @@ -1 +1 @@ -Subproject commit a6e4162839279e639057b616ac79d34421f85754 +Subproject commit ac4e49f5e012476d75ea1e96283b4e32e57b374e diff --git a/programs/extrautils b/programs/extrautils index 0014090..5c578a5 160000 --- a/programs/extrautils +++ b/programs/extrautils @@ -1 +1 @@ -Subproject commit 0014090747a3007e4ffc8fd3c7da018d0409ae3f +Subproject commit 5c578a59b32e298ec68218270fba0f48d9d37979 diff --git a/programs/orbutils b/programs/orbutils index fb96856..5b3b416 160000 --- a/programs/orbutils +++ b/programs/orbutils @@ -1 +1 @@ -Subproject commit fb96856201b20979ec3cb508d7d152a8e9889c51 +Subproject commit 5b3b4165516f837818962198bd453085f3c43a10 diff --git a/programs/smith b/programs/smith index 92eb750..1b36c22 160000 --- a/programs/smith +++ b/programs/smith @@ -1 +1 @@ -Subproject commit 92eb75026fc1f6236d2c610115a02998cb5bf215 +Subproject commit 1b36c22c40a3ed9cc8b613b97a52ea97b38c8097 diff --git a/programs/userutils b/programs/userutils index ad314ad..5ae1712 160000 --- a/programs/userutils +++ b/programs/userutils @@ -1 +1 @@ -Subproject commit ad314add6a51dc16ca63b596b0ae7da3b6bf29b5 +Subproject commit 5ae17129d3124b990b38391c60b1b4ad150b3112 diff --git a/rust b/rust index 123d08b..0743694 160000 --- a/rust +++ b/rust @@ -1 +1 @@ -Subproject commit 123d08b3d3901d5725af8303c1329b007089cde5 +Subproject commit 07436946b6ee6345509b73c6e4dafb38b6a243f1 diff --git a/schemes/redoxfs b/schemes/redoxfs index a5b6dcc..3a58139 160000 --- a/schemes/redoxfs +++ b/schemes/redoxfs @@ -1 +1 @@ -Subproject commit a5b6dcc0c009e0786b2957baf1bb955eb65e50af +Subproject commit 3a58139e5762b18fd3af399f8276ec44e7ab0978