From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 57CC0803B1 for ; Thu, 23 Mar 2017 20:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490327068; x=1521863068; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=A8UV9CopgzEdkJ/CF0J0QUCn1pPore3LYfEnTjnuLJs=; b=I3fWWJW4mEB1I+JM1bc5FT6ejxoNhxA0AYETIHfxDx6lu5tNrzonaZCC 2CKMZQPv3ALk0kOD2JGv+BmJZVZ/fw==; Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Mar 2017 20:44:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,213,1486454400"; d="scan'208";a="78847359" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 23 Mar 2017 20:44:27 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 23 Mar 2017 20:44:27 -0700 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.319.2; Thu, 23 Mar 2017 20:44:27 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.212]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.253]) with mapi id 14.03.0248.002; Fri, 24 Mar 2017 11:44:25 +0800 From: "Zeng, Star" To: Ard Biesheuvel , "Kinney, Michael D" , "afish@apple.com" CC: "Tian, Feng" , Laszlo Ersek , edk2-devel-01 , Leif Lindholm , "Gao, Liming" , "Zeng, Star" Thread-Topic: [edk2] [PATCH v2 05/12] ArmPkg: introduce EDKII Platform Has ACPI Protocol, and plug-in library Thread-Index: AQHSn1/Ct9FsN6en9E+84QMKKTQOM6GaK/cAgAZJkQCAATfqoP//+AQAgAGszmA= Date: Fri, 24 Mar 2017 03:44:24 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B84CA03@shsmsx102.ccr.corp.intel.com> References: <20170317204731.31488-1-lersek@redhat.com> <20170317204731.31488-6-lersek@redhat.com> <20170318150041.GL16034@bivouac.eciton.net> <1bc7b29c-7a71-86cb-adce-5a14de129c63@redhat.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B8377AB@shsmsx102.ccr.corp.intel.com> In-Reply-To: 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 v2 05/12] ArmPkg: introduce EDKII Platform Has ACPI Protocol, and plug-in library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2017 03:44:28 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I just think it seems a generic problem. Some platforms may dynamically determine whether ACPI should be supported o= r not. Some platforms may dynamically determine whether SMBIOS should be supported= or not. Some platforms may dynamically determine whether HII should be supported or= not. ... We are thinking whether we can have a generic NULL instance to support all = this kind of cases, for example: 1. Define a FixedAtBuild PCD PcdDepexGuid that will be a VOID* type PCD poi= nt to a depex GUID. 2. Implement a NULL instance DepexLib. [Defines] INF_VERSION =3D 0x00010005 BASE_NAME =3D DepexLib FILE_GUID =3D XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D NULL [Sources] DepexLib.c [Packages] XXXPkg/XXXPkg.dec [Depex] PcdDepexGuid 3. Link NULL instance and configure PCD in dsc. MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf { NULL|XXXPkg/Library/DepexLib/DepexLib.inf PcdDepexGuid|gEdkiiPlatformHasAcpiGuid } MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf { NULL|XXXPkg/Library/DepexLib/DepexLib.inf PcdDepexGuid|gEdkiiPlatformHasSmbiosGuid } But current BaseTools does not support the syntax to declare PCD in [Depex]= section of inf yet. Based on the statements above, I have below comments. 1. I agree to add the GUID into MdeModulePkg, but how about using gEdkiiPla= tformHasAcpiGuid instead of gEdkiiPlatformHasAcpiProtocolGuid and add the G= UID into [Guids] section of MdeModulePkg.dec? As Platform can install gEdki= iPlatformHasAcpiGuid PPI to control PEIM and install gEdkiiPlatformHasAcpiG= uid PROTOCOL to control DRIVER. And another, no need to add a include file = PlatformHasAcpi.h as BaseTools supports to add the GUID definitions to Auto= Gen files from package dec. 2. You can file bugzilla bug to request BaseTools syntax support to declare= PCD in [Depex] section of inf. Then PcdDepexGuid and DepexLib could be fin= ally added into core package MdeModulePkg or even MdePkg (I prefer). Before= that, how about implementing the PlatformHasAcpiLib in none core package? Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard = Biesheuvel Sent: Thursday, March 23, 2017 5:09 PM To: Zeng, Star ; Kinney, Michael D ; afish@apple.com Cc: Tian, Feng ; Laszlo Ersek ; edk= 2-devel-01 ; Leif Lindholm Subject: Re: [edk2] [PATCH v2 05/12] ArmPkg: introduce EDKII Platform Has A= CPI Protocol, and plug-in library On 23 March 2017 at 01:41, Zeng, Star wrote: > I prefer to do not include the protocol definition and the library instan= ce into MdeModulePkg at this moment until they need to be used by multiple = platforms/archs. > I disagree. Nowhere in the PI or UEFI spec is there any mention (for any ar= chitecture) that ACPI is mandatory. Given that EDK2 is the reference platfo= rm UEFI/PI, and not for ACPI or the PC/x86 platform, I think it is unreason= able to have lots and lots of PC quirks (i.e., allocations below 4 GB) in M= deModulePkg, but then disallow a clean approach to make ACPI selectable, in= a way that is true to the spirit of PI (i.e., using protocol dependencies) So I think at least the protocol definitions belong in MdeModulePkg. Thanks, Ard. _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel