mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-21 23:56:18 +04:00
aarch64: speed up page table map/unmap
1. update crate aarch64, call tlb_invalidate() instead of tlb_invalidate_all() in MapperFlush::flush(). 2. reduce user stack size to 1MiB.
This commit is contained in:
parent
52251b2adb
commit
97539dd760
8
bootloader/Cargo.lock
generated
8
bootloader/Cargo.lock
generated
@ -2,8 +2,8 @@
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "aarch64"
|
||||
version = "2.6.0"
|
||||
source = "git+https://github.com/rcore-os/aarch64#72d8ac8fdf6e41c453cda8f9fd144ae2798b579c"
|
||||
version = "2.6.1"
|
||||
source = "git+https://github.com/rcore-os/aarch64#65d1453f11f3cc113247352dffa02d8dcdd34769"
|
||||
dependencies = [
|
||||
"bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -104,7 +104,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
name = "rcore-bootloader"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aarch64 2.6.0 (git+https://github.com/rcore-os/aarch64)",
|
||||
"aarch64 2.6.1 (git+https://github.com/rcore-os/aarch64)",
|
||||
"bcm2837 1.0.0 (git+https://github.com/rcore-os/bcm2837)",
|
||||
"cc 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fixedvec 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -211,7 +211,7 @@ version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum aarch64 2.6.0 (git+https://github.com/rcore-os/aarch64)" = "<none>"
|
||||
"checksum aarch64 2.6.1 (git+https://github.com/rcore-os/aarch64)" = "<none>"
|
||||
"checksum bcm2837 1.0.0 (git+https://github.com/rcore-os/bcm2837)" = "<none>"
|
||||
"checksum bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed8765909f9009617974ab6b7d332625b320b33c326b1e9321382ef1999b5d56"
|
||||
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
|
||||
|
@ -9,7 +9,7 @@ xmas-elf = "0.6.2"
|
||||
fixedvec = "0.2.3"
|
||||
|
||||
[target.'cfg(target_arch = "aarch64")'.dependencies]
|
||||
aarch64 = { git = "https://github.com/rcore-os/aarch64", version = "2.6.0" }
|
||||
aarch64 = { git = "https://github.com/rcore-os/aarch64", version = "2.6.1" }
|
||||
bcm2837 = { git = "https://github.com/rcore-os/bcm2837", version = "1.0.0" }
|
||||
|
||||
[build-dependencies]
|
||||
|
10
kernel/Cargo.lock
generated
10
kernel/Cargo.lock
generated
@ -2,8 +2,8 @@
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "aarch64"
|
||||
version = "2.6.0"
|
||||
source = "git+https://github.com/rcore-os/aarch64#72d8ac8fdf6e41c453cda8f9fd144ae2798b579c"
|
||||
version = "2.6.1"
|
||||
source = "git+https://github.com/rcore-os/aarch64#65d1453f11f3cc113247352dffa02d8dcdd34769"
|
||||
dependencies = [
|
||||
"bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -44,7 +44,7 @@ name = "bcm2837"
|
||||
version = "1.0.0"
|
||||
source = "git+https://github.com/rcore-os/bcm2837#b29a8db5504b7eaa6f8adf2c3ff916d1ffd15194"
|
||||
dependencies = [
|
||||
"aarch64 2.6.0 (git+https://github.com/rcore-os/aarch64)",
|
||||
"aarch64 2.6.1 (git+https://github.com/rcore-os/aarch64)",
|
||||
"volatile 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -353,7 +353,7 @@ dependencies = [
|
||||
name = "rcore"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"aarch64 2.6.0 (git+https://github.com/rcore-os/aarch64)",
|
||||
"aarch64 2.6.1 (git+https://github.com/rcore-os/aarch64)",
|
||||
"apic 0.1.0 (git+https://github.com/rcore-os/apic-rs)",
|
||||
"bcm2837 1.0.0 (git+https://github.com/rcore-os/bcm2837)",
|
||||
"bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -659,7 +659,7 @@ version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[metadata]
|
||||
"checksum aarch64 2.6.0 (git+https://github.com/rcore-os/aarch64)" = "<none>"
|
||||
"checksum aarch64 2.6.1 (git+https://github.com/rcore-os/aarch64)" = "<none>"
|
||||
"checksum apic 0.1.0 (git+https://github.com/rcore-os/apic-rs)" = "<none>"
|
||||
"checksum array-init 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "23589ecb866b460d3a0f1278834750268c607e8e28a1b982c907219f3178cd72"
|
||||
"checksum bare-metal 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a3caf393d93b2d453e80638d0674597020cef3382ada454faacd43d1a55a735a"
|
||||
|
@ -79,7 +79,7 @@ pc-keyboard = "0.5"
|
||||
riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] }
|
||||
|
||||
[target.'cfg(target_arch = "aarch64")'.dependencies]
|
||||
aarch64 = { git = "https://github.com/rcore-os/aarch64", version = "2.6.0" }
|
||||
aarch64 = { git = "https://github.com/rcore-os/aarch64", version = "2.6.1" }
|
||||
bcm2837 = { git = "https://github.com/rcore-os/bcm2837", version = "1.0.0", optional = true }
|
||||
|
||||
[target.'cfg(target_arch = "mips")'.dependencies]
|
||||
|
@ -4,4 +4,4 @@ pub const PHYSICAL_MEMORY_OFFSET: usize = KERNEL_OFFSET - MEMORY_OFFSET;
|
||||
pub const KERNEL_HEAP_SIZE: usize = 8 * 1024 * 1024;
|
||||
|
||||
pub const USER_STACK_OFFSET: usize = 0x0000_8000_0000_0000 - USER_STACK_SIZE;
|
||||
pub const USER_STACK_SIZE: usize = 8 * 1024 * 1024;
|
||||
pub const USER_STACK_SIZE: usize = 1 * 1024 * 1024;
|
||||
|
@ -86,8 +86,7 @@ pub enum MMIOType {
|
||||
|
||||
impl Entry for PageEntry {
|
||||
fn update(&mut self) {
|
||||
let addr = VirtAddr::new_unchecked((self as *const _ as u64) << 9);
|
||||
tlb_invalidate(addr);
|
||||
tlb_invalidate(self.1.start_address());
|
||||
}
|
||||
|
||||
fn present(&self) -> bool {
|
||||
|
Loading…
Reference in New Issue
Block a user