From nobody Sat May 18 04:30:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81251+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81251+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1632877419; cv=none; d=zohomail.com; s=zohoarc; b=kNB3w5DbhS8Hw3vlPh8hNXdApq98WpV0DqhykivpPfCSNwiAcp7oB1a5wGQE3LsRzy6mKD4vITgedH4eHO6tkmeX2Eqar1p4gfTl/vcQ3dIUqWYAN/9YxrMZ85gogDdHTU648QbDXiqSS+a5BK9ffYwyMkROzN024YKr30xfG14= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632877419; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=TR9gqqz342ukc0BJ86f/pT2PpRe3U5ZT0tiQNbly7LI=; b=QqFbQp0H0LGrddceHtc+1HZAILOu1Oueg1TXr/TzfpFlf7NVhyyegCz2d/OY0OBwJSmIDB1bNbkv0zfVpf/EVnWPgzqN3uMveHd1yMOnXbWi4RGQMcHHHhXtvEdJ7J50oALag2f1uHoebmvodtRttfmv4CtDDI3Je9vx+HDLqhA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81251+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1632877419439137.9512647684394; Tue, 28 Sep 2021 18:03:39 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Gh0zYY1788612xvH6KSIq5Ri; Tue, 28 Sep 2021 18:03:39 -0700 X-Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web09.2864.1632877418145110695 for ; Tue, 28 Sep 2021 18:03:38 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10121"; a="224491469" X-IronPort-AV: E=Sophos;i="5.85,330,1624345200"; d="scan'208";a="224491469" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 18:03:36 -0700 X-IronPort-AV: E=Sophos;i="5.85,330,1624345200"; d="scan'208";a="437447456" X-Received: from nldesimo-desk1.amr.corp.intel.com ([10.212.189.201]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 18:03:36 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Chasel Chiu , Benjamin Doron Subject: [edk2-devel] [edk2-platforms] [PATCH V1] KabylakeOpenBoardPkg/AspireVn7Dash572G: Fix Visual Studio Build Date: Tue, 28 Sep 2021 18:03:22 -0700 Message-Id: <20210929010323.2653-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nathaniel.l.desimone@intel.com X-Gm-Message-State: u1ml081A3DnN1uimY79PF3Qqx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1632877419; bh=UbxdSi2MYz8kghfLtmwjnF2/mjyoFtAlwp5I2gHwVP8=; h=Cc:Date:From:Reply-To:Subject:To; b=B6zI95oC1tbGkMg6m8qfUnZY/3S8R93PKAeCVfromciRnbE0pgsr9AzVDB52IQB3x2S a2aEw5faRgbyKFhNGY1QOdB2wuBDOdEoGETzxR60aXig4u5wqN/jm54QUXZJEE5s0dRWo agvMVV/EiJWHDf0MNzzUGoAwNzmMseXcSpA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1632877421368100003 Content-Type: text/plain; charset="utf-8" AspireVn7Dash572G currently does not build with Visual Studio. This is due to the Visual C++ compiler generating warnings with the GCC compiler does not. The two classes of issues are unused local variables and implicit integer casts that could result in truncation. Visual C++ requires an explicit cast in cases where integer truncation is possible. Cc: Chasel Chiu Cc: Benjamin Doron Signed-off-by: Nate DeSimone Reviewed-by: Chasel Chiu --- .../AspireVn7Dash572G/Library/BoardEcLib/EcCommands.c | 9 +++++---- .../Library/BoardInitLib/DxeBoardInitLib.c | 3 ++- .../Library/BoardInitLib/PeiAspireVn7Dash572GDetect.c | 3 +-- .../BoardInitLib/PeiAspireVn7Dash572GInitPostMemLib.c | 7 +++---- .../PeiSiliconPolicyUpdateLib.inf | 2 ++ 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardEcLib/EcCommands.c b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash= 572G/Library/BoardEcLib/EcCommands.c index ea8a8ae11e..6e752b4e22 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEc= Lib/EcCommands.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEc= Lib/EcCommands.c @@ -2,6 +2,7 @@ Board-specific EC commands. =20 Copyright (c) 2021, Baruch Binyamin Doron + Copyright (c) 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -167,8 +168,8 @@ EcIdxRead ( return; } =20 - IoWrite8 (EC_INDEX_IO_HIGH_ADDR_PORT, Address >> 8); - IoWrite8 (EC_INDEX_IO_LOW_ADDR_PORT, Address); + IoWrite8 (EC_INDEX_IO_HIGH_ADDR_PORT, (UINT8) (Address >> 8)); + IoWrite8 (EC_INDEX_IO_LOW_ADDR_PORT, (UINT8) Address); *Data =3D IoRead8 (EC_INDEX_IO_DATA_PORT); } =20 @@ -184,8 +185,8 @@ EcIdxWrite ( IN UINT8 Data ) { - IoWrite8 (EC_INDEX_IO_HIGH_ADDR_PORT, Address >> 8); - IoWrite8 (EC_INDEX_IO_LOW_ADDR_PORT, Address); + IoWrite8 (EC_INDEX_IO_HIGH_ADDR_PORT, (UINT8) (Address >> 8)); + IoWrite8 (EC_INDEX_IO_LOW_ADDR_PORT, (UINT8) Address); IoWrite8 (EC_INDEX_IO_DATA_PORT, Data); } =20 diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/DxeBoardInitLib.c b/Platform/Intel/KabylakeOpenBoardPkg/Aspire= Vn7Dash572G/Library/BoardInitLib/DxeBoardInitLib.c index 4bce51886e..5c5c26d85c 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/DxeBoardInitLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/DxeBoardInitLib.c @@ -2,6 +2,7 @@ Aspire VN7-572G Board Initialization DXE library =20 Copyright (c) 2021, Baruch Binyamin Doron + Copyright (c) 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -46,7 +47,7 @@ EcSendTime ( SendEcCommand (0xE0); for (Index =3D 0; Index < 4; Index++) { // Shift bytes - EcTimeByte =3D EcTime >> Index*8; + EcTimeByte =3D (UINT8) (EcTime >> (Index * 8)); DEBUG ((DEBUG_INFO, "EC: Sending 0x%x (iteration %d)\n", EcTimeByte, I= ndex)); SendEcData (EcTimeByte); } diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/PeiAspireVn7Dash572GDetect.c b/Platform/Intel/KabylakeOpenBoar= dPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiAspireVn7Dash572GDetect.c index d379fdb0d4..344e06859e 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GDetect.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GDetect.c @@ -1,6 +1,6 @@ /** @file =20 -Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -29,7 +29,6 @@ GetAspireVn7Dash572GBoardId ( OUT UINT8 *BoardId ) { - EFI_STATUS Status; UINT16 DataBuffer; =20 ReadEcAdcConverter (MODEL_ID_AD, &DataBuffer); diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/= BoardInitLib/PeiAspireVn7Dash572GInitPostMemLib.c b/Platform/Intel/Kabylake= OpenBoardPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiAspireVn7Dash572GIni= tPostMemLib.c index 2946e174ca..77722f5d60 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitPostMemLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardIn= itLib/PeiAspireVn7Dash572GInitPostMemLib.c @@ -1,6 +1,6 @@ /** @file =20 -Copyright (c) 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -40,7 +40,6 @@ EcInit ( UINT16 ABase; UINT16 Pm1Sts; UINT32 GpeSts; - UINT16 XhciPmCs; =20 /* This is called via a "$FNC" in a PeiOemModule pointer table, with "$D= PX" on SiInit */ IoWrite8 (0x6C, 0x5A); // 6Ch is the EC sideband port @@ -66,13 +65,13 @@ EcInit ( IoWrite32 (ABase + R_PCH_ACPI_GPE0_STS_127_96, GpeSts); /* Clear xHCI PM_CS[PME_Status] - RW/1C - and disable xHCI PM_CS[PME= _En] */ PciAndThenOr16 (PCI_LIB_ADDRESS(PCI_BUS_NUMBER_PCH_XHCI, PCI_DEVICE_= NUMBER_PCH_XHCI, PCI_FUNCTION_NUMBER_PCH_XHCI, R_PCH_XHCI_PWR_CNTL_STS), - ~B_PCH_XHCI_PWR_CNTL_STS_PME_EN, + (UINT16) ~B_PCH_XHCI_PWR_CNTL_STS_PME_EN, B_PCH_XHCI_PWR_CNTL_STS_PME_STS ); =20 /* Enter S3 sleep */ IoAndThenOr32 (ABase + R_PCH_ACPI_PM1_CNT, - ~(B_PCH_ACPI_PM1_CNT_SLP_TYP | B_PCH_ACPI_PM1_CNT_SLP= _EN), + (UINT32) ~(B_PCH_ACPI_PM1_CNT_SLP_TYP | B_PCH_ACPI_PM= 1_CNT_SLP_EN), V_PCH_ACPI_PM1_CNT_S3 ); IoWrite32 (ABase + R_PCH_ACPI_PM1_CNT, B_PCH_ACPI_PM1_CNT_SLP_EN); diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/L= ibrary/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf b/Platform/I= ntel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/PeiSiliconPolicy= UpdateLib/PeiSiliconPolicyUpdateLib.inf index ad85326bf9..0a8cf91b07 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/= PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf @@ -53,6 +53,8 @@ gHsioSataPreMemConfigGuid ## CONSUMES gSaMiscPeiPreMemConfigGuid ## CONSUMES gFspNonVolatileStorageHobGuid ## CONSUMES + gIoApicConfigGuid ## CONSUMES + gHpetPreMemConfigGuid ## CONSUMES gLockDownConfigGuid gPchGeneralConfigGuid gCpuPowerMgmtBasicConfigGuid --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81251): https://edk2.groups.io/g/devel/message/81251 Mute This Topic: https://groups.io/mt/85939100/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-