Reviewed-by: Jaben Carsey <jaben.car...@intel.com>

>-----Original Message-----
>From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
>Sent: Tuesday, June 30, 2015 6:18 AM
>To: edk2-devel@lists.sourceforge.net; ler...@redhat.com; Yao, Jiewen
>Cc: Fleming, Matt
>Subject: [edk2] [PATCH 5/5] MdeModulePkg: enforce arch-specific alignment for 
>split regions
>
>The splitting of memory regions into code and data regions violates
>architecture specific alignment rules by using a fixed alignment
>of 4 KB. Replace it with EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT,
>which is defined appropriately on each architecture.
>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
>---
> MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
>diff --git a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c 
>b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
>index 0232a3ce7d93..01ecca64ab0a 100644
>--- a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
>+++ b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
>@@ -785,7 +785,7 @@ SetPropertiesTableSectionAlignment (
>   IN UINT32  SectionAlignment
>   )
> {
>-  if (((SectionAlignment & (SIZE_4KB - 1)) != 0) &&
>+  if (((SectionAlignment & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) 
>!= 0) &&
>       ((mPropertiesTable.MemoryProtectionAttribute &
>EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA) != 0)) {
>     DEBUG ((EFI_D_VERBOSE, "SetPropertiesTableSectionAlignment - Clear\n"));
>     mPropertiesTable.MemoryProtectionAttribute &=
>~EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA;
>@@ -1119,8 +1119,9 @@ InsertImageRecord (
>   }
>
>   SetPropertiesTableSectionAlignment (SectionAlignment);
>-  if ((SectionAlignment & (SIZE_4KB - 1)) != 0) {
>-    DEBUG ((EFI_D_ERROR, "!!!!!!!!  InsertImageRecord - Section 
>Alignment(0x%x) is not 4K  !!!!!!!!\n", SectionAlignment));
>+  if ((SectionAlignment & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) 
>!= 0) {
>+    DEBUG ((EFI_D_ERROR, "!!!!!!!!  InsertImageRecord - Section 
>Alignment(0x%x) is not %dK  !!!!!!!!\n",
>+      SectionAlignment, EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT >> 10));
>     PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*) (UINTN) ImageAddress);
>     if (PdbPointer != NULL) {
>       DEBUG ((EFI_D_ERROR, "!!!!!!!!  Image - %a  !!!!!!!!\n", PdbPointer));
>--
>1.9.1
>
>
>------------------------------------------------------------------------------
>Don't Limit Your Business. Reach for the Cloud.
>GigeNET's Cloud Solutions provide you with the tools and support that
>you need to offload your IT needs and focus on growing your business.
>Configured For All Businesses. Start Your Cloud Today.
>https://www.gigenetcloud.com/
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to