<!-- description --> @brief Initializes the Global Storage (GS). <!-- inputs/outputs --> @param mut_gs the gs_t to use @param mut_sys the bf_syscall_t to use @param intrinsic the intrinsic_t to use @return Returns bsl::errc_success on success, bsl::errc_failure and friends otherwise
| 48 | /// and friends otherwise |
| 49 | /// |
| 50 | [[nodiscard]] constexpr auto |
| 51 | gs_initialize( |
| 52 | gs_t &mut_gs, syscall::bf_syscall_t &mut_sys, intrinsic_t const &intrinsic) noexcept |
| 53 | -> bsl::errc_type |
| 54 | { |
| 55 | bsl::discard(intrinsic); |
| 56 | |
| 57 | mut_gs.msr_bitmap = |
| 58 | mut_sys.bf_mem_op_alloc_page<lib::basic_page_4k_t>(mut_gs.msr_bitmap_phys); |
| 59 | if (bsl::unlikely(nullptr == mut_gs.msr_bitmap)) { |
| 60 | bsl::print<bsl::V>() << bsl::here(); |
| 61 | return bsl::errc_failure; |
| 62 | } |
| 63 | |
| 64 | return bsl::errc_success; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | #endif |
nothing calls this directly
no outgoing calls
no test coverage detected