[edk2-platforms][PATCH] IpmiFeaturePkg: IPMI Transport PPI and Protocol for BIOS/BMC communication


Oram, Isaac W
 

Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>

-----Original Message-----
From: manickavasakam karpagavinayagam <manickavasakamk@ami.com>
Sent: Thursday, June 10, 2021 4:44 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Felixp@ami.com; DOPPALAPUDI, HARIKRISHNA <harikrishnad@ami.com>; Jha, Manish <manishj@ami.com>; Bobroff, Zachary <zacharyb@ami.com>; KARPAGAVINAYAGAM, MANICKAVASAKAM <manickavasakamk@ami.com>
Subject: [edk2-platforms][PATCH] IpmiFeaturePkg: IPMI Transport PPI and Protocol for BIOS/BMC communication

Enable IPMI Transport PPI and Protocol for BIOS/BMC communication
Add PlatformIpmiIoRangeSet() to enable OEM specific southbridge SIO KCS I/O address range
---
Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c | 7 ++++++-
Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf | 2 ++
Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PostMemory.fdf | 5 +++--
Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PreMemory.fdf | 3 ++-
Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLib/IpmiBaseLib.inf | 3 +++
Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBaseLib/PeiIpmiBaseLib.inf | 3 +++
6 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c
index 31f613925d..14040c089c 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.c
@@ -9,7 +9,7 @@
#include <IndustryStandard/Ipmi.h>

#include "PeiGenericIpmi.h"

#include <Library/ReportStatusCodeLib.h>

-

+#include <Library/IpmiPlatformHookLib.h>



///////////////////////////////////////////////////////////////////////////////

// Function Implementations

@@ -48,6 +48,11 @@ PeiInitializeIpmiKcsPhysicalLayer (
// Enable OEM specific southbridge SIO KCS I/O address range 0xCA0 to 0xCAF at here

// if the the I/O address range has not been enabled.

//

+ Status = PlatformIpmiIoRangeSet (PcdGet16 (PcdIpmiIoBaseAddress));

+ DEBUG ((DEBUG_INFO, "IPMI Peim:PlatformIpmiIoRangeSet - %r!\n", Status));

+ if (EFI_ERROR(Status)) {

+ return Status;

+ }



mIpmiInstance = AllocateZeroPool (sizeof (PEI_IPMI_BMC_INSTANCE_DATA));

if (mIpmiInstance == NULL) {

diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf
index 0ef2c18116..883a9168e5 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf
@@ -41,7 +41,9 @@
MemoryAllocationLib

DebugLib

IoLib

+ ReportStatusCodeLib

TimerLib

+ IpmiPlatformHookLib



[Guids]



diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PostMemory.fdf b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PostMemory.fdf
index b5b37ddd9f..cbd9453cf0 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PostMemory.fdf
@@ -7,10 +7,11 @@
#

##



- INF OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.inf

+ INF OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/GenericIpmi.inf

+ INF OutOfBandManagement/IpmiFeaturePkg/IpmiInit/DxeIpmiInit.inf

+ INF RuleOverride = DRIVER_ACPITABLE OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.inf

INF OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElog.inf

INF OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf

INF OutOfBandManagement/IpmiFeaturePkg/IpmiFru/IpmiFru.inf

- INF OutOfBandManagement/IpmiFeaturePkg/IpmiInit/DxeIpmiInit.inf

INF OutOfBandManagement/IpmiFeaturePkg/OsWdt/OsWdt.inf

INF OutOfBandManagement/IpmiFeaturePkg/SolStatus/SolStatus.inf

diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PreMemory.fdf b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PreMemory.fdf
index 4aa2d8e9da..826490952b 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PreMemory.fdf
@@ -7,5 +7,6 @@
#

##



-INF OutOfBandManagement/IpmiFeaturePkg/Frb/FrbPei.inf

+INF OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf

INF OutOfBandManagement/IpmiFeaturePkg/IpmiInit/PeiIpmiInit.inf

+INF OutOfBandManagement/IpmiFeaturePkg/Frb/FrbPei.inf

diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLib/IpmiBaseLib.inf b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLib/IpmiBaseLib.inf
index b429d3b7b9..86df943560 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLib/IpmiBaseLib.inf
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLib/IpmiBaseLib.inf
@@ -26,3 +26,6 @@


[Protocols]

gIpmiTransportProtocolGuid

+

+[Depex]

+ gIpmiTransportProtocolGuid

diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBaseLib/PeiIpmiBaseLib.inf b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBaseLib/PeiIpmiBaseLib.inf
index f89614adfb..9a2c87873f 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBaseLib/PeiIpmiBaseLib.inf
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBaseLib/PeiIpmiBaseLib.inf
@@ -28,3 +28,6 @@


[Ppis]

gPeiIpmiTransportPpiGuid

+

+[Depex]

+ gPeiIpmiTransportPpiGuid

--
2.25.0.windows.1


Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.