public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Tan, Ming" <ming.tan@intel.com>
To: "Attar, AbdulLateef (Abdul Lateef)" <AbdulLateef.Attar@amd.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH v2] SpcrFeaturePkg: Modify PCI device interrupt setting.
Date: Thu, 4 Nov 2021 05:45:51 +0000	[thread overview]
Message-ID: <BN9PR11MB551307E701670E1560375151978D9@BN9PR11MB5513.namprd11.prod.outlook.com> (raw)
In-Reply-To: <BN9PR12MB52253C5A4095479DDFE00DA6E08D9@BN9PR12MB5225.namprd12.prod.outlook.com>

Abdul:
  The following are the testing result using FWTS 21.08.00:
spcr: SPCR Serial Port Console Redirection Table test.
--------------------------------------------------------------------------------
Test 1 of 3: SPCR Serial Port Console Redirection Table test.
Serial Interface: 16550 compatible
Baud Rate:        115200
Terminal Type:    VT100
PASSED: Test 1, No issues found in SPCR table.

Test 2 of 3: SPCR Revision Test.

Test 3 of 3: SPCR GSIV Interrupt Test.

================================================================================
1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

  The following are currently code without my patch using FWTS 21.08.00:
spcr: SPCR Serial Port Console Redirection Table test.
--------------------------------------------------------------------------------
Test 1 of 3: SPCR Serial Port Console Redirection Table test.
Serial Interface: 16550 compatible
FAILED [HIGH] SPCRIllegalIRQ: Test 1, SPCR PC-AT compatible IRQ 0xff is invalid
Baud Rate:        115200
Terminal Type:    VT100
FAILED [HIGH] SPCRPciFlagsBit0: Test 1, SPCR PCI flags compatibility bit 0 is 0,
expecting 1 for PCI device

Test 2 of 3: SPCR Revision Test.

Test 3 of 3: SPCR GSIV Interrupt Test.

================================================================================
0 passed, 2 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

  BR/Tan Ming.

-----Original Message-----
From: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com> 
Sent: Thursday, November 4, 2021 1:22 PM
To: devel@edk2.groups.io; Tan, Ming <ming.tan@intel.com>
Subject: RE: [edk2-devel] [PATCH v2] SpcrFeaturePkg: Modify PCI device interrupt setting.

[Public]

Code changes looks good.

Is fwts passing now? I think FWTS has wrong test case.
It expects Global system interrupt number to be zero for APIC interrupt type, which is wrong.
In my opinion it should check for Global system interrupt number for zero in case of PC-AT interrupt type.

Thanks
AbduL

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tan, Ming via groups.io
Sent: Wednesday, October 27, 2021 12:27 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] [PATCH v2] SpcrFeaturePkg: Modify PCI device interrupt setting.

[CAUTION: External Email]

REF: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3708&amp;data=04%7C01%7CAbdulLateef.Attar%40amd.com%7Cb53806998fbe4d20cfc008d99917110f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637709147065715846%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=rvzXQBpKAzzWr0VGZZoCJyVcJBhOvzvlbdrxzEe1KQk%3D&amp;reserved=0

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/Spcr
+++ Acpi.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



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82732): https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F82732&amp;data=04%7C01%7CAbdulLateef.Attar%40amd.com%7Cb53806998fbe4d20cfc008d99917110f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637709147065715846%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=m6rywrR9G355hZ1IHgi5XCtuYpK52Fu19aQaGZFBtbA%3D&amp;reserved=0
Mute This Topic: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.io%2Fmt%2F86622293%2F6129197&amp;data=04%7C01%7CAbdulLateef.Attar%40amd.com%7Cb53806998fbe4d20cfc008d99917110f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637709147065715846%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=GrAh49Txcr%2Bd9xAwq1l%2FFo6sGqZZN%2BcXX2Q1TT3ss44%3D&amp;reserved=0
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Funsub&amp;data=04%7C01%7CAbdulLateef.Attar%40amd.com%7Cb53806998fbe4d20cfc008d99917110f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637709147065715846%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=CYm4d5gMEDoei40a4lXbB6eEB%2B81It7wXuCu6maMZ5M%3D&amp;reserved=0 [abdattar@amd.com] -=-=-=-=-=-=


  reply	other threads:[~2021-11-04  5:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27  6:56 [PATCH v2] SpcrFeaturePkg: Modify PCI device interrupt setting Tan, Ming
2021-11-04  5:21 ` [edk2-devel] " Attar, AbdulLateef (Abdul Lateef)
2021-11-04  5:45   ` Tan, Ming [this message]
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=BN9PR11MB551307E701670E1560375151978D9@BN9PR11MB5513.namprd11.prod.outlook.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