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.
/
Leif
> ---
> ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c | 28
> ++++++++++++-------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
> b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
> index 2feb11f..ae6ebc4 100644
> --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
> +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
> @@ -147,24 +147,24 @@ MemoryPeim (
> if (PcdGet64 (PcdFdBaseAddress) ==
> NextHob.ResourceDescriptor->PhysicalStart) {
> if (SystemMemoryTop == FdTop) {
> NextHob.ResourceDescriptor->ResourceAttribute =
> ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT;
> - } else {
> - // Create the System Memory HOB for the firmware with the
> non-present attribute
> - BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,
> - ResourceAttributes &
> ~EFI_RESOURCE_ATTRIBUTE_PRESENT,
> - PcdGet64 (PcdFdBaseAddress),
> - PcdGet32 (PcdFdSize));
> -
> + } else {
> + // Create the System Memory HOB for the firmware with the
> non-present attribute
> + BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,
> + ResourceAttributes,
> + PcdGet64 (PcdFdBaseAddress),
> + PcdGet32 (PcdFdSize));
> +
> // Top of the FD is system memory available for UEFI
> NextHob.ResourceDescriptor->PhysicalStart += PcdGet32(PcdFdSize);
> NextHob.ResourceDescriptor->ResourceLength -=
> PcdGet32(PcdFdSize);
> }
> - } else {
> - // Create the System Memory HOB for the firmware with the
> non-present attribute
> - BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,
> - ResourceAttributes &
> ~EFI_RESOURCE_ATTRIBUTE_PRESENT,
> - PcdGet64 (PcdFdBaseAddress),
> - PcdGet32 (PcdFdSize));
> -
> + } else {
> + // Create the System Memory HOB for the firmware with the
> non-present attribute
> + BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY,
> + ResourceAttributes,
> + PcdGet64 (PcdFdBaseAddress),
> + PcdGet32 (PcdFdSize));
> +
> // Update the HOB
> NextHob.ResourceDescriptor->ResourceLength = PcdGet64
> (PcdFdBaseAddress) - NextHob.ResourceDescriptor->PhysicalStart;
>
> --
> 1.9.1
>
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel