(version: u32)
| 325 | |
| 326 | #[no_mangle] |
| 327 | pub 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] |
| 363 | pub fn panic_implementation(info: &core::panic::PanicInfo<'_>) -> ! { |
nothing calls this directly
no test coverage detected