Initial implementation of supervisor#1385
Conversation
QEMU Validation FailedQEMU validation did not complete successfully or did not shutdown as expected. Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/28404973648
|
| Job | Result |
|---|---|
| Gather Incoming PR Metadata | ✅ |
| Run Patina QEMU Validation / Post In-Progress Notification | ✅ |
| Run Patina QEMU Validation / Preflight Checks | ✅ |
| Run Patina QEMU Validation / Get Constants / Get Repository Constants | ✅ |
| Run Patina QEMU Validation / Validate QEMU - ArmVirt (Linux) | ❌ |
| Run Patina QEMU Validation / Validate QEMU Q35 (Windows) | ❌ |
| Run Patina QEMU Validation / Validate QEMU - Q35 (Linux) | ❌ |
| Run Patina QEMU Validation / Emit PR Metadata | ✅ |
Error Details
qemu-validation-logs-Linux-ArmVirt/armvirt-linux.log (8 error/warning sections)
warning: patch `patina_mm_supervisor v22.0.1 (/__w/patina/patina/patina_mm_supervisor)` was not used in the crate graph
warning: patch `patina_mm_user_core v22.0.1 (/__w/patina/patina/patina_mm_user_core)` was not used in the crate graph
help: Check that the patched package version and available features are compatible
warning: patch `patina_mm_supervisor v22.0.1 (/__w/patina/patina/patina_mm_supervisor)` was not used in the crate graph
warning: patch `patina_mm_user_core v22.0.1 (/__w/patina/patina/patina_mm_user_core)` was not used in the crate graph
help: Check that the patched package version and available features are compatible
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 `r_efi::efi::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-7.0.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 1 previous error
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 (8 error/warning sections)
warning: patch `patina_mm_supervisor v22.0.1 (D:\a\patina\patina\patina_mm_supervisor)` was not used in the crate graph
warning: patch `patina_mm_user_core v22.0.1 (D:\a\patina\patina\patina_mm_user_core)` was not used in the crate graph
help: Check that the patched package version and available features are compatible
warning: patch `patina_mm_supervisor v22.0.1 (D:\a\patina\patina\patina_mm_supervisor)` was not used in the crate graph
warning: patch `patina_mm_user_core v22.0.1 (D:\a\patina\patina\patina_mm_user_core)` was not used in the crate graph
help: Check that the patched package version and available features are compatible
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 `r_efi::efi::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-7.0.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 1 previous error
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 (8 error/warning sections)
warning: patch `patina_mm_supervisor v22.0.1 (/__w/patina/patina/patina_mm_supervisor)` was not used in the crate graph
warning: patch `patina_mm_user_core v22.0.1 (/__w/patina/patina/patina_mm_user_core)` was not used in the crate graph
help: Check that the patched package version and available features are compatible
warning: patch `patina_mm_supervisor v22.0.1 (/__w/patina/patina/patina_mm_supervisor)` was not used in the crate graph
warning: patch `patina_mm_user_core v22.0.1 (/__w/patina/patina/patina_mm_user_core)` was not used in the crate graph
help: Check that the patched package version and available features are compatible
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 `r_efi::efi::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-7.0.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 1 previous error
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 | d3a06ea |
| patina-dxe-core-qemu | fb2e07f |
| patina-fw-patcher | 5b82a50 |
| patina-qemu firmware | v4.0.1 |
| patina-qemu build script | cf7af08 |
This comment was automatically generated by the Patina QEMU PR Validation Post workflow.
Javagedes
left a comment
There was a problem hiding this comment.
I'm very concerned about the number of global statics in your implementation. I understand it may actually be necessary to be able to perform our SEA validation on the supervisor.
We need to consolidate the statics if possible. If we cannot (due to SEA validation requirements), then we need to make trait abstractions around each of the different statics so that at runtime they all link up, but for testing you can use mockall to mock the different statics. e.g. something like:
static MY_STATIC: SomeStatic = SomeStatic::new();
trait MyTrait {
fn interface_fn1();
fn interface_fn2();
}
impl MyTrait for SomeStatic {
fn interface_fn1() { MY_STATIC.interface_fn1() }
fn interface_fn2() { MY_STATIC.interface_fn2() }
}This will allow us to use mockall with the trait to do proper mocking.
8a5c38f to
c0baea8
Compare
c06dc1e to
df8b415
Compare
027814b to
221a7a5
Compare
|
Binary level PR: OpenDevicePartnership/patina-dxe-core-qemu#162 |
a36196f to
4531212
Compare
8623257 to
593d694
Compare
85c905c to
910a2e5
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
2586dc6 to
fb64c5b
Compare
Description
This is the initial implementation of MM supervisor and user core in Rust.
How This Was Tested
This was tested on QEMU Q35 platform and booted to OS desktop as well as passed supervisor test app.
Integration Instructions
The integration guide is listed in: https://github.com/kuqin12/mu_feature_mm_supv/blob/personal/kuqin/supv_init/SeaPkg/Docs/PlatformIntegration/PlatformIntegrationSteps.md#integraion-guide-for-rust-based-supervisor. Because it provides the implementation of MM supervisor init module.