> -----Original Message-----
> From: Laszlo Ersek [mailto:[email protected]]
> Sent: Wednesday, April 03, 2019 8:39 PM
> To: Wu, Hao A; [email protected]
> Cc: Justen, Jordan L; David Woodhouse
> Subject: Re: [edk2] [RFC PATCH v1 3/8] OvmfPkg/OvmfPkg.dec: Add 8259-
> related PCDs in OVMF DEC file
> 
> On 04/03/19 09:00, Hao Wu 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.
> >
> > Cc: Jordan Justen <[email protected]>
> > Cc: Laszlo Ersek <[email protected]>
> > Cc: Ard Biesheuvel <[email protected]>
> > Cc: David Woodhouse <[email protected]>
> > Cc: Ray Ni <[email protected]>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Hao Wu <[email protected]>
> > ---
> >  OvmfPkg/OvmfPkg.dec | 26 ++++++++++++++++++++
> >  1 file changed, 26 insertions(+)
> >
> > diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
> > index fb89ebf3ad..cb838422aa 100644
> > --- a/OvmfPkg/OvmfPkg.dec
> > +++ b/OvmfPkg/OvmfPkg.dec
> > @@ -128,6 +128,32 @@
> >
> gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize|0x0|UIN
> T32|0x1a
> >
> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd|0x0|UI
> NT32|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|
> 0x28
> > +
> > +  ## 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|UIN
> T16|0x29
> > +
> >  [PcdsDynamic, PcdsDynamicEx]
> >    gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2
> >
> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOL
> EAN|0x10
> >
> 
> Thank you for wrapping the comments so nicely!
> 
> 
> (1) In PcAtChipsetPkg.dec, both PCDs are declared under:
> 
> [PcdsFixedAtBuild, PcdsDynamic, PcdsDynamicEx, PcdsPatchableInModule]
> 
> but in OvmfPkg, this patch introduces both PCDs under just
> 
> [PcdsFixedAtBuild]
> 
> I think that's fine for now, but please mention this change in the
> commit message.

Yes, I will address this one.

> 
> 
> (2) OVMF's PCD token space seems to have some holes, namely at: 3
> decimal, 5 decimal, and 0x17.
> 
> Can you introduce the new PCDs with tokens 3 and 5, just to decrease the
> fragmentation?

Sure.

Best Regards,
Hao Wu

> 
> 
> With (1) and (2) addressed:
> 
> Reviewed-by: Laszlo Ersek <[email protected]>
> 
> Thanks,
> Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#23): https://edk2.groups.io/g/devel/message/23
Mute This Topic: https://groups.io/mt/30892915/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to