On 15 September 2017 at 03:13, Leif Lindholm <[email protected]> wrote: > On Fri, Sep 15, 2017 at 08:02:34PM +0530, Meenakshi Aggarwal wrote: >> From: Udit Kumar <[email protected]> >> >> While creating Hob list, ArmPlatformPkg is hiding UEFI memory. >> whereas this memory can be used by OS. >> >> This patch, allows OS to use UEFI code area. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Meenakshi Aggarwal <[email protected]> >> Signed-off-by: Udit Kumar <[email protected]> > > I will let Ard comment on the technical aspect, since you've been > discussing this offline. > > However, there is something broken in your setup: the patch should > look like this: > --- > iff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > index 2feb11f21d..d3fa894244 100644 > --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > @@ -150,7 +150,7 @@ MemoryPeim ( > } else { > // Create the System Memory HOB for the > // firmware with the non-present attribute > BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, > - ResourceAttributes & > ~EFI_RESOURCE_ATTRIBUTE_PRESENT, > + ResourceAttributes, > PcdGet64 (PcdFdBaseAddress), > PcdGet32 (PcdFdSize)); > > @@ -161,7 +161,7 @@ MemoryPeim ( > } else { > // Create the System Memory HOB for the firmware > // with the non-present attribute > BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, > - ResourceAttributes & > ~EFI_RESOURCE_ATTRIBUTE_PRESENT, > + ResourceAttributes, > PcdGet64 (PcdFdBaseAddress), > PcdGet32 (PcdFdSize)); > > --- > > I am guessing you have inadvertently modified the line terminations > from CRLF to LF (the evidence gets stripped out by SMTP). > Please resubmit with this addressed. >
Thanks for the patch. But please consider carefully what you're doing: in the original code, the entire DRAM region is added, and subsequently split up so the part that overlaps with the FD can be registered with different attributes. After your patch, we carefully isolate the region that overlaps the FD, and subsequently register it with the exact same attributes, which means we didn't have to isolate it in the first place. My point is really that you can just remove lines 124 - 189 instead. _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

