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

Function alloc_mk_args

loader/src/alloc_mk_args.c:42–52  ·  view source on GitHub ↗

* <!-- description --> * @brief Allocates a chunk of memory for the arguments that will be * passed to the microkernel's _start function * * <!-- inputs/outputs --> * @param pmut_args the mk_args_t to store the mk _start args * @return LOADER_SUCCESS on success, LOADER_FAILURE on failure. */

Source from the content-addressed store, hash-verified

40 * @return LOADER_SUCCESS on success, LOADER_FAILURE on failure.
41 */
42NODISCARD int64_t
43alloc_mk_args(struct mk_args_t **const pmut_args) NOEXCEPT
44{
45 *pmut_args = (struct mk_args_t *)platform_alloc(HYPERVISOR_PAGE_SIZE);
46 if (NULLPTR == *pmut_args) {
47 bferror("platform_alloc failed");
48 return LOADER_FAILURE;
49 }
50
51 return LOADER_SUCCESS;
52}

Callers 1

start_vmm_per_cpuFunction · 0.85

Calls 2

platform_allocFunction · 0.50
bferrorFunction · 0.50

Tested by

no test coverage detected