Are there any tools in the edk2 to patch a PCD in an FD? I was looking at what a debugger has to do to load symbols for the SEC or PEI and it seems like a lot of work. It looks like all you know is the base of the FV. You then have to search that FV for an FFS file then open up the sections of the file to find the PE/COFF section, and then parse the PE/COFF section of that file.
It seems bad that you have to include FV cracking code in SEC, just to load symbols. Especially given the data you needs ends up in the *.Fv.map file. The PI spec caches a copy of the PEI Entry Point at a known location so you would not have to include FV cracking code in yet another location. So it would be nice if there were some patchable in module PCD values that could be patched post FD build to make this a much simpler process. For example there could be a PCD for SecCoreImageBase, and PeiCoreImageBase. For bonus points we could include the address of the PdbPointers too. https://svn.code.sf.net/p/edk2/code/trunk/edk2/ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.c // // Get the Sec or PrePeiCore module (defined as SEC type module) // Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdSecureFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader); if (!EFI_ERROR(Status)) { Status = GetImageContext (FfsHeader,&ImageContext); if (!EFI_ERROR(Status)) { PeCoffLoaderRelocateImageExtraAction (&ImageContext); } } Thanks, Andrew Fish
------------------------------------------------------------------------------
_______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel