Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions dev_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def main():
if not BUILD_DIR.exists():
BUILD_DIR.mkdir()

tool_rebuild = f"cd {CWD / 'tool/microkit'} && cargo build --release"
tool_rebuild = f"cd {CWD / 'tool/microkit'} && cargo build"
r = system(tool_rebuild)
assert r == 0

Expand All @@ -90,7 +90,7 @@ def main():
make_env["MICROKIT_BOARD"] = args.board
make_env["MICROKIT_CONFIG"] = args.config
make_env["MICROKIT_SDK"] = str(release)
make_env["MICROKIT_TOOL"] = (CWD / "target/release/microkit").absolute()
make_env["MICROKIT_TOOL"] = (CWD / "target/debug/microkit").absolute()
make_env["LLVM"] = str(args.llvm)

# Choose the makefile based on the `--example-from-sdk` command line flag
Expand Down
8 changes: 5 additions & 3 deletions tool/microkit/src/sel4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ pub struct Config {
}

impl Config {
/// Refers to 'seL4_UserTop'
pub fn user_top(&self) -> u64 {
match self.arch {
Arch::Aarch64 => match self.hypervisor {
Expand All @@ -325,16 +326,17 @@ impl Config {
}
}

/// Refers to the 'PPTR_BASE' define in kernel source
pub fn virtual_base(&self) -> u64 {
match self.arch {
Arch::Aarch64 => match self.hypervisor {
true => 0x0000008000000000,
false => u64::pow(2, 64) - u64::pow(2, 39),
false => 0xffffff8000000000,
},
Arch::Riscv64 => match self.riscv_pt_levels.unwrap() {
RiscvVirtualMemory::Sv39 => u64::pow(2, 64) - u64::pow(2, 38),
RiscvVirtualMemory::Sv39 => 0xffffffc000000000,
},
Arch::X86_64 => u64::pow(2, 64) - u64::pow(2, 39),
Arch::X86_64 => 0xffffff8000000000,
}
}

Expand Down
Loading