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

Function fail_entry

example/default_rust/src/lib.rs:287–324  ·  view source on GitHub ↗
(errc: u64, addr: u64)

Source from the content-addressed store, hash-verified

285
286#[no_mangle]
287fn fail_entry(errc: u64, addr: u64) {
288 let ret: bsl::ErrcType;
289
290 // NOTE:
291 // - Call into the fast fail handler. This entry point serves as a
292 // trampoline between C and C++. Specifically, the microkernel
293 // cannot call a member function directly, and can only call
294 // a C style function.
295 //
296
297 unsafe {
298 ret = dispatch_fail(
299 &G_GS,
300 &G_TLS,
301 &G_SYS,
302 &G_INTRINSIC,
303 &G_VP_POOL,
304 &G_VS_POOL,
305 bsl::to_u64(errc),
306 bsl::to_u64(addr),
307 );
308 }
309
310 if !ret {
311 print_v!("{}", bsl::here());
312 syscall::bf_control_op_exit();
313 return;
314 }
315
316 // NOTE:
317 // - This code should never be reached. The fast fail handler should
318 // always call one of the "run" ABIs to return back to the
319 // microkernel when a fast fail is finished. If this is called, it
320 // is because the fast fail handler returned with an error.
321 //
322
323 syscall::bf_control_op_exit();
324}
325
326#[no_mangle]
327pub fn ext_main_entry(version: u32) -> i32 {

Callers

nothing calls this directly

Calls 2

dispatch_failFunction · 0.70
bf_control_op_exitFunction · 0.50

Tested by

no test coverage detected