From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 DA40980368 for ; Wed, 8 Mar 2017 05:14:35 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2017 05:14:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,264,1486454400"; d="scan'208";a="73675971" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 08 Mar 2017 05:14:35 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Mar 2017 05:14:35 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Mar 2017 05:14:34 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Wed, 8 Mar 2017 21:14:32 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , Laszlo Ersek , edk2-devel-01 CC: "Tian, Feng" , Michael Tsirkin , Ard Biesheuvel , Phil Dennis-Jordan , Leo Duran , Al Stone Thread-Topic: [edk2] [PATCH 0/2] MdeModulePkg/AcpiTableDxe: improve FADT.{DSDT, X_DSDT} mutual exclusion Thread-Index: AQHSfLSv7Z8IjvNzok+l1Vz/9yjsB6Fc1/eAgC5JzeA= Date: Wed, 8 Mar 2017 13:14:32 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A8FC4C5@shsmsx102.ccr.corp.intel.com> References: <20170201175654.19425-1-lersek@redhat.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B81BDE2@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B81BDE2@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 0/2] MdeModulePkg/AcpiTableDxe: improve FADT.{DSDT, X_DSDT} mutual exclusion 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: Wed, 08 Mar 2017 13:14:36 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Laszlo I agree with you that the strange order issue and spec compliance issue nee= d to be fixed. I am OK on the final result in RequireDsdtXDsdtExclusion(). However, the logic below is a little hard to read for me, because I have to= switch my mind between "return FALSE" and "return TRUE". =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + if (Fadt->Header.Revision < 5) { + return FALSE; + } + if (Fadt->Header.Revision > 5) { + return TRUE; + } + // + // For FADT Major Version 5, check the FADT Minor Version as well (offse= t 131 + // decimal). + // + if (Fadt->Reserved2[2] < 1) { + return FALSE; + } + return TRUE; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D How about we use a simpler logic? Such as below: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + // version <=3D 5.0 + if ((Fadt->Header.Revision < 5) || + ((Fadt->Header.Revision =3D=3D 5) && (((EFI_ACPI_5_1_FIXED_ACPI_DESCR= IPTION_TABLE *)Fadt)->MinorVersion =3D=3D 0))) { + return FALSE; + } + // version >=3D 5.1 + return TRUE; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Thank you Yao Jiewen > -----Original Message----- > From: Zeng, Star > Sent: Tuesday, February 7, 2017 6:20 PM > To: Laszlo Ersek ; edk2-devel-01 > Cc: Tian, Feng ; Michael Tsirkin ; > Ard Biesheuvel ; Phil Dennis-Jordan > ; Leo Duran ; Al Stone > ; Zeng, Star ; Yao, Jiewen > > Subject: RE: [edk2] [PATCH 0/2] MdeModulePkg/AcpiTableDxe: improve > FADT.{DSDT, X_DSDT} mutual exclusion >=20 > Laszlo, >=20 > I will give feedback tomorrow (PRC time) to this series, sorry for late. >=20 > Also Cc Jiewen. >=20 > Thanks, > Star > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of La= szlo > Ersek > Sent: Thursday, February 2, 2017 1:57 AM > To: edk2-devel-01 > Cc: Tian, Feng ; Michael Tsirkin ; > Ard Biesheuvel ; Phil Dennis-Jordan > ; Leo Duran ; Al Stone > ; Zeng, Star > Subject: [edk2] [PATCH 0/2] MdeModulePkg/AcpiTableDxe: improve FADT.{DSDT= , > X_DSDT} mutual exclusion >=20 > Patch #2 explains it all. >=20 > Repo: https://github.com/lersek/edk2/ > Branch: fadt_dsdt >=20 > NOTE for people on the CC list: >=20 > If you are not presently subscribed to edk2-devel and wish to comment on = this > series publicly, you need to subscribe first, and wait for the subscripti= on request > to *complete* (see your inbox), *before* sending your followup. This is n= ot > ideal, but edk2-devel requires subscription before reflecting messages fr= om > someone. >=20 > Subscribe at . Thanks. >=20 > Cc: Al Stone > Cc: Ard Biesheuvel > Cc: Feng Tian > Cc: Igor Mammedov > Cc: Leo Duran > Cc: Michael Tsirkin > Cc: Phil Dennis-Jordan > Cc: Star Zeng >=20 > Laszlo Ersek (2): > MdeModulePkg/AcpiTableDxe: condense whitespace around > FADT.{DSDT,X_DSDT} > MdeModulePkg/AcpiTableDxe: improve FADT.{DSDT,X_DSDT} mutual exclusion >=20 > MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 82 > ++++++++++++++++---- > 1 file changed, 67 insertions(+), 15 deletions(-) >=20 > -- > 2.9.3 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel