summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--systemintfcmds.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/systemintfcmds.cpp b/systemintfcmds.cpp
index 9ec65d1..7b2536a 100644
--- a/systemintfcmds.cpp
+++ b/systemintfcmds.cpp
@@ -106,6 +106,24 @@ ipmi::RspType<> ipmiAppSetBMCGlobalEnable(
bool systemEventLogEnable, uint1_t reserved, bool OEM0Enabled,
bool OEM1Enabled, bool OEM2Enabled)
{
+ ipmi::ChannelInfo chInfo;
+
+ if (ipmi::getChannelInfo(ctx->channel, chInfo) != ipmi::ccSuccess)
+ {
+ phosphor::logging::log<phosphor::logging::level::ERR>(
+ "Failed to get Channel Info",
+ phosphor::logging::entry("CHANNEL=%d", ctx->channel));
+ return ipmi::responseUnspecifiedError();
+ }
+
+ if (chInfo.mediumType !=
+ static_cast<uint8_t>(ipmi::EChannelMediumType::systemInterface))
+ {
+ phosphor::logging::log<phosphor::logging::level::ERR>(
+ "Error - supported only in system interface");
+ return ipmi::responseCommandNotAvailable();
+ }
+
// Recv Message Queue and SEL are enabled by default.
// Event Message buffer are disabled by default (not supported).
// Any request that try to change the mask will be rejected
OpenPOWER on IntegriCloud