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

Function ext_main_entry

example/default_rust/src/lib.rs:327–360  ·  view source on GitHub ↗
(version: u32)

Source from the content-addressed store, hash-verified

325
326#[no_mangle]
327pub fn ext_main_entry(version: u32) -> i32 {
328 let mut ret: bsl::ErrcType;
329
330 unsafe {
331 ret = G_SYS.initialize(
332 bsl::to_u32(version),
333 bootstrap_entry as bsl::CPtrT,
334 vmexit_entry as bsl::CPtrT,
335 fail_entry as bsl::CPtrT,
336 );
337 }
338 if !ret {
339 print_v!("{}", bsl::here());
340 syscall::bf_control_op_exit();
341 return bsl::exit_failure;
342 }
343
344 unsafe {
345 ret = gs_initialize(&mut G_GS, &G_SYS, &G_INTRINSIC);
346 }
347 if !ret {
348 print_v!("{}", bsl::here());
349 syscall::bf_control_op_exit();
350 return bsl::exit_failure;
351 }
352
353 unsafe {
354 G_VP_POOL.initialize(&G_GS, &G_TLS, &G_SYS, &G_INTRINSIC);
355 G_VS_POOL.initialize(&G_GS, &G_TLS, &G_SYS, &G_INTRINSIC);
356 }
357
358 syscall::bf_control_op_wait();
359 return bsl::exit_success;
360}
361
362#[panic_handler]
363pub fn panic_implementation(info: &core::panic::PanicInfo<'_>) -> ! {

Callers

nothing calls this directly

Calls 4

bf_control_op_exitFunction · 0.50
gs_initializeFunction · 0.50
bf_control_op_waitFunction · 0.50
initializeMethod · 0.45

Tested by

no test coverage detected