microsoft/openvmm

Public

mirrored fromhttps://github.com/microsoft/openvmmAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
ef598e5dbee969896aec0c2a72b77800cbedaa14

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

guest_test_uefi/src/uefi/mod.rs

27lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4mod rt;
5mod splash;
6mod tests;
7
8use core::num::NonZeroU8;
9use splash::Splashes;
10use uefi::Status;
11use uefi::entry;
12use uefi::println;
13use uefi::system;
14
15#[entry]
16fn 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