public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI
       [not found] <cover.1691044467.git.abdattar@amd.com>
@ 2023-08-03  6:35 ` Abdul Lateef Attar via groups.io
  2023-08-03  6:42   ` Chang, Abner via groups.io
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Abdul Lateef Attar via groups.io @ 2023-08-03  6:35 UTC (permalink / raw)
  To: devel
  Cc: Abdul Lateef Attar, Sai Chaganty, Isaac Oram, Nate DeSimone,
	Liming Gao, Abner Chang

From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>

Create a new PCD to hold the IRQ or GSI number for SPCR,
with default values of 4.
Update the ACPI SPCR table's IRQ value based on PCD.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Abner Chang <abner.chang@amd.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>

Change-Id: I7218903fa5572f8139ad45db598ab085f079713b
---
 .../OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec  | 5 +++++
 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf             | 4 ++++
 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h                  | 3 +++
 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c                  | 7 ++++---
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec
index b084fad89220..d69d650f3f20 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec
@@ -7,6 +7,7 @@
 # for the build infrastructure.
 #
 # Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -24,6 +25,10 @@ [Includes]
 [Guids]
   gSpcrFeaturePkgTokenSpaceGuid = { 0xe978c988, 0xeeba, 0x4671, { 0xb8, 0x0d, 0xcc, 0x8b, 0x89, 0xb5, 0xd1, 0xef }}
 
+[PcdsFixedAtBuild]
+  # SPCR default IRQ set to 4
+  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt|4|UINT8|0x00000010
+
 [PcdsFeatureFlag]
   gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable|FALSE|BOOLEAN|0x00000001
 
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
index 9a4f95e86bbf..cd43afea5242 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
@@ -24,6 +24,7 @@ [LibraryClasses]
   UefiDriverEntryPoint
   UefiLib
   SpcrDeviceLib
+  PcdLib
 
 [Packages]
   MdePkg/MdePkg.dec
@@ -51,5 +52,8 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio
 
+[FixedPcd]
+  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt
+
 [Depex]
   TRUE
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h
index c11da439fcb8..245a847762c5 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h
@@ -3,6 +3,8 @@
   SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
 
   Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.<BR>
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -23,6 +25,7 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/MemoryAllocationLib.h>
 #include <Library/SpcrDeviceLib.h>
+#include <Library/PcdLib.h>
 
 #include <Protocol/AcpiTable.h>
 #include <Protocol/SerialIo.h>
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
index 51449d0fad9e..e92db96caaa9 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
@@ -3,7 +3,7 @@
   SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
 
   Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.<BR>
-  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -83,8 +83,8 @@ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE gSpcrInfo = {
   },
 
   0x03,               //INTERRUPT_TYPE,
-  0x04,               //IRQ,
-  0x04,               //GLOBAL_SYSTEM_INTERRUPT,
+  FixedPcdGet8 (PcdSpcrInterrupt), // IRQ,
+  FixedPcdGet8 (PcdSpcrInterrupt), // GLOBAL_SYSTEM_INTERRUPT,
   0x07,               //BAUD_RATE,
   0x00,               //PARITY,
   0x01,               //STOP_BITS,
@@ -441,6 +441,7 @@ OutOfBandACPITableConstruction (
     gSpcrInfo.FlowControl = UART_FLOW_CONTROL_HARDWARE;
   }
 
+
   if (HasIsaSerialNode(SavedDevicePath)) {
     GetIsaTypeInfo (SavedDevicePath);
   } else {
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107519): https://edk2.groups.io/g/devel/message/107519
Mute This Topic: https://groups.io/mt/100521521/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI
  2023-08-03  6:35 ` [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI Abdul Lateef Attar via groups.io
@ 2023-08-03  6:42   ` Chang, Abner via groups.io
  2023-08-17  6:44     ` Attar, AbdulLateef (Abdul Lateef) via groups.io
  2023-12-11 21:19   ` Nate DeSimone
  2023-12-11 21:21   ` Nate DeSimone
  2 siblings, 1 reply; 6+ messages in thread
From: Chang, Abner via groups.io @ 2023-08-03  6:42 UTC (permalink / raw)
  To: Attar, AbdulLateef (Abdul Lateef), devel@edk2.groups.io
  Cc: Attar, AbdulLateef (Abdul Lateef), Sai Chaganty, Isaac Oram,
	Nate DeSimone, Liming Gao

[AMD Official Use Only - General]

Acked-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Abdul Lateef Attar <abdattar@amd.com>
> Sent: Thursday, August 3, 2023 2:35 PM
> To: devel@edk2.groups.io
> Cc: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Sai
> Chaganty <rangasai.v.chaganty@intel.com>; Isaac Oram
> <isaac.w.oram@intel.com>; Nate DeSimone
> <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> Chang, Abner <Abner.Chang@amd.com>
> Subject: [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based
> IRQ/GSI
>
> From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
>
> Create a new PCD to hold the IRQ or GSI number for SPCR,
> with default values of 4.
> Update the ACPI SPCR table's IRQ value based on PCD.
>
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Abner Chang <abner.chang@amd.com>
> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
>
> Change-Id: I7218903fa5572f8139ad45db598ab085f079713b
> ---
>  .../OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec  | 5 +++++
>  .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf             | 4 ++++
>  .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h                  | 3 +++
>  .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c                  | 7 ++++---
>  4 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> index b084fad89220..d69d650f3f20 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> @@ -7,6 +7,7 @@
>  # for the build infrastructure.
>  #
>  # Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -24,6 +25,10 @@ [Includes]
>  [Guids]
>    gSpcrFeaturePkgTokenSpaceGuid = { 0xe978c988, 0xeeba, 0x4671, { 0xb8,
> 0x0d, 0xcc, 0x8b, 0x89, 0xb5, 0xd1, 0xef }}
>
> +[PcdsFixedAtBuild]
> +  # SPCR default IRQ set to 4
> +  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt|4|UINT8|0x00000010
> +
>  [PcdsFeatureFlag]
>
> gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable|FALSE|BOOLEAN|0x
> 00000001
>
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> index 9a4f95e86bbf..cd43afea5242 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> @@ -24,6 +24,7 @@ [LibraryClasses]
>    UefiDriverEntryPoint
>    UefiLib
>    SpcrDeviceLib
> +  PcdLib
>
>  [Packages]
>    MdePkg/MdePkg.dec
> @@ -51,5 +52,8 @@ [Pcd]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio
>
> +[FixedPcd]
> +  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt
> +
>  [Depex]
>    TRUE
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> index c11da439fcb8..245a847762c5 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> @@ -3,6 +3,8 @@
>    SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
>
>    Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.<BR>
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> +
>    SPDX-License-Identifier: BSD-2-Clause-Patent
>
>  **/
> @@ -23,6 +25,7 @@
>  #include <Library/BaseMemoryLib.h>
>  #include <Library/MemoryAllocationLib.h>
>  #include <Library/SpcrDeviceLib.h>
> +#include <Library/PcdLib.h>
>
>  #include <Protocol/AcpiTable.h>
>  #include <Protocol/SerialIo.h>
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> index 51449d0fad9e..e92db96caaa9 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> @@ -3,7 +3,7 @@
>    SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
>
>    Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.<BR>
> -  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
>    SPDX-License-Identifier: BSD-2-Clause-Patent
>
>  **/
> @@ -83,8 +83,8 @@
> EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE gSpcrInfo = {
>    },
>
>    0x03,               //INTERRUPT_TYPE,
> -  0x04,               //IRQ,
> -  0x04,               //GLOBAL_SYSTEM_INTERRUPT,
> +  FixedPcdGet8 (PcdSpcrInterrupt), // IRQ,
> +  FixedPcdGet8 (PcdSpcrInterrupt), // GLOBAL_SYSTEM_INTERRUPT,
>    0x07,               //BAUD_RATE,
>    0x00,               //PARITY,
>    0x01,               //STOP_BITS,
> @@ -441,6 +441,7 @@ OutOfBandACPITableConstruction (
>      gSpcrInfo.FlowControl = UART_FLOW_CONTROL_HARDWARE;
>    }
>
> +
>    if (HasIsaSerialNode(SavedDevicePath)) {
>      GetIsaTypeInfo (SavedDevicePath);
>    } else {
> --
> 2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107520): https://edk2.groups.io/g/devel/message/107520
Mute This Topic: https://groups.io/mt/100521521/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI
  2023-08-03  6:42   ` Chang, Abner via groups.io
@ 2023-08-17  6:44     ` Attar, AbdulLateef (Abdul Lateef) via groups.io
  2023-12-07  4:25       ` Abdul Lateef Attar via groups.io
  0 siblings, 1 reply; 6+ messages in thread
From: Attar, AbdulLateef (Abdul Lateef) via groups.io @ 2023-08-17  6:44 UTC (permalink / raw)
  To: Chang, Abner, devel@edk2.groups.io
  Cc: Sai Chaganty, Isaac Oram, Nate DeSimone, Liming Gao

[AMD Official Use Only - General]

Gentle reminder, review please.

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com>
Sent: Thursday, August 3, 2023 12:12 PM
To: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; devel@edk2.groups.io
Cc: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Sai Chaganty <rangasai.v.chaganty@intel.com>; Isaac Oram <isaac.w.oram@intel.com>; Nate DeSimone <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
Subject: RE: [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI

[AMD Official Use Only - General]

Acked-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Abdul Lateef Attar <abdattar@amd.com>
> Sent: Thursday, August 3, 2023 2:35 PM
> To: devel@edk2.groups.io
> Cc: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Sai
> Chaganty <rangasai.v.chaganty@intel.com>; Isaac Oram
> <isaac.w.oram@intel.com>; Nate DeSimone
> <nathaniel.l.desimone@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Chang, Abner <Abner.Chang@amd.com>
> Subject: [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based
> IRQ/GSI
>
> From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
>
> Create a new PCD to hold the IRQ or GSI number for SPCR, with default
> values of 4.
> Update the ACPI SPCR table's IRQ value based on PCD.
>
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Abner Chang <abner.chang@amd.com>
> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
>
> Change-Id: I7218903fa5572f8139ad45db598ab085f079713b
> ---
>  .../OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec  | 5 +++++
>  .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf             | 4 ++++
>  .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h                  | 3 +++
>  .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c                  | 7 ++++---
>  4 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> index b084fad89220..d69d650f3f20 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> @@ -7,6 +7,7 @@
>  # for the build infrastructure.
>  #
>  # Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -24,6 +25,10 @@
> [Includes]  [Guids]
>    gSpcrFeaturePkgTokenSpaceGuid = { 0xe978c988, 0xeeba, 0x4671, {
> 0xb8, 0x0d, 0xcc, 0x8b, 0x89, 0xb5, 0xd1, 0xef }}
>
> +[PcdsFixedAtBuild]
> +  # SPCR default IRQ set to 4
> +  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt|4|UINT8|0x00000010
> +
>  [PcdsFeatureFlag]
>
> gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable|FALSE|BOOLEAN|0x
> 00000001
>
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> index 9a4f95e86bbf..cd43afea5242 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> @@ -24,6 +24,7 @@ [LibraryClasses]
>    UefiDriverEntryPoint
>    UefiLib
>    SpcrDeviceLib
> +  PcdLib
>
>  [Packages]
>    MdePkg/MdePkg.dec
> @@ -51,5 +52,8 @@ [Pcd]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio
>
> +[FixedPcd]
> +  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt
> +
>  [Depex]
>    TRUE
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> index c11da439fcb8..245a847762c5 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> @@ -3,6 +3,8 @@
>    SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
>
>    Copyright (c) 2004 - 2020, Intel Corporation. All rights
> reserved.<BR>
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> +
>    SPDX-License-Identifier: BSD-2-Clause-Patent
>
>  **/
> @@ -23,6 +25,7 @@
>  #include <Library/BaseMemoryLib.h>
>  #include <Library/MemoryAllocationLib.h>  #include
> <Library/SpcrDeviceLib.h>
> +#include <Library/PcdLib.h>
>
>  #include <Protocol/AcpiTable.h>
>  #include <Protocol/SerialIo.h>
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> index 51449d0fad9e..e92db96caaa9 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> @@ -3,7 +3,7 @@
>    SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
>
>    Copyright (c) 2004 - 2020, Intel Corporation. All rights
> reserved.<BR>
> -  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> reserved.<BR>
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
>    SPDX-License-Identifier: BSD-2-Clause-Patent
>
>  **/
> @@ -83,8 +83,8 @@
> EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE gSpcrInfo = {
>    },
>
>    0x03,               //INTERRUPT_TYPE,
> -  0x04,               //IRQ,
> -  0x04,               //GLOBAL_SYSTEM_INTERRUPT,
> +  FixedPcdGet8 (PcdSpcrInterrupt), // IRQ,
> +  FixedPcdGet8 (PcdSpcrInterrupt), // GLOBAL_SYSTEM_INTERRUPT,
>    0x07,               //BAUD_RATE,
>    0x00,               //PARITY,
>    0x01,               //STOP_BITS,
> @@ -441,6 +441,7 @@ OutOfBandACPITableConstruction (
>      gSpcrInfo.FlowControl = UART_FLOW_CONTROL_HARDWARE;
>    }
>
> +
>    if (HasIsaSerialNode(SavedDevicePath)) {
>      GetIsaTypeInfo (SavedDevicePath);
>    } else {
> --
> 2.25.1




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107830): https://edk2.groups.io/g/devel/message/107830
Mute This Topic: https://groups.io/mt/100521521/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI
  2023-08-17  6:44     ` Attar, AbdulLateef (Abdul Lateef) via groups.io
@ 2023-12-07  4:25       ` Abdul Lateef Attar via groups.io
  0 siblings, 0 replies; 6+ messages in thread
From: Abdul Lateef Attar via groups.io @ 2023-12-07  4:25 UTC (permalink / raw)
  To: Chang, Abner, devel@edk2.groups.io
  Cc: Sai Chaganty, Isaac Oram, Nate DeSimone, Liming Gao

[Public]

Hi Maintainers,
        Could you please review and merge this patch.
Thanks
AbduL


-----Original Message-----
From: Attar, AbdulLateef (Abdul Lateef)
Sent: Thursday, August 17, 2023 12:14 PM
To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>; Isaac Oram <isaac.w.oram@intel.com>; Nate DeSimone <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
Subject: RE: [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI

Gentle reminder, review please.

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com>
Sent: Thursday, August 3, 2023 12:12 PM
To: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; devel@edk2.groups.io
Cc: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Sai Chaganty <rangasai.v.chaganty@intel.com>; Isaac Oram <isaac.w.oram@intel.com>; Nate DeSimone <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
Subject: RE: [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI

[AMD Official Use Only - General]

Acked-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Abdul Lateef Attar <abdattar@amd.com>
> Sent: Thursday, August 3, 2023 2:35 PM
> To: devel@edk2.groups.io
> Cc: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Sai
> Chaganty <rangasai.v.chaganty@intel.com>; Isaac Oram
> <isaac.w.oram@intel.com>; Nate DeSimone
> <nathaniel.l.desimone@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Chang, Abner <Abner.Chang@amd.com>
> Subject: [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based
> IRQ/GSI
>
> From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
>
> Create a new PCD to hold the IRQ or GSI number for SPCR, with default
> values of 4.
> Update the ACPI SPCR table's IRQ value based on PCD.
>
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Abner Chang <abner.chang@amd.com>
> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
>
> Change-Id: I7218903fa5572f8139ad45db598ab085f079713b
> ---
>  .../OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec  | 5 +++++
>  .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf             | 4 ++++
>  .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h                  | 3 +++
>  .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c                  | 7 ++++---
>  4 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> index b084fad89220..d69d650f3f20 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
> ec
> @@ -7,6 +7,7 @@
>  # for the build infrastructure.
>  #
>  # Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -24,6 +25,10 @@
> [Includes]  [Guids]
>    gSpcrFeaturePkgTokenSpaceGuid = { 0xe978c988, 0xeeba, 0x4671, {
> 0xb8, 0x0d, 0xcc, 0x8b, 0x89, 0xb5, 0xd1, 0xef }}
>
> +[PcdsFixedAtBuild]
> +  # SPCR default IRQ set to 4
> +  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt|4|UINT8|0x00000010
> +
>  [PcdsFeatureFlag]
>
> gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable|FALSE|BOOLEAN|0x
> 00000001
>
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> index 9a4f95e86bbf..cd43afea5242 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> AcpiDxe.inf
> @@ -24,6 +24,7 @@ [LibraryClasses]
>    UefiDriverEntryPoint
>    UefiLib
>    SpcrDeviceLib
> +  PcdLib
>
>  [Packages]
>    MdePkg/MdePkg.dec
> @@ -51,5 +52,8 @@ [Pcd]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio
>
> +[FixedPcd]
> +  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt
> +
>  [Depex]
>    TRUE
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> index c11da439fcb8..245a847762c5 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.h
> @@ -3,6 +3,8 @@
>    SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
>
>    Copyright (c) 2004 - 2020, Intel Corporation. All rights
> reserved.<BR>
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> +
>    SPDX-License-Identifier: BSD-2-Clause-Patent
>
>  **/
> @@ -23,6 +25,7 @@
>  #include <Library/BaseMemoryLib.h>
>  #include <Library/MemoryAllocationLib.h>  #include
> <Library/SpcrDeviceLib.h>
> +#include <Library/PcdLib.h>
>
>  #include <Protocol/AcpiTable.h>
>  #include <Protocol/SerialIo.h>
> diff --git
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> index 51449d0fad9e..e92db96caaa9 100644
> ---
> a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> +++
> b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
> Acpi.c
> @@ -3,7 +3,7 @@
>    SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
>
>    Copyright (c) 2004 - 2020, Intel Corporation. All rights
> reserved.<BR>
> -  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> reserved.<BR>
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
>    SPDX-License-Identifier: BSD-2-Clause-Patent
>
>  **/
> @@ -83,8 +83,8 @@
> EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE gSpcrInfo = {
>    },
>
>    0x03,               //INTERRUPT_TYPE,
> -  0x04,               //IRQ,
> -  0x04,               //GLOBAL_SYSTEM_INTERRUPT,
> +  FixedPcdGet8 (PcdSpcrInterrupt), // IRQ,
> +  FixedPcdGet8 (PcdSpcrInterrupt), // GLOBAL_SYSTEM_INTERRUPT,
>    0x07,               //BAUD_RATE,
>    0x00,               //PARITY,
>    0x01,               //STOP_BITS,
> @@ -441,6 +441,7 @@ OutOfBandACPITableConstruction (
>      gSpcrInfo.FlowControl = UART_FLOW_CONTROL_HARDWARE;
>    }
>
> +
>    if (HasIsaSerialNode(SavedDevicePath)) {
>      GetIsaTypeInfo (SavedDevicePath);
>    } else {
> --
> 2.25.1




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112156): https://edk2.groups.io/g/devel/message/112156
Mute This Topic: https://groups.io/mt/100521521/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI
  2023-08-03  6:35 ` [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI Abdul Lateef Attar via groups.io
  2023-08-03  6:42   ` Chang, Abner via groups.io
@ 2023-12-11 21:19   ` Nate DeSimone
  2023-12-11 21:21   ` Nate DeSimone
  2 siblings, 0 replies; 6+ messages in thread
From: Nate DeSimone @ 2023-12-11 21:19 UTC (permalink / raw)
  To: Abdul Lateef Attar, devel@edk2.groups.io
  Cc: Abdul Lateef Attar, Chaganty, Rangasai V, Oram, Isaac W,
	Gao, Liming, Abner Chang

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: Abdul Lateef Attar <abdattar@amd.com> 
Sent: Wednesday, August 2, 2023 11:35 PM
To: devel@edk2.groups.io
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Abner Chang <abner.chang@amd.com>
Subject: [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI

From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>

Create a new PCD to hold the IRQ or GSI number for SPCR, with default values of 4.
Update the ACPI SPCR table's IRQ value based on PCD.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Abner Chang <abner.chang@amd.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>

Change-Id: I7218903fa5572f8139ad45db598ab085f079713b
---
 .../OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec  | 5 +++++
 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf             | 4 ++++
 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h                  | 3 +++
 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c                  | 7 ++++---
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec
index b084fad89220..d69d650f3f20 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
+++ ec
@@ -7,6 +7,7 @@
 # for the build infrastructure.
 #
 # Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -24,6 +25,10 @@ [Includes]  [Guids]
   gSpcrFeaturePkgTokenSpaceGuid = { 0xe978c988, 0xeeba, 0x4671, { 0xb8, 0x0d, 0xcc, 0x8b, 0x89, 0xb5, 0xd1, 0xef }}
 
+[PcdsFixedAtBuild]
+  # SPCR default IRQ set to 4
+  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt|4|UINT8|0x00000010
+
 [PcdsFeatureFlag]
   gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable|FALSE|BOOLEAN|0x00000001
 
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
index 9a4f95e86bbf..cd43afea5242 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
+++ AcpiDxe.inf
@@ -24,6 +24,7 @@ [LibraryClasses]
   UefiDriverEntryPoint
   UefiLib
   SpcrDeviceLib
+  PcdLib
 
 [Packages]
   MdePkg/MdePkg.dec
@@ -51,5 +52,8 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio
 
+[FixedPcd]
+  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt
+
 [Depex]
   TRUE
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h
index c11da439fcb8..245a847762c5 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
+++ Acpi.h
@@ -3,6 +3,8 @@
   SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
 
   Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.<BR>
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -23,6 +25,7 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/MemoryAllocationLib.h>  #include <Library/SpcrDeviceLib.h>
+#include <Library/PcdLib.h>
 
 #include <Protocol/AcpiTable.h>
 #include <Protocol/SerialIo.h>
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
index 51449d0fad9e..e92db96caaa9 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
+++ Acpi.c
@@ -3,7 +3,7 @@
   SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
 
   Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.<BR>
-  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -83,8 +83,8 @@ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE gSpcrInfo = {
   },
 
   0x03,               //INTERRUPT_TYPE,
-  0x04,               //IRQ,
-  0x04,               //GLOBAL_SYSTEM_INTERRUPT,
+  FixedPcdGet8 (PcdSpcrInterrupt), // IRQ,
+  FixedPcdGet8 (PcdSpcrInterrupt), // GLOBAL_SYSTEM_INTERRUPT,
   0x07,               //BAUD_RATE,
   0x00,               //PARITY,
   0x01,               //STOP_BITS,
@@ -441,6 +441,7 @@ OutOfBandACPITableConstruction (
     gSpcrInfo.FlowControl = UART_FLOW_CONTROL_HARDWARE;
   }
 
+
   if (HasIsaSerialNode(SavedDevicePath)) {
     GetIsaTypeInfo (SavedDevicePath);
   } else {
--
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112330): https://edk2.groups.io/g/devel/message/112330
Mute This Topic: https://groups.io/mt/100521521/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI
  2023-08-03  6:35 ` [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI Abdul Lateef Attar via groups.io
  2023-08-03  6:42   ` Chang, Abner via groups.io
  2023-12-11 21:19   ` Nate DeSimone
@ 2023-12-11 21:21   ` Nate DeSimone
  2 siblings, 0 replies; 6+ messages in thread
From: Nate DeSimone @ 2023-12-11 21:21 UTC (permalink / raw)
  To: Abdul Lateef Attar, devel@edk2.groups.io
  Cc: Abdul Lateef Attar, Chaganty, Rangasai V, Oram, Isaac W,
	Gao, Liming, Abner Chang

Pushed as 3c0adfe.

-----Original Message-----
From: Abdul Lateef Attar <abdattar@amd.com> 
Sent: Wednesday, August 2, 2023 11:35 PM
To: devel@edk2.groups.io
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Abner Chang <abner.chang@amd.com>
Subject: [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI

From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>

Create a new PCD to hold the IRQ or GSI number for SPCR, with default values of 4.
Update the ACPI SPCR table's IRQ value based on PCD.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Abner Chang <abner.chang@amd.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>

Change-Id: I7218903fa5572f8139ad45db598ab085f079713b
---
 .../OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec  | 5 +++++
 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf             | 4 ++++
 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h                  | 3 +++
 .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c                  | 7 ++++---
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec
index b084fad89220..d69d650f3f20 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
+++ ec
@@ -7,6 +7,7 @@
 # for the build infrastructure.
 #
 # Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -24,6 +25,10 @@ [Includes]  [Guids]
   gSpcrFeaturePkgTokenSpaceGuid = { 0xe978c988, 0xeeba, 0x4671, { 0xb8, 0x0d, 0xcc, 0x8b, 0x89, 0xb5, 0xd1, 0xef }}
 
+[PcdsFixedAtBuild]
+  # SPCR default IRQ set to 4
+  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt|4|UINT8|0x00000010
+
 [PcdsFeatureFlag]
   gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable|FALSE|BOOLEAN|0x00000001
 
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
index 9a4f95e86bbf..cd43afea5242 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
+++ AcpiDxe.inf
@@ -24,6 +24,7 @@ [LibraryClasses]
   UefiDriverEntryPoint
   UefiLib
   SpcrDeviceLib
+  PcdLib
 
 [Packages]
   MdePkg/MdePkg.dec
@@ -51,5 +52,8 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio
 
+[FixedPcd]
+  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt
+
 [Depex]
   TRUE
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h
index c11da439fcb8..245a847762c5 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
+++ Acpi.h
@@ -3,6 +3,8 @@
   SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
 
   Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.<BR>
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -23,6 +25,7 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/MemoryAllocationLib.h>  #include <Library/SpcrDeviceLib.h>
+#include <Library/PcdLib.h>
 
 #include <Protocol/AcpiTable.h>
 #include <Protocol/SerialIo.h>
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
index 51449d0fad9e..e92db96caaa9 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr
+++ Acpi.c
@@ -3,7 +3,7 @@
   SPCR is abbreviation of Serial Port Console Redirection Table (SPCR).
 
   Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.<BR>
-  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -83,8 +83,8 @@ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE gSpcrInfo = {
   },
 
   0x03,               //INTERRUPT_TYPE,
-  0x04,               //IRQ,
-  0x04,               //GLOBAL_SYSTEM_INTERRUPT,
+  FixedPcdGet8 (PcdSpcrInterrupt), // IRQ,
+  FixedPcdGet8 (PcdSpcrInterrupt), // GLOBAL_SYSTEM_INTERRUPT,
   0x07,               //BAUD_RATE,
   0x00,               //PARITY,
   0x01,               //STOP_BITS,
@@ -441,6 +441,7 @@ OutOfBandACPITableConstruction (
     gSpcrInfo.FlowControl = UART_FLOW_CONTROL_HARDWARE;
   }
 
+
   if (HasIsaSerialNode(SavedDevicePath)) {
     GetIsaTypeInfo (SavedDevicePath);
   } else {
--
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112331): https://edk2.groups.io/g/devel/message/112331
Mute This Topic: https://groups.io/mt/100521521/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-11 21:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1691044467.git.abdattar@amd.com>
2023-08-03  6:35 ` [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI Abdul Lateef Attar via groups.io
2023-08-03  6:42   ` Chang, Abner via groups.io
2023-08-17  6:44     ` Attar, AbdulLateef (Abdul Lateef) via groups.io
2023-12-07  4:25       ` Abdul Lateef Attar via groups.io
2023-12-11 21:19   ` Nate DeSimone
2023-12-11 21:21   ` Nate DeSimone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox