diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-08-07 17:27:24 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-08-07 17:27:24 +0000 |
commit | 0c7cc4fb923d802a9dda4f6126884aba34fdab76 (patch) | |
tree | af7e706ce13b137cd3703e673205040a5bae8b8a | |
parent | 1fe76acce62910fdf6e01a7419a5669ea026676c (diff) | |
download | edk2-platforms-0c7cc4fb923d802a9dda4f6126884aba34fdab76.tar.xz |
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.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18188 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | ArmPlatformPkg/PrePeiCore/PrePeiCore.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c index 43ae40de2f..491d7a6f85 100644 --- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c @@ -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
}
};
|