microsoft/openvmm
Publicmirrored fromhttps://github.com/microsoft/openvmmAvailable
guest_test_uefi/src/uefi/mod.rs
27lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | mod rt; |
| 5 | mod splash; |
| 6 | mod tests; |
| 7 | |
| 8 | use core::num::NonZeroU8; |
| 9 | use splash::Splashes; |
| 10 | use uefi::Status; |
| 11 | use uefi::entry; |
| 12 | use uefi::println; |
| 13 | use uefi::system; |
| 14 | |
| 15 | #[entry] |
| 16 | fn uefi_main() -> Status { |
| 17 | println!("UEFI vendor = {}", system::firmware_vendor()); |
| 18 | println!("UEFI revision = {:x}", system::firmware_revision()); |
| 19 | |
| 20 | // Attempt to draw a pretty splash screen. Not always possible (e.g: when |
| 21 | // running UEFI on a VM without a gfx adapter - such as in CI). |
| 22 | splash::draw_splash(Splashes(NonZeroU8::new(1).unwrap())); |
| 23 | |
| 24 | tests::run_tests(); |
| 25 | |
| 26 | Status::SUCCESS |
| 27 | } |
| 28 | |