remove group extension commands
The Group Extension Commands section was originally introduced to
support ARM SBMR.
Since phosphor-ipmi-host now provides the support for the commands [1],
this redundant implementation can be removed to avoid duplication and
simplify maintenance.
[1] https://github.com/openbmc/phosphor-host-ipmid/commit/0a3f40b92c44bb196e355f845c6aafd1d2dce5fe
Change-Id: Ie20ab6a035adc7314a70164adbc3bc779013dfd6
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
diff --git a/include/groupextcommands.hpp b/include/groupextcommands.hpp
deleted file mode 100644
index 2ecbef6..0000000
--- a/include/groupextcommands.hpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2024-present Facebook. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-static constexpr auto bootRawObjPrefix = "/xyz/openbmc_project/state/boot/raw";
-static constexpr auto bootRawBusName = "xyz.openbmc_project.State.Boot.Raw";
-static constexpr auto bootRawIntf = "xyz.openbmc_project.State.Boot.Raw";
-
-namespace ipmi
-{
-
-using Group = uint8_t;
-constexpr Group groupSBMR = 0xAE;
-
-namespace sbmr
-{
-constexpr Cmd cmdSendBootProgress = 0x02;
-} // namespace sbmr
-
-} // namespace ipmi
diff --git a/meson.build b/meson.build
index 6c5fff4..cf5108c 100644
--- a/meson.build
+++ b/meson.build
@@ -85,7 +85,6 @@
'src/selcommands.cpp',
'src/transportcommands.cpp',
'src/biccommands.cpp',
- 'src/groupextcommands.cpp',
implicit_include_directories: false,
dependencies: zfboemcmds_pre,
version: meson.project_version(),
diff --git a/src/groupextcommands.cpp b/src/groupextcommands.cpp
deleted file mode 100644
index eb6b48e..0000000
--- a/src/groupextcommands.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <commandutils.hpp>
-#include <groupextcommands.hpp>
-#include <ipmid/api-types.hpp>
-#include <ipmid/api.hpp>
-#include <phosphor-logging/lg2.hpp>
-
-namespace ipmi
-{
-
-PHOSPHOR_LOG2_USING;
-
-uint64_t bigEndianToHost(uint64_t bigEndianValue)
-{
- if (std::endian::native == std::endian::little)
- {
- return std::byteswap(bigEndianValue);
- }
-
- return bigEndianValue;
-}
-
-void registerSBMRFunctions() __attribute__((constructor));
-
-ipmi::RspType<> ipmiSBMRSendBootProgress(ipmi::Context::ptr ctx,
- std::vector<uint8_t> data)
-{
- using postcode_t = std::tuple<std::vector<uint8_t>, std::vector<uint8_t>>;
-
- std::optional<size_t> hostId = findHost(ctx->hostIdx);
-
- if (!hostId)
- {
- error("Invalid Host Id received");
- return ipmi::responseInvalidCommand();
- }
-
- if (data.size() != 9)
- {
- error("Invalid request of boot progress length received: {LENGTH}",
- "LENGTH", data.size());
- return ipmi::responseReqDataLenInvalid();
- }
-
- try
- {
- postcode_t postCode(std::move(data), {});
- auto conn = getSdBus();
- auto hostbootRawObj =
- std::string(bootRawObjPrefix) + std::to_string(*hostId);
- auto method =
- conn->new_method_call(bootRawBusName, hostbootRawObj.data(),
- "org.freedesktop.DBus.Properties", "Set");
-
- method.append(bootRawIntf, "Value",
- std::variant<postcode_t>(std::move(postCode)));
-
- conn->call_noreply(method);
- }
- catch (std::exception& e)
- {
- error("postcode handler error: {ERROR}", "ERROR", e);
- return ipmi::responseResponseError();
- }
-
- return ipmi::responseSuccess();
-}
-
-void registerSBMRFunctions()
-{
- ipmi::registerGroupHandler(
- ipmi::prioOemBase, ipmi::groupSBMR, ipmi::sbmr::cmdSendBootProgress,
- ipmi::Privilege::Admin, ipmiSBMRSendBootProgress);
- return;
-}
-
-} // end of namespace ipmi