* <!-- 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. */
| 40 | * @return LOADER_SUCCESS on success, LOADER_FAILURE on failure. |
| 41 | */ |
| 42 | NODISCARD int64_t |
| 43 | alloc_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 | } |
no test coverage detected