mdrv2.hpp (c39d3dfca789d7ad5de9b7bd0856fc5b79c589df) | mdrv2.hpp (f2d8bb48366d812180a8684e3ff58f26425854fa) |
---|---|
1/* 2// Copyright (c) 2018 Intel Corporation 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 --- 61 unchanged lines hidden (view full) --- 70 MDRV2(MDRV2&&) = delete; 71 MDRV2& operator=(MDRV2&&) = delete; 72 ~MDRV2() = default; 73 74 MDRV2(sdbusplus::bus_t& bus, const char* path, 75 boost::asio::io_context& io) : 76 sdbusplus::server::object_t< 77 sdbusplus::server::xyz::openbmc_project::smbios::MDRV2>(bus, path), | 1/* 2// Copyright (c) 2018 Intel Corporation 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 --- 61 unchanged lines hidden (view full) --- 70 MDRV2(MDRV2&&) = delete; 71 MDRV2& operator=(MDRV2&&) = delete; 72 ~MDRV2() = default; 73 74 MDRV2(sdbusplus::bus_t& bus, const char* path, 75 boost::asio::io_context& io) : 76 sdbusplus::server::object_t< 77 sdbusplus::server::xyz::openbmc_project::smbios::MDRV2>(bus, path), |
78 bus(bus), timer(io), smbiosInterface(getObjectServer().add_interface( | 78 timer(io), bus(bus), smbiosInterface(getObjectServer().add_interface( |
79 smbiosPath, smbiosInterfaceName)) 80 { 81 smbiosDir.agentVersion = smbiosAgentVersion; 82 smbiosDir.dirVersion = 1; 83 smbiosDir.dirEntries = 1; 84 directoryEntries(smbiosDir.dirEntries); 85 smbiosDir.status = 1; 86 smbiosDir.remoteDirVersion = 0; --- 51 unchanged lines hidden (view full) --- 138 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 0x42}; 139 uint8_t smbiosTableStorage[smbiosTableStorageSize]; 140 141 bool smbiosIsUpdating(uint8_t index); 142 bool smbiosIsAvailForUpdate(uint8_t index); 143 inline uint8_t smbiosValidFlag(uint8_t index); 144 void systemInfoUpdate(void); 145 | 79 smbiosPath, smbiosInterfaceName)) 80 { 81 smbiosDir.agentVersion = smbiosAgentVersion; 82 smbiosDir.dirVersion = 1; 83 smbiosDir.dirEntries = 1; 84 directoryEntries(smbiosDir.dirEntries); 85 smbiosDir.status = 1; 86 smbiosDir.remoteDirVersion = 0; --- 51 unchanged lines hidden (view full) --- 138 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 0x42}; 139 uint8_t smbiosTableStorage[smbiosTableStorageSize]; 140 141 bool smbiosIsUpdating(uint8_t index); 142 bool smbiosIsAvailForUpdate(uint8_t index); 143 inline uint8_t smbiosValidFlag(uint8_t index); 144 void systemInfoUpdate(void); 145 |
146 int getTotalCpuSlot(void); 147 int getTotalDimmSlot(void); 148 int getTotalPcieSlot(void); | 146 std::optional<size_t> getTotalCpuSlot(void); 147 std::optional<size_t> getTotalDimmSlot(void); 148 std::optional<size_t> getTotalPcieSlot(void); |
149 std::vector<std::unique_ptr<Cpu>> cpus; 150 std::vector<std::unique_ptr<Dimm>> dimms; 151 std::vector<std::unique_ptr<Pcie>> pcies; 152 std::unique_ptr<System> system; 153 std::shared_ptr<sdbusplus::asio::dbus_interface> smbiosInterface; 154}; 155 156} // namespace smbios 157} // namespace phosphor | 149 std::vector<std::unique_ptr<Cpu>> cpus; 150 std::vector<std::unique_ptr<Dimm>> dimms; 151 std::vector<std::unique_ptr<Pcie>> pcies; 152 std::unique_ptr<System> system; 153 std::shared_ptr<sdbusplus::asio::dbus_interface> smbiosInterface; 154}; 155 156} // namespace smbios 157} // namespace phosphor |