Skip to content

Commit

Permalink
fmt: unify boot page table name
Browse files Browse the repository at this point in the history
  • Loading branch information
yfblock committed Jul 24, 2024
1 parent bcd89f7 commit f7ff51b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn rust_tmp_main(hart_id: usize, device_tree: usize) {
shutdown();
}

pub fn kernel_page_table() -> PageTable {
pub fn boot_page_table() -> PageTable {
PageTable(crate::addr::PhysAddr(TTBR0_EL1.get_baddr() as _))
}

Expand Down
3 changes: 1 addition & 2 deletions src/loongarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub use context::TrapFrame;
#[cfg(feature = "kcontext")]
pub use kcontext::{context_switch, context_switch_pt, read_current_tp, KContext};
use loongArch64::register::euen;
pub use page_table::kernel_page_table;
pub use page_table::boot_page_table;
pub use trap::{disable_irq, enable_external_irq, enable_irq, run_user_task};

pub fn rust_tmp_main(hart_id: usize) {
Expand Down Expand Up @@ -51,7 +51,6 @@ pub fn rust_tmp_main(hart_id: usize) {
}

pub fn shutdown() -> ! {
error!("shutdown!");
loop {
unsafe { loongArch64::asm::idle() };
}
Expand Down
2 changes: 1 addition & 1 deletion src/loongarch64/page_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl TLB {
}
}

pub fn kernel_page_table() -> PageTable {
pub fn boot_page_table() -> PageTable {
// FIXME: This should return a valid page table.
// ref solution: create a blank page table in boot stage.
PageTable(PhysAddr(0))
Expand Down

0 comments on commit f7ff51b

Please sign in to comment.