Commit Graph

285 Commits

Author SHA1 Message Date
Star Zeng 0a13a62413 MdeModulePkg PeiCore: Add NULL pointer check.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15846 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-20 07:05:55 +00:00
Gao, Liming 9d8de12c31 Update PeiCore to follow PI spec to retrieve GUIDED section data when ExtractionPpi is not found.
Enhance PeiCore Security Policy to check AuthenticationStatus when SecurityPpi is not found.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Zeng, Star <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15817 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-18 05:43:06 +00:00
Zeng, Star fe7819402c MdeModulePkg/IntelFrameworkModulePkg: Update PeiCore, SmbiosDxe and IsaSerialDxe to use PcdGetxx() instead of FixedPcdGetxx().
It changes some of the PCD declarations to add more supported PCD storage types and
the change in the PCD access methods is associated with that.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zeng, Star <star.zeng@intel.com>
Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15798 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 05:55:08 +00:00
Star Zeng 6c8cfb0751 MdeModulePkg PeiCore: The DEBUG message (for HeapOffset and StackOffset) should be placed after HeapOffset is got.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15787 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-12 01:41:25 +00:00
Eric Dong 523f48e771 Refine code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15598 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-26 03:24:25 +00:00
Star Zeng 387208ab04 MdeModulePkg/SecurityPkg: Update TreePei to handle FvInfo2 and update FwVol of PeiCore to always install both FvInfo and FvInfo2.
Contributed-under: TianoCore Contribution Agreement 1.0
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://svn.code.sf.net/p/edk2/code/trunk/edk2@15467 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-15 09:19:04 +00:00
Gao, Liming ffd332cac1 1. Add new API MigratePeiServicesTablePointer() in PeiServicesTablePointerLib class.
2. PeiCore will call this API to migrate the PEI Services Table pointer from temporary RAM to permanent RAM.

Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15115 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-15 02:17:30 +00:00
Gao, Liming 21d9882c61 Clarify PcdPeiCoreMaxPeimPerFv description that means the maximum supported file count in one FV, not only PEIM.
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Zeng, Star <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15066 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-09 05:25:56 +00:00
Liming Gao 18d3e28062 Update the heap migration logic to avoid memory overflow.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15036 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-02 07:16:09 +00:00
Liming Gao d958a7e0bc Correct the RemainingPages calculation in PEI AllocatePages service.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15035 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-02 02:38:32 +00:00
Liming Gao 9b8e61be26 Fix two issues in PeiCore.
1. HOB address is not 8 byte alignment.
2. FV with the max supported PEIM can't be dispatched. 

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14993 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17 06:21:33 +00:00
Liming Gao 0f9ebb3216 Add support for PI1.2.1 TempRam Done PPI.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14847 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-15 02:05:11 +00:00
Star Zeng c79351059e 1. Enable use-cases in PEI using SecurityPPI co-equal to the use-cases in DXE using the Security Arch Protocol
2. Add support to find section by instance rather than only 0 at PEI phase.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14763 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-11 03:54:13 +00:00
Liming Gao 5d7f312635 Update PeiCore to support load PEIM into memory on S3 boot path.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14757 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-09 05:39:51 +00:00
Star Zeng 3837e91c58 MdeModulePkg: Add support for weakly aligned FVs.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14671 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-16 01:50:44 +00:00
Liming Gao 63e70348e4 Fixed the issue in PeiCore on Load Module At Fixed Address logic
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14623 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-04 02:20:25 +00:00
ydong10 935efc217f In order to make sure the image is section alignment, after allocate buffer for TE image, it will adjust the base address. But it has two potential issues: One is the start address may not section alignment, second is the buffer is not bigger enough to do the adjustment. This patch fixes these two issues.
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@14145 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-27 02:09:01 +00:00
lzeng14 8472f1f59d Build the registered guid HOB and SystemTable to record the GUID itself in PeiExtractGuidedSectionLib and DxeExtractGuidedSectionLib, and also state the restriction in BaseExtractGuidedSectionLib.
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13930 6f19259b-4bc3-4df7-8a09-765794883524
2012-11-08 01:12:56 +00:00
erictian a326830d70 MdeModulePkg: eliminate all implicit library dependencies for all modules in MdeModulePkg on PcdLib
Signed-off-by: Tian Feng <feng.tian@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13909 6f19259b-4bc3-4df7-8a09-765794883524
2012-11-01 06:59:25 +00:00
li-elvin 37623a5c02 Add missing status code in several modules.
Signed-off-by: Li Elvin <elvin.li@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Gao Liming <liming.gao@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>
Reviewed-by: Fan Jeff <jeff.fan@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13890 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-30 04:23:40 +00:00
erictian 02bbc6ee99 MdeModulePkg:removes the unreachable ‘break’ instruction after a ‘return’ instruction in the switch().
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13778 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-29 02:44:33 +00:00
lgao4 e94728b359 Update HobLib and Hob Service to avoid data over flow.
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@13533 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-17 01:51:26 +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
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 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
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
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 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
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
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
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
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 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
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
vanjeff d0a3ead235 Changed TEMPORARY_RAM_SUPPORT_PPI to EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11385 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-14 02:03:35 +00:00
lgao4 89cd8129f7 Update PeiCore and DxeCore to verify FFS data checksum.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11332 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-23 03:09:55 +00:00
mdkinney 6a55eea3eb Update PEI/DXE/SMM dispatchers to include DEBUG ((DEBUG_DISPATCH, )) macros to log the evaluation of all dependency expressions.
This logging can be enabled by setting the DEBUG_DISPATCH bit(0x80) of the PCD gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel.





git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11117 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-04 20:05:09 +00:00
ydong10 c9325700d0 Refine soma code to make code run safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10877 6f19259b-4bc3-4df7-8a09-765794883524
2010-09-15 07:48:11 +00:00
andrewfish 1c8029e3aa Update the previous fix to only shadow the function for supported processor architectrues. The old way required non supported processor architectures to opt out.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10637 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-07 23:27:08 +00:00
andrewfish 27172c0f36 Fix issue with ARM port. Image.c shadow code is not ANSI C and crashes on ARM. So I did the same thing that is done on Itanium and skipped the shadow for ARM architecture in all cases.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10636 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-07 23:10:14 +00:00
mdkinney 6b22483ffb 1) Call ProcessNotifyList() to process all Dispatch Notifications after the Memory Discovered PPI is installed.
2) Add ProcessLibraryConstructorList() call when OldCoreData != NULL and OldCoreData->ShadowedPeiCore == NULL.
3) Make sure no lib functions are used prior to the ProcessLibraryConstructorList() call.
4) Clean up comments



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10611 6f19259b-4bc3-4df7-8a09-765794883524
2010-06-29 06:08:14 +00:00
mdkinney ef05e06350 1) Fix IPF ICC 11.1 issue when /Ox is used related to the use of local variables and parameter across the transition when TEMP RAM is disabled.
2) Update the logic that computes the offset of the heap and stack from TEMP RAM to Permanent RAM to handle all possible offsets values.
3) Minor cleanups to the PEI_CORE_INSTANCE structure
4) Simplify the logic that manages the TEMP RAM to PERM RAM transition and clean up the related DEBUG() messages.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10481 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-11 22:11:31 +00:00
mdkinney 4da3058929 Fix ICC 11.1 build break
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10467 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-07 23:25:20 +00:00
hhtian cd5ebaa06d Update the copyright notice format
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10420 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-24 09:49:11 +00:00
jchen20 b7250b714a Fixed a bug in LMFA code
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10233 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-12 04:35:00 +00:00
jchen20 9bfb494096 The patch attached is to fix the issue that LMFA feature is failed on OVMF. The root cause is that OVMF platform reserved 128k top memory range for EMU variable range before PEI memory range re-locate to specified memory range, which is quite different from real platform. The original implementation has an assumption that AllocatePage will NOT be invoked until PEI memory range is re-located to preassigned memory range, , which is TRUE in most real platform, but FALSE on OVMF platform. So This patch is to enhanced the memory resource HOB re-organization algorithm to eliminate the assumption.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10225 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-10 02:47:05 +00:00
qhuang8 4237d40b77 Minor update comment to remove unprintable character in source file.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10214 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-09 05:58:00 +00:00
jchen20 def75b5dad Fix a bug in load modules at fixed address which may potentially impact OS S3.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10175 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-04 03:16:55 +00:00
jchen20 f73b3df815 Fix a bug in LMFA which may potentially impact OS S3.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10174 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-04 03:10:41 +00:00
rsun3 60cf9cfc14 Minor bug fix and robustness check improvement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10168 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-03 09:40:16 +00:00
klu2 ccf0f68d73 Add checking whether FvCount is overflow when new unknown FvInfoPpi is dispatched.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10146 6f19259b-4bc3-4df7-8a09-765794883524
2010-03-01 08:59:00 +00:00
geekboy15a 3978f5d92b Fixed GCC build issue caused by converting a pointer to an integer of a larger size.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10115 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-26 19:17:16 +00:00
xli24 64ca68027b Add parameter checking for PEI service AllocatePages(), according to PI1.2 errata A.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10112 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-26 09:26:52 +00:00
jchen20 4fb720763c Fix a bug in "Load module At fixed address" to enable it on IPF platform
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10106 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-26 07:43:00 +00:00
jgong5 f505090909 Avoid shadowing PE image read function on IPF
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10057 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-24 07:00:37 +00:00
lgao4 6bfbb5f0e0 1. Correct File header to ## @file
2. Remove unnecessary .common] postfix on section.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10052 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-24 00:21:16 +00:00
jgong5 25973fc3ea Enhance memory copy logic for PEI core image read. The change uses CopyMem() library function for unshadowed version and uses inline implementation for a shadowed version. This reduces PE image reading time to 1/5 - 1/10 when code cache is disabled. The change also fixed a memory leak when allocating shadow space for image read function.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10038 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-22 05:48:06 +00:00
klu2 20ead7252b Fix the issue that unknown format FV in Fvhob is installed for FvInfoPpi more than one time. The fixing is search dispatched Fv database and cached unknown Fv information for all Fv in FvHob, if Fv has been identified by PeiCore, then no need install FvInfoPpi for it again.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9984 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-11 05:49:48 +00:00
rsun3 4140a6635b Coding style fix and minor improvements.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9977 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-11 02:33:16 +00:00
jchen20 852081fc68 revise the debug message to add 0x in front of the HEX number for consistency
replace FixedPcdGetXX with PcdGetXX to access PcdLoadModuleAtFixAddressEnable

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9964 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-10 06:10:53 +00:00
jchen20 e18fa16721 modified to pass the ICC build
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9939 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-05 08:34:15 +00:00
jchen20 54ea99a798 Enable the Load Module At fixed Address feature
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9937 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-05 07:54:16 +00:00
jgong5 087e13cbe2 Enable PEI core to differentiate PEIMs in performance log by passing PEIM file handles
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9927 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-04 04:31:12 +00:00
mdkinney 188e4e8444 Remove unnecessary use of FixedPcdxxx() functions and [FixedPcd] INF sections. These should only be used for PCDs that are used to pre-init global variables, pre-init global structures, or size arrays.
Do some minor clean ups to INF files
 


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9868 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-29 23:39:48 +00:00
xli24 f9876ecf8a Remove reference to PCDs of status code value. Use macros introduced in PI1.2 instead.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9833 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-27 04:00:58 +00:00
lgao4 414bdfb663 Print the warning information for the image without relocation only when load it into memory.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9822 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-26 06:37:15 +00:00
klu2 2e76dc7e79 Remove ASSERT() to make AllocatePool() service match PI spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9815 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-26 04:28:30 +00:00
klu2 b4d856a6b5 Fix the issue that accessing for unaligned address break IPF
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9809 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-25 09:56:20 +00:00
lgao4 341a658fca Correct PeiCore not dispatch the register for shadow image without relocation.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9796 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-24 12:55:59 +00:00
lgao4 bfd4a3f1b4 Update PeiLoadFilePpi produced by PeiCore to load only images with relocation into memory.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9775 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-15 09:48:37 +00:00
rsun3 aa75dfeccd Fix some coding style issues in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9774 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-15 08:03:23 +00:00
klu2 1c738c8f97 When found the file according to given file name guid, PeiFfs2FvPpiFindFileByName() should break the searching loop and return success.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9742 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-14 05:31:07 +00:00
mdkinney f4391d63e0 Update INF file to properly declare which PCDs must be Fixed, and update PCD usage that does not require the FixedPcdGetxx() access method.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9732 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-14 01:59:30 +00:00
mdkinney 1427885873 Cleanup INF file for PEI Core
1) Remove references to CPU I/O PPI and PCI CFG2 PPI.  The PEI Core does have the PEI Services Table that caches a copy of these, but the PEI Core never produces a real version of these PPIs.  Instead, the PEI Core only has a null implementation of the APIs so we can catch PIEMs that call these services before they are properly installed.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9731 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-14 01:40:51 +00:00
klu2 8fdcc4123b check whether FvHandle is NULL for FfsGetVolumeInfo() interface.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9664 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-04 05:20:18 +00:00
klu2 8d415937c8 Add default implementation of EFI_CPU_IO_PPI and EFI_PCI_CFG2_PPI for EFI_SERVICES_TABLE.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9662 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-04 04:36:37 +00:00
xli24 dc05231352 Fix ICC compiler warning.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9612 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-25 08:05:53 +00:00
klu2 f335832963 Add fixing for supporting third-party FV in unknown format.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9601 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-25 02:28:47 +00:00
klu2 dc6f9b3542 Move the Fv updating of PeiCore's internal structure PrivateData out of the implementation of build-in Ffs2's EFI_PEI_FIRMWARE_VOLUME_PPI. Because this PPI maybe provided by other PEIM/Sec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9510 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-03 05:41:05 +00:00
klu2 7ec939170c Remove the tab characters.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9509 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-03 02:51:50 +00:00
klu2 8e0e40ed3d After PeiCore is shadowed into permanent memory, the pointers to build-in Ffs2 FvPpi should be also fixed up to be pointed to the one in permanent memory.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9508 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-03 02:48:05 +00:00
klu2 595d4b4c24 The FV size in EFI_FV_INFO has been excluded the length of FV header, so no need subtract the length of FV header again when compute the length of Apriori file.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9494 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-27 02:38:32 +00:00
klu2 3e4c5b49e4 Add checking for VolumeHandle, if VolumeHandle is NULL, return EFI_INVALID_PARAMETER
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9482 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-25 06:26:03 +00:00
xli24 5a9403b8f3 Following 3 updates are for spec update published in PI 1.2.
1. Rename EFI_PEI_NEXT_VARIABLE_NAME2 to EFI_PEI_GET_NEXT_VARIABLE_NAME2, as PI 1.2 specifies.
2. Add return status description for PEI Service FfsGetVolumeInfo.
3. Update parameter description for EFI_PEI_READ_ONLY_VARIABLE2_PPI.NextVariableName().

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9438 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-17 15:00:28 +00:00
klu2 1b620adba6 Remove a typo
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9429 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-16 04:53:48 +00:00
klu2 ca577976b4 Initialize the FileHandle to NULL, before search FV image file in discoveried FV
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9428 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-16 04:52:29 +00:00
klu2 2f016ba866 To make backward compatiblity, if can not find corresponding the handle of FV then treat FV as build-in FFS2 format and memory mapped FV that FV handle is pointed to the address of first byte of FV.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9409 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-11 05:51:45 +00:00
klu2 3b428adef9 Enabling EFI_PEI_FIRMWARE_VOLUME_PPI introduced by PI1.2.
1, Implement EFI_PEI_FIRMWARE_VOLUME_PPI for FFS2 format as build-in supporting FV format in PeiCore.
2, Reduce the assumption of memory-mapped FV in PeiCore. PeiCore should access FV via EFI_PEI_FIRMWARE_VOLUME_PPI interface but not cast FvHandle/FileHandle to EFI_FIRMWARE_VOLUME_HEADER/EFI_FV_FILE_HEADER directly.
3, Reduce AllFv[] and AllFvCount in PEI_CORE_INSTANCE structure. Original PEI_CORE_INSTANCE use AllFv[] and Fv[] array to manage discovered FV and dispatched FV. But not need to make thing too complex. Now PEI_CORE_FV_HANDLE array of Fv[] will take responsibility to manage all FV instance and status.
4, Fix the bug use PeiDispatcher use wrong index for PeiFfsFindNextVolume(), 
5, Fix the bug in PeiFfsFindNextVolume(), if instance is not found, *VolumeHandle should be set to NULL but not VolumeHandle was set to NULL.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9407 6f19259b-4bc3-4df7-8a09-765794883524
2009-11-11 03:27:39 +00:00
lgao4 6d9a0f280d Update comments on setting >= 8 bytes Fv Alignment.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9372 6f19259b-4bc3-4df7-8a09-765794883524
2009-10-26 09:14:47 +00:00
jchen20 c2a19e9235 For now PEI Core LoadImage() service to always call LoadAndRelocatePeCoffImage() even for XIP PEIMs.However the AllocatePage invoked in S3 path will make system assert. The patch is to fix it.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9368 6f19259b-4bc3-4df7-8a09-765794883524
2009-10-26 06:54:55 +00:00
jljusten 6e6971f0e2 PEI Core: Remove unused variable in PeiLoadImageLoadImage function.
The ICC compiler generated a warning due to this unused variable.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9334 6f19259b-4bc3-4df7-8a09-765794883524
2009-10-08 21:35:03 +00:00
mdkinney 43ada17c28 Update PEI Core LoadImage() service to always call LoadAndRelocatePeCoffImage() even for XIP PEIMs. This will guarantee that the PE/COFF Extra Action Lib will be called for all PE/COFF images, even XIP PEIMs.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9327 6f19259b-4bc3-4df7-8a09-765794883524
2009-10-01 23:49:36 +00:00
lgao4 db0b7ad5f4 Make ASSERT statement more meaningful.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9276 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-17 01:57:24 +00:00
lgao4 919df8e6d2 Enhance PeiCore and DxeCore check whether the image machine type is supported when start image.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9266 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-16 02:37:23 +00:00
lgao4 ed5ac057bf Set correctly FV format guid when install FV INFO PPI.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9254 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-10 07:20:10 +00:00
qhuang8 8c519a565d 1. Update IA32 PeiCore implementation to support load x64 image for EFI_PEI_LOAD_FILE_PPI.
2. Simplify the implementation of PeiLoadImage() in PeiCore to skip the function call of PeiLoadImageLoadImage() because PeiCore itself produce one instance of EFI_PEI_LOAD_FILE_PPI.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9045 6f19259b-4bc3-4df7-8a09-765794883524
2009-08-11 15:45:16 +00:00
eric_tian 3d4d0c34f9 updated to use the term “temporary memory” but not CAR
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8035 6f19259b-4bc3-4df7-8a09-765794883524
2009-04-08 08:14:09 +00:00
klu2 3152f167db PeiInstallPeiMemory should only be called one time.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7867 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-12 07:43:02 +00:00
qhuang8 98a601b177 Add comments and refine code to avoid addition overflow.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7863 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-11 13:59:22 +00:00
lgao4 18fcd6a70c Add check to the allocated pool.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7861 6f19259b-4bc3-4df7-8a09-765794883524
2009-03-11 02:53:15 +00:00