mu_basecore
mu_basecore copied to clipboard
Initial Variable Store Router Changes [Rebase & FF]
Description
An initial set of changes to start development on this branch.
These changes include the primary interface defintions for variable router support and variable storage driver implementation for FVB backed variable storage in PEI, DXE, and Traditional SMM. A Standalone MM implementation will be added in the future.
MdeModulePkg: Add initial Variable Router documentation
Explains key interfaces and concepts in the variable router. More details will be added in the future.
MdeModulePkg: Add Variable Storage PPIs and Protocols
Adds two new PPIs and protocols. The Variable Storage Selector PPI/protocol which is used by the UEFI variable modules to determine which Variable Storage PPI/Protocol instance should be used for a given variable transaction. The Variable Storage PPI/Protocols are used to abstract storage details from common UEFI variable logic in the central variable modules.
MdeModulePkg: Add Variable Storage Support Protocol
This protocol is produced by the UEFI variable driver. It contains services the UEFI variable driver provides to variable storage drivers.
Right now, the protocol only contains a NotifyWriteServiceReady() function. This is called by a variable storage driver to notify the UEFI variable driver that the variable storage driver's WriteServiceIsReady() function is now returning TRUE instead of FALSE.
Variable storage drivers should call this function as soon as possible.
The UEFI variable driver will delay producing the Variable Write Architectural Protocol (gEfiVariableWriteArchProtocolGuid) until all present variable storage protocols return TRUE from EDKII_VARIABLE_STORAGE_PROTOCOL.WriteServiceIsReady(). The UEFI variable driver will query the WriteServiceIsReady() status from each present variable storage protocol instance on each invocation of this function.
MdeModulePkg: Define FVB Variable Storage PPI and Protocol GUIDs
Defines the GUIDs that can be used by a Firmware Volume Block (FVB) variable storage implementations.
MdeModulePkg: Add PcdEnableFvbVariableStorage
Adds a package configuration option for enabling and disabling Firmware Volume Block (FVB) variable storage. Normally the FVB variable storage drivers would simply be removed from the flash image. However, this also allows the functionality to be configured on an offline firmware image (patchable in module PCD) or at runtime Dynamic/DynamicEx PCD.
For example, a platform may check to see if a UFS storage device is present. If so, that may be preferred for variable storage so the PcdEnableFvbVariableStorage PCD is set to FALSE during boot.
MdeModulePkg: Add FvbVariableStorage PEIM
Adds a PEIM that produces the variable storage protocol for FVB backed variable storage. This is similar to traditional non-volatile storage capabilities in the PEI variable driver.
If a platform is newly adopting the variable storage protocol design, it should likely include this driver so it can continue to service UEFI variable on SPI flash in PEI.
MdeModulePkg: Add Runtime DXE and SMM FvbVariableStorage drivers
Adds Runtime DXE and Traditional MM drivers that produces the variable storage protocol for FVB backed variable storage. This is similar to traditional non-volatile storage capabilities in the Runtime DXE and SMM variable drivers.
If a platform is newly adopting the variable storage protocol design, it should likely include this driver so it can continue to service UEFI variable on SPI flash in Runtime DXE/SMM.
Note: A Standalone MM driver will be added to the FvbVariableStorage directory in the future.
- [x] Impacts functionality?
- Functionality - Does the change ultimately impact how firmware functions?
- Examples: Add a new library, publish a new PPI, update an algorithm, ...
- [ ] Impacts security?
- Security - Does the change have a direct security impact on an application, flow, or firmware?
- Examples: Crypto algorithm change, buffer overflow fix, parameter validation improvement, ...
- [ ] Breaking change?
- Breaking change - Will anyone consuming this change experience a break in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo, call a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
- Tests - Does the change include any explicit test code?
- Examples: Unit tests, integration tests, robot tests, ...
- [x] Includes documentation?
- Documentation - Does the change contain explicit documentation additions outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to documentation on an a separate Web page, ...
How This Was Tested
N/A
Integration Instructions
N/A
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: No coverage uploaded for pull request base (
feature/variable_router@9b0348c). Click here to learn what that means.
Additional details and impacted files
@@ Coverage Diff @@
## feature/variable_router #772 +/- ##
==========================================================
Coverage ? 1.23%
==========================================================
Files ? 1302
Lines ? 332084
Branches ? 6683
==========================================================
Hits ? 4117
Misses ? 327891
Partials ? 76
| Flag | Coverage Δ | |
|---|---|---|
| NetworkPkg | 0.00% <ø> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
This pull request has been automatically been closed because it did not have any activity in 60 days and no follow up within 7 days after being marked stale. Thank you for your contributions.