Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MdeModulePkg/Variable: RT UEFI Variable Cache Support
This change reduces SMIs for GetVariable () by maintaining a UEFI variable cache in Runtime DXE in addition to the pre- existing cache in SMRAM. When the Runtime Service GetVariable() is invoked a Runtime DXE cache is used instead of triggering an SMI to VariableSmm. This can improve overall system performance by servicing variable read requests without rendezvousing all cores into SMM. The following points should be kept in mind: 1. All of the non-volatile storage contents are loaded into the cache upon driver load. This one time load operation from storage is preferred as opposed to building the cache on demand. An on- demand cache would require a fallback SMI to load data into the cache as variables are requested. 2. All SetVariable () requests will trigger an SMI. This occurs regardless of whether the variable is volatile or non-volatile. 3. Both volatile and non-volatile variables are cached in a runtime buffer. To reflect the design currently in place in the EDK II driver, they are cached in separate buffers. 4. The cache in Runtime DXE and SMM are intended to be exact copies of one another. All SMM variable accesses only return data from the SMM cache. The runtime caches are only updated after the variable I/O operation is successful in SMM. The runtime caches are only updated from SMM. 5. Synchronization mechanisms are in place to ensure the runtime cache content integrity with the SMM cache. These may result in updates to runtime cache that are the same in content but different in offset and size from updates to the SMM cache. This code is currently in an experimental state and not ready for production scenarios. Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
- Loading branch information
d812d43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use: EDKII_PI_SMM_COMMUNICATION_REGION_TABLE from system configuration table, for allocating communication buffer.
This table to declare the generic SMM communication buffer location.
If this table is present, it means the SMM communication buffer is restricted to
EfiReservedMemoryType, EfiACPIMemoryNVS, or EfiRuntimeServicesData.