OvmfPkg: QemuFlashFvbServicesRuntimeDxe: split out runtime DXE specifics
In preparation for introducing an SMM interface to this driver, move the following traits to separate files, so that we can replace them in the new SMM INF file: - Protocol installations. The SMM driver will install protocol interfaces in the SMM protocol database, using SMM services. - Virtual address change handler and pointer conversions. SMM drivers run with physical mappings and pointers must not be converted. There are further restrictions and changes for an SMM driver, but the rest of the code either complies with those already, or will handle the changes transparently. For example: - SMM drivers have access to both UEFI and SMM protocols in their entry points (see the PI spec 1.4, "1.7 SMM Driver Initialization"), - MemoryAllocationLib has an SMM instance that serves allocation requests with the gSmst->SmmAllocatePool() service transparently, allocating runtime-marked SMRAM. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18671 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -13,13 +13,9 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "PiDxe.h"
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/UefiRuntimeLib.h>
|
||||
#include <Guid/EventGroup.h>
|
||||
|
||||
#include "QemuFlash.h"
|
||||
|
||||
@ -34,20 +30,11 @@
|
||||
#define CLEARED_ARRAY_STATUS 0x00
|
||||
|
||||
|
||||
STATIC UINT8 *mFlashBase = NULL;
|
||||
UINT8 *mFlashBase;
|
||||
|
||||
STATIC UINTN mFdBlockSize = 0;
|
||||
STATIC UINTN mFdBlockCount = 0;
|
||||
|
||||
|
||||
VOID
|
||||
QemuFlashConvertPointers (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EfiConvertPointer (0x0, (VOID **) &mFlashBase);
|
||||
}
|
||||
|
||||
|
||||
STATIC
|
||||
volatile UINT8*
|
||||
QemuFlashPtr (
|
||||
|
Reference in New Issue
Block a user