Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hack: remove specific frame #955

Draft
wants to merge 1 commit into
base: theseus_main
Choose a base branch
from
Draft
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions kernel/frame_allocator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,19 @@ pub fn init<F, R, P>(
}
}

// needed for Acer Aspire 7745G:
// removes the single free chunk at 0x9F7FF000, which allows
// `add_reserved_region` to merge it in
let mut hacky_free_list: [Option<Chunk>; 32] = Default::default();
for (idx, chunk) in free_list.iter().enumerate() {
if let Some(chunky) = chunk {
if chunky.start_address().value() != 0x9F7FF000 {
hacky_free_list[idx] = chunk.clone();
}
}
}
let free_list = hacky_free_list;

*FREE_GENERAL_FRAMES_LIST.lock() = StaticArrayRBTree::new(free_list.clone());
*FREE_RESERVED_FRAMES_LIST.lock() = StaticArrayRBTree::new(reserved_list.clone());
*GENERAL_REGIONS.lock() = StaticArrayRBTree::new(free_list);
Expand Down