summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix ECC issueklu22008-10-241-30/+30
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6214 6f19259b-4bc3-4df7-8a09-765794883524
* Update HobLib and PeCoffLib according to MDE Lib Spec 0.61clgao42008-10-101-7/+9
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6100 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Change 0 == Length style to Length == 0lgao42008-09-181-19/+20
| | | | | | | 2. Clean BasePeCoff library instance, only keep one copy PeCoffLoaderEx.c file for IA32, X64 and IPF arch 3. Clean the confused comments git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5927 6f19259b-4bc3-4df7-8a09-765794883524
* remove unnecessary comments introduced by tools from MdePkg. The regular ↵vanjeff2008-09-171-3/+1
| | | | | | express is "//^p//[ ]Include[ ]common[ ]header[ ]file[ ]for[ ]this[ ]module[.]^p//" git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5911 6f19259b-4bc3-4df7-8a09-765794883524
* Correct ECC Error for MdePkg/Include/Protocol and Correct PeCofferLib bug to ↵lgao42008-07-171-6/+10
| | | | | | set ImageContext->EntryPoint after relocate when the destination address is specified. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5514 6f19259b-4bc3-4df7-8a09-765794883524
* Clean up: update "EFI" to "UEFI" if applicable.qhuang82007-11-221-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4317 6f19259b-4bc3-4df7-8a09-765794883524
* Add one judge whether TeImage or PeImage has reloc section when relocate ↵lgao42007-10-261-0/+2
| | | | | | TeImage or PeImage into memory. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4224 6f19259b-4bc3-4df7-8a09-765794883524
* 1. Replace PeCoffLoader library by PeCoff lib for PeiCore, DxeIpl and DxeMain. lgao42007-09-281-0/+20
| | | | | | | | 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
* Removed MdePkg usage of ModuleName: in file headersAJFISH2007-07-121-2/+0
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3217 6f19259b-4bc3-4df7-8a09-765794883524
* Removed CommonHeader.h generated file from the MdePkg. AJFISH2007-06-291-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2922 6f19259b-4bc3-4df7-8a09-765794883524
* Add in BasePeCoff library instance.qwang122007-06-281-0/+1338
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2847 6f19259b-4bc3-4df7-8a09-765794883524
* Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break ↵lhauch2007-06-011-1333/+0
| | | | | | 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
* Make MDE package pass intel IPF compiler with /W4 /WX switched on.xli242007-01-251-60/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2312 6f19259b-4bc3-4df7-8a09-765794883524
* Fix PeLoad function can't handle invalid PeImage to skip correct debug entry.lgao42007-01-161-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2253 6f19259b-4bc3-4df7-8a09-765794883524
* Correct TeImage Header based on PeiCis spec.lgao42007-01-151-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2250 6f19259b-4bc3-4df7-8a09-765794883524
* Correct TeImage file format and Clean up PeiRebase tool to remove unused ↵lgao42007-01-151-2/+5
| | | | | | | | 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
* Correctly skip debug entry.lgao42007-01-121-5/+4
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2232 6f19259b-4bc3-4df7-8a09-765794883524
* Update BaseDebugLibNull to not touch any global variables or PCD settingsmdkinney2006-12-121-11/+52
| | | | | | 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
* 1. Adjust might be 64bit, so we need to typecast it to UINT32 firstly.vanjeff2006-08-151-41/+41
| | | | | | 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
* Fixed bugs found when this code was ported into R8. ajfish2006-08-111-5/+7
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1240 6f19259b-4bc3-4df7-8a09-765794883524
* TeImage Signature should be got from Te pointer, not Pe pointerlgao42006-07-281-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1136 6f19259b-4bc3-4df7-8a09-765794883524
* Added back safety check for PE/COFF image walking. I think the safety check ↵ajfish2006-07-261-0/+9
| | | | | | 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
* Removed cross references from PciCf8Lib and PciExpressLib class to PciLib ↵ajfish2006-07-261-207/+511
| | | | | | | | | | | | | | | | | | 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
* • BaseMemoryLib:qhuang82006-06-261-23/+23
| | | | | | | | | | | | | | | 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
* 1. UINTN & INTN issue for EBC architecture:qhuang82006-06-221-29/+22
| | | | | | | | | | | | | | | | | | | | | | | | 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
* 1. PostCodeLib.qhuang82006-06-191-66/+88
| | | | | | | | | | | | | | | | 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
* Initial import.bbahnsen2006-04-211-0/+1019
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524