Commit Graph

559 Commits

Author SHA1 Message Date
ydong10 3e0587010e Enhance the error handling for AllocatePool and AllocatePages function.
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-27 02:48:46 +00:00
lzeng14 670d4d88ac Return EFI_INVALID_PARAMETER when Type has either EVT_NOTIFY_SIGNAL or 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-26 03:32:53 +00:00
ydong10 28186d4566 Validate some fields in PE image to make sure not access violation for later 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-04-24 03:00:32 +00:00
rsun3 b08b7ba451 MdeModulePkg PiSmmCore: Fix a bug in SmmLoadImage() in PiSmmCore that in-correct status codes may be returned.
Signed-off-by: Sun Rui <rui.sun@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13208 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-24 01:38:40 +00:00
lzeng14 f95f107c8e Searching for files starts on an 8 byte aligned boundary after the end of 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-27 01:57:51 +00:00
vanjeff 1e172d6bbf 1. Introduced CPU Exception Handler Library to provide the CPU exception 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-15 05:20:41 +00:00
ydong10 8a44cd74ec Enhance the error handling.
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-03-13 08:06:16 +00:00
lgao4 77a750a550 Fix the issue in PeiCore to support PDB file path without '\' or '.' character.
Signed-off-by: lgao4
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13069 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-29 04:56:53 +00:00
lgao4 1f33d18687 Don't install FV protocol on the corrupt FV image.
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-17 05:04:49 +00:00
ydong10 328ce03e55 Add code check to avoid access violation.
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
2012-02-15 02:43:07 +00:00
lgao4 1e21413c8c Fix the issue in PeiCore that doesn’t handle Unix style file path of PDB file.
Signed-off-by: lgao4
Reviewed-by:rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12906 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-04 04:17:48 +00:00
lgao4 bdc9d5a5d5 Add more check to make sure the valid pointer be used.
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-19 09:00:58 +00:00
lgao4 2fc46f86f9 Enhance DXE dispatcher logic to check the duplicated FV image bases on 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-15 06:50:54 +00:00
rsun3 da38df1d09 MdeModulePkg DXE Core: Refine code to avoid UNIXGCC build break.
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-09 02:35:04 +00:00
rsun3 a62da87e95 MdeModulePkg DXE Core: Fix overflow and truncation issues in the 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-12-06 05:24:27 +00:00
lgao4 e0e7f80cc3 Update code to pass build on VS2008 with /Od compiler option.
Signed-off-by: lgao4
Reviewed-by: rsun3
Reviewed-by: ftian


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12792 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-28 06:19:36 +00:00
lzeng14 795bb9b6c4 1. According to PI errata 0000840 and PI 1.2c Vol 3 3.2.3, remove 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-25 01:57:23 +00:00
rsun3 fc8ff20ff2 MdeModulePkg DXE Core: Update implementation of SetMemorySpaceAttributes() 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-23 08:15:14 +00:00
lgao4 d359254990 Update DxeCore handle FV Image file with Depex section per PI spec.
Signed-off-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12763 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-23 03:12:04 +00:00
jljusten 7538d53684 MdeModulePkg: Remove variables that are set, but not used
GCC 4.6 generates a warning when a variable is set,
but never used.

Signed-off-by: jljusten
Reviewed-by: lgao4
Reviewed-by: erictian
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12617 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-31 15:58:05 +00:00
lzeng14 6c85d16217 Add core FFS3 support, DxeCore.
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-10-27 09:23:19 +00:00
lzeng14 890e54170e Add core FFS3 support, PeiCore and DxeIpl.
Signed-off-by: lzeng14
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12583 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-27 09:04:50 +00:00
vanjeff bdfbe63efa Store PeiServices** when updating IDT table in DxeIplPeim before transfer to long mode.
Signed-off-by: vanjeff
Reviewed-by: rsun3
Reviewed-by: mdkinney



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12580 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-27 05:26:02 +00:00
lgao4 f00237c1d2 Fix ICC9 build break.
Signed-off-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12446 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-27 03:46:25 +00:00
lgao4 60c0073fd7 Remove ASSERT (EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Image->Machine)) in StartImage.
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-09-26 09:32:30 +00:00
jyao1 378175d258 Add PCD for 1G page table
signed off by: jyao1
reviewed by: jfan12

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12397 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-21 03:45:35 +00:00
rsun3 2740a797df MdeModulePkg PeiMain: Enhance the PEI Core to convert GUID/PPI pointers pointing to somewhere in the temporary stack in PPI descriptors.
Signed-off-by: rsun3
Reviewed-by: lzeng14


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12390 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-20 09:17:48 +00:00
jyao1 54d3b84e3e Correct 1G page table generation.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12380 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-19 13:02:05 +00:00
rsun3 424b7c9f8f Enhance the PEI Core to convert pointers pointing to PPI descriptors on the temporary stack.
Signed-off by: rsun3
Reviewed-by:   li-elvin


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12354 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-15 06:48:20 +00:00
jyao1 c56b65665d Use CPU_HOB to detect max address support from platform, and added 1G page table support.
Sign-off-by: jyao1
Reviewed-by: li-elvin

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12332 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-13 05:48:57 +00:00
mdkinney f02dfb5aee Rollback SMRAM Lock location
Signed-off-by: mdkinney
Reviewed-by: rsun3


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12243 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-31 02:26:36 +00:00
erictian db0f0d3c79 Remove CONST modifier to be spec compliance
Signed-off-by: erictian
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12194 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-24 09:38:10 +00:00
mdkinney 5657b268e7 Update SMM Core to use SMM Mode as soon as SMM Mode is available
Signed-off-by: mdkinney
Reviewed-by: rsun3



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12190 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-24 06:49:21 +00:00
vanjeff d12a2ecb2a Updated GCD implementation to consume the correct EFI Resources 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-18 02:05:46 +00:00
rsun3 495797c557 1. Add two performance measurement points for SMM performance measurement;
2. Introduce SmmCorePlatformHookLib library class defining two platform hook points. Update PI Smm Core to call the hook points before and after invoking registered SMI handlers. A NULL instance of this library class is implemented.

Note that after this check in, DSC files consuming the PiSmmCore.inf need to be updated to add a library instance for SmmCorePlatformHookLib library class.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12140 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-16 02:58:20 +00:00
oliviermartin f75316c3ab MdeModulePkg/Dxe: Move assertions inside CoreInsertGcdMapEntry()
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-08-08 18:16:22 +00:00
andrewfish d042796c1a MdeModulePkg: Fix VS2008 warning.
This looks amlost like a bug in VS2008, please verify that the warning is fixed as I don't ahve a copy of VS2008.

signed-off-by: andrewfish



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12020 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-15 15:19:05 +00:00
andrewfish e47f0da408 MdeModulePkg: Add PcdDxeIplBuildPageTables for DxeIpl X64 to optionally not rebuild the page tables.
signed-off-by: andrewfish
reviewed-by: rsun3



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12016 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-14 02:31:02 +00:00
rsun3 c4c085a2a6 Fix an issue that there may be an infinite loop in the 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-13 08:40:55 +00:00
lgao4 619b3e0e8d Correct the status code value to EFI_SW_PC_INIT_END after PEIM returns control to PeiCore.
Signed-off-by: lgao4
Reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12010 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-12 09:03:36 +00:00
niruiyu 284ee2e829 Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is 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-07-06 03:55:36 +00:00
jljusten 54cd17e984 MdeModulePkg DXE Core: Add Idle event during BootServices WaitForEvent
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-16 23:28:02 +00:00
lgao4 2b2f353371 Remove the unused TimerLib from PeiCore.
Signed-off-by: lgao4
Reviewed-by: rsun3


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11832 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-16 06:44:21 +00:00
niruiyu 31222776db Set *ImageHandle to NULL when LoadImage() returns EFI_ACCESS_DENIED.
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-10 03:05:40 +00:00
niruiyu 772cba0943 Add assertion in PeiAllocatePool when out of resource.
Signed-off-by: niruiyu
Reviewed-by: mdkinney

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11776 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-09 02:52:35 +00:00
niruiyu 10fe0d814a Fix crash in GetMemoryMap() when memory type 0x80000000-0xFFFFFFFF was 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-06-09 02:01:19 +00:00
andrewfish 63e78d5254 Fix X64 clang warnings.
Reviewed by: Rui Sun
Approved by: Rui Sun



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11753 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-04 22:27:37 +00:00
niruiyu 9f72ced4c5 Update the comments of InstallConfigurationTable to follow UEFI Spec.
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-31 03:15:58 +00:00
li-elvin 3d0a23854e Add more status code in drivers.
Signed-off-by: li-elvin
Reviewed-by: jyao1
Reviewed-by: lgao4
Reviewed-by: erictian

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11706 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-26 06:29:30 +00:00
erictian e439df5074 Make sure the return value of MapKey is correct by moving the assignment 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-25 03:04:31 +00:00