MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / map_mk_code_aliases

Function map_mk_code_aliases

loader/tests/src/map_mk_code_aliases.c:45–66  ·  view source on GitHub ↗

* <!-- description --> * @brief This function maps the code aliases into the microkernel's * root page tables. For more information about how this mapping is * performed, please see alloc_and_copy_mk_code_aliases. * * <!-- inputs/outputs --> * @param a a pointer to a code_aliases_t that stores the aliases * being mapped * @param pmut_rpt the root page table to map the cod

Source from the content-addressed store, hash-verified

43 * @return LOADER_SUCCESS on success, LOADER_FAILURE on failure.
44 */
45NODISCARD int64_t
46map_mk_code_aliases(
47 struct code_aliases_t const *const a, root_page_table_t *const pmut_rpt) NOEXCEPT
48{
49 (void)a;
50 (void)pmut_rpt;
51
52 if (g_mut_map_4k_page > 0) {
53 --g_mut_map_4k_page;
54
55 if (0 == g_mut_map_4k_page) {
56 return LOADER_FAILURE;
57 }
58
59 bf_touch();
60 }
61 else {
62 bf_touch();
63 }
64
65 return LOADER_SUCCESS;
66}

Callers

nothing calls this directly

Calls 1

bf_touchFunction · 0.85

Tested by

no test coverage detected