| Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
This adds ManageabilityTransportSsifLib instance following the
manageability transport framework to support IPMI SSIF protocol.
Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
|
|
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>
|
|
The PlatformBmcReadyLib provides platform specific implementation to
check the BMC state.
Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
|
|
This extends support for SMBUS System Interface (SSIF) transport based
on the IPMI specification.
Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|