Map PIM region to uncacheable region

This commit is contained in:
2024-01-04 19:44:16 +01:00
parent 34c8ab84fb
commit 92499fe95b
9 changed files with 78 additions and 85 deletions

View File

@@ -1,4 +1,4 @@
use crate::boot;
use super::config::PimWriter;
use pim_isa::{BankMode, Kernel, PimConfig};
@@ -19,14 +19,6 @@ impl PimState {
// TODO return token and return to singlebank when dropped
pub fn set_bank_mode(&mut self, bank_mode: BankMode) {
if cfg!(feature = "cacheless") {
match bank_mode {
BankMode::SingleBank => unsafe { boot::set_page_table_cache() },
BankMode::AllBank => (),
BankMode::PimAllBank => unsafe { boot::set_page_table_non_cache() },
}
}
self.writer.write(
serde_json_core::to_string::<PimConfig, 64>(&PimConfig {
kernel: None,