From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.8261.1635317858541256498 for ; Tue, 26 Oct 2021 23:57:38 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: ming.tan@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="217000176" X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="217000176" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2021 23:57:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="497730606" Received: from shwdejointlab96.ccr.corp.intel.com ([10.239.132.208]) by orsmga008.jf.intel.com with ESMTP; 26 Oct 2021 23:57:36 -0700 From: "Tan, Ming" To: devel@edk2.groups.io Subject: [PATCH v2] SpcrFeaturePkg: Modify PCI device interrupt setting. Date: Wed, 27 Oct 2021 14:56:53 +0800 Message-Id: <20211027065653.6579-1-ming.tan@intel.com> X-Mailer: git-send-email 2.29.2.windows.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3708 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 --- 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/SpcrAcp= i.c +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcp= i.c @@ -324,7 +324,9 @@ GetPciTypeInfo ( }=0D =0D gSpcrInfo.BaseAddress.Address =3D BaseAddress;=0D - gSpcrInfo.Irq =3D (UINT8) Irq;=0D + gSpcrInfo.InterruptType =3D EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TAB= LE_INTERRUPT_TYPE_APIC;=0D + gSpcrInfo.Irq =3D 0;=0D + gSpcrInfo.GlobalSystemInterrupt =3D (UINT32)Irq;=0D =0D gSpcrInfo.PciDeviceId =3D DeviceId;=0D gSpcrInfo.PciVendorId =3D VendorId;=0D @@ -332,6 +334,7 @@ GetPciTypeInfo ( gSpcrInfo.PciDeviceNumber =3D (UINT8) Device;=0D gSpcrInfo.PciFunctionNumber =3D (UINT8) Function;=0D gSpcrInfo.PciSegment =3D (UINT8) SegNum;=0D + gSpcrInfo.PciFlags =3D 1;=0D =0D Done:=0D if (Resources !=3D NULL) {=0D --=20 2.29.2.windows.3