From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Wed, 10 Apr 2019 09:17:18 -0700 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 287068AE6C; Wed, 10 Apr 2019 16:17:12 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-121-133.rdu2.redhat.com [10.10.121.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id A111E691AE; Wed, 10 Apr 2019 16:17:09 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 3/8] OvmfPkg/OvmfPkg.dec: Add 8259-related PCDs in OVMF DEC file To: devel@edk2.groups.io, hao.a.wu@intel.com Cc: Jordan Justen , Ard Biesheuvel , David Woodhouse , Ray Ni References: <20190410010628.19708-1-hao.a.wu@intel.com> <20190410010628.19708-4-hao.a.wu@intel.com> From: "Laszlo Ersek" Message-ID: <714fe55d-d07a-4a9a-0695-d80a3d35dfb3@redhat.com> Date: Wed, 10 Apr 2019 18:16:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190410010628.19708-4-hao.a.wu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 10 Apr 2019 16:17:12 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 04/10/19 03:06, Wu, Hao A wrote: > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1496 > > According to the DEC file in PcAtChipsetPkg, this commit adds the two > 8259-driver-related PCDs into the OvmfPkg DEC file. > > Please note that, instead of adding the two PCDs under section: > [PcdsFixedAtBuild, PcdsDynamic, PcdsDynamicEx, PcdsPatchableInModule] > > as in PcAtChipsetPkg.dec file, they are added in section: > [PcdsFixedAtBuild] > > in OvmfPkg.dec instead. > > Cc: Jordan Justen > Cc: Ard Biesheuvel > Cc: David Woodhouse > Cc: Ray Ni > Signed-off-by: Hao Wu > Reviewed-by: Laszlo Ersek > --- > OvmfPkg/OvmfPkg.dec | 26 ++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec > index d59508db56..cc2a4909af 100644 > --- a/OvmfPkg/OvmfPkg.dec > +++ b/OvmfPkg/OvmfPkg.dec > @@ -122,6 +122,32 @@ [PcdsFixedAtBuild] > gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize|0x0|UINT32|0x1a > gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd|0x0|UINT32|0x1f > > + ## Pcd8259LegacyModeMask defines the default mask value for platform. This > + # value is determined. > + # 1) If platform only support pure UEFI, value should be set to 0xFFFF or > + # 0xFFFE; Because only clock interrupt is allowed in legacy mode in pure > + # UEFI platform. > + # 2) If platform install CSM and use thunk module: > + # a) If thunk call provided by CSM binary requires some legacy interrupt > + # support, the corresponding bit should be opened as 0. > + # For example, if keyboard interfaces provided CSM binary use legacy > + # keyboard interrupt in 8259 bit 1, then the value should be set to > + # 0xFFFC. > + # b) If all thunk call provied by CSM binary do not require legacy > + # interrupt support, value should be set to 0xFFFF or 0xFFFE. > + # > + # The default value of legacy mode mask could be changed by > + # EFI_LEGACY_8259_PROTOCOL->SetMask(). But it is rarely need change it > + # except some special cases such as when initializing the CSM binary, it > + # should be set to 0xFFFF to mask all legacy interrupt. Please restore the > + # original legacy mask value if changing is made for these special case. > + gUefiOvmfPkgTokenSpaceGuid.Pcd8259LegacyModeMask|0xFFFF|UINT16|0x3 > + > + ## Pcd8259LegacyModeEdgeLevel defines the default edge level for legacy > + # mode's interrrupt controller. > + # For the corresponding bits, 0 = Edge triggered and 1 = Level triggered. > + gUefiOvmfPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel|0x0000|UINT16|0x5 > + > [PcdsDynamic, PcdsDynamicEx] > gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2 > gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN|0x10 > Thanks for addressing my v1 comments! My R-b stands. Laszlo