/device/linaro/bootloader/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/ |
D | FileBuffer.c | 19 EFI_EDITOR_FILE_BUFFER FileBuffer; variable 82 CopyMem (&FileBuffer , &FileBufferConst, sizeof (EFI_EDITOR_FILE_BUFFER)); in FileBufferInit() 88 FileBuffer.FileName = EditGetDefaultFileName (L"txt"); in FileBufferInit() 89 if (FileBuffer.FileName == NULL) { in FileBufferInit() 93 FileBuffer.ListHead = AllocateZeroPool (sizeof (LIST_ENTRY)); in FileBufferInit() 94 if (FileBuffer.ListHead == NULL) { in FileBufferInit() 98 InitializeListHead (FileBuffer.ListHead); in FileBufferInit() 100 FileBuffer.DisplayPosition.Row = 2; in FileBufferInit() 101 FileBuffer.DisplayPosition.Column = 1; in FileBufferInit() 102 FileBuffer.LowVisibleRange.Row = 2; in FileBufferInit() [all …]
|
D | MainTextEditor.c | 32 extern EFI_EDITOR_FILE_BUFFER FileBuffer; 325 if (MainEditor.FileBuffer->FileModified) { in MainCommandOpenFile() 360 Status = FileBufferSave (MainEditor.FileBuffer->FileName); in MainCommandOpenFile() 365 …arRefresh (MainEditor.FileBuffer->FileName, MainEditor.FileBuffer->FileType, MainEditor.FileBuffer… in MainCommandOpenFile() 389 FileBufferRead (MainEditor.FileBuffer->FileName, TRUE); in MainCommandOpenFile() 395 FileBufferRead (MainEditor.FileBuffer->FileName, TRUE); in MainCommandOpenFile() 417 FileBufferRead (MainEditor.FileBuffer->FileName, TRUE); in MainCommandOpenFile() 431 FileBufferRead (MainEditor.FileBuffer->FileName, TRUE); in MainCommandOpenFile() 453 if (MainEditor.FileBuffer->ReadOnly) { in MainCommandSwitchFileType() 458 if (MainEditor.FileBuffer->FileType == FileTypeUnicode) { in MainCommandSwitchFileType() [all …]
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Sample/Tools/Source/GenCRC32Section/ |
D | GenCRC32Section.c | 46 IN OUT UINT8 *FileBuffer, in SignSectionWithCrc32() argument 91 Status = CalculateCrc32 (FileBuffer, DataSize, &Crc32Checksum); in SignSectionWithCrc32() 111 memcpy (SwapBuffer, FileBuffer, DataSize); in SignSectionWithCrc32() 112 memcpy (FileBuffer, &Crc32Header, CRC32_SECTION_HEADER_SIZE); in SignSectionWithCrc32() 113 memcpy (FileBuffer + CRC32_SECTION_HEADER_SIZE, SwapBuffer, DataSize); in SignSectionWithCrc32() 119 FileBuffer[TotalSize] = 0; in SignSectionWithCrc32() 163 IN OUT UINT8 **FileBuffer, in ReadFilesContentsIntoBuffer() argument 194 (*FileBuffer)[Size++] = Temp; in ReadFilesContentsIntoBuffer() 205 (*FileBuffer)[Size] = 0; in ReadFilesContentsIntoBuffer() 226 UINT8 *FileBuffer; in main() local [all …]
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/GenFw/ |
D | ElfConvert.c | 158 UINT8 *FileBuffer in IsElfHeader() argument 161 return (FileBuffer[EI_MAG0] == ELFMAG0 && in IsElfHeader() 162 FileBuffer[EI_MAG1] == ELFMAG1 && in IsElfHeader() 163 FileBuffer[EI_MAG2] == ELFMAG2 && in IsElfHeader() 164 FileBuffer[EI_MAG3] == ELFMAG3); in IsElfHeader() 169 UINT8 **FileBuffer, in ConvertElf() argument 180 EiClass = (*FileBuffer)[EI_CLASS]; in ConvertElf() 182 if (!InitializeElf32 (*FileBuffer, &ElfFunctions)) { in ConvertElf() 186 if (!InitializeElf64 (*FileBuffer, &ElfFunctions)) { in ConvertElf() 229 free (*FileBuffer); in ConvertElf() [all …]
|
D | GenFw.c | 100 IN OUT UINT8 *FileBuffer, 107 IN OUT UINT8 *FileBuffer, 537 UINT8 **FileBuffer, in PeCoffConvertImageToXip() argument 552 PeHdr = GetPeCoffHeader ((void *) *FileBuffer); in PeCoffConvertImageToXip() 637 memcpy (XipFile, *FileBuffer, PeHdr->Pe32.OptionalHeader.SizeOfHeaders); in PeCoffConvertImageToXip() 653 *FileBuffer + SectionHeader->PointerToRawData, in PeCoffConvertImageToXip() 664 free (*FileBuffer); in PeCoffConvertImageToXip() 666 *FileBuffer = XipFile; in PeCoffConvertImageToXip() 835 IN OUT UINT8 *FileBuffer, in SetAddressToSectionHeader() argument 866 ImageContext.Handle = (VOID *) FileBuffer; in SetAddressToSectionHeader() [all …]
|
D | GenFw.h | 47 UINT8 *FileBuffer 52 UINT8 **FileBuffer,
|
D | Elf64Convert.h | 21 UINT8 *FileBuffer,
|
D | Elf32Convert.h | 21 UINT8 *FileBuffer,
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Sample/Tools/Source/GenSection/ |
D | GenSection.c | 283 UINT8 *FileBuffer, in GetSectionContents() argument 346 if (FileSize > 0 && FileBuffer != NULL && (Size + (UINTN) FileSize) <= *BufferLength) { in GetSectionContents() 347 if (fread (FileBuffer + Size, (size_t) FileSize, 1, InFile) != 1) { in GetSectionContents() 360 if (FileBuffer != NULL && Size < *BufferLength) { in GetSectionContents() 361 FileBuffer[Size] = 0; in GetSectionContents() 417 UINT8 *FileBuffer; in GenSectionCompressionSection() local 429 FileBuffer = NULL; in GenSectionCompressionSection() 439 FileBuffer, in GenSectionCompressionSection() 444 FileBuffer = (UINT8 *) malloc (InputLength); in GenSectionCompressionSection() 445 if (FileBuffer == NULL) { in GenSectionCompressionSection() [all …]
|
/device/linaro/bootloader/edk2/IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/ |
D | UpdateDispatcher.c | 364 UINT8 *FileBuffer; in PerformUpdate() local 374 FileBuffer = NULL; in PerformUpdate() 379 (VOID **) &FileBuffer, in PerformUpdate() 407 if (FileBuffer != NULL) { in PerformUpdate() 408 FreePool (FileBuffer); in PerformUpdate() 411 FileBuffer = NULL; in PerformUpdate() 418 (VOID **) &FileBuffer, in PerformUpdate() 430 FileBuffer, in PerformUpdate() 461 FileBuffer, in PerformUpdate() 478 FileBuffer, in PerformUpdate() [all …]
|
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeSecurityManagementLib/ |
D | DxeSecurityManagementLib.c | 223 VOID *FileBuffer; in ExecuteSecurityHandlers() local 241 FileBuffer = NULL; in ExecuteSecurityHandlers() 253 if (FileBuffer == NULL) { in ExecuteSecurityHandlers() 259 FileBuffer = GetFileBufferByFilePath (FALSE, FilePath, &FileSize, &AuthenticationStatus); in ExecuteSecurityHandlers() 260 if (FileBuffer == NULL) { in ExecuteSecurityHandlers() 264 FileBuffer = GetFileBufferByFilePath (TRUE, FilePath, &FileSize, &AuthenticationStatus); in ExecuteSecurityHandlers() 266 if ((FileBuffer != NULL) && (!EFI_ERROR (Status))) { in ExecuteSecurityHandlers() 277 FileBuffer, in ExecuteSecurityHandlers() 285 if (FileBuffer != NULL) { in ExecuteSecurityHandlers() 286 FreePool (FileBuffer); in ExecuteSecurityHandlers() [all …]
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/GenCrc32/ |
D | GenCrc32.c | 131 UINT8 *FileBuffer; in main() local 150 FileBuffer = NULL; in main() 289 FileBuffer = (UINT8 *) malloc (FileSize); in main() 290 if (FileBuffer == NULL) { in main() 296 fread (FileBuffer, 1, FileSize, InFile); in main() 313 Status = CalculateCrc32 (FileBuffer, FileSize, &Crc32Value); in main() 323 fwrite (FileBuffer, 1, FileSize, OutFile); in main() 329 Status = CalculateCrc32 (FileBuffer + sizeof (UINT32), FileSize - sizeof (UINT32), &Crc32Value); in main() 334 …0x%08x and File Crc32 value is 0x%08x", (unsigned) Crc32Value, (unsigned) (*(UINT32 *)FileBuffer)); in main() 335 if (Crc32Value != *(UINT32 *)FileBuffer) { in main() [all …]
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/GenSec/ |
D | GenSec.c | 394 UINT8 *FileBuffer, in GetSectionContents() argument 460 if (FileBuffer != NULL && Size < *BufferLength) { in GetSectionContents() 461 FileBuffer[Size] = 0; in GetSectionContents() 535 if (FileBuffer != NULL && ((Size + Offset) < *BufferLength)) { in GetSectionContents() 539 memset (FileBuffer + Size, 0, Offset); in GetSectionContents() 540 SectHeader = (EFI_COMMON_SECTION_HEADER *) (FileBuffer + Size); in GetSectionContents() 556 if ((FileSize > 0) && (FileBuffer != NULL) && ((Size + FileSize) <= *BufferLength)) { in GetSectionContents() 557 if (fread (FileBuffer + Size, (size_t) FileSize, 1, InFile) != 1) { in GetSectionContents() 621 UINT8 *FileBuffer; in GenSectionCompressionSection() local 629 FileBuffer = NULL; in GenSectionCompressionSection() [all …]
|
/device/linaro/bootloader/edk2/MdeModulePkg/Library/UefiBootManagerLib/ |
D | BmBoot.c | 160 VOID *FileBuffer; in BmGetFileBufferByFvFilePath() local 168 FileBuffer = GetFileBufferByFilePath (TRUE, FilePath, FileSize, &AuthenticationStatus); in BmGetFileBufferByFvFilePath() 169 if (FileBuffer != NULL) { in BmGetFileBufferByFvFilePath() 172 return FileBuffer; in BmGetFileBufferByFvFilePath() 193 FileBuffer = BmGetFileBufferByFvFilePath (NewDevicePath, FullPath, FileSize); in BmGetFileBufferByFvFilePath() 196 if (FileBuffer != NULL) { in BmGetFileBufferByFvFilePath() 197 return FileBuffer; in BmGetFileBufferByFvFilePath() 210 for (Index = 0; (Index < FvHandleCount) && (FileBuffer == NULL); Index++) { in BmGetFileBufferByFvFilePath() 218 FileBuffer = BmGetFileBufferByFvFilePath (NewDevicePath, FullPath, FileSize); in BmGetFileBufferByFvFilePath() 225 return FileBuffer; in BmGetFileBufferByFvFilePath() [all …]
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Sample/Tools/Source/GenFfsFile/ |
D | GenFfsFile.c | 502 IN OUT UINT8 *FileBuffer, in GenSimpleGuidSection() argument 562 memcpy (SwapBuffer, FileBuffer, DataSize); in GenSimpleGuidSection() 563 memcpy (FileBuffer, &GuidSectionHeader, sizeof (EFI_GUID_DEFINED_SECTION)); in GenSimpleGuidSection() 564 memcpy (FileBuffer + sizeof (EFI_GUID_DEFINED_SECTION), SwapBuffer, DataSize); in GenSimpleGuidSection() 570 FileBuffer[TotalSize] = 0; in GenSimpleGuidSection() 586 UINT8 *FileBuffer, in CompressSection() argument 667 Status = CompressFunction (FileBuffer, DataSize, CompData, &CompSize); in CompressSection() 674 Status = CompressFunction (FileBuffer, DataSize, CompData, &CompSize); in CompressSection() 711 memcpy (FileBuffer, &CompressionSet, sizeof (EFI_COMPRESSION_SECTION)); in CompressSection() 712 memcpy (FileBuffer + sizeof (CompressionSet), CompData, CompSize); in CompressSection() [all …]
|
/device/linaro/bootloader/edk2/IntelFrameworkModulePkg/Universal/FirmwareVolume/FwVolDxe/ |
D | FwVolRead.c | 328 UINT8 *FileBuffer; in FvReadFile() local 447 FileBuffer = AllocateCopyPool (FileSize, SrcPtr); in FvReadFile() 448 if (FileBuffer == NULL) { in FvReadFile() 453 *Buffer = FileBuffer; in FvReadFile() 521 UINT8 *FileBuffer; in FvReadFileSection() local 544 FileBuffer = NULL; in FvReadFileSection() 548 (VOID **) &FileBuffer, in FvReadFileSection() 562 FreePool (FileBuffer); in FvReadFileSection() 574 FreePool (FileBuffer); in FvReadFileSection() 581 FileBuffer, in FvReadFileSection() [all …]
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Sample/Tools/Source/FwImage/ |
D | fwimage.c | 110 IN UINT8 *FileBuffer, in ZeroExceptionTable() argument 166 Section = (EFI_IMAGE_SECTION_HEADER *) &FileBuffer[DosHdr->e_lfanew + SectionOffset]; in ZeroExceptionTable() 172 FileBuffer + DosHdr->e_lfanew + SectionOffset, in ZeroExceptionTable() 181 memset (FileBuffer + PdataOffset, 0, PdataSize); in ZeroExceptionTable() 194 IN UINT8 *FileBuffer, in StripZeroPendingReloc() argument 210 …SectionHeader = (EFI_IMAGE_SECTION_HEADER *)(FileBuffer + DosHdr->e_lfanew + sizeof(UINT32) + size… in StripZeroPendingReloc() 244 …SectionHeader = (EFI_IMAGE_SECTION_HEADER *)(FileBuffer + DosHdr->e_lfanew + sizeof(UINT32) + size… in StripZeroPendingReloc() 317 UINT8 *FileBuffer; in main() local 461 FReadFile (fpIn, (VOID **)&FileBuffer, &FileLength); in main() 465 DosHdr = (EFI_IMAGE_DOS_HEADER *) FileBuffer; in main() [all …]
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/GenFfs/ |
D | GenFfs.c | 240 OUT UINT8 *FileBuffer, in GetSectionContents() argument 383 if (FileBuffer != NULL && ((Size + Offset) < *BufferLength)) { in GetSectionContents() 387 memset (FileBuffer + Size, 0, Offset); in GetSectionContents() 388 … SectHeader = (EFI_FREEFORM_SUBTYPE_GUID_SECTION *) (FileBuffer + Size); in GetSectionContents() 426 if ((FileSize > 0) && (FileBuffer != NULL) && ((Size + FileSize) <= *BufferLength)) { in GetSectionContents() 427 if (fread (FileBuffer + Size, (size_t) FileSize, 1, InFile) != 1) { in GetSectionContents() 483 UINT8 *FileBuffer; in main() local 505 FileBuffer = NULL; in main() 801 FileBuffer, in main() 823 FileBuffer = (UINT8 *) malloc (FileSize); in main() [all …]
|
/device/linaro/bootloader/edk2/MdeModulePkg/Include/Library/ |
D | SecurityManagementLib.h | 91 IN VOID *FileBuffer, 196 IN VOID *FileBuffer, 271 IN VOID *FileBuffer,
|
/device/linaro/bootloader/OpenPlatformPkg/Applications/FirmwareUpdate/ |
D | FUpdate.c | 167 IN OUT UINTN **FileBuffer, in PrepareFirmwareImage() argument 214 *FileBuffer = Buffer; in PrepareFirmwareImage() 260 UINTN *FileBuffer = NULL; in ShellCommandRunFUpdate() local 308 Status = PrepareFirmwareImage (CheckPackage, &FileHandle, &FileBuffer, &FileSize); in ShellCommandRunFUpdate() 314 Status = CheckImageHeader (FileBuffer); in ShellCommandRunFUpdate() 333 Status = SpiFlashProtocol->Update (Slave, 0, FileSize, (UINT8 *)FileBuffer); in ShellCommandRunFUpdate() 337 FreePool (FileBuffer); in ShellCommandRunFUpdate() 352 FreePool (FileBuffer); in ShellCommandRunFUpdate()
|
/device/linaro/bootloader/edk2/MdeModulePkg/Universal/SecurityStubDxe/ |
D | SecurityStub.c | 139 IN VOID *FileBuffer, in Security2StubAuthenticate() argument 146 if (FileBuffer != NULL) { in Security2StubAuthenticate() 159 FileBuffer, in Security2StubAuthenticate()
|
/device/linaro/bootloader/OpenPlatformPkg/Applications/SpiTool/ |
D | SpiFlashCmd.c | 215 UINT8 *Buffer = NULL, *FileBuffer = NULL; in ShellCommandRunSpiFlash() local 398 FileBuffer = AllocateZeroPool ((UINTN) ByteCount); in ShellCommandRunSpiFlash() 399 if (FileBuffer == NULL) { in ShellCommandRunSpiFlash() 406 Status = FileHandleRead (FileHandle, &ByteCount, FileBuffer); in ShellCommandRunSpiFlash() 419 Buffer = FileBuffer; in ShellCommandRunSpiFlash() 464 Status = FileHandleWrite (FileHandle, &ByteCount, FileBuffer); in ShellCommandRunSpiFlash() 473 FreePool (FileBuffer); in ShellCommandRunSpiFlash() 483 FreePool (FileBuffer); in ShellCommandRunSpiFlash()
|
/device/linaro/bootloader/edk2/MdeModulePkg/Core/Dxe/FwVol/ |
D | FwVolRead.c | 444 UINT8 *FileBuffer; in FvReadFileSection() local 474 FileBuffer = ((UINT8 *) FfsEntry->FfsHeader) + sizeof (EFI_FFS_FILE_HEADER2); in FvReadFileSection() 476 FileBuffer = ((UINT8 *) FfsEntry->FfsHeader) + sizeof (EFI_FFS_FILE_HEADER); in FvReadFileSection() 492 FileBuffer, in FvReadFileSection()
|
/device/linaro/bootloader/edk2/EdkCompatibilityPkg/Sample/Tools/Source/Common/ |
D | SimpleFileParsing.c | 60 T_CHAR *FileBuffer; member 607 if (mGlobals.SourceFile.FileBuffer != NULL) { in SFPCloseFile() 608 free (mGlobals.SourceFile.FileBuffer); in SFPCloseFile() 718 SourceFile->FileBuffer = (T_CHAR *) malloc (SourceFile->FileSize + sizeof (T_CHAR)); in ProcessFile() 719 if (SourceFile->FileBuffer == NULL) { in ProcessFile() 724 fread ((void *) SourceFile->FileBuffer, SourceFile->FileSize, 1, SourceFile->Fptr); in ProcessFile() 725 SourceFile->FileBuffer[(SourceFile->FileSize / sizeof (T_CHAR))] = T_CHAR_NULL; in ProcessFile() 998 …if (SourceFile->FileBufferPtr >= SourceFile->FileBuffer + SourceFile->FileSize / sizeof (T_CHAR)) { in EndOfFile() 1241 SourceFile->FileBufferPtr = SourceFile->FileBuffer; in RewindFile()
|
/device/linaro/bootloader/edk2/BaseTools/Source/C/GenFv/ |
D | GenFvInternalLib.c | 683 IN EFI_FFS_FILE_HEADER *FileBuffer in IsVtfFile() argument 702 if (!memcmp (&FileBuffer->Name, &mEfiFirmwareVolumeTopFileGuid, sizeof (EFI_GUID))) { in IsVtfFile() 1129 UINT8 *FileBuffer; in AddFile() local 1162 FileBuffer = malloc (FileSize); in AddFile() 1163 if (FileBuffer == NULL) { in AddFile() 1169 NumBytesRead = fread (FileBuffer, sizeof (UINT8), FileSize, NewFile); in AddFile() 1180 free (FileBuffer); in AddFile() 1189 memcpy (FvImage->CurrentFilePointer, FileBuffer, FileSize); in AddFile() 1201 Status = VerifyFfsFile ((EFI_FFS_FILE_HEADER *)FileBuffer); in AddFile() 1203 free (FileBuffer); in AddFile() [all …]
|