public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Hao Wu <hao.a.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Hao Wu <hao.a.wu@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	David Woodhouse <dwmw2@infradead.org>, Ray Ni <ray.ni@intel.com>
Subject: [RFC PATCH v1 3/8] OvmfPkg/OvmfPkg.dec: Add 8259-related PCDs in OVMF DEC file
Date: Wed,  3 Apr 2019 15:00:31 +0800	[thread overview]
Message-ID: <20190403070036.1404-4-hao.a.wu@intel.com> (raw)
In-Reply-To: <20190403070036.1404-1-hao.a.wu@intel.com>

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 <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Ray Ni <ray.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 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|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|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|UINT16|0x29
+
 [PcdsDynamic, PcdsDynamicEx]
   gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN|0x10
-- 
2.12.0.windows.1



  parent reply	other threads:[~2019-04-03  7:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  7:00 [RFC PATCH v1 0/8] Duplicate 8259/8254 components in OvmfPkg Hao Wu
2019-04-03  7:00 ` [RFC PATCH v1 1/8] OvmfPkg: Copy 8259InterruptControllerDxe driver from PcAtChipsetPkg Hao Wu
2019-04-03 12:05   ` Laszlo Ersek
2019-04-03  7:00 ` [RFC PATCH v1 2/8] OvmfPkg: Copy Legacy8259 protocol definitions from IntelFrameworkPkg Hao Wu
     [not found]   ` <945615d3-5d8f-659a-a8c4-7320f108ab88@redhat.com>
2019-04-04  2:44     ` [edk2] " hao.a.wu
2019-04-03  7:00 ` Hao Wu [this message]
2019-04-03 12:39   ` [RFC PATCH v1 3/8] OvmfPkg/OvmfPkg.dec: Add 8259-related PCDs in OVMF DEC file Laszlo Ersek
2019-04-04  2:56     ` [edk2] " Wu, Hao A
2019-04-03  7:00 ` [RFC PATCH v1 4/8] OvmfPkg/8259InterruptControllerDxe: Update to make it build for OVMF Hao Wu
2019-04-03 12:46   ` Laszlo Ersek
2019-04-04  3:02     ` [edk2] " Wu, Hao A
2019-04-03  7:00 ` [RFC PATCH v1 5/8] OvmfPkg/AcpiPlatformDxe: Consume the 8259 PCD defined in OvmfPkg Hao Wu
2019-04-03 12:48   ` Laszlo Ersek
2019-04-03  7:00 ` [RFC PATCH v1 6/8] OvmfPkg: Copy 8254TimerDxe driver from PcAtChipsetPkg Hao Wu
2019-04-03 12:50   ` Laszlo Ersek
2019-04-03  7:00 ` [RFC PATCH v1 7/8] OvmfPkg/8254TimerDxe: Update to make it build for OVMF Hao Wu
2019-04-03 12:52   ` Laszlo Ersek
2019-04-03  7:00 ` [RFC PATCH v1 8/8] OvmfPkg: Update DSC/FDF files to consume 8259/8254 drivers in OvmfPkg Hao Wu
2019-04-03 12:57   ` Laszlo Ersek
2019-04-03 12:10 ` [RFC PATCH v1 0/8] Duplicate 8259/8254 components " Laszlo Ersek
2019-04-03 12:13   ` Laszlo Ersek
     [not found]     ` <563a0d19-fcc9-3a40-c782-1b04704e3b95@redhat.com>
2019-04-04  4:05       ` [edk2] " Wu, Hao A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190403070036.1404-4-hao.a.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox