/device/linaro/bootloader/edk2/BaseTools/Source/C/GenFw/ |
D | Elf64Convert.c | 472 NtHdr->Pe32Plus.Signature = EFI_IMAGE_NT_SIGNATURE; in ScanSections64() 476 NtHdr->Pe32Plus.FileHeader.Machine = EFI_IMAGE_MACHINE_X64; in ScanSections64() 477 NtHdr->Pe32Plus.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC; in ScanSections64() 480 NtHdr->Pe32Plus.FileHeader.Machine = EFI_IMAGE_MACHINE_IPF; in ScanSections64() 481 NtHdr->Pe32Plus.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC; in ScanSections64() 484 NtHdr->Pe32Plus.FileHeader.Machine = EFI_IMAGE_MACHINE_AARCH64; in ScanSections64() 485 NtHdr->Pe32Plus.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC; in ScanSections64() 489 NtHdr->Pe32Plus.FileHeader.Machine = EFI_IMAGE_MACHINE_X64; in ScanSections64() 490 NtHdr->Pe32Plus.OptionalHeader.Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC; in ScanSections64() 493 NtHdr->Pe32Plus.FileHeader.NumberOfSections = mCoffNbrSections; in ScanSections64() [all …]
|
D | GenFw.c | 1014 } else if (ImgHdr->Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) { in RebaseImage() 1015 ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress; in RebaseImage()
|
/device/linaro/bootloader/edk2/SecurityPkg/Tcg/Tcg2Dxe/ |
D | MeasureBootPeCoff.c | 144 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in MeasurePeImageAndExtend() 145 HashSize = (UINTN) ((UINT8 *)(&Hdr.Pe32Plus->OptionalHeader.CheckSum) - HashBase); in MeasurePeImageAndExtend() 171 HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32); in MeasurePeImageAndExtend() 172 HashSize = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - ImageAddress); in MeasurePeImageAndExtend() 195 HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32); in MeasurePeImageAndExtend() 196 …HashSize = (UINTN) ((UINT8 *)(&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTR… in MeasurePeImageAndExtend() 220 …HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURIT… in MeasurePeImageAndExtend() 221 HashSize = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - ImageAddress); in MeasurePeImageAndExtend() 244 SumOfBytesHashed = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders; in MeasurePeImageAndExtend() 326 … CertSize = Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size; in MeasurePeImageAndExtend()
|
/device/linaro/bootloader/edk2/SecurityPkg/Tcg/TrEEDxe/ |
D | MeasureBootPeCoff.c | 144 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in MeasurePeImageAndExtend() 145 HashSize = (UINTN) ((UINT8 *)(&Hdr.Pe32Plus->OptionalHeader.CheckSum) - HashBase); in MeasurePeImageAndExtend() 171 HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32); in MeasurePeImageAndExtend() 172 HashSize = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - ImageAddress); in MeasurePeImageAndExtend() 195 HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32); in MeasurePeImageAndExtend() 196 …HashSize = (UINTN) ((UINT8 *)(&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTR… in MeasurePeImageAndExtend() 220 …HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURIT… in MeasurePeImageAndExtend() 221 HashSize = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - ImageAddress); in MeasurePeImageAndExtend() 244 SumOfBytesHashed = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders; in MeasurePeImageAndExtend() 326 … CertSize = Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size; in MeasurePeImageAndExtend()
|
/device/linaro/bootloader/edk2/MdePkg/Library/BasePeCoffLib/ |
D | BasePeCoff.c | 346 … if (EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES < Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes) { in PeCoffLoaderGetPeHeader() 356 if (((UINT32)Hdr.Pe32Plus->FileHeader.SizeOfOptionalHeader - HeaderWithoutDataDir) != in PeCoffLoaderGetPeHeader() 357 Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes * sizeof (EFI_IMAGE_DATA_DIRECTORY)) { in PeCoffLoaderGetPeHeader() 362 …ffHeaderOffset + sizeof (UINT32) + sizeof (EFI_IMAGE_FILE_HEADER) + Hdr.Pe32Plus->FileHeader.SizeO… in PeCoffLoaderGetPeHeader() 366 if (Hdr.Pe32Plus->OptionalHeader.SizeOfImage <= SectionHeaderOffset) { in PeCoffLoaderGetPeHeader() 370 …if ((Hdr.Pe32Plus->OptionalHeader.SizeOfImage - SectionHeaderOffset) / EFI_IMAGE_SIZEOF_SECTION_HE… in PeCoffLoaderGetPeHeader() 378 if (Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders <= SectionHeaderOffset) { in PeCoffLoaderGetPeHeader() 382 if (Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders >= Hdr.Pe32Plus->OptionalHeader.SizeOfImage) { in PeCoffLoaderGetPeHeader() 386 …if ((Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - SectionHeaderOffset) / EFI_IMAGE_SIZEOF_SECTION_… in PeCoffLoaderGetPeHeader() 398 Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - 1, in PeCoffLoaderGetPeHeader() [all …]
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePeCoffLib/ |
D | BasePeCoff.c | 148 ImageContext->ImageType = Hdr.Pe32Plus->OptionalHeader.Subsystem; in GluePeCoffLoaderGetPeHeader() 149 ImageContext->ImageSize = (UINT64) Hdr.Pe32Plus->OptionalHeader.SizeOfImage; in GluePeCoffLoaderGetPeHeader() 150 ImageContext->SectionAlignment = Hdr.Pe32Plus->OptionalHeader.SectionAlignment; in GluePeCoffLoaderGetPeHeader() 151 ImageContext->SizeOfHeaders = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders; in GluePeCoffLoaderGetPeHeader() 243 ImageContext->ImageAddress = Hdr.Pe32Plus->OptionalHeader.ImageBase; in GluePeCoffLoaderGetImageInfo() 289 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in GluePeCoffLoaderGetImageInfo() 290 …DebugDirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI… in GluePeCoffLoaderGetImageInfo() 570 Adjust = (UINT64) BaseAddress - Hdr.Pe32Plus->OptionalHeader.ImageBase; in GluePeCoffLoaderRelocateImage() 571 Hdr.Pe32Plus->OptionalHeader.ImageBase = (UINT64)BaseAddress; in GluePeCoffLoaderRelocateImage() 573 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in GluePeCoffLoaderRelocateImage() [all …]
|
/device/linaro/bootloader/edk2/SecurityPkg/Library/DxeTpmMeasureBootLib/ |
D | DxeTpmMeasureBootLib.c | 449 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in TcgMeasurePeImage() 450 HashSize = (UINTN) ((UINT8 *)(&Hdr.Pe32Plus->OptionalHeader.CheckSum) - HashBase); in TcgMeasurePeImage() 476 HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32); in TcgMeasurePeImage() 477 HashSize = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - ImageAddress); in TcgMeasurePeImage() 500 HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32); in TcgMeasurePeImage() 501 …HashSize = (UINTN) ((UINT8 *)(&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTR… in TcgMeasurePeImage() 525 …HashBase = (UINT8 *) &Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURIT… in TcgMeasurePeImage() 526 HashSize = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - ImageAddress); in TcgMeasurePeImage() 549 SumOfBytesHashed = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders; in TcgMeasurePeImage() 631 … CertSize = Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size; in TcgMeasurePeImage()
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/ |
D | PeCoffLoader.c | 434 ImageContext->ImageAddress = Hdr.Pe32Plus->OptionalHeader.ImageBase; in PeCoffLoaderGetImageInfo() 486 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in PeCoffLoaderGetImageInfo() 487 …DebugDirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI… in PeCoffLoaderGetImageInfo() 777 Adjust = (UINT64) BaseAddress - Hdr.Pe32Plus->OptionalHeader.ImageBase; in PeCoffLoaderRelocateImage() 778 Hdr.Pe32Plus->OptionalHeader.ImageBase = (UINT64)BaseAddress; in PeCoffLoaderRelocateImage() 780 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in PeCoffLoaderRelocateImage() 781 RelocDir = &Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC]; in PeCoffLoaderRelocateImage() 1268 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in PeCoffLoaderLoadImage() 1269 …DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE… in PeCoffLoaderLoadImage() 1394 …DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE… in PeCoffLoaderLoadImage()
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePeCoffGetEntryPointLib/ |
D | PeCoffGetEntryPoint.c | 186 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in PeCoffLoaderGetPdbPointer() 187 …DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAG… in PeCoffLoaderGetPdbPointer()
|
/device/linaro/bootloader/edk2/DuetPkg/EfiLdr/ |
D | PeLoader.c | 100 *ImageBase = PeHdr.Pe32Plus.OptionalHeader.ImageBase; in EfiLdrGetPeImageInfo() 202 …DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(PeHdr.Pe32Plus.OptionalHeader.DataDirectory[EFI_IMA… in EfiLdrPeCoffLoadPeImage() 272 NumberOfRvaAndSizes = PeHdr.Pe32Plus.OptionalHeader.NumberOfRvaAndSizes; in EfiLdrPeCoffLoadPeImage() 273 DataDirectory = PeHdr.Pe32Plus.OptionalHeader.DataDirectory; in EfiLdrPeCoffLoadPeImage() 375 ImageBase = PeHdr.Pe32Plus.OptionalHeader.ImageBase; in EfiLdrPeCoffLoadPeImage()
|
/device/linaro/bootloader/edk2/SecurityPkg/Library/DxeImageVerificationLib/ |
D | DxeImageVerificationLib.c | 393 HashSize = (UINTN) ((UINT8 *) (&mNtHeader.Pe32Plus->OptionalHeader.CheckSum) - HashBase); in HashPeImage() 394 NumberOfRvaAndSizes = mNtHeader.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in HashPeImage() 426 HashBase = (UINT8 *) &mNtHeader.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32); in HashPeImage() 427 HashSize = mNtHeader.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - mImageBase); in HashPeImage() 450 HashBase = (UINT8 *) &mNtHeader.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32); in HashPeImage() 451 …HashSize = (UINTN) ((UINT8 *) (&mNtHeader.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTO… in HashPeImage() 475 …HashBase = (UINT8 *) &mNtHeader.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_S… in HashPeImage() 476 HashSize = mNtHeader.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) (HashBase - mImageBase); in HashPeImage() 499 SumOfBytesHashed = mNtHeader.Pe32Plus->OptionalHeader.SizeOfHeaders; in HashPeImage() 582 …CertSize = mNtHeader.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Si… in HashPeImage() [all …]
|
/device/linaro/bootloader/edk2/EmulatorPkg/Library/PeiEmuPeCoffGetEntryPointLib/ |
D | PeiEmuPeCoffGetEntryPointLib.c | 211 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in PeCoffLoaderGetPdbPointer() 212 …DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAG… in PeCoffLoaderGetPdbPointer()
|
/device/linaro/bootloader/edk2/MdePkg/Library/BasePeCoffGetEntryPointLib/ |
D | PeCoffGetEntryPoint.c | 230 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in PeCoffLoaderGetPdbPointer() 231 …DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAG… in PeCoffLoaderGetPdbPointer()
|
/device/linaro/bootloader/edk2/Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/ |
D | PeCoffGetEntryPoint.c | 238 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in PeCoffLoaderGetPdbPointer() 239 …DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAG… in PeCoffLoaderGetPdbPointer()
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Foundation/Efi/Include/ |
D | EfiImage.h | 695 EFI_IMAGE_NT_HEADERS64 Pe32Plus; member 701 EFI_IMAGE_NT_HEADERS64 *Pe32Plus; member
|
/device/linaro/bootloader/edk2/EmbeddedPkg/GdbStub/ |
D | GdbStub.c | 944 SizeOfHeaders = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders; in PeCoffLoaderGetDebuggerInfo() 945 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in PeCoffLoaderGetDebuggerInfo() 946 …DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAG… in PeCoffLoaderGetDebuggerInfo()
|
/device/linaro/bootloader/edk2/MdePkg/Include/IndustryStandard/ |
D | PeImage.h | 745 EFI_IMAGE_NT_HEADERS64 Pe32Plus; member 751 EFI_IMAGE_NT_HEADERS64 *Pe32Plus; member
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/Include/IndustryStandard/ |
D | PeImage.h | 758 EFI_IMAGE_NT_HEADERS64 Pe32Plus; member 764 EFI_IMAGE_NT_HEADERS64 *Pe32Plus; member
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/Common/ |
D | BasePeCoff.c | 1329 NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; in PeCoffLoaderGetPdbPointer() 1330 …DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAG… in PeCoffLoaderGetPdbPointer() 1443 *BaseOfImage = (VOID *)(UINTN)Hdr.Pe32Plus->OptionalHeader.ImageBase; in PeCoffLoaderGetEntryPoint()
|
/device/linaro/bootloader/edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/ |
D | SecureBootConfigImpl.c | 1765 HashSize = (UINTN) ((UINT8 *) (&mNtHeader.Pe32Plus->OptionalHeader.CheckSum) - HashBase); in HashPeImage() 1787 HashBase = (UINT8 *) &mNtHeader.Pe32Plus->OptionalHeader.CheckSum + sizeof (UINT32); in HashPeImage() 1788 …HashSize = (UINTN) ((UINT8 *) (&mNtHeader.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTO… in HashPeImage() 1809 …HashBase = (UINT8 *) &mNtHeader.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_S… in HashPeImage() 1810 …HashSize = mNtHeader.Pe32Plus->OptionalHeader.SizeOfHeaders - (UINTN) ((UINT8 *) (&mNtHeader.Pe32P… in HashPeImage() 1829 SumOfBytesHashed = mNtHeader.Pe32Plus->OptionalHeader.SizeOfHeaders; in HashPeImage() 1908 … mNtHeader.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size - in HashPeImage()
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/EfiRom/ |
D | EfiRom.c | 833 } else if (PeHdr.Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) { in CheckPE32File() 834 *SubSystem = PeHdr.Pe32Plus.OptionalHeader.Subsystem; in CheckPE32File()
|
/device/linaro/bootloader/edk2/MdeModulePkg/Core/Dxe/Mem/ |
D | MemoryProfileRecord.c | 217 return Hdr.Pe32Plus->OptionalHeader.Subsystem; in InternalPeCoffGetSubsystem()
|
/device/linaro/bootloader/edk2/MdeModulePkg/Core/Dxe/Misc/ |
D | PropertiesTable.c | 1118 SectionAlignment = Hdr.Pe32Plus->OptionalHeader.SectionAlignment; in InsertImageRecord()
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/GenFv/ |
D | GenFvInternalLib.c | 3349 } else if (ImgHdr->Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) { in FfsRebase() 3350 ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress; in FfsRebase()
|
/device/linaro/bootloader/edk2/MdeModulePkg/Core/PiSmmCore/ |
D | SmramProfileRecord.c | 169 return Hdr.Pe32Plus->OptionalHeader.Subsystem; in InternalPeCoffGetSubsystem()
|