[wip] mark some unused vars
This commit is contained in:
parent
aac393381d
commit
a2ea1f59a6
|
@ -13,7 +13,7 @@ pub struct AreaFrameAllocator {
|
||||||
|
|
||||||
impl FrameAllocator for AreaFrameAllocator {
|
impl FrameAllocator for AreaFrameAllocator {
|
||||||
fn allocate_frame(&mut self) -> Option<Frame> {
|
fn allocate_frame(&mut self) -> Option<Frame> {
|
||||||
if let Some(area) = self.current_area {
|
if let Some(_area) = self.current_area {
|
||||||
// "Clone" the frame to return it if it's free. Frame doesn't
|
// "Clone" the frame to return it if it's free. Frame doesn't
|
||||||
// implement Clone, but we can construct an identical frame.
|
// implement Clone, but we can construct an identical frame.
|
||||||
let frame = Frame {
|
let frame = Frame {
|
||||||
|
|
|
@ -149,9 +149,9 @@ impl ActivePageTable {
|
||||||
A: FrameAllocator,
|
A: FrameAllocator,
|
||||||
{
|
{
|
||||||
let l0 = self.l0_mut();
|
let l0 = self.l0_mut();
|
||||||
let mut l1 = l0.next_table_create(page.l0_index(), allocator);
|
let l1 = l0.next_table_create(page.l0_index(), allocator);
|
||||||
let mut l2 = l1.next_table_create(page.l1_index(), allocator);
|
let l2 = l1.next_table_create(page.l1_index(), allocator);
|
||||||
let mut l3 = l2.next_table_create(page.l2_index(), allocator);
|
let l3 = l2.next_table_create(page.l2_index(), allocator);
|
||||||
|
|
||||||
assert!(l3[page.l3_index()].is_unused());
|
assert!(l3[page.l3_index()].is_unused());
|
||||||
l3[page.l3_index()].set(frame, flags | EntryFlags::VALID);
|
l3[page.l3_index()].set(frame, flags | EntryFlags::VALID);
|
||||||
|
@ -173,7 +173,7 @@ impl ActivePageTable {
|
||||||
self.map_to(page, frame, flags, allocator)
|
self.map_to(page, frame, flags, allocator)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn unmap<A>(&mut self, page: Page, allocator: &mut A)
|
fn unmap<A>(&mut self, page: Page, _allocator: &mut A)
|
||||||
where
|
where
|
||||||
A: FrameAllocator,
|
A: FrameAllocator,
|
||||||
{
|
{
|
||||||
|
@ -187,7 +187,7 @@ impl ActivePageTable {
|
||||||
.and_then(|l1| l1.next_table_mut(page.l1_index()))
|
.and_then(|l1| l1.next_table_mut(page.l1_index()))
|
||||||
.and_then(|l2| l2.next_table_mut(page.l2_index()))
|
.and_then(|l2| l2.next_table_mut(page.l2_index()))
|
||||||
.expect("mapping code does not support huge pages");
|
.expect("mapping code does not support huge pages");
|
||||||
let frame = l3[page.l3_index()].pointed_frame().unwrap();
|
let _frame = l3[page.l3_index()].pointed_frame().unwrap();
|
||||||
l3[page.l3_index()].set_unused();
|
l3[page.l3_index()].set_unused();
|
||||||
// tlb::flush(VirtualAddress(page.start_address()));
|
// tlb::flush(VirtualAddress(page.start_address()));
|
||||||
// TODO free p(1,2,3) table if empty
|
// TODO free p(1,2,3) table if empty
|
||||||
|
|
|
@ -204,7 +204,7 @@ fn setup_paging() {
|
||||||
read_mair(),
|
read_mair(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let bcm2837_mem_map: [MemMapRegion; 2] = [
|
let _bcm2837_mem_map: [MemMapRegion; 2] = [
|
||||||
MemMapRegion {
|
MemMapRegion {
|
||||||
virt: 0x0000_0000,
|
virt: 0x0000_0000,
|
||||||
phys: 0x0000_0000,
|
phys: 0x0000_0000,
|
||||||
|
|
Loading…
Reference in New Issue