summaryrefslogtreecommitdiff
path: root/Features
AgeCommit message (Collapse)AuthorFilesLines
2024-07-19ManageabilityPkg: add support for the phosphor ipmi blob transfer protocolNickle Wang9-0/+2821
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4773 This change implements the blob transfer protocol used in OpenBmc documented here: https://github.com/openbmc/phosphor-ipmi-blobs Signed-off-by: Nick Ramirez <nramirez@nvidia.com> Co-authored-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Cc: Tinh Nguyen <tinhnguyen@amperemail.onmicrosoft.com> Cc: Nhi Pham <nhi@os.amperecomputing.com> Cc: Thang Nguyen OS <thang@amperemail.onmicrosoft.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com>
2024-06-22IpmiFeaturePkg/GenericIpmi: add EFIAPI for driver entrypointsMike Maslenkin3-0/+3
Fix gcc build failure: IpmiFeaturePkg/GenericIpmi/Smm/SmmGenericIpmi.c:414:1: error: conflicting types for 'InitializeSmmGenericIpmi' 414 | InitializeSmmGenericIpmi ( | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from <command-line>: IpmiFeaturePkg/GenericIpmi/Smm/SmmGenericIpmi/DEBUG/AutoGen.h:138:1: note: previous declaration of 'InitializeSmmGenericIpmi' was here 138 | InitializeSmmGenericIpmi ( | ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>
2024-06-22IpmiFeaturePkg/GenericIpmi: add IpmiFeaturePkg.dec to packages listMike Maslenkin1-0/+1
GCC is unable to find a header file located into IpmiFeaturePkg: fatal error: Library/ServerMgmtRtLib.h: No such file or directory 11 | #include <Library/ServerMgmtRtLib.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>
2024-05-29ManageabilityPkg: Add TransportLib instance for IPMI SSIFNhi Pham9-0/+1524
This adds ManageabilityTransportSsifLib instance following the manageability transport framework to support IPMI SSIF protocol. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
2024-05-29ManageabilityPkg: Add NULL PlatformBmcReadyLib instanceNhi Pham4-0/+68
The NULL library is used when there is no platform specific implementation of PlatformBmcReadyLib. In that case, the state of BMC is always ready. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
2024-05-29ManageabilityPkg: Add PlatformBmcReadyLib library headerNhi Pham2-0/+30
The PlatformBmcReadyLib provides platform specific implementation to check the BMC state. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
2024-05-29ManageabilityPkg/IpmiProtocol: Extend support for SSIF transportNhi Pham5-12/+48
This extends support for SMBUS System Interface (SSIF) transport based on the IPMI specification. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
2024-05-29ManageabilityPkg: Add useful defines for IPMI LUN and NetFnNhi Pham2-1/+9
This adds useful defines for IPMI BMC Logical Unit Number (LUN) and the maximum value of Net Function (NetFn) to use across transport modules. According to the IPMI specification, unless otherwise specified, commands are listed as mandatory must be accessed through LUN 00b. Hence, this patch defaults LUN 00b for all IPMI BMC commands. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
2024-04-30ManageabilityPkg: Remove the dependency with MinPlatformAbner Chang1-16/+56
BZ# 4695 Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2024-04-15VirtualKeyboardFeaturePkg: Update the comments of ReadKeyStroke and ↵Qingyu2-0/+4
ReadKeyStrokeEx - mantis #2131 Refer to Uefi spec 2.10 section 12.3.3, Add a new retval EFI_UNSUPPORTED to EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.ReadKeyStrokeEx and EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke(). Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Qingyu <qingyu.shang@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2024-03-26IpmiFeaturePkg: Add missed call to FreePoolPhanindraX Babu Pabba1-0/+1
Adding missed out call to FreePool API to free the allocated memory. Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: PhanindraX Babu Pabba <phanindrax.babu.pabba@intel.com>
2024-02-23IpmiFeaturePkg/GenericIpmi:StandaloneMmGenericIpmiLixia Huang1-2/+2
StandaloneMmGenericIpmi driver is not loaded successfully due to wrong Depex. Set Depex to TRUE in StandaloneMmGenericImpi.inf. Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Lixia Huang <lisa.huang@intel.com>
2024-02-02IpmiFeaturePkg/ServerManagementLib: Fix a GCC compile errorWei6 Xu1-2/+2
The source file definition in INF file is ServerManagementELog.c, while the actual file name is ServerManagementElog.c. The case is mismatched. Correct the definition in INF file to fix this issue. Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Cc: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
2023-12-21IpmiFeaturePkg/BmcElog: Support Standalone MMLixia Huang7-17/+119
Refactor BmcElog to support Standalone MM. Remove unused code. Cc: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Lixia Huang <lisa.huang@intel.com>
2023-12-21IpmiFeaturePkg/GenericElog: Support Standalone MMLixia Huang7-48/+118
Refactor GenericElog to support Standalone MM. Remove unused function SmElogServiceInitialize. Cc: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Lixia Huang <lisa.huang@intel.com>
2023-12-21IpmiFeaturePkg/BmcAcpiSwChild: Support Standalone MMWei Xu7-22/+113
Refactor BmcAcpiSwChild to support Standalone MM. Cc: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Wei Xu <wei6.xu@intel.com>
2023-12-21IpmiFeaturePkg/ServerManagementLib: Support Standalone MMWei Xu5-221/+273
Split the ServerManagementLib.c into two source files: - ServerManagementELog.c to support Event Log functions. - ServerManagementTime.c to support GetTimeStamp function. - Replace gBS->Stall() with MicroSecondDelay() in TimerLib to remove dependency on gBS. Base Lib includes both of the two source files, StandaloneMm Lib only includes the ServerManagementTime.c Cc: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Wei Xu <wei6.xu@intel.com>
2023-12-19IpmiFeaturePkg/GenericIpmi: Fix GCC compiler errorLixia Huang1-2/+0
Fix GCC compiler error in StandaloneMmGenericIpmi. Cc: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Lixia Huang <lisa.huang@intel.com>
2023-12-12OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSIAbdul Lateef Attar4-3/+16
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> Reviewed-by: 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
2023-12-12IpmiFeaturePkg/GenericIpmi: Sync change from SMMLixia Huang7-77/+326
Sync change from SMM to StandaloneMm GenericIpmi driver. Update SmmIpmbInterface and SmmSsifInterface Lib to support MM_STANDALONE. And Format code with uncrustify. Cc: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Lixia Huang <lisa.huang@intel.com>
2023-12-04Ext4Pkg: Fix CRC16 checksumming on block groupsPedro Falcato1-5/+1
Old filesystems (around 2008 and older) do not use CRC32c but rather CRC16-ANSI. Previously, the CalculateCrc16Ansi function was broken and gave us wrong checksums. Adapt to the new interface. And while we're at it, fix the checksum algorithm itself - the crc16 algorithm just skips over the bg_checksum, and does not checksum it. This problem was found out-of-list when older ext4 filesystems (that use crc16 checksums) failed to mount with "corruption". BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4609 Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com> Cc: Savva Mitrofanov <savvamtr@gmail.com> Cc: Marvin Häuser <mhaeuser@posteo.de> Reviewed-by: Marvin Häuser <mhaeuser@posteo.de>
2023-12-01UserAuthFeaturePkg/UserAuthenticationSmm: Support Standalone MM.Wei6 Xu11-44/+363
Refactor UserAuthenticationSmm to support Standalone MM. - Factor out variable lock code logic that references boot services. - UserAuthenticationStandaloneMmDxe is added to lock the variables. It is only used for UserAuthenticationStandaloneMm. - UserAuthenticationStandaloneMm doesn't lock the variables, needs to rely on UserAuthenticationStandaloneMmDxe to do the lock. - UserAuthenticationSmm still locks the variables by itself, no need to include UserAuthenticationStandaloneMmDxe. - Register gEfiEventExitBootServicesGuid notify which is used by the StandaloneMmCore. Since gEdkiiVariableLockProtocolGuid is a deprecated interface, use gEdkiiVariablePolicyProtocolGuid to lock password variables instead. Cc: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
2023-11-30IpmiFeaturePkg: Fix BuildNate DeSimone1-0/+1
Add missing MemoryAllocationLib dependency Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-11-30IpmiFeaturePkg/SmmIpmiBaseLib: Support Standalone MM.Wei6 Xu2-34/+12
Add MM_STANDALONE type support for SmmIpmiBaseLib instance. Replace Smst with Mmst. Remove unused UefiBootServicesTableLib reference. Reviewed-by: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
2023-11-17IpmiFeaturePkg/IpmiRedirFru: Switch to AfterConsole event for callbackZhen Gong3-9/+11
Use AfterConsole event instead of ReadyToBoot for callback so the driver can update SMBIOS table before booting to setup menu. Signed-off-by: Zhen Gong <zhen.gong@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>
2023-11-10Features/IpmiFeaturePkg: Remove IpmiCommandLib from IpmiFeaturePkgAbner Chang7-913/+1
Remove IpmiCommandLib from IpmiFeaturePkg as it was migrated to ManageabilityPkg and has more IPMI commands support. Remove this IpmiFeaturePkg to avoid the confusion. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-11-04IpmiFeaturePkg/GenericIpmi: Support Standalone MMLixia Huang3-0/+199
Add Standalone Mm Generic Impi driver. And add type 'PcdsFixedAtBuild' for PcdIpmiSmmIoBaseAddress to access in StandaloneMm driver Reviewed-by: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Lixia Huang <lisa.huang@intel.com>
2023-11-03IpmiFeaturePkg: Add FRU driversZhen Gong15-105/+2141
Add GenericFruDriver and generate data based on SMBIOS data. Signed-off-by: Zhen Gong <zhen.gong@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-11-03IpmiFeaturePkg: Add ACPI power state driversZhen Gong10-0/+505
Add DXE and SMM drivers that send "Set ACPI Power State" command to BMC. Signed-off-by: Zhen Gong <zhen.gong@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-11-03IpmiFeaturePkg: Add ServerManagementLibZhen Gong6-0/+1061
Lightweight lib to support Server Management drivers. Signed-off-by: Zhen Gong <zhen.gong@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-11-03IpmiFeaturePkg: Add Elog driversZhen Gong24-243/+3530
Add generic Elog driver and support BMC Elog operations. Signed-off-by: Zhen Gong <zhen.gong@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2023-10-30ManageabilityPkg: Uncrustify on C source filesAbner Chang9-32/+40
Run Uncrustify on the C source files those were modified in commit ID from 3f4c4384 to 28ff8f29. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Konstantin Aladyshev <aladyshev22@gmail.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
2023-10-29OutOfBandManagement/IpmiFeaturePKg: Remove IpmiCommandLib.h from IpmiFeaturePkgAbner Chang9-314/+8
Remove duplicate IpmiCommandLib.h and use the one under MdeModulePKg instead. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-10-28ManageabilityPkg/Ipmi: Remove IpmiCommandLib.h from ManageabilityPkgAbner Chang6-620/+5
Remove duplicate IpmiCommandLib.h and use the one under MdeModulePKg instead. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
2023-10-27ManageabilityPkg/Ipmi: IPMI Get System Interface Capabilities CommandAbner Chang1-0/+68
Implment AppFn, 0x57 command. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2023-10-26ManageabilityPkg: Check PLDM completion codeKonstantin Aladyshev1-1/+2
Every PLDM response contains 1 byte Completion code which is needed to be checked against SUCCESS value which means that the PLDM command was accepted and completed normally. If it is not equal to that value it is necessary to return error status so the caller would know that Response buffer is invalid. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26PldmSmbiosTransferDxe: Implement Set PLDM terminus ID APIAbner Chang2-0/+54
Currently all PLDM functions inside the PLDM_SMBIOS_TRANSFER_PROTOCOL use PLDM terminus PCDs for the MCTP addressing. Add additional function to the protocol API to provide user a way to use custom TIDs. Signed-off-by: Abner Chang <abner.chang@amd.com> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Return error on PLDM header check failsKonstantin Aladyshev1-3/+6
Currently PldmSubmit command returns EFI_SUCCESS even if the response header checks have failed. Correct the code to return errors in such cases. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg/PldmProtocol: Remove PLDM command tableAbner Chang3-85/+31
In case of the PLDM/MCTP communication response size doesn't have to be known beforehand, the caller just need to provide the buffer big enough to accomodate the response. Remove PLDM command table for retrieving the response payload size and correct the code to fix the response buffer size handling. Also update the message for error conditions. Signed-off-by: Abner Chang <abner.chang@amd.com> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26PldmProtocolDxe: Correct TID argument usageAbner Chang8-37/+162
Currently the PLDM source/destination TID arguments for the PldmSubmit function are not actually used in any way in the underlying MCTP communication. The code just uses MCTP source/destination EID PCDs. So we have to restructure code to actually use provided PLDM TIDs. On the other case the PldmSubmitCommand function from the PldmProtocolLib doesn't even accept the source/destination TID arguments. To address both these facts correct TID argument usage in the following way: - by default the TID values are taken from the built-time PCDs, - user have an ability to provide custom TIDs either via PldmSubmit function arguments or by calling PldmSetTerminus API. Signed-off-by: Abner Chang <abner.chang@amd.com> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Add PLDM terminus PCDsAbner Chang1-0/+6
Add PLDM source and destination terminus IDs for transmiting PLDM message. Signed-off-by: Abner Chang <abner.chang@amd.com> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Return error on multiple-packet MCTP responsesKonstantin Aladyshev1-0/+11
Since the current driver doesn't yet support handling of multiple-packet MCTP responses, return EFI_UNSUPPORTED error in such cases. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Use correct constants for PLDM header checksKonstantin Aladyshev1-4/+4
Currently PldmProtocol code uses magic numbers in the PLDM header checks. Since PLDM headers have all the necessary definitions replace magic numbers with the appropriate defines. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Don't check MCTP header fields if transfer has failedKonstantin Aladyshev1-9/+7
If MCTP KCS communication has failed we need to abort MCTP transfer function before checking any MCTP header data. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Correct value for the MCTP TAG_OWNER response bitKonstantin Aladyshev1-2/+2
Currently the MCTP TAG_OWNER bit is checked against 1 both in MTCP request and response. According to the MTCP Base specification in case of the MCTP response the TAG_OWNER bit should be equal to 0. Correct MCTP_MESSAGE_TAG_OWNER_RESPONSE flag value to fix the issue. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Update the algorithm of using MCTP endpoint ID PCDKonstantin Aladyshev4-18/+44
Although MtcpSubmit function receives source and destination MCTP EID arguments these value are not used in any way currently. Instead the code always uses EID values from the PCDs. To correct this issue modify function interface to receive source and destination MCTP EIDs via pointers and use PCD values only if the pointers are NULL. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Signed-off-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Correct typo in MCTP destination EID fieldKonstantin Aladyshev1-1/+1
Correct wrong structure member used for MCTP destination EID. Signed-off-by: Abner Chang <abner.chang@amd.com> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Check header fields in the MCTP responseKonstantin Aladyshev1-0/+82
Add checks for the MCTP header fields in the MCTP response. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Support both MCTP and IPMI in KCS tranport libraryKonstantin Aladyshev2-38/+260
The Manageability KCS transport library needs to support requests both from MCTP and IPMI transports. Currently the code only handles IPMI case correctly. In the MCTP case the communication should be based on the MCTP-over-KCS specification (DSP0254). This specification defines a special KCS binding header and trailer structures that need to be present in every MCTP message. The header structure contains a length field, therefore response packet size is not needed to be known beforehand. The trailer structure contains a PEC checksum that can be used to check itegrity of the response message. Modify Manageability KCS transport library code to check which message is processed (IPMI or MCTP) and handle each case correctly based on its own specification. Tested: - The IPMI KCS communication is tested by Abner Chang, - The MCTP KCS communication is tested by Konstantin Aladyshev on the AMD EthanolX CRB. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Signed-off-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2023-10-26ManageabilityPkg: Check MCTP EIDs for reserved valuesKonstantin Aladyshev1-0/+17
MTCP base specification marks EIDs 1-7 as reserved. Therefore return EFI_INVALID_PARAMETER if such EIDs were provided to the MctpSubmitMessage function. Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Signed-off-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>