Re: [edk2] [PATCH] ArmPlatformPkg: bring DS-5 scripts in line with linker script changes
On 10 November 2015 at 20:06, Leif Lindholm wrote: > On 10 November 2015 at 18:10, Ard Biesheuvel > wrote: >> On 6 November 2015 at 08:25, Ard Biesheuvel >> wrote: >>> The ARM and AARCH64 linker scripts have recently been updated so that >>> the memory layouts of the ELF and PE/COFF versions of each module are >>> identical. In particular, this means that the ELF images now have a >>> hole before the first section rather than starting at offset 0x0, which >>> means we no longer have to correct for this difference when loading the >>> ELF image into the debugger. >>> >>> Contributed-under: TianoCore Contribution Agreement 1.0 >>> Signed-off-by: Ard Biesheuvel >> >> Leif, >> >> Vladimir has confirmed that this patch fixes the DS-5 problems he was >> observing. >> Are you happy with me merging this patch? > > Sure, go ahead. > (I lost track of the state of this thread somewhere.) > Thanks. Committed as SVN r18775 (with your ack) -- Ard. ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] ArmPlatformPkg: bring DS-5 scripts in line with linker script changes
On 10 November 2015 at 18:10, Ard Biesheuvel wrote: > On 6 November 2015 at 08:25, Ard Biesheuvel wrote: >> The ARM and AARCH64 linker scripts have recently been updated so that >> the memory layouts of the ELF and PE/COFF versions of each module are >> identical. In particular, this means that the ELF images now have a >> hole before the first section rather than starting at offset 0x0, which >> means we no longer have to correct for this difference when loading the >> ELF image into the debugger. >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ard Biesheuvel > > Leif, > > Vladimir has confirmed that this patch fixes the DS-5 problems he was > observing. > Are you happy with me merging this patch? Sure, go ahead. (I lost track of the state of this thread somewhere.) / Leif ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] ArmPlatformPkg: bring DS-5 scripts in line with linker script changes
On 6 November 2015 at 08:25, Ard Biesheuvel wrote: > The ARM and AARCH64 linker scripts have recently been updated so that > the memory layouts of the ELF and PE/COFF versions of each module are > identical. In particular, this means that the ELF images now have a > hole before the first section rather than starting at offset 0x0, which > means we no longer have to correct for this difference when loading the > ELF image into the debugger. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Leif, Vladimir has confirmed that this patch fixes the DS-5 problems he was observing. Are you happy with me merging this patch? Thanks, Ard. > --- > ArmPlatformPkg/Scripts/Ds5/firmware_volume.py | 26 +++- > 1 file changed, 3 insertions(+), 23 deletions(-) > > diff --git a/ArmPlatformPkg/Scripts/Ds5/firmware_volume.py > b/ArmPlatformPkg/Scripts/Ds5/firmware_volume.py > index 8e3a8adc9bc8..c434e3de19da 100644 > --- a/ArmPlatformPkg/Scripts/Ds5/firmware_volume.py > +++ b/ArmPlatformPkg/Scripts/Ds5/firmware_volume.py > @@ -94,9 +94,7 @@ class EfiSectionTE: > stripped_size = struct.unpack(" self.ec.getMemoryService().read(self.base_te + 0x6, 2, 32))[0] > stripped_size -= EfiSectionTE.SIZEOF_EFI_TE_IMAGE_HEADER > > -base_of_code = self.ec.getMemoryService().readMemory32(self.base_te > + 0xC) > - > -return self.base_te + base_of_code - stripped_size > +return self.base_te - stripped_size > > class EfiSectionPE32: > def __init__(self, ec, base_pe32): > @@ -131,16 +129,7 @@ class EfiSectionPE32: > return filename[0:string.find(filename,'\0')] > > def get_debug_elfbase(self): > -# Offset from dos hdr to PE file hdr > -pe_file_header = self.base_pe32 + > self.ec.getMemoryService().readMemory32(self.base_pe32 + 0x3C) > - > -base_of_code = self.base_pe32 + > self.ec.getMemoryService().readMemory32(pe_file_header + 0x28) > -base_of_data = self.base_pe32 + > self.ec.getMemoryService().readMemory32(pe_file_header + 0x2C) > - > -if (base_of_code < base_of_data) and (base_of_code != 0): > -return base_of_code > -else: > -return base_of_data > +return self.base_pe32 > > class EfiSectionPE64: > def __init__(self, ec, base_pe64): > @@ -176,16 +165,7 @@ class EfiSectionPE64: > return filename[0:string.find(filename,'\0')] > > def get_debug_elfbase(self): > -# Offset from dos hdr to PE file hdr > -pe_file_header = self.base_pe64 + > self.ec.getMemoryService().readMemory32(self.base_pe64 + 0x3C) > - > -base_of_code = self.base_pe64 + > self.ec.getMemoryService().readMemory32(pe_file_header + 0x28) > -base_of_data = self.base_pe64 + > self.ec.getMemoryService().readMemory32(pe_file_header + 0x2C) > - > -if (base_of_code < base_of_data) and (base_of_code != 0): > -return base_of_code > -else: > -return base_of_data > +return self.base_pe64 > > class FirmwareFile: > EFI_FV_FILETYPE_RAW = 0x01 > -- > 1.9.1 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] ArmPlatformPkg: bring DS-5 scripts in line with linker script changes
The ARM and AARCH64 linker scripts have recently been updated so that the memory layouts of the ELF and PE/COFF versions of each module are identical. In particular, this means that the ELF images now have a hole before the first section rather than starting at offset 0x0, which means we no longer have to correct for this difference when loading the ELF image into the debugger. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/Scripts/Ds5/firmware_volume.py | 26 +++- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/ArmPlatformPkg/Scripts/Ds5/firmware_volume.py b/ArmPlatformPkg/Scripts/Ds5/firmware_volume.py index 8e3a8adc9bc8..c434e3de19da 100644 --- a/ArmPlatformPkg/Scripts/Ds5/firmware_volume.py +++ b/ArmPlatformPkg/Scripts/Ds5/firmware_volume.py @@ -94,9 +94,7 @@ class EfiSectionTE: stripped_size = struct.unpack("https://lists.01.org/mailman/listinfo/edk2-devel