summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe
AgeCommit message (Collapse)AuthorFilesLines
2012-10-16Fix code potential errors.ydong101-2/+2
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Tian, Feng <feng.tian@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13852 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-07Fix the memory leak issue and enhance the check for CoreReadImageFile return.lzeng141-5/+7
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ting Ye <ting.ye@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13704 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-06Check the return code from CoreLocateDevicePath() in ↵lzeng141-1/+4
MdeModulePkg/Core/Dxe/Image/Image.c CoreLoadImageCommon(). Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13703 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-28Fix comparisons of enumerated types which may cause warnings for some compilers.rsun34-14/+14
Signed-off-by: Sun Rui <rui.sun@intel.com> Reviewed-by: Gao Liming <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13686 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-22Roll back one unnecessary change in Dispatcher.c, which is added by previous ↵lgao41-12/+2
patch. Signed-off-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13662 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-22Add PI1.2.1 SAP2 support and UEFI231B mantis 896lgao48-47/+164
1. Update SecurityManagementLib to support SAP2 and SAP services. 2. Update SecurityStub driver to produce SAP2 and SAP protocol both. 3. Update DxeCore and SmmCore to use SAP2 and SAP service to verify Image. 4. Update DxeCore ConnectController() to use SAP2 service to check user permission. Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Guo Dong <dong.guo@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13660 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-02Measure ExitBootServices failure caseczhang463-0/+6
Signed-off-by: Chao Zhang<chao.b.zhang@intel.com> Reviewed-by: Dong Guo<guo.dong@intel.com> Reviewed-by: Gao Liming<liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13581 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-27Close the corresponding GUIDed section extraction protocol notify event in ↵lzeng141-9/+19
CloseSectionStream. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13563 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-26MdeModulePkg/CoreDxe: Fixed compiler warning 'integer conversion resulted in ↵oliviermartin1-1/+1
a change of sign' Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Sun Rui <rui.sun@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13560 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-25Fix the typo in InstallMultipleProtocolInterfaces commentsniruiyu1-3/+4
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com> Reviewed-by: Liming Gao<liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13554 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-30Record LoadImage perf log for LoadImageEx() and use NULL as Handle to record ↵lzeng141-7/+43
StartImage perf log when StartImage() fails. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13379 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-29Update DxeCore and FwVolDxe drivers to inherit authentication status for the ↵lzeng147-8/+75
FV image, if the image came from an FV image file and section in another firmware volume. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13368 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-08Fix the potential issue that NULL pointer may be referred in LoadImage().lgao41-2/+11
Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Rui Sun <rui.sun@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13293 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-27Enhance the error handling for AllocatePool and AllocatePages function.ydong103-4/+12
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13225 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-26Return EFI_INVALID_PARAMETER when Type has either EVT_NOTIFY_SIGNAL or ↵lzeng143-7/+82
EVT_NOTIFY_WAIT set and NotifyTpl is not a supported TPL level. Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13222 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-24Validate some fields in PE image to make sure not access violation for later ↵ydong101-1/+9
code. Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13211 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-27Searching for files starts on an 8 byte aligned boundary after the end of ↵lzeng141-2/+12
the Extended Header if it exists. Signed-off-by: lzeng14 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13143 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-151. Introduced CPU Exception Handler Library to provide the CPU exception ↵vanjeff3-3/+10
handlers and add one NULL library instance. 2. Updated DXE Core, BootScriptExecutorDxe and CapsuleX64Pei to consume CPU Exception Library to setup the default CPU Exception handlers. Signed-off-by: vanjeff Reviewed-by: jyao1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13097 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-13Enhance the error handling.ydong101-6/+19
Signed-off-by: ydong10 Reviewed-by: lzeng14 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13094 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-17Don't install FV protocol on the corrupt FV image. lgao43-38/+21
Signed-off-by: lgao4 Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13020 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-15Add code check to avoid access violation.ydong102-0/+2
Signed-off-by: ydong10 Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13014 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-19Add more check to make sure the valid pointer be used. lgao41-27/+29
Signed-off-by: lgao4 Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12886 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-15Enhance DXE dispatcher logic to check the duplicated FV image bases on ↵lgao44-27/+161
FvHob2 and FvNameGuid per PI spec. Signed-off-by: lgao4 Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12874 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-09MdeModulePkg DXE Core: Refine code to avoid UNIXGCC build break.rsun31-1/+1
The UNIXGCC compiler generates an internal call for division operation when compiling CoreInternalWaitForTick(), which causes build break due to link failure. This check-in changes the implementation of CoreInternalWaitForTick() to avoid this case. Signed-off-by: rsun3 Reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12830 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-06MdeModulePkg DXE Core: Fix overflow and truncation issues in the ↵rsun31-19/+64
implementation of the Stall() boot service to follow the UEFI spec. Signed-off-by: rsun3 Reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12822 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-251. According to PI errata 0000840 and PI 1.2c Vol 3 3.2.3, remove ↵lzeng141-9/+17
description rows that start with a Required Alignment (bytes) of 2, 4, and 8. 2. In PeiFfsFvPpiGetFileInfo(), FileHeader->Attributes needs to be converted to EFI_FV_FILE_ATTRIBUTES from EFI_FFS_FILE_ATTRIBUTES before it is assigned to FileInfo->FileAttributes. 3. Set EFI_FV_FILE_ATTRIB_FIXED and EFI_FV_FILE_ATTRIB_MEMORY_MAPPED bits for EFI_FV_FILE_ATTRIBUTES based on the FFS file and FV image. Signed-off-by: lzeng14 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12777 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-23MdeModulePkg DXE Core: Update implementation of SetMemorySpaceAttributes() ↵rsun32-9/+34
DXE Service to return EFI_NOT_AVAILABLE_YET if CPU Arch Protocol is not available per PI 1.2 Errata C spec. Signed-off-by: rsun3 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12766 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-23Update DxeCore handle FV Image file with Depex section per PI spec.lgao42-24/+106
Signed-off-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12763 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-27Add core FFS3 support, DxeCore.lzeng147-56/+150
Signed-off-by: lzeng14 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12584 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-27Fix ICC9 build break. lgao41-2/+4
Signed-off-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12446 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-26Remove ASSERT (EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Image->Machine)) in StartImage.lgao41-1/+47
Signed-off-by: lgao4 Reviewed-by: jyao1 rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12443 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-18Updated GCD implementation to consume the correct EFI Resources ↵vanjeff1-3/+28
Attributes(Capabilities) instead of the wrong EFI Resources Attributes(Settings). ASSERT() if memory resource HOB includes protect memory setting but not included the corresponding protect memory capabilities Signed-off-by: vanjeff Reviewed-by: rsun3 Reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12158 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-08MdeModulePkg/Dxe: Move assertions inside CoreInsertGcdMapEntry()oliviermartin1-2/+4
CoreInsertGcdMapEntry() does not assume the new region could overlap two existing GCDs. In this case, we need to call this function twice and the TopEntry or BottomEntry could have been updated by the previous call. Reviewed by: rsun3 Reviewed by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12097 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-13Fix an issue that there may be an infinite loop in the ↵rsun31-70/+109
CoreInitializeMemoryServices() in Gcd.c of the DXE Core. Also update logic to use continue statements to reduce the level of nesting in the two loops that search the HOB lists. More comment are added. Signed-off-by: rsun3 Reviewed-by: mdkinney Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12015 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-06Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is ↵niruiyu3-6/+4
valid/invalid. Signed-off-by: niruiyu Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11987 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-16MdeModulePkg DXE Core: Add Idle event during BootServices WaitForEventjljusten4-7/+39
Signal an Idle event during BootServices WaitForEvent. Signed-off-by: jljusten Reviewed-by: mdkinney Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11841 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-10Set *ImageHandle to NULL when LoadImage() returns EFI_ACCESS_DENIED.niruiyu1-1/+7
Signed-off-by: niruiyu Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11783 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-09Fix crash in GetMemoryMap() when memory type 0x80000000-0xFFFFFFFF was ↵niruiyu1-2/+4
allocated by OS loader Signed-off-by: niruiyu Reviewed-by: lgao4 Reviewed-by: hhtian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11774 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-31Update the comments of InstallConfigurationTable to follow UEFI Spec.niruiyu1-2/+2
Signed-off-by: niruiyu Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11716 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-25Make sure the return value of MapKey is correct by moving the assignment ↵erictian1-6/+5
into memory lock protection region Signed-off-by: erictian Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11700 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-24Add the DriverFamilyOverride support in DxeCore.niruiyu3-2/+41
Signed-off-by: niruiyu Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11698 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-17CalculateSum8() and CalculateSum16() defined in BaseLib are used to ↵lzeng141-20/+4
calculate checksum. Signed-off-by: lzeng14 Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11674 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-16Fix LocateDevicePath() to return proper error status code. It was returning ↵mdkinney1-17/+20
EFI_INVALID_PARAMETER if Device was NULL even if not handles matched the search criteria. The proper behavior is to return EFI_NOT_FOUND if not handles match the search criteria, and only return EFI_INVALID_PARAMETER if at least one match is found and Device is NULL. Also update function header comment block for LocateDevicePath() to match UEFI Specification. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11406 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-23Update PeiCore and DxeCore to verify FFS data checksum.lgao41-5/+10
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11332 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-12Correct typo in word in DxeCore.lgao44-5/+5
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11307 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-12Updates function description per UEFI2.3d. No impact is for functionality. ↵lgao43-5/+45
The main changes include: 1. For LoadImage() service, EFI_ACCESS_DENIED return status is added, and EFI_SECURITY_VIOLATION return status description is updated. Meanwhile, EFI_PE32_IMAGE_PROTOCOL. LoadPeImage() in MdeModulePkg is also updated to match LoadImage() service. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11306 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-21Fix bounds check on parameter of type EFI_GCD_IO_TYPE to use ↵mdkinney1-1/+1
EfiGcdIoTypeMaximum instead of EfiGcdMemoryTypeMaximum. Also fix typo in DEBUG() message string for gDS->AllocateIoSpace() calls. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11268 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-11Clean up GCD DEBUG() macros so DEBUG_CODE() is only used to enable/disable ↵mdkinney1-109/+81
the DBG MMIO and GCD I/O map dumps git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11243 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-06Add DEBUG() macros to all GCD services to monitor all changes to the GCD ↵mdkinney1-22/+216
Memory and GCD I/O maps when DEBUG_GCD is set in PcdDebugPrintErrorLevel. If DEBUG_PROPERTY_DEBUG_CODE_ENABLED is also set in PcdDebugPropertyMask, then the GCD Memory and I/O Maps will be dumped every time there is a GCD change. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11230 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-061) Change location of DEBUG() macro that prints the name of the FFS file ↵mdkinney1-2/+2
being evaluated by the DXE Dispatcher to eliminate a duplicate print. 2) Change location of DEBUG() macro that prints the name of the FFS file being evaluated by the SMM Dispatcher to eliminate a duplicate print. 3) Remove all references and processing of SOR from the PiSmmCore. Treat use of SOR in the dependency expression of an SMM Driver as an invalid depex opcode. 4) Remove all references for an SMM Driver being in the "Untrusted" state from the PiSmmCore. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11127 6f19259b-4bc3-4df7-8a09-765794883524