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:
1
DXE_SAL_DRIVER
2
3
[Defines]
4
INF_VERSION = 0x00010005
5
BASE_NAME = SampleDriverDxeSal
6
FILE_GUID = XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
7
MODULE_TYPE = DXE_SAL_DRIVER
8
ENTRY_POINT = SampleDxeSalDriverEntryPoint
9
10
[Depex]
11
gSampleProtocolGuid
Copied!

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.
1
EFI_STATUS
2
EFIAPI
3
SampleDxeSalDriverEntryPoint (
4
IN EFI_HANDLE ImageHandle,
5
IN EFI_SYSTEM_TABLE *SystemTable
6
)
7
{
8
//
9
// More initialization can be added here.
10
//
11
//
12
// Event creation for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE can be added
13
// here.
14
//
15
//
16
// Register SAL services
17
//
18
return EFI_SUCCESS;
19
}
Copied!
Last modified 1yr ago