Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 3 | #include "activation.hpp" |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 4 | #include "item_updater_helper.hpp" |
Adriana Kobylak | 30352a6 | 2024-04-09 09:25:36 -0500 | [diff] [blame] | 5 | #include "msl_verify.hpp" |
Saqib Khan | 705f1bf | 2017-06-09 23:58:38 -0500 | [diff] [blame] | 6 | #include "version.hpp" |
Gunnar Mills | b0ce996 | 2018-09-07 13:39:10 -0500 | [diff] [blame] | 7 | #include "xyz/openbmc_project/Collection/DeleteAll/server.hpp" |
| 8 | |
| 9 | #include <sdbusplus/server.hpp> |
John Wang | 85c356f | 2019-09-11 16:20:13 +0800 | [diff] [blame] | 10 | #include <xyz/openbmc_project/Association/Definitions/server.hpp> |
Michael Tritz | 37a5904 | 2017-07-12 13:44:53 -0500 | [diff] [blame] | 11 | #include <xyz/openbmc_project/Common/FactoryReset/server.hpp> |
Michael Tritz | 0129d92 | 2017-08-10 19:33:46 -0500 | [diff] [blame] | 12 | #include <xyz/openbmc_project/Control/FieldMode/server.hpp> |
Adriana Kobylak | 30352a6 | 2024-04-09 09:25:36 -0500 | [diff] [blame] | 13 | #include <xyz/openbmc_project/Software/MinimumVersion/server.hpp> |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 14 | |
Adriana Kobylak | 58aa750 | 2020-06-08 11:12:11 -0500 | [diff] [blame] | 15 | #include <string> |
Bright Cheng | 8e9ccfe | 2019-11-18 16:18:44 +0800 | [diff] [blame] | 16 | #include <vector> |
Adriana Kobylak | 58aa750 | 2020-06-08 11:12:11 -0500 | [diff] [blame] | 17 | |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 18 | namespace phosphor |
| 19 | { |
| 20 | namespace software |
| 21 | { |
| 22 | namespace updater |
| 23 | { |
| 24 | |
Patrick Williams | bf2bb2b | 2022-07-22 19:26:52 -0500 | [diff] [blame] | 25 | using ItemUpdaterInherit = sdbusplus::server::object_t< |
Patrick Williams | 1e9a5f1 | 2023-08-23 16:53:06 -0500 | [diff] [blame] | 26 | sdbusplus::server::xyz::openbmc_project::common::FactoryReset, |
| 27 | sdbusplus::server::xyz::openbmc_project::control::FieldMode, |
| 28 | sdbusplus::server::xyz::openbmc_project::association::Definitions, |
| 29 | sdbusplus::server::xyz::openbmc_project::collection::DeleteAll>; |
Adriana Kobylak | 30352a6 | 2024-04-09 09:25:36 -0500 | [diff] [blame] | 30 | using MinimumVersionInherit = sdbusplus::server::object_t< |
| 31 | sdbusplus::server::xyz::openbmc_project::software::MinimumVersion>; |
Michael Tritz | 37a5904 | 2017-07-12 13:44:53 -0500 | [diff] [blame] | 32 | |
Patrick Williams | e75d10f | 2017-05-30 16:56:32 -0500 | [diff] [blame] | 33 | namespace MatchRules = sdbusplus::bus::match::rules; |
Gunnar Mills | 4844291 | 2017-10-06 13:34:07 -0500 | [diff] [blame] | 34 | using VersionClass = phosphor::software::manager::Version; |
Gunnar Mills | ded875d | 2017-08-28 16:44:52 -0500 | [diff] [blame] | 35 | using AssociationList = |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 36 | std::vector<std::tuple<std::string, std::string, std::string>>; |
Gunnar Mills | ded875d | 2017-08-28 16:44:52 -0500 | [diff] [blame] | 37 | |
Adriana Kobylak | 30352a6 | 2024-04-09 09:25:36 -0500 | [diff] [blame] | 38 | /** @class MinimumVersion |
| 39 | * @brief OpenBMC MinimumVersion implementation. |
| 40 | * @details A concrete implementation for |
| 41 | * xyz.openbmc_project.Software.MinimumVersion DBus API. |
| 42 | */ |
| 43 | class MinimumVersion : public MinimumVersionInherit |
| 44 | { |
| 45 | public: |
| 46 | /** @brief Constructs MinimumVersion |
| 47 | * |
| 48 | * @param[in] bus - The D-Bus bus object |
| 49 | * @param[in] path - The D-bus object path |
| 50 | */ |
| 51 | MinimumVersion(sdbusplus::bus_t& bus, const std::string& path) : |
| 52 | MinimumVersionInherit(bus, path.c_str(), action::emit_interface_added) |
| 53 | {} |
| 54 | }; |
| 55 | |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 56 | /** @class ItemUpdater |
| 57 | * @brief Manages the activation of the BMC version items. |
| 58 | */ |
Michael Tritz | 37a5904 | 2017-07-12 13:44:53 -0500 | [diff] [blame] | 59 | class ItemUpdater : public ItemUpdaterInherit |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 60 | { |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 61 | public: |
| 62 | /* |
| 63 | * @brief Types of Activation status for image validation. |
| 64 | */ |
| 65 | enum class ActivationStatus |
| 66 | { |
| 67 | ready, |
| 68 | invalid, |
| 69 | active |
| 70 | }; |
Saqib Khan | 35e83f3 | 2017-05-22 11:37:32 -0500 | [diff] [blame] | 71 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 72 | /** @brief Constructs ItemUpdater |
| 73 | * |
| 74 | * @param[in] bus - The D-Bus bus object |
| 75 | */ |
Patrick Williams | bf2bb2b | 2022-07-22 19:26:52 -0500 | [diff] [blame] | 76 | ItemUpdater(sdbusplus::bus_t& bus, const std::string& path) : |
Patrick Williams | 35aa9a8 | 2022-04-05 15:55:30 -0500 | [diff] [blame] | 77 | ItemUpdaterInherit(bus, path.c_str(), |
| 78 | ItemUpdaterInherit::action::defer_emit), |
| 79 | bus(bus), helper(bus), |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 80 | versionMatch(bus, |
| 81 | MatchRules::interfacesAdded() + |
| 82 | MatchRules::path("/xyz/openbmc_project/software"), |
| 83 | std::bind(std::mem_fn(&ItemUpdater::createActivation), |
| 84 | this, std::placeholders::_1)) |
| 85 | { |
Lei YU | 531fbc2 | 2021-12-10 20:03:18 +0800 | [diff] [blame] | 86 | getRunningSlot(); |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 87 | setBMCInventoryPath(); |
| 88 | processBMCImage(); |
| 89 | restoreFieldModeStatus(); |
Lei YU | 6e9fb1d | 2021-02-19 18:01:40 +0800 | [diff] [blame] | 90 | #ifdef HOST_BIOS_UPGRADE |
| 91 | createBIOSObject(); |
| 92 | #endif |
Adriana Kobylak | 30352a6 | 2024-04-09 09:25:36 -0500 | [diff] [blame] | 93 | |
| 94 | if (minimum_ship_level::enabled()) |
| 95 | { |
| 96 | minimumVersionObject = std::make_unique<MinimumVersion>(bus, path); |
| 97 | minimumVersionObject->minimumVersion( |
| 98 | minimum_ship_level::getMinimumVersion()); |
| 99 | } |
| 100 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 101 | emit_object_added(); |
| 102 | }; |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 103 | |
Adriana Kobylak | bbcb7be | 2018-07-17 15:47:34 -0500 | [diff] [blame] | 104 | /** @brief Save priority value to persistent storage (flash and optionally |
| 105 | * a U-Boot environment variable) |
| 106 | * |
| 107 | * @param[in] versionId - The Id of the version |
| 108 | * @param[in] value - The priority value |
| 109 | * @return None |
| 110 | */ |
| 111 | void savePriority(const std::string& versionId, uint8_t value); |
| 112 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 113 | /** @brief Sets the given priority free by incrementing |
| 114 | * any existing priority with the same value by 1 |
| 115 | * |
| 116 | * @param[in] value - The priority that needs to be set free. |
| 117 | * @param[in] versionId - The Id of the version for which we |
| 118 | * are trying to free up the priority. |
| 119 | * @return None |
| 120 | */ |
| 121 | void freePriority(uint8_t value, const std::string& versionId); |
Saqib Khan | 4c1aec0 | 2017-07-06 11:46:13 -0500 | [diff] [blame] | 122 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 123 | /** |
| 124 | * @brief Create and populate the active BMC Version. |
| 125 | */ |
| 126 | void processBMCImage(); |
Saqib Khan | ba23988 | 2017-05-26 08:41:54 -0500 | [diff] [blame] | 127 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 128 | /** |
| 129 | * @brief Erase specified entry D-Bus object |
| 130 | * if Action property is not set to Active |
| 131 | * |
| 132 | * @param[in] entryId - unique identifier of the entry |
| 133 | */ |
| 134 | void erase(std::string entryId); |
Leonel Gonzalez | 3526ef7 | 2017-07-07 14:38:25 -0500 | [diff] [blame] | 135 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 136 | /** |
| 137 | * @brief Deletes all versions except for the current one |
| 138 | */ |
Pavithra Barithaya | 36cc1c8 | 2024-06-22 00:41:28 -0500 | [diff] [blame] | 139 | void deleteAll() override; |
Gunnar Mills | ded875d | 2017-08-28 16:44:52 -0500 | [diff] [blame] | 140 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 141 | /** @brief Creates an active association to the |
| 142 | * newly active software image |
| 143 | * |
| 144 | * @param[in] path - The path to create the association to. |
| 145 | */ |
| 146 | void createActiveAssociation(const std::string& path); |
Gunnar Mills | ded875d | 2017-08-28 16:44:52 -0500 | [diff] [blame] | 147 | |
Adriana Kobylak | 991af7e | 2018-12-10 13:08:38 -0600 | [diff] [blame] | 148 | /** @brief Removes the associations from the provided software image path |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 149 | * |
Adriana Kobylak | 991af7e | 2018-12-10 13:08:38 -0600 | [diff] [blame] | 150 | * @param[in] path - The path to remove the associations from. |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 151 | */ |
Adriana Kobylak | 991af7e | 2018-12-10 13:08:38 -0600 | [diff] [blame] | 152 | void removeAssociations(const std::string& path); |
Gunnar Mills | ded875d | 2017-08-28 16:44:52 -0500 | [diff] [blame] | 153 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 154 | /** @brief Determine if the given priority is the lowest |
| 155 | * |
| 156 | * @param[in] value - The priority that needs to be checked. |
| 157 | * |
| 158 | * @return boolean corresponding to whether the given |
| 159 | * priority is lowest. |
| 160 | */ |
| 161 | bool isLowestPriority(uint8_t value); |
Saqib Khan | b9da663 | 2017-09-13 09:48:37 -0500 | [diff] [blame] | 162 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 163 | /** |
| 164 | * @brief Updates the U-Boot variables to point to the requested |
| 165 | * versionId, so that the systems boots from this version on |
| 166 | * the next reboot. |
| 167 | * |
| 168 | * @param[in] versionId - The version to point the system to boot from. |
| 169 | */ |
| 170 | void updateUbootEnvVars(const std::string& versionId); |
Adriana Kobylak | b77551c | 2017-10-27 12:46:23 -0500 | [diff] [blame] | 171 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 172 | /** |
| 173 | * @brief Updates the uboot variables to point to BMC version with lowest |
| 174 | * priority, so that the system boots from this version on the |
| 175 | * next boot. |
| 176 | */ |
| 177 | void resetUbootEnvVars(); |
Saqib Khan | 49446ae | 2017-10-02 10:54:20 -0500 | [diff] [blame] | 178 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 179 | /** @brief Brings the total number of active BMC versions to |
| 180 | * ACTIVE_BMC_MAX_ALLOWED -1. This function is intended to be |
| 181 | * run before activating a new BMC version. If this function |
| 182 | * needs to delete any BMC version(s) it will delete the |
| 183 | * version(s) with the highest priority, skipping the |
| 184 | * functional BMC version. |
Adriana Kobylak | a696359 | 2018-09-07 14:13:29 -0500 | [diff] [blame] | 185 | * |
| 186 | * @param[in] caller - The Activation object that called this function. |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 187 | */ |
Lei YU | 0cd6d84 | 2021-12-27 11:56:02 +0800 | [diff] [blame] | 188 | void freeSpace(const Activation& caller); |
Adriana Kobylak | 204e1e7 | 2018-01-24 16:00:05 -0600 | [diff] [blame] | 189 | |
AppaRao Puli | 1bb6dcb | 2020-03-27 20:51:57 +0530 | [diff] [blame] | 190 | /** @brief Creates a updateable association to the |
| 191 | * "running" BMC software image |
| 192 | * |
| 193 | * @param[in] path - The path to create the association. |
| 194 | */ |
| 195 | void createUpdateableAssociation(const std::string& path); |
| 196 | |
Adriana Kobylak | ec4eec3 | 2019-11-13 14:28:35 -0600 | [diff] [blame] | 197 | /** @brief Persistent map of Version D-Bus objects and their |
| 198 | * version id */ |
| 199 | std::map<std::string, std::unique_ptr<VersionClass>> versions; |
| 200 | |
Bright Cheng | 8e9ccfe | 2019-11-18 16:18:44 +0800 | [diff] [blame] | 201 | /** @brief Vector of needed BMC images in the tarball*/ |
| 202 | std::vector<std::string> imageUpdateList; |
| 203 | |
Manojkiran Eda | 19dd56b | 2024-06-17 14:29:52 +0530 | [diff] [blame] | 204 | /** @brief The slot of running BMC image */ |
Lei YU | 531fbc2 | 2021-12-10 20:03:18 +0800 | [diff] [blame] | 205 | uint32_t runningImageSlot = 0; |
| 206 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 207 | private: |
| 208 | /** @brief Callback function for Software.Version match. |
| 209 | * @details Creates an Activation D-Bus object. |
| 210 | * |
| 211 | * @param[in] msg - Data associated with subscribed signal |
| 212 | */ |
Patrick Williams | bf2bb2b | 2022-07-22 19:26:52 -0500 | [diff] [blame] | 213 | void createActivation(sdbusplus::message_t& msg); |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 214 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 215 | /** |
| 216 | * @brief Validates the presence of SquashFS image in the image dir. |
| 217 | * |
| 218 | * @param[in] filePath - The path to the image dir. |
| 219 | * @param[out] result - ActivationStatus Enum. |
| 220 | * ready if validation was successful. |
| 221 | * invalid if validation fail. |
| 222 | * active if image is the current version. |
| 223 | * |
| 224 | */ |
| 225 | ActivationStatus validateSquashFSImage(const std::string& filePath); |
Saqib Khan | 35e83f3 | 2017-05-22 11:37:32 -0500 | [diff] [blame] | 226 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 227 | /** @brief BMC factory reset - marks the read-write partition for |
| 228 | * recreation upon reboot. */ |
| 229 | void reset() override; |
Michael Tritz | 37a5904 | 2017-07-12 13:44:53 -0500 | [diff] [blame] | 230 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 231 | /** |
| 232 | * @brief Enables field mode, if value=true. |
| 233 | * |
| 234 | * @param[in] value - If true, enables field mode. |
| 235 | * @param[out] result - Returns the current state of field mode. |
| 236 | * |
| 237 | */ |
| 238 | bool fieldModeEnabled(bool value) override; |
Michael Tritz | 0129d92 | 2017-08-10 19:33:46 -0500 | [diff] [blame] | 239 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 240 | /** @brief Sets the BMC inventory item path under |
| 241 | * /xyz/openbmc_project/inventory/system/chassis/. */ |
| 242 | void setBMCInventoryPath(); |
Gunnar Mills | b60add1 | 2017-08-24 16:41:42 -0500 | [diff] [blame] | 243 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 244 | /** @brief The path to the BMC inventory item. */ |
| 245 | std::string bmcInventoryPath; |
Gunnar Mills | b60add1 | 2017-08-24 16:41:42 -0500 | [diff] [blame] | 246 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 247 | /** @brief Restores field mode status on reboot. */ |
| 248 | void restoreFieldModeStatus(); |
Michael Tritz | 0129d92 | 2017-08-10 19:33:46 -0500 | [diff] [blame] | 249 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 250 | /** @brief Creates a functional association to the |
| 251 | * "running" BMC software image |
| 252 | * |
| 253 | * @param[in] path - The path to create the association to. |
| 254 | */ |
| 255 | void createFunctionalAssociation(const std::string& path); |
Gunnar Mills | 88e8a32 | 2017-09-13 11:09:28 -0500 | [diff] [blame] | 256 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 257 | /** @brief Persistent sdbusplus D-Bus bus connection. */ |
Patrick Williams | bf2bb2b | 2022-07-22 19:26:52 -0500 | [diff] [blame] | 258 | sdbusplus::bus_t& bus; |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 259 | |
Lei YU | 56aaf45 | 2018-06-21 16:09:44 +0800 | [diff] [blame] | 260 | /** @brief The helper of image updater. */ |
| 261 | Helper helper; |
| 262 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 263 | /** @brief Persistent map of Activation D-Bus objects and their |
| 264 | * version id */ |
| 265 | std::map<std::string, std::unique_ptr<Activation>> activations; |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 266 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 267 | /** @brief sdbusplus signal match for Software.Version */ |
| 268 | sdbusplus::bus::match_t versionMatch; |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 269 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 270 | /** @brief This entry's associations */ |
| 271 | AssociationList assocs = {}; |
Gunnar Mills | ded875d | 2017-08-28 16:44:52 -0500 | [diff] [blame] | 272 | |
Adriana Kobylak | 2285fe0 | 2018-02-27 15:36:59 -0600 | [diff] [blame] | 273 | /** @brief Clears read only partition for |
| 274 | * given Activation D-Bus object. |
| 275 | * |
| 276 | * @param[in] versionId - The version id. |
| 277 | */ |
Pavithra Barithaya | 6d17852 | 2024-06-24 04:17:29 -0500 | [diff] [blame] | 278 | void removeReadOnlyPartition(const std::string& versionId); |
Eddie James | eaa1ee0 | 2018-03-01 10:09:10 -0600 | [diff] [blame] | 279 | |
| 280 | /** @brief Copies U-Boot from the currently booted BMC chip to the |
| 281 | * alternate chip. |
| 282 | */ |
| 283 | void mirrorUbootToAlt(); |
Bright Cheng | 8e9ccfe | 2019-11-18 16:18:44 +0800 | [diff] [blame] | 284 | |
| 285 | /** @brief Check the required image files |
| 286 | * |
| 287 | * @param[in] filePath - BMC tarball file path |
| 288 | * @param[in] imageList - Image filenames included in the BMC tarball |
| 289 | * @param[out] result - Boolean |
| 290 | * true if all image files are found in BMC tarball |
| 291 | * false if one of image files is missing |
| 292 | */ |
Pavithra Barithaya | c5f6e7e | 2024-06-24 09:50:21 -0500 | [diff] [blame^] | 293 | static bool checkImage(const std::string& filePath, |
| 294 | const std::vector<std::string>& imageList); |
Lei YU | 6e9fb1d | 2021-02-19 18:01:40 +0800 | [diff] [blame] | 295 | |
Adriana Kobylak | 30352a6 | 2024-04-09 09:25:36 -0500 | [diff] [blame] | 296 | /** @brief Persistent MinimumVersion D-Bus object */ |
| 297 | std::unique_ptr<MinimumVersion> minimumVersionObject; |
| 298 | |
Lei YU | 6e9fb1d | 2021-02-19 18:01:40 +0800 | [diff] [blame] | 299 | #ifdef HOST_BIOS_UPGRADE |
| 300 | /** @brief Create the BIOS object without knowing the version. |
| 301 | * |
| 302 | * The object is created only to provide the DBus access so that an |
| 303 | * external service could set the correct BIOS version. |
| 304 | * On BIOS code update, the version is updated accordingly. |
| 305 | */ |
| 306 | void createBIOSObject(); |
| 307 | |
| 308 | /** @brief Persistent Activation D-Bus object for BIOS */ |
| 309 | std::unique_ptr<Activation> biosActivation; |
| 310 | |
Lei YU | 16aa28a | 2021-05-07 10:17:30 +0800 | [diff] [blame] | 311 | public: |
Lei YU | 6e9fb1d | 2021-02-19 18:01:40 +0800 | [diff] [blame] | 312 | /** @brief Persistent Version D-Bus object for BIOS */ |
| 313 | std::unique_ptr<VersionClass> biosVersion; |
| 314 | #endif |
Lei YU | 531fbc2 | 2021-12-10 20:03:18 +0800 | [diff] [blame] | 315 | |
| 316 | /** @brief Get the slot number of running image */ |
| 317 | void getRunningSlot(); |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 318 | }; |
| 319 | |
Gunnar Mills | ec1b41c | 2017-05-02 12:20:36 -0500 | [diff] [blame] | 320 | } // namespace updater |
| 321 | } // namespace software |
| 322 | } // namespace phosphor |