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

Function bootstrap_entry

kernel/integration/bf_debug_op_dump_vp.cpp:107–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 /// @param ppid0 the physical process to bootstrap
106 ///
107 extern "C" void
108 bootstrap_entry(bsl::safe_u16::value_type const ppid0) noexcept
109 {
110 bsl::discard(ppid0);
111 constexpr auto one{bsl::safe_u16::magic_1()};
112
113 // invalid id
114 {
115 constexpr auto vpid{syscall::BF_INVALID_ID};
116 syscall::bf_debug_op_dump_vp(vpid);
117 }
118
119 // id out of range
120 {
121 constexpr auto vpid{(bsl::to_u16(HYPERVISOR_MAX_VPS) + one).checked()};
122 syscall::bf_debug_op_dump_vp(vpid);
123 }
124
125 // id never allocated
126 {
127 constexpr auto vpid{(bsl::to_u16(HYPERVISOR_MAX_VPS) - one).checked()};
128 syscall::bf_debug_op_dump_vp(vpid);
129 }
130
131 // success
132 {
133 auto const vpid{g_mut_sys.bf_vp_op_create_vp({})};
134 syscall::bf_debug_op_dump_vp(vpid);
135 }
136
137 bsl::debug() << "success. remaining backtrace is expected\n" << bsl::here();
138 return bf_control_op_exit();
139 }
140
141 /// <!-- description -->
142 /// @brief Implements the fast fail entry function. This is registered

Callers

nothing calls this directly

Calls 3

bf_debug_op_dump_vpFunction · 0.50
bf_control_op_exitFunction · 0.50
bf_vp_op_create_vpMethod · 0.45

Tested by

no test coverage detected