public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Tan, Ming" <ming.tan@intel.com>
To: devel@edk2.groups.io
Subject: [PATCH v2] SpcrFeaturePkg: Modify PCI device interrupt setting.
Date: Wed, 27 Oct 2021 14:56:53 +0800	[thread overview]
Message-ID: <20211027065653.6579-1-ming.tan@intel.com> (raw)

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3708

The original code will cause FWTS V21.08.00 testing failed.
 spcr: SPCR PC-AT compatible IRQ 0xff is invalid
 spcr: SPCR PCI flags compatibility bit 0 is 0, expecting 1 for PCI device

Now modify the SpcrAcpi for following:
1. Disable the support of PC-AT compatible IRQ support.
   Now only support IO-APIC interrupt type.
2. Set irq to 0.
3. Set the GSI to the value read from PCI device cfg space 0x3C.
4. Set PCI Flags to 1.

Signed-off-by: Ming Tan <ming.tan@intel.com>
---
  V2: Fix a typo

 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c                    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
index 86c40e90b8..7ad0c058c8 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
@@ -324,7 +324,9 @@ GetPciTypeInfo (
   }
 
   gSpcrInfo.BaseAddress.Address = BaseAddress;
-  gSpcrInfo.Irq = (UINT8) Irq;
+  gSpcrInfo.InterruptType = EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_APIC;
+  gSpcrInfo.Irq = 0;
+  gSpcrInfo.GlobalSystemInterrupt = (UINT32)Irq;
 
   gSpcrInfo.PciDeviceId       = DeviceId;
   gSpcrInfo.PciVendorId       = VendorId;
@@ -332,6 +334,7 @@ GetPciTypeInfo (
   gSpcrInfo.PciDeviceNumber   = (UINT8) Device;
   gSpcrInfo.PciFunctionNumber = (UINT8) Function;
   gSpcrInfo.PciSegment        = (UINT8) SegNum;
+  gSpcrInfo.PciFlags          = 1;
 
 Done:
   if (Resources != NULL) {
-- 
2.29.2.windows.3


             reply	other threads:[~2021-10-27  6:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27  6:56 Tan, Ming [this message]
2021-11-04  5:21 ` [edk2-devel] [PATCH v2] SpcrFeaturePkg: Modify PCI device interrupt setting Attar, AbdulLateef (Abdul Lateef)
2021-11-04  5:45   ` Tan, Ming
2021-12-02  0:48 ` Nate DeSimone
2021-12-02  0:56 ` Nate DeSimone

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=20211027065653.6579-1-ming.tan@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