Revision: 18188
          http://sourceforge.net/p/edk2/code/18188
Author:   abiesheuvel
Date:     2015-08-07 17:27:24 +0000 (Fri, 07 Aug 2015)
Log Message:
-----------
ArmPlatformPkg/PrePeiCore: constify PPI globals

Since PrePeiCore's .text section contains an AARCH64 exception
vector table, its 2 KB alignment propagates to other sections as
well. Since this is a SEC module, it should not have any writable
data in the first place, so change some non-const PPI globals to
const. The resulting binary has no .data section at all, which
saves 2 KB in the XIP image.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindh...@linaro.org>

Modified Paths:
--------------
    trunk/edk2/ArmPlatformPkg/PrePeiCore/PrePeiCore.c

Modified: trunk/edk2/ArmPlatformPkg/PrePeiCore/PrePeiCore.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/PrePeiCore/PrePeiCore.c   2015-08-07 06:25:28 UTC 
(rev 18187)
+++ trunk/edk2/ArmPlatformPkg/PrePeiCore/PrePeiCore.c   2015-08-07 17:27:24 UTC 
(rev 18188)
@@ -21,19 +21,19 @@
 
 #include "PrePeiCore.h"
 
-EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI   mTemporaryRamSupportPpi = { 
PrePeiCoreTemporaryRamSupport };
-ARM_GLOBAL_VARIABLE_PPI             mGlobalVariablePpi = { 
PrePeiCoreGetGlobalVariableMemory };
+CONST EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI   mTemporaryRamSupportPpi = { 
PrePeiCoreTemporaryRamSupport };
+CONST ARM_GLOBAL_VARIABLE_PPI             mGlobalVariablePpi = { 
PrePeiCoreGetGlobalVariableMemory };
 
-EFI_PEI_PPI_DESCRIPTOR      gCommonPpiTable[] = {
+CONST EFI_PEI_PPI_DESCRIPTOR      gCommonPpiTable[] = {
   {
     EFI_PEI_PPI_DESCRIPTOR_PPI,
     &gEfiTemporaryRamSupportPpiGuid,
-    &mTemporaryRamSupportPpi
+    (VOID *) &mTemporaryRamSupportPpi
   },
   {
     EFI_PEI_PPI_DESCRIPTOR_PPI,
     &gArmGlobalVariablePpiGuid,
-    &mGlobalVariablePpi
+    (VOID *) &mGlobalVariablePpi
   }
 };
 


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to