Skip to content

Commit

Permalink
Page mapping benchmarks: Add RISC-V support
Browse files Browse the repository at this point in the history
This commit enables page-mapping benchmarks for RISC-V. No changes were
needed due to the changes to AARCH64 page table structures, which made
each level of the page table a generic PageTable object (which was
already the case in RISC-V).

Signed-off-by: Alwin Joshy <[email protected]>
  • Loading branch information
alwin-joshy committed Sep 10, 2024
1 parent 2317521 commit 965d1cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/page_mapping/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ config_option(
DEFAULT
ON
DEPENDS
"DefaultBenchDeps; KernelSel4ArchAarch64 OR KernelArchX86"
"DefaultBenchDeps; KernelSel4ArchAarch64 OR KernelArchX86 OR KernelArchRiscV"
)
add_config_library(sel4benchpagemapping "${configure_string}")

Expand Down
4 changes: 2 additions & 2 deletions apps/page_mapping/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static void inline prepare_page_table(seL4_Word addr, int npage, seL4_CPtr untyp
seL4_ARCH_Default_VMAttributes);
}
assert(err == 0);
#elif defined(CONFIG_ARCH_AARCH64)
#elif defined(CONFIG_ARCH_AARCH64) || defined(CONFIG_ARCH_RISCV)
while (err != seL4_DeleteFirst) {
pt = *free_slot;
err = untyped_retype_root(untyped, seL4_ARCH_PageTableObject,
Expand Down Expand Up @@ -219,7 +219,7 @@ bench_proc(int argc UNUSED, char *argv[])
ZF_LOGF_IFERR(err, "ummap page table failed\n");
}
}
#elif defined(CONFIG_ARCH_AARCH64) || defined(CONFIG_ARCH_IA32)
#elif defined(CONFIG_ARCH_AARCH64) || defined(CONFIG_ARCH_IA32) || defined(CONFIG_ARCH_RISCV)
seL4_ARCH_PageTable_Unmap(i);
ZF_LOGF_IFERR(err, "ummap page table failed\n");
#endif
Expand Down

0 comments on commit 965d1cc

Please sign in to comment.