From 8d3640d22610eeb9a21c803d75c698e681a1dc62 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 16 May 2022 12:27:36 +0200 Subject: vendorcode/amd/agesa/f15tn: Fix all improper use of .data AGESA has a lot of code in the .data section which is for initialized data, that in fact should be .rodata. This adds the 'CONST' keyword everywhere it is needed. TEST: See in the .elf file (e.g. using readelf) that there is nothing in .data section. Change-Id: I9593c24f764319f66a64715d91175f64edf10608 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/64386 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Stefan Reinauer --- src/vendorcode/amd/agesa/f15tn/Include/OptionMemory.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/vendorcode/amd/agesa/f15tn/Include') diff --git a/src/vendorcode/amd/agesa/f15tn/Include/OptionMemory.h b/src/vendorcode/amd/agesa/f15tn/Include/OptionMemory.h index 2494ba98d9..41a416fbde 100644 --- a/src/vendorcode/amd/agesa/f15tn/Include/OptionMemory.h +++ b/src/vendorcode/amd/agesa/f15tn/Include/OptionMemory.h @@ -123,7 +123,7 @@ typedef BOOLEAN OPTION_MEM_FEATURE_MAIN ( typedef BOOLEAN MEM_NB_CONSTRUCTOR ( IN OUT MEM_NB_BLOCK *NBPtr, IN OUT MEM_DATA_STRUCT *MemPtr, - IN MEM_FEAT_BLOCK_NB *FeatPtr, + CONST IN MEM_FEAT_BLOCK_NB *FeatPtr, IN MEM_SHARED_DATA *mmSharedPtr, ///< Pointer to Memory scratchpad IN UINT8 NodeID ); @@ -242,7 +242,7 @@ typedef struct _MEM_NB_SUPPORT { UINT16 MemNBSupportVersion; ///< Version of northbridge support. MEM_NB_CONSTRUCTOR *MemConstructNBBlock; ///< NorthBridge block constructor. MEM_INITIALIZER *MemNInitDefaults; ///< Default value initialization for MEM_DATA_STRUCT. - MEM_FEAT_BLOCK_NB *MemFeatBlock; ///< Memory feature block. + CONST MEM_FEAT_BLOCK_NB *MemFeatBlock; ///< Memory feature block. MEM_RESUME_CONSTRUCTOR *MemS3ResumeConstructNBBlock; ///< S3 memory initialization northbridge block constructor. MEM_IDENDIMM_CONSTRUCTOR *MemIdentifyDimmConstruct; ///< Constructor for address to dimm identification. } MEM_NB_SUPPORT; @@ -262,7 +262,7 @@ typedef struct _MEM_FEAT_TRAIN_SEQ { UINT16 OptMemTrainingSequenceListVersion; ///< Version of main feature block. OPTION_MEM_FEATURE_NB *TrainingSequence; ///< Training Sequence function. OPTION_MEM_FEATURE_NB *TrainingSequenceEnabled; ///< Enable function. - MEM_TECH_FEAT_BLOCK *MemTechFeatBlock; ///< Memory feature block. + CONST MEM_TECH_FEAT_BLOCK *MemTechFeatBlock; ///< Memory feature block. } MEM_FEAT_TRAIN_SEQ; /** @@ -289,7 +289,7 @@ typedef struct _MEM_PSC_TABLE_BLOCK { typedef BOOLEAN MEM_PSC_FLOW ( IN OUT MEM_NB_BLOCK *NBPtr, - IN MEM_PSC_TABLE_BLOCK *EntryOfTables + CONST IN MEM_PSC_TABLE_BLOCK *EntryOfTables ); /** @@ -297,7 +297,7 @@ typedef BOOLEAN MEM_PSC_FLOW ( * specific configuration. */ typedef struct _MEM_PSC_FLOW_BLOCK { - MEM_PSC_TABLE_BLOCK *EntryOfTables; ///