[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: [email protected] <[email protected]> On Behalf Of Tan, Ming via 
groups.io
Sent: Wednesday, October 27, 2021 12:27 PM
To: [email protected]
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 <[email protected]>
---
  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: [email protected]
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
 [[email protected]] -=-=-=-=-=-=



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83322): https://edk2.groups.io/g/devel/message/83322
Mute This Topic: https://groups.io/mt/86622293/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to