UDK2018 MdeModulePkg Notes
-
PeiCore:
- Handle notification PPI from SEC.
- Install
SEC HOB
data. - Support pre memory page allocation.
- Consume new PCD
PcdInitValueInTempStack
to get the init value in temp stack.
-
PeiCore and DxeCore:
- Support
FFS_ATTRIB_DATA_ALIGNMENT_2
. - Propagate
PEI-phase
FV authentication status to DXE. - Support
EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE
.
- Support
-
DxeCore:
- Enhance "
ConvertPages: Incompatible memory types
". - Remove extra connects for UEFI Applications.
- Enhance "
-
PiSmmCore: Install
EndOfS3Resume
andS3SmmInitDone
protocols in registered SMI handlers. -
PiSmmIpl:
- Handle
CommSize OPTIONAL
case inSmmCommunicationCommunicate
. - Remove
NX
page attribute forSMRAM
.
- Handle
-
DxeIplPeim: Mark page table as read-only.
-
Update
DxeIplPeim
andSectionExtractionPei
to remove the hard code alignment adjustment. Section data alignment should be made in the build generation. -
Null Pointer Detection:
DxeIplPeim
andDxeCore
are updated to support the feature.- This feature is used to detect invalid access to
NULL
pointer and page fault exception will be triggered if such issue is detected. Due to the implementation limitation, accessing any address in page 0 (000-FFF) will be actually detected by this feature. This feature is enabled byBIT0
andBIT1
ofPcdNullPointerDetectionPropertyMask
for UEFI and SMM code separately. - For source legacy drivers which need to access legacy memory at page 0, macro
ACCESS_PAGE0_CODE
can be used to enclose those statements to avoid unnecessary page fault exception without losing their original functionalities, if this feature needs to be enabled. - For binary legacy drivers, legacy
OptionROM
and legacy compatible OS loader, which will normally access page 0,BIT7
ofPcdNullPointerDetectionPropertyMask
can be used, as last resort, to disable this feature right afterEndOfDxe
event. - This feature is disabled by default.
- This feature is used to detect invalid access to
-
Heap Guard:
DxeIplPeim, DxeCore
andPiSmmCore
are updated to support the feature.- Heap Guard is used to detect heap memory overflow and page fault exception will be triggered if such issue is detected. It consists of page guard and pool guard, which can be enabled separately or simultaneously by
BIT0
andBIT1
ofPcdHeapGuardPropertyMask
for UEFI memory, and byBIT2
andBIT3
for SMM memory. - To let Heap Guard get into work, the users still need to enable one or more allocation types of memory (like
EfiBootServicesData
), which need to be detected, throughPcdHeapGuardPageType
and/orPcdHeapGuardPoolType
. These two PCDs control both UEFI and SMM memory. - For pool memory,
BIT7
ofPcdHeapGuardPropertyMask
is designed to elaborate the detection of buffer overflow from access growing or declining direction. It's cleared by default (growing direction). - Due to memory consumption, performance and potential OS boot impact, this feature is not suggested to be enabled in production BIOS.
- This feature is disabled by default.
- Heap Guard is used to detect heap memory overflow and page fault exception will be triggered if such issue is detected. It consists of page guard and pool guard, which can be enabled separately or simultaneously by
-
Stack Guard:
DxeIplPeim, DxeCore
are updated to support the feature.- This feature is used to detect the overflow of the whole UEFI stack memory, including the stack of BSP and all APs. Page fault exception will be triggered if such issue is detected. It can be enabled/disabled by
PcdCpuStackGuard
. - This feature disabled by default.
- This feature is used to detect the overflow of the whole UEFI stack memory, including the stack of BSP and all APs. Page fault exception will be triggered if such issue is detected. It can be enabled/disabled by
-
Add IOMMU support.
- Add IOMMU PPI and protocol definitions.
- Update
PciBusDxe
to support IOMMU. When IOMMU protocol is installed, PciBus calls IOMMU to set access attribute for the PCI device in Map/Ummap. - Update
PciHostBridgeDxe
to support IOMMU. When IOMMU protocol is installed,PciHostBridge
just calls IOMMUAllocateBuffer/FreeBuffer/Map/Unmap
. - Update
SdBlockIoPei, EmmcBlockIoPei, UfsBlockIoPei, EhciPei, UhciPei
andXhciPei
to support IOMMU.
-
Add
EndOfS3Resume
GUID definition, after S3 SMM initialization is done and before S3 boot script is executed, the GUID will be installed at the end of S3 resume phase as protocol in SMM environment. -
Add
S3SmmInitDone
GUID definition, the GUID will be installed as PPI in PEI and protocol in SMM environment. -
Add
SmmMemoryAttribute
protocol definition, the protocol is intended forPiSmmCore
to be able to change memory page attributes for the sake of heap guard feature. -
Add
LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY
lockbox
attribute and updateLockBoxLib
to support it. -
Add a new API
InitializeCpuExceptionHandlersEx
inCpuExceptionHandlerLib
to support initializing exception handlers with extra functionalities which need extra init data, such as stack switch for Stack Guard feature. -
In
BootScriptExecutorDxe
: Remove NX page attribute for reservedFfsBuffer
. -
Update
RuntimeDxe
andPeiCrc32GuidedSectionExtractLib
to consumeCalculateCrc32()
API inBaseLib
. -
In
UefiBootManagerLib
:- Support DNS device path description.
- Generate boot description for SD/eMMC.
- Remove the useless perf codes.
-
MemoryTest: Update
GenericMemoryTestDxe
andNullMemoryTestDxe
to handle More Reliable memory type. -
In
SmbiosMeasurementDxe
: Skip measurement for OEM type and platform code can measure it by self if required. -
FirmwarePerformancePei
: Remove the SEC performance data getting code asSecCore
inUefiCpuPkg
has addedSecPerformancePpiCallBack
to get SEC performance data and build HOB to convey the SEC performance data to DXE phase. -
PeiDxeDebugLibReportStatusCode
: Print partially when format string is too long. -
SerialDxe
:- Process timeout consistently in
SerialRead
. - Handle Timeout change more robustly in
SerialSetAttributes
.
- Process timeout consistently in
-
ResetSystem:
- Add
PlatformSpecificResetFilter
andPlatformSpecificResetHandler
PPI and protocol definitions. - Add
PlatformSpecificResetNotification
PPI definition. - Update
ResetSystemRuntimeDxe
to implementResetNotification
,ResetFilter
andResetHandler
protocols. - Add
ResetSystemPei
to implementReset2, ResetNotification, ResetFilter
andResetHandler
PPIs. - Add
ResetSystemLib
instances, PeiResetSystemLib calls the ResetSystem2() service in the PEI Services Table, andDxeResetSystemLib
calls theResetSystem()
service in the UEFI Runtime Services Table. - Add
ResetUtility
library class and BASE instance. The library class that provides services to generate a GUID specific reset, parse the GUID from a GUID specific reset, and build theResetData
buffer for any type of reset that requires extra data. - Update
PeiCore
to always attempt to useReset2
PPI first.
- Add
-
PCD:
- Update PCD driver to support the optimized
PcdDataBase
. - Enable Firmware to retrieve the default setting, add two PCDs
PcdSetNvStoreDefaultId
andPcdNvStoreDefaultValueBuffer
. - Remove unused
PCD attribute PCD_TYPE_SKU_ENABLED
.
- Update PCD driver to support the optimized
-
Variable DXE/SMM driver:
- Deprecate
EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
. - Update
GetNextVariableName
to follow UEFI 2.7. - Update code to also support normal format variable storage HOB when the NV variable store is auth format.
- Deprecate
-
HII:
-
EFI
Varstore/Buffer Varstore BIT
field support- Add GUID/flags definitions for BitField support.
- Update
SetupBrowserDxe, HiiDatabaseDxe, UefiHiiLib
andVarCheckHiiLib
to handle/check Question which is stored in the BIT field of EFIVarstore/Bufffer Varstore
. - Add sample cases in
DriverSampleDxe
to create BIT/UNION varstore and add sample Questions to consumebit/union VarStore
-
Update
HiiDatabaseDxe
to replace the default setting in vfr file with the one set throughDynamicHii
PCD. -
Update
DisplayEngineDxe
to add the implementation ofHiiPopup
protocol which is defined in UEFI2.7 Spec -
Update
DriverSampleDxe
to add a sample case to consumeHiiPopup
protocol.
-
-
Network:
- Update network stack drivers (
DHCP, iSCSI, PXE
) to check the "Network Media State" type of AIP protocol, and wait the NIC to restore the network connection ifEFI_NOT_READY
is returned. HttpLib
:HttpMappingToStatusCode()
is updated to handle the new defined HTTP status codeHTTP_STATUS_308_PERMANENT_REDIRECT
in UEFI specification.- IP4:
- Update
Ip4Config.SetData()
to clean up certain configuration data. Ip4
driver is updated to triggerIp4Config2
protocol to retrieve a default address, if the defaultIPv4
address is not available andUseDefaultAddress
is set toTRUE
.- Update
IP4
stack to support point-to-point link with 31-bit mask (RFC3021
).
- Update
NetLib
: Add new library interfaceNetLibDetectMediaWaitTimeout()
to support media state detection by AIP protocol.
- Update network stack drivers (
-
Performance Infrastructure: Update EDK II performance infrastructure to log and dump the performance entry as FPDT record in ACPI FPDT table. The updated performance infrastructure can support to dump performance data in UEFI Shell and OS both.
PeiPerformanceLib
:- Update
PeiPerformanceLib
to convert Perf entry to FPDT record in PEI phase. - Report FPDT records in PEI phase to
DxeCorePerformanceLib
through GUID hob.
- Update
SmmCorePerformanceLib
:- Update
SmmCorePerformanceLib
to convert Perf entry to FPDT record in SMM phase. - Define a new structure smm boot performance table to save the contents and size of FPDT records in SMM phase and report the address of smm boot performance table to
FirmwarePerformanceDataTableSmm
.
- Update
DxeCorePerformanceLib
:- Update
DxeCorePerformanceLib
to convert Perf entry to FPDT record in DXE phase. - Collect FPDT records in PEI phase through the GUID hob.
- Collect FPDT records in SMM phase through MM Communication protocol.
- Allocate boot performance table to save all FPDT records and report the address of boot performance table to
FirmwarePerformanceDataTableDxe
.
- Update
FirmwarePerformanceDataTablePei
: Add FPDT records into basic boot performance table for S3 phaseFirmwarePerformanceDataTableSmm
: UpdateFirmwarePerformanceDataTableSmm
to receive smm boot performance table address which is reported bySmmCorePerformanceLib
.FirmwarePerformanceDataTableDxe
:- Update
FirmwarePerformanceDataTableDxe
to receive boot performance table address which is reported byDxeCorePerformanceLib
. - Update
FirmwarePerformanceDataTableDxe
to HookEFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT
to install ACPI table. - Remove the macro
EXTENSION_RECORD_SIZE
, since the extension size can be got throughPcdExtFpdtBootRecordPadSize
. - Remove the codes that collect boot records in SMM phase(The codes have been moved to DxeCorePerformanceLib).
- Update
-
Update
ReadKeyStrokeEx()
inPs2KeyboardDxe, TerminalDxe
andConSplitterDxe
to always return the key state even there is no key pressed. -
AtaAtapiPassThruDxe
: Relax PHY detection timeout value from 10ms to 15ms. -
SdDxe
andEmmcDxe
: Produce Disk Information Protocol for SD/eMMC devices. -
UfsPassThruDxe
: Produce EFI UFS Device Config Protocol. -
PciBus:
- Install
PciEnumerationComplete
protocol after PciIo protocols are installed, instead of after hardware enumeration is completed. The change is to follow the PI spec and also benefits certain implementation that depends on thePciIo
handle inPciEnumerationComplete
callback. - Reserve BUS number for non-root and root hot-plug controllers. Old implementation only reserves for root hot-plug controllers.
- Install
-
Add Translation field to
PCI_ROOT_BRIDGE_APERTURE
. Translation is used to represent the difference between device address and host address, if they are not the same on some platforms.
-
PeiCore: Update debug message to print FV handle correctly.
-
DxeCore:
- Avoid accessing non-owned memory in CoreValidateHandle,
CoreDisconnectControllersUsingProtocolInterface()
andCoreOpenProtocol()
. - Fix double free pages on
LoadImage
failure path. - Fix Interface returned by
CoreOpenProtocol
.
- Avoid accessing non-owned memory in CoreValidateHandle,
-
PiSmmCore:
- Unregister each other for LegacyBoot and
ExitBootServices
SMI handlers. - Set ForwardLink to
NULL
inRemoveOldEntry()
to fix potential linked list assertion. - Fix hang due to already-freed memory dereference.
- Unregister each other for LegacyBoot and
-
Fix misuses of
AllocateCopyPool
inUiApp, BootMaintenanceManagerUiLib, DeviceManageruiLib, UefiHiiLib, FvSimpleFileSystemDxe
andHiiDatabaseDxe
. -
DxePrintLibPrint2Protocol
: Fix error in Precision position calculation. -
SmmLockBox
: Return updated Length forEFI_BUFFER_TOO_SMALL
. -
SmmLockBoxDxeLib
: GetSmmCommRegion
bygEdkiiPiSmmCommunicationRegionTableGuid
system configuration table for SMM communication buffer. -
(Smm)
S3SaveState
: Extract arguments in correct order in the functions forEFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE
andEFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE
. -
PiSmmCoreMemoryAllocationLib
: Fix aFreePool()
assertion issue in whenPiSmmCore
links againstPeiDxeDebugLibReportStatusCode
. -
UefiBootManagerLib
:- Remove unnecessary assertion in
BmCharToUnit
to avoid system hang. - Remove assertion when "
BootOptionSupport
" variable doesn't exist. - Remove superfluous
TimerLib
dependency.
- Remove unnecessary assertion in
-
DxeCapsuleLibFmp
:- Verify nested capsule with FMP. The current logic that uses the ESRT Table does not work because capsules are processed before the ESRT Table is published at the Ready To Boot event.
- Add more check for the UX capsule.
-
CapsulePei
: Sort and merge memory resource entries to handle the case that the memory resource HOBs are reported differently betweenBOOT_ON_FLASH_UPDATE
boot mode and normal boot mode. -
FrameBufferBltLib
:- Fix copying of unaligned memory.
- Fix a bug causing display corrupted by using
PixelsPerScanLine
when calculating the line width.
-
SerialDxe
:- Fix not able to change serial attributes.
- Do not fail reset when
SetAttributes
is not supported.
-
Variable DXE/SMM driver:
- Delete and lock OS-created MOR variable.
- Delete and lock MOR in the absence of SMM.
-
HII:
SetupBrowserDxe
: Update APIIsResetRequired
to cache all the reset signals which are triggered by UI configuration changes.DisplayEngineDxe
: Fix a incorrect display issue that exposed by a corner use case. Use Case: In one page, some new menus may be dynamically inserted between highlight menu and top of screen menu when some question are refreshed. Incorrect display will appear if the new added menus cause the highlight menu and previous top of screen menu can't be shown in one page.UefiHiiLib
: Fix a bug that check the string length incorrectly for String Opcode.BootManagerUiLib
: Check reset requirement before exiting UiApp, if reset is required, the platform will be reset.BootMaintenanceManagerUiLib
: Check reset requirement before exiting UiApp, if reset is required, the platform will be reset.
-
Network:
- Fix a bug in IP4 driver that
TxToken
is incorrect removed if error happens in transmit. - Fix a bug in PXE driver that user selected options are ignored in PXE BootMenu from DHCP option 43.
- Fix a bug in IP4 driver that
Ip4IpSecProcessPacket()
is always called to locate IpSec protocol even the IpSec protocol has not been installed. - Fix a bug in
DxeNetLib NetbufTrim()
function that theNetBuf TotalSize
is not checked with 0 before the trim operation.
- Fix a bug in IP4 driver that
-
TerminalDxe
: FixPCANSI
mapping forTRIANGLE
andARROW
. -
AtaAtapiPassThru
: Unmap DMA buffers after disabling BM DMA. -
ScsiBusDxe
: EFI SCSI I/O Protocol should not be produced on nonexistent LUNs. -
ScsiDiskDxe
:EFI_NO_MEDIA
should be returned instead ofEFI_MEDIA_CHANGED
when media is removed from device. -
EmmcDxe
: Fix a bug that extra data may be erased byEFI_ERASE_BLOCK_PROTOCOL.EraseBlocks()
. -
UfsPassThruDxe
andUfsBlockIoPei
: Set 'DATA SEGMENT LENGTH
' field of theUPIU
to the number of descriptor bytes to write. -
USB:
-
EhciDxe
: Call EhcFreeUrb to copy the contents of the mapped DMA buffer into the real buffer when sync interrupt transfer completes. -
XhciPei
andXhciDxe
: Recover halted endpoint when BABBLE error occurs. -
XhciDxe
- Fix a data loss issue in interrupt transfer. The data loss doesn't impact USB keyboard/mouse functionality but may cause BLE connection random failure.
- Fix DMA buffer map and unmap inconsistency for async interrupt transfer.
-
UsbMassStorageDxe
: Fix device compatibility issues so that more USB floppies and USB keys can be supported.
-
-
NonDiscoverablePciDeviceDxe
: Fix memory override bug inPciIoPciRead
interface. -
NvmExpressDxe
:- Abort the request by resetting the NVMe controller when a timeout occurs for a blocking PassThru request.
- Notify the NVMe controller when system reset happens.
- Fix error status override within
NvmExpressPassThru()
. - Fix data buffer not mapped for NVMe Write command.
-
SdMmcPciHcDxe
: CallSdMmcFreeTrb()
to complete a synchronous operation. -
PciBus: Fix the bug that
EfiBusSpecificDriverOverride
protocol is not produced for devices containing option rom. -
PartitionDxe
: FixProbeMediaStatusEx()
to pass the address of a buffer in the stack instead of a NULL pointer toReadDisk()
interface ofEFI_DISK_IO_PROTOCOL
.
-
Current
SmiHandlerProfile
implementation builds profile database atSmmReadyToLock
. So the profile for SMI handler registered afterSmmReadyToLock
will be not recorded. -
HII:
EFI_IFR_IMAGE, EFI_IFR_ANIMATION
,EFI_IFR_VARSTORE_DEVICE
opcodes are not supported.- Nested
Suppressif/DisableIf/GrayoutIf
condition for single statement is not supported.
-
MNP driver is updated to recycle the TX buffer from SNP asynchronously. The UNDI/SNP implementation must follow UEFI 2.6 Appendix E.4.16 to return the recycled transmitted buffer address in UNDI GetStatus command to make it work, otherwise an incorrect recycled buffer address will cause a DEBUG version MNP driver ASSERT.