From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ml01.01.org (Postfix) with ESMTP id EE5191A1DFB for ; Thu, 11 Aug 2016 23:59:40 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 11 Aug 2016 23:59:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,509,1464678000"; d="scan'208";a="864185219" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 11 Aug 2016 23:59:40 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 11 Aug 2016 23:59:38 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.8]) by shsmsx102.ccr.corp.intel.com ([169.254.2.147]) with mapi id 14.03.0248.002; Fri, 12 Aug 2016 14:59:36 +0800 From: "Wei, David" To: Gary Lin , "edk2-devel@lists.01.org" Thread-Topic: [PATCH 1/4] Vlv2TbltDevicePkg/FspSupport: Fix GCC build errors Thread-Index: AQHR86vTL8A5Yer04Eq80NbIMzCY4aBE5rUQ Date: Fri, 12 Aug 2016 06:59:35 +0000 Message-ID: <89954A0B46707A448411A627AD4EEE3437D85251@SHSMSX101.ccr.corp.intel.com> References: <20160811083820.27055-1-glin@suse.com> <20160811083820.27055-2-glin@suse.com> In-Reply-To: <20160811083820.27055-2-glin@suse.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWJmZmM2MTYtZDRlMy00YmM2LTk2NTMtMjgzMmUyYTgzYzEyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImdmZ0RVRVpMVkZraGRlaHV4V3JjYU9EK3ZIQXJQTDlPRVZFbW4xZG1ONUU9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/4] Vlv2TbltDevicePkg/FspSupport: Fix GCC build errors 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: Fri, 12 Aug 2016 06:59:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: David Wei =20 Thanks, David Wei =20 -----Original Message----- From: Gary Lin [mailto:glin@suse.com]=20 Sent: Thursday, August 11, 2016 4:38 PM To: edk2-devel@lists.01.org Cc: Wei, David Subject: [PATCH 1/4] Vlv2TbltDevicePkg/FspSupport: Fix GCC build errors Fix the errors from GCC: Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessL= ibVlv2.c: In function 'GetMemorySizeInMemoryTypeInformation': Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessL= ibVlv2.c:59:40: error: passing argument 1 of '(*PeiServices)->GetHobList' f= rom incompatible pointer type [-Werror=3Dincompatible-pointer-types] Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessL= ibVlv2.c:52:31: error: variable 'Status' set but not used [-Werror=3Dunused= -but-set-variable] Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessL= ibVlv2.c: In function 'FspHobProcessForOtherData': Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobProcessL= ibVlv2.c:401:29: error: passing argument 1 of 'PlatformHobCreateFromFsp' fr= om incompatible pointer type [-Werror=3Dincompatible-pointer-types] Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.= c:18:30: fatal error: Library\DebugLib.h: No such file or directory Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.= c:19:35: fatal error: Library\SerialPortLib.h: No such file or directory Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c:18= :27: fatal error: Library\IoLib.h: No such file or directory Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c:19= :35: fatal error: Library\SerialPortLib.h: No such file or directory Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c: I= n function 'EnableInternalUart': Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c:19= 5:20: error: pointer targets in passing argument 1 of 'SerialPortWrite' dif= fer in signedness [-Werror=3Dpointer-sign] Cc: David Wei Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin --- .../Library/PeiFspHobProcessLibVlv2/FspHobProcessLibVlv2.c | 5 ++= --- .../FspSupport/Library/SecFspPlatformSecLibVlv2/PlatformInit.c | 4 ++= -- .../FspSupport/Library/SecFspPlatformSecLibVlv2/UartInit.c | 6 ++= +--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/F= spHobProcessLibVlv2.c b/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProce= ssLibVlv2/FspHobProcessLibVlv2.c index f0b68cd..c308698 100644 --- a/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobPr= ocessLibVlv2.c +++ b/Vlv2TbltDevicePkg/FspSupport/Library/PeiFspHobProcessLibVlv2/FspHobPr= ocessLibVlv2.c @@ -49,14 +49,13 @@ GetMemorySizeInMemoryTypeInformation ( IN EFI_PEI_SERVICES **PeiServices ) { - EFI_STATUS Status; EFI_PEI_HOB_POINTERS Hob; EFI_MEMORY_TYPE_INFORMATION *MemoryData; UINT8 Index; UINTN TempPageNum; =20 MemoryData =3D NULL; - Status =3D (*PeiServices)->GetHobList (PeiServices, (VOID **) &Hob.R= aw); + (*PeiServices)->GetHobList ((CONST EFI_PEI_SERVICES **)PeiServices, (VOI= D **) &Hob.Raw); while (!END_OF_HOB_LIST (Hob)) { if (Hob.Header->HobType =3D=3D EFI_HOB_TYPE_GUID_EXTENSION && CompareGuid (&Hob.Guid->Name, &gEfiMemoryTypeInformationGuid)) { @@ -398,7 +397,7 @@ FspHobProcessForOtherData ( // // Other hob for platform // - PlatformHobCreateFromFsp ( PeiServices, FspHobList); + PlatformHobCreateFromFsp ((CONST EFI_PEI_SERVICES **) PeiServices, FspH= obList); =20 return EFI_SUCCESS; } diff --git a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/= PlatformInit.c b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibV= lv2/PlatformInit.c index 2e181ac..c54b8af 100644 --- a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/Platfor= mInit.c +++ b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/Platfor= mInit.c @@ -15,8 +15,8 @@ =20 =20 #include -#include -#include +#include +#include =20 VOID EnableInternalUart (); =20 diff --git a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/= UartInit.c b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/= UartInit.c index 4255ad3..c3ba557 100644 --- a/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartIni= t.c +++ b/Vlv2TbltDevicePkg/FspSupport/Library/SecFspPlatformSecLibVlv2/UartIni= t.c @@ -15,8 +15,8 @@ =20 =20 #include -#include -#include +#include +#include =20 #define PCI_IDX 0xCF8 #define PCI_DAT 0xCFC @@ -192,7 +192,7 @@ EnableInternalUart( MmioOr8 (PciD31F0RegBase + R_PCH_LPC_UART_CTRL, (UINT8) B_PCH_LPC_UART_C= TRL_COM1_EN); =20 SerialPortInitialize (); - SerialPortWrite ("EnableInternalUart!\r\n", sizeof("EnableInternalUart!\= r\n") - 1); + SerialPortWrite ((UINT8 *)"EnableInternalUart!\r\n", sizeof("EnableInter= nalUart!\r\n") - 1); =20 return ; } --=20 2.9.2