8.9 DXE SAL Driver
The module type of DXE SAL Driver is only available to the IPF architecture.
This module type is used by DXE Drivers that can be called in physical mode
before SetVirtualAddressMap()
is called, and either physical mode or virtual
mode after SetVirtualAddressMap()
is called. This means the services that
these modules produce are available after ExitBootServices()
.
A DXE SAL driver defines MODULE_TYPE
as DXE_SAL_DRIVER
in the INF file. In
addition, a DXE SAL driver registers SAL Services for the system.
Because a DXE SAL Driver is available after ExitBootServices()
, it may also
need to register an event handler for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
.
8.9.1 INF File
Following is the example of a [Defines]
section for a driver named
SampleDriverDxeSal. For DXE SAL driver, the MODULE_TYPE
entry should be as
follows:
DXE_SAL_DRIVER
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = SampleDriverDxeSal
FILE_GUID = XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
MODULE_TYPE = DXE_SAL_DRIVER
ENTRY_POINT = SampleDxeSalDriverEntryPoint
[Depex]
gSampleProtocolGuid
8.9.2 Entry Point
The entry point of DXE SAL Driver must register the SAL services it produces. The template code is as follows.
Note: EDK II does not specify a detailed way for DXE SAL Drivers to produce and register SAL services.
EFI_STATUS
EFIAPI
SampleDxeSalDriverEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
//
// More initialization can be added here.
//
//
// Event creation for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE can be added
// here.
//
//
// Register SAL services
//
return EFI_SUCCESS;
}