> -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ard > Biesheuvel > Sent: Tuesday, May 30, 2023 3:58 PM > To: devel@edk2.groups.io; Ni, Ray <ray...@intel.com> > Cc: Yao, Jiewen <jiewen....@intel.com>; Gerd Hoffmann <kra...@redhat.com>; > Taylor Beebe <t...@taylorbeebe.com>; Oliver Smith-Denny <osd@smith- > denny.com>; Bi, Dandan <dandan...@intel.com>; Gao, Liming > <gaolim...@byosoft.com.cn>; Kinney, Michael D <michael.d.kin...@intel.com>; > Leif Lindholm <quic_llind...@quicinc.com>; Michael Kubacki > <mikub...@linux.microsoft.com> > Subject: Re: [edk2-devel] [RFC PATCH 08/11] MdeModulePkg/DxeIpl: Relocate > and remap XIP capable DXE drivers > > On Tue, 30 May 2023 at 08:45, Ni, Ray <ray...@intel.com> wrote: > > > > 1. is it possible that a PE image sits in the right location but the > SectionAlignment is larger than FileAlignment so each section still needs to > be > copied to the aligned memory location? > > > > That is a good question. Currently, the ELF toolchains rely on GenFw > to construct the PE images in a way that permits execution in place, > but I have no idea how this works with native PE/COFF toolchains. > > > 2. PeCoffLoaderRelocateImage() might not be called for XIP > > > > Are you saying it is not permitted? Or that it may not happen? > > In any case, relocating the image in place is exactly what the > BaseTools do for XIP PEIMs, so I think applying the same logic here is > reasonable.
But when the image is in SPI flash (MMIO device, rather in physical memory), relocating the image in place should not be performed. Or you require platform build strips the relocation section for drivers XIP in SPI flash? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#105430): https://edk2.groups.io/g/devel/message/105430 Mute This Topic: https://groups.io/mt/99197142/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-