From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: zailiang.sun@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Mon, 22 Jul 2019 18:31:46 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 18:31:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,297,1559545200"; d="scan'208";a="171025856" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga007.fm.intel.com with ESMTP; 22 Jul 2019 18:31:45 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jul 2019 18:31:45 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jul 2019 18:31:45 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.109]) with mapi id 14.03.0439.000; Tue, 23 Jul 2019 09:31:43 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Qian, Yi" , Gary Lin Subject: Re: [edk2-platforms Patch V3 10/12] Vlv2TbltDevicePkg: Fix XCODE5 build errors Thread-Topic: [edk2-platforms Patch V3 10/12] Vlv2TbltDevicePkg: Fix XCODE5 build errors Thread-Index: AQHVQOEcPvQffolvNUCcnEQfoO1wtKbXav3A Date: Tue, 23 Jul 2019 01:31:43 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C990D3@SHSMSX104.ccr.corp.intel.com> References: <20190722225859.24724-1-michael.d.kinney@intel.com> <20190722225859.24724-11-michael.d.kinney@intel.com> In-Reply-To: <20190722225859.24724-11-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Zailiang Sun > -----Original Message----- > From: Kinney, Michael D > Sent: Tuesday, July 23, 2019 6:59 AM > To: devel@edk2.groups.io > Cc: Sun, Zailiang ; Qian, Yi ; > Gary Lin > Subject: [edk2-platforms Patch V3 10/12] Vlv2TbltDevicePkg: Fix XCODE5 > build errors >=20 > * Remove extra parenthesis in if statements > * Remove local variable structure initialization > that adds use of memcpy() on XCODE X64 builds. > Move per-initialize structure to a module global. >=20 > Cc: Zailiang Sun > Cc: Yi Qian > Cc: Gary Lin > Signed-off-by: Michael D Kinney > --- > .../Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 12 ++++++++++-- > .../Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c | 2 +- > .../Vlv2TbltDevicePkg/PlatformInitPei/PchInitPeim.c | 2 +- > .../VlvPlatformInitDxe/IgdOpRegion.c | 2 +- > 4 files changed, 13 insertions(+), 5 deletions(-) >=20 > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c > b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c > index 479ffa61a0..3e0b978120 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c > +++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c > @@ -63,6 +63,15 @@ SYSTEM_CONFIGURATION mSystemConfig; > UINT8 mSmbusRsvdAddresses[] =3D PLATFORM_SMBUS_RSVD_ADDRESSES; > UINT8 mNumberSmbusAddress =3D sizeof( mSmbusRsvdAddresses ) / > sizeof( mSmbusRsvdAddresses[0] ); >=20 > +EFI_ACPI_OSFR_OCUR_OBJECT mOcurObjectTemplate =3D { > + {0xB46F133D, 0x235F, 0x4634, 0x9F, 0x03, 0xB1, 0xC0, 0x1C, 0x54, > +0x78, 0x5B}, > + 0, > + 0, > + 0, > + 0, > + 0 > +}; > + > /** > Locate the first instance of a protocol. If the protocol requested is= an > FV protocol, then it will return the first FV that contains the ACPI t= able @@ - > 203,7 +212,6 @@ PlatformUpdateTables ( > EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *Facp; > EFI_ACPI_OSFR_TABLE *OsfrTable= ; > EFI_ACPI_OSFR_OCUR_OBJECT *pOcurObje= ct; > - EFI_ACPI_OSFR_OCUR_OBJECT OcurObject= =3D > {{0xB46F133D, 0x235F, 0x4634, 0x9F, 0x03, 0xB1, 0xC0, 0x1C, 0x54, 0x78, 0= x5B}, > 0, 0, 0, 0, 0}; > CHAR16 *OcurMfgSt= ringBuffer =3D NULL; > CHAR16 *OcurModel= StringBuffer =3D NULL; > UINT8 *OcurRefDa= taBlockBuffer =3D NULL; > @@ -554,7 +562,7 @@ PlatformUpdateTables ( > (UINT32) (sizeof (EFI_ACPI_OSFR_TABLE_FIXED_PORTION) + sizeo= f > (UINT32)); > pOcurObject =3D (EFI_ACPI_OSFR_OCUR_OBJECT *)((UINTN) OsfrTabl= e + > sizeof (EFI_ACPI_OSFR_TABLE_FIXED_PORTION) + \ > sizeof (UINT32)); > - CopyMem (pOcurObject, &OcurObject, sizeof > (EFI_ACPI_OSFR_OCUR_OBJECT)); > + CopyMem (pOcurObject, &mOcurObjectTemplate, sizeof > + (EFI_ACPI_OSFR_OCUR_OBJECT)); > pOcurObject->ManufacturerNameStringOffset =3D (UINT32)((UINTN) > pOcurObject - (UINTN) OsfrTable + \ > sizeof (EFI_ACPI_OSFR_OCUR_OBJECT)); > pOcurObject->ModelNameStringOffset =3D (UINT32)((UINTN) > pOcurObject - (UINTN) OsfrTable + \ diff --git > a/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c > b/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c > index b1c01afc16..69ced08a58 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c > @@ -250,7 +250,7 @@ GetPciRom ( > // > // Do not run RAID or AHCI Option ROM if IDE > // > - if ( (DeviceClass =3D=3D ((PCI_CLASS_MASS_STORAGE << 8 ) | > PCI_CLASS_MASS_STORAGE_IDE)) ) { > + if (DeviceClass =3D=3D ((PCI_CLASS_MASS_STORAGE << 8 ) | > + PCI_CLASS_MASS_STORAGE_IDE)) { > return EFI_NOT_FOUND; > } >=20 > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PchInitPeim= .c > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PchInitPeim.c > index 71d6cb7c15..0b5d7f76a1 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PchInitPeim.c > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PchInitPeim.c > @@ -514,7 +514,7 @@ IchRcrbInit ( > // > // Initial RCBA according to the PeiRCBA table > // > - if ((BootMode =3D=3D BOOT_ON_S3_RESUME)) { > + if (BootMode =3D=3D BOOT_ON_S3_RESUME) { > // > // We are resuming from S3 > // Enable HPET if enabled in Setup > diff --git > a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c > b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c > index dad27f130d..fcd9e566ae 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c > +++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c > @@ -573,7 +573,7 @@ GetVBiosVbtCallback ( > return EFI_SUCCESS; > } > } > - if ((VBiosPtr =3D=3D NULL) ) { > + if (VBiosPtr =3D=3D NULL) { > // > // Intel video BIOS not found. > // > -- > 2.21.0.windows.1