Commit Graph

71 Commits

Author SHA1 Message Date
lgao4 9626a87e43 Add one judge whether TeImage or PeImage has reloc section when relocate TeImage or PeImage into memory.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4224 6f19259b-4bc3-4df7-8a09-765794883524
2007-10-26 09:28:29 +00:00
lgao4 3d7b0992fc 1. Replace PeCoffLoader library by PeCoff lib for PeiCore, DxeIpl and DxeMain.
2. Add three PeCoff library instances for NT32 PeImage load.
3. Update PeCoffGetEntryPointLib to support TeImage.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3965 6f19259b-4bc3-4df7-8a09-765794883524
2007-09-28 08:14:30 +00:00
AJFISH d5b86e43cf Removed MdePkg usage of ModuleName: in file headers
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3217 6f19259b-4bc3-4df7-8a09-765794883524
2007-07-12 22:59:43 +00:00
AJFISH f734a10ab1 Removed CommonHeader.h generated file from the MdePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2922 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-29 23:22:13 +00:00
qwang12 d071fb194d Add in BasePeCoff library instance.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2847 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-28 13:30:16 +00:00
lhauch 586cd1f1f4 Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing builds. Also updated the SPD and FPD files UiNames
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2616 6f19259b-4bc3-4df7-8a09-765794883524
2007-06-01 14:49:55 +00:00
xli24 582510249f Make MDE package pass intel IPF compiler with /W4 /WX switched on.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2312 6f19259b-4bc3-4df7-8a09-765794883524
2007-01-25 06:05:36 +00:00
lgao4 497ef745f0 Fix PeLoad function can't handle invalid PeImage to skip correct debug entry.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2253 6f19259b-4bc3-4df7-8a09-765794883524
2007-01-16 06:30:16 +00:00
lgao4 582c7220f8 Correct TeImage Header based on PeiCis spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2250 6f19259b-4bc3-4df7-8a09-765794883524
2007-01-15 11:24:23 +00:00
lgao4 5b66424456 Correct TeImage file format and Clean up PeiRebase tool to remove unused code and only relocate image.
Move two EFI_DEP_REPLACE_TRUE and DEPEX_STACK_SIZE_INCREMENT macros from MdePkg to EdkModule/DxeMain module, because these two macros are specific implementation, not defined in spec.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2249 6f19259b-4bc3-4df7-8a09-765794883524
2007-01-15 11:13:40 +00:00
lgao4 f92b6f195c Correctly skip debug entry.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2232 6f19259b-4bc3-4df7-8a09-765794883524
2007-01-12 04:54:20 +00:00
mdkinney 513b53b139 Update BaseDebugLibNull to not touch any global variables or PCD settings
Update BasePeCoffLib to include work around for Itanium ELILO images that do not follow the PE/COFF spec

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2083 6f19259b-4bc3-4df7-8a09-765794883524
2006-12-12 05:26:13 +00:00
vanjeff 9c7790d2cb 1. Adjust might be 64bit, so we need to typecast it to UINT32 firstly.
2. Synchronization modification described in Tracker EDKT182 to all dependent files.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1270 6f19259b-4bc3-4df7-8a09-765794883524
2006-08-15 06:35:47 +00:00
ajfish 317f832ef8 Fixed bugs found when this code was ported into R8.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1240 6f19259b-4bc3-4df7-8a09-765794883524
2006-08-11 18:04:56 +00:00
lgao4 c941b270ea TeImage Signature should be got from Te pointer, not Pe pointer
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1136 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-28 06:08:00 +00:00
ajfish 236877a6a7 Added back safety check for PE/COFF image walking. I think the safety check is broken in some places (Linux) but we need to investigate more.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1108 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-26 23:34:08 +00:00
ajfish 2ce311322c Removed cross references from PciCf8Lib and PciExpressLib class to PciLib class.
Added PeCoffLoaderGetMachineType to the PeCoffGetEntryPointLibrary Class. Document to be updated.

Added the PeCoffLoaderImageReadFromMemory() and PeCoffLoaderRelocateImageForRuntime () to the PcCoffLib. 

Updated EfiImage.h and removed EFI_IMAGE_OPTIONAL_HEADER and EFI_IMAGE_NT_HEADERS as they were replaced with checking the MachineType.

PeCoffLib – Added checks for MachineType so the PeCoff lib can load any PE32 or PE32+ image. The relocations are still limited to IA32, X64, IPF, and EBC. I also added a re-relocator function to remove PeLoader Code from Runtime Lib. Even though there is only one instance of the re-relocator I wanted to get all the PeCoff loader code together.

Replaced DEBUG_CODE() macro with DEBUG_CODE_START() and DEBUG_CODE_END() so you can debug through the DEBUG_CODE() macros. Also removed PE/COFF code and replaced with library usage.

I also updated the IO Instrinsic lib to use _ReadWriteBarrior() to help with sync problems

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1103 6f19259b-4bc3-4df7-8a09-765794883524
2006-07-26 15:23:35 +00:00
qhuang8 24e25d11c0 • BaseMemoryLib:
Modify some Aassert()s conditions to sync with MWG 0.56d
	Modify some defects in function header.
•	PostCodeLib:
Implement PeiDxePostCodeLibReportStatusCode.
•	Misc
Rename BaseDebugLibReportStatusCode to PeiDxeDebugLibReportStatusCode
	Remove tabs in all .c and .h files in MdePkg.
	Rename PeiServicesReinstallPpi() to PeiServicesReInstallPpi()
	Adjust some minor coding style in PeCoffLoaderGetEntryPointerLib()


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@626 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-26 10:18:28 +00:00
qhuang8 4ba61e5e2a 1. UINTN & INTN issue for EBC architecture:
The MAX_BIT of EBC will no longer be fixed to bit 63. It is defined as (1ULL << (sizeof (INTN) * 8 - 1)).
	Make EdkModulePkg & MdePkg EBC compiler clean: treat all EFI_STATUS error code as variable.
2. PrintLib
	Complete all missing ASSERT()s.
	Fix “\n” & “%\n” issue thanks to the clarification of MWG 0.56d.
	Adjust StatusString array to support EBC build.
3. BaseMemoryLib
	Adjust ASSERT () & function header of ComparaMem, SetMemXX, ScanMemXX to synchronize with MWG 0.56d.
4.SmbusLib
	Change Pec bit to bit 22 SmBusAddress to synchronize MWG 0.56d.
	Add ASSERT()s to check if length is illegal for SmBusBlockWrite() & SmBusProcessBlock() since it is 6 bit now.
5. PerformanceLib
	Rename “EdkDxePerformanceLib” & “EdkPeiPerformanceLib” to “DxePerformanceLib” & “PeiPerformanceLib” respectively.
	Synchronize the function header of GetPerformanceMeasurement() with MWG 0.56d.
6. BasePeCoffLoaderLib.
	Make PeCoffLoaderLoadImage () Assert() if ImageContext is NULL>
	Make PeCoffLoaderLoadImage () return RETURN_INVALID_PARAMETER if the ImageAddress in ImageContext is 0.
	Adjust some coding style.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@593 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-22 06:08:00 +00:00
qhuang8 cd14fe3dcf 1. PostCodeLib.
Rename BasePostCodeLib80 to BasePostCodeLibPort80. 
		Fix typos in macro POST_CODE() and POST_CODE_WITH_DESCRIPTION()
	2. DebugLib
		Change the parameter type of LineNumber of DebugAssert() from “INTN” to “UINTN” to follow MWG.
		Add type cast “(EFI_GUID *)” in macro ASSERT_PROTCOL_ALREADY_INSTALLED () to follow MWG.
	3. BasePeCoffLib/
		Add library function header for all the interfaces in MWG.
		Add missing ASSERT()s.
	4. PciLib
		Add ASSERT()s in PciRead/WriteBuffer() to check cross PCI function access.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@557 6f19259b-4bc3-4df7-8a09-765794883524
2006-06-19 07:40:23 +00:00
bbahnsen 878ddf1fc3 Initial import.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524
2006-04-21 22:54:32 +00:00