From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 756B71A1DF6 for ; Mon, 29 Aug 2016 11:13:03 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP; 29 Aug 2016 11:13:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,597,1470726000"; d="scan'208";a="1032770723" Received: from gpmudusu-mobl5.amr.corp.intel.com ([10.101.139.14]) by fmsmga001.fm.intel.com with ESMTP; 29 Aug 2016 11:13:02 -0700 From: Giri P Mudusuru To: edk2-devel@lists.01.org Cc: Jiewen Yao , Maurice Ma , Satya Yarlagadda , Michael Kinney Date: Mon, 29 Aug 2016 11:13:00 -0700 Message-Id: X-Mailer: git-send-email 2.9.0.windows.1 In-Reply-To: References: Subject: [PATCH 1/3] IntelFsp2Pkg: Remove pragma usage to align with UEFI Spec X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 18:13:03 -0000 UEFI spec section 2.3.1 requires all data to be naturally aligned. Remove the unnecessary pragma usage and use push and pop where needed. Cc: Jiewen Yao Cc: Maurice Ma Cc: Satya Yarlagadda Cc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Giri P Mudusuru --- IntelFsp2Pkg/Include/FspDataTable.h | 4 ---- IntelFsp2Pkg/Include/FspEas/FspApi.h | 3 --- IntelFsp2Pkg/Include/FspGlobalData.h | 4 ---- IntelFsp2Pkg/Include/Guid/FspHeaderFile.h | 4 ---- IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 4 ++-- 5 files changed, 2 insertions(+), 17 deletions(-) diff --git a/IntelFsp2Pkg/Include/FspDataTable.h b/IntelFsp2Pkg/Include/FspDataTable.h index 3c79f34..a137feb 100644 --- a/IntelFsp2Pkg/Include/FspDataTable.h +++ b/IntelFsp2Pkg/Include/FspDataTable.h @@ -15,8 +15,6 @@ #ifndef _FSP_DATA_TABLE_H_ #define _FSP_DATA_TABLE_H_ -#pragma pack(1) - #define FSP_DATA_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'D') typedef struct { @@ -27,6 +25,4 @@ typedef struct { UINT32 FspsBase; } FSP_DATA_TABLE; -#pragma pack() - #endif diff --git a/IntelFsp2Pkg/Include/FspEas/FspApi.h b/IntelFsp2Pkg/Include/FspEas/FspApi.h index a2e4813..173b33f 100644 --- a/IntelFsp2Pkg/Include/FspEas/FspApi.h +++ b/IntelFsp2Pkg/Include/FspEas/FspApi.h @@ -30,7 +30,6 @@ #define FSP_STATUS_RESET_REQUIRED_8 0x40000008 /// @} -#pragma pack(1) /// /// FSP_UPD_HEADER Configuration. /// @@ -153,8 +152,6 @@ typedef struct { FSP_INIT_PHASE Phase; } NOTIFY_PHASE_PARAMS; -#pragma pack() - /** This FSP API is called soon after coming out of reset and before memory and stack is available. This FSP API will load the microcode update, enable code caching for the diff --git a/IntelFsp2Pkg/Include/FspGlobalData.h b/IntelFsp2Pkg/Include/FspGlobalData.h index 8ac3199..605a264 100644 --- a/IntelFsp2Pkg/Include/FspGlobalData.h +++ b/IntelFsp2Pkg/Include/FspGlobalData.h @@ -16,8 +16,6 @@ #include -#pragma pack(1) - typedef enum { TempRamInitApiIndex, FspInitApiIndex, @@ -61,6 +59,4 @@ typedef struct { UINT64 PerfData[32]; } FSP_GLOBAL_DATA; -#pragma pack() - #endif diff --git a/IntelFsp2Pkg/Include/Guid/FspHeaderFile.h b/IntelFsp2Pkg/Include/Guid/FspHeaderFile.h index 96cac00..d36d0a6 100644 --- a/IntelFsp2Pkg/Include/Guid/FspHeaderFile.h +++ b/IntelFsp2Pkg/Include/Guid/FspHeaderFile.h @@ -30,8 +30,6 @@ #define FSP_INFO_HEADER_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'H') -#pragma pack(1) - /// /// FSP Information Header as described in FSP v2.0 Spec section 5.1.1. /// @@ -197,8 +195,6 @@ typedef struct { //UINT32 PatchData[]; } FSP_PATCH_TABLE; -#pragma pack() - extern EFI_GUID gFspHeaderFileGuid; #endif diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c index 660e9fc..58c71f5 100644 --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c @@ -20,7 +20,7 @@ #include #include -#pragma pack(1) +#pragma pack(push, 1) // // API Parameter +0x34 @@ -53,7 +53,7 @@ typedef struct { #define CONTEXT_STACK_OFFSET(x) (UINT32)&((CONTEXT_STACK *)(UINTN)0)->x -#pragma pack() +#pragma pack(pop) /** This function sets the FSP global data pointer. -- 2.9.0.windows.1