Repository navigation
Conversation
QEMU Validation FailedQEMU validation did not complete successfully or did not shutdown as expected. Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/26604317226
|
| Job | Result |
|---|---|
| Gather Incoming PR Metadata | ✅ |
| Run Patina QEMU Validation / Preflight Checks | ✅ |
| Run Patina QEMU Validation / Post In-Progress Notification | ✅ |
| Run Patina QEMU Validation / Get Constants / Get Repository Constants | ✅ |
| Run Patina QEMU Validation / Validate QEMU - SBSA (Linux) | ❌ |
| Run Patina QEMU Validation / Validate QEMU - Q35 (Linux) | ❌ |
| Run Patina QEMU Validation / Validate QEMU Q35 (Windows) | ❌ |
| Run Patina QEMU Validation / Emit PR Metadata | ✅ |
Error Details
qemu-validation-logs-Linux-SBSA/sbsa-linux.log (15 error/warning sections)
… (truncated)
error[E0308]: mismatched types
--> src/q35/component/service/smbios_platform.rs:125:30
|
125 | security_status: 0x02,
| ^^^^ expected `SecurityStatus`, found integer
error[E0308]: mismatched types
--> src/q35/component/service/smbios_platform.rs:155:28
|
155 | feature_flags: 0x01, // Board is a hosting board
| ^^^^ expected `FeatureFlags`, found integer
|
help: call `Into::into` on this expression to convert `{integer}` into `FeatureFlags`
|
155 | feature_flags: 0x01.into(), // Board is a hosting board
| +++++++
error[E0308]: mismatched types
--> src/q35/component/service/smbios_platform.rs:158:25
|
158 | board_type: 0x0A, // Motherboard
| ^^^^ expected `BoardType`, found integer
error[E0308]: mismatched types
--> src/q35/component/service/smbios_test.rs:45:49
|
45 | boot_services.locate_protocol_unchecked(&SMBIOS_PROTOCOL_GUID, core::ptr::null_mut()).map_err(|e| {
| ------------------------- ^^^^^^^^^^^^^^^^^^^^^ expected `r_efi::base::Guid`, found a different `r_efi::base::Guid`
| |
| arguments to this method are incorrect
|
note: there are multiple different versions of crate `r_efi` in the dependency graph
--> /.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/r-efi-6.0.0/src/base.rs:392:1
|
392 | pub struct Guid {
| ^^^^^^^^^^^^^^^ this is the expected type
|
::: /.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/r-efi-5.3.0/src/base.rs:392:1
|
392 | pub struct Guid {
| --------------- this is the found type
= help: you can use `cargo tree` to explore your dependency tree
note: method defined here
--> /__w/patina/patina/sdk/patina/src/boot_services.rs:826:15
|
826 | unsafe fn locate_protocol_unchecked(
| ^^^^^^^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0308`.
error: could not compile `qemu_dxe_core` (lib) due to 12 previous errors
warning: build failed, waiting for other jobs to finish...
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 113 - Error while executing command, exit code: 101
qemu-validation-logs-Linux-Q35/q35-linux.log (15 error/warning sections)
… (truncated)
error[E0308]: mismatched types
--> src/q35/component/service/smbios_platform.rs:125:30
|
125 | security_status: 0x02,
| ^^^^ expected `SecurityStatus`, found integer
error[E0308]: mismatched types
--> src/q35/component/service/smbios_platform.rs:155:28
|
155 | feature_flags: 0x01, // Board is a hosting board
| ^^^^ expected `FeatureFlags`, found integer
|
help: call `Into::into` on this expression to convert `{integer}` into `FeatureFlags`
|
155 | feature_flags: 0x01.into(), // Board is a hosting board
| +++++++
error[E0308]: mismatched types
--> src/q35/component/service/smbios_platform.rs:158:25
|
158 | board_type: 0x0A, // Motherboard
| ^^^^ expected `BoardType`, found integer
error[E0308]: mismatched types
--> src/q35/component/service/smbios_test.rs:45:49
|
45 | boot_services.locate_protocol_unchecked(&SMBIOS_PROTOCOL_GUID, core::ptr::null_mut()).map_err(|e| {
| ------------------------- ^^^^^^^^^^^^^^^^^^^^^ expected `r_efi::base::Guid`, found a different `r_efi::base::Guid`
| |
| arguments to this method are incorrect
|
note: there are multiple different versions of crate `r_efi` in the dependency graph
--> /.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/r-efi-6.0.0/src/base.rs:392:1
|
392 | pub struct Guid {
| ^^^^^^^^^^^^^^^ this is the expected type
|
::: /.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/r-efi-5.3.0/src/base.rs:392:1
|
392 | pub struct Guid {
| --------------- this is the found type
= help: you can use `cargo tree` to explore your dependency tree
note: method defined here
--> /__w/patina/patina/sdk/patina/src/boot_services.rs:826:15
|
826 | unsafe fn locate_protocol_unchecked(
| ^^^^^^^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0308`.
error: could not compile `qemu_dxe_core` (lib) due to 12 previous errors
warning: build failed, waiting for other jobs to finish...
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 113 - Error while executing command, exit code: 101
qemu-validation-logs-Windows-Q35/q35-windows.log (15 error/warning sections)
… (truncated)
error[E0308]: mismatched types
--> src\q35\component\service\smbios_platform.rs:125:30
|
125 | security_status: 0x02,
| ^^^^ expected `SecurityStatus`, found integer
error[E0308]: mismatched types
--> src\q35\component\service\smbios_platform.rs:155:28
|
155 | feature_flags: 0x01, // Board is a hosting board
| ^^^^ expected `FeatureFlags`, found integer
|
help: call `Into::into` on this expression to convert `{integer}` into `FeatureFlags`
|
155 | feature_flags: 0x01.into(), // Board is a hosting board
| +++++++
error[E0308]: mismatched types
--> src\q35\component\service\smbios_platform.rs:158:25
|
158 | board_type: 0x0A, // Motherboard
| ^^^^ expected `BoardType`, found integer
error[E0308]: mismatched types
--> src\q35\component\service\smbios_test.rs:45:49
|
45 | boot_services.locate_protocol_unchecked(&SMBIOS_PROTOCOL_GUID, core::ptr::null_mut()).map_err(|e| {
| ------------------------- ^^^^^^^^^^^^^^^^^^^^^ expected `r_efi::base::Guid`, found a different `r_efi::base::Guid`
| |
| arguments to this method are incorrect
|
note: there are multiple different versions of crate `r_efi` in the dependency graph
--> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\r-efi-6.0.0\src\base.rs:392:1
|
392 | pub struct Guid {
| ^^^^^^^^^^^^^^^ this is the expected type
|
::: C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\r-efi-5.3.0\src\base.rs:392:1
|
392 | pub struct Guid {
| --------------- this is the found type
= help: you can use `cargo tree` to explore your dependency tree
note: method defined here
--> D:\a\patina\patina\sdk\patina\src\boot_services.rs:826:15
|
826 | unsafe fn locate_protocol_unchecked(
| ^^^^^^^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0308`.
error: could not compile `qemu_dxe_core` (lib) due to 12 previous errors
warning: build failed, waiting for other jobs to finish...
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 113 - Error while executing command, exit code: 101
Dependencies
| Repository | Ref |
|---|---|
| patina | f5857cb |
| patina-dxe-core-qemu | 5b470dd |
| patina-fw-patcher | 3ea3802 |
| patina-qemu firmware | v3.0.0 |
| patina-qemu build script | 05e6c57 |
This comment was automatically generated by the Patina QEMU PR Validation Post workflow.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
I haven't looked at the PR changes yet, but it should target the |
102fbd3 to
ede86cc
Compare
Michael, The branch is now updated to target major instead of main. |
ede86cc to
3e6fd6c
Compare
cc656fc to
6114c86
Compare
82949ad to
90b03b5
Compare
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
90b03b5 to
f5857cb
Compare
Description
R-EFI 6.0 Migration
Upstream r-efi 6.0 marks all
extern "efiapi"function pointers in EFI BootServices, Runtime Services, and other protocols as
unsafe, since their safetycannot be enforced by the Rust type system at compile time.
This PR audits almost all usage of UEFI service function pointers across the Patina
codebase for correctness and safety.
There are three primary areas where
unsafeusage has been audited:extern "efiapi"functionsBootServicestrait thateventually call into the FFI
Not all functions in the above categories need to be marked
unsafe. Forexample,
extern "efiapi" close_eventis not markedunsafebecause it cansafely be called with an arbitrary event parameter without causing undefined
behavior in the Patina implementation. The
eventparameter is treated as anopaque pointer and is never dereferenced.
That said, any indirect caller that dereferences this Boot Services function
pointer must still use an
unsafeblock, since the function pointer itself isdefined as
unsafein r-efi 6.0. In addition, inherently unsafe Rustfunctions (such as
core_free_pool()) are now explicitly markedunsafe.Each inspected function or call site is documented with appropriate safety
comments where necessary, and with explanations where
unsafeis notrequired.
There are no functional changes.
Clippy flags public functions that accept raw pointer parameters and pass them
across an FFI boundary without being marked
unsafe, with the followingwarning:
"this public function might dereference a raw pointer but is not marked
unsafe"In Patina, this pattern is common for functions that take
efi::Eventorefi::Handleparameters and call Boot Services function pointers. Weexplicitly suppress this lint for such functions because these types are
treated as opaque pointers and are never dereferenced:
#[allow(clippy::not_unsafe_ptr_arg_deref)]Geiger Unsafe Stats
How This Was Tested
Booted to UEFI Shell Q35/SBSA
Integration Instructions
All consumers of Patina will need to pick the newer Patina version when published and also should update their r-efi version to 6.0.0.