Nvidia-Gpu: Support to fetch model,revision inventory properties
Add capability to fetch model and revision from Nvidia GPU devices using
GET inventory command
Tested
Able to get model and revision info from the GPU
```
busctl introspect xyz.openbmc_project.GpuSensor /xyz/openbmc_project/inventory/NVIDIA_GB200_GPU_0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Common.UUID interface - - -
.UUID property s "6c13dc0f-ec0c-1fc9-db63-4d9f1053b5ef" emits-change
xyz.openbmc_project.Inventory.Decorator.Asset interface - - -
.Manufacturer property s "NVIDIA" emits-change
.Model property s "RTXPRO6000BlackwellDC" emits-change
.PartNumber property s "B40GPU" emits-change
.SerialNumber property s "1641425000136" emits-change
xyz.openbmc_project.Inventory.Decorator.Revision interface - - -
.Version property s "2BB5-895-A1" emits-change
xyz.openbmc_project.Inventory.Item.Accelerator interface - - -
.Type property s "GPU" emits-change
```
Change-Id: Ib0870f1680687272e58c49726618aeee332e3d4a
Signed-off-by: Rohit PAI <ropai@nvidia.com>
diff --git a/src/nvidia-gpu/Inventory.cpp b/src/nvidia-gpu/Inventory.cpp
index 18b9dc2..7a1c3cc 100644
--- a/src/nvidia-gpu/Inventory.cpp
+++ b/src/nvidia-gpu/Inventory.cpp
@@ -27,6 +27,8 @@
static constexpr const char* assetIfaceName =
"xyz.openbmc_project.Inventory.Decorator.Asset";
static constexpr const char* uuidIfaceName = "xyz.openbmc_project.Common.UUID";
+static constexpr const char* revisionIfaceName =
+ "xyz.openbmc_project.Inventory.Decorator.Revision";
Inventory::Inventory(
const std::shared_ptr<sdbusplus::asio::connection>& /*conn*/,
@@ -49,6 +51,8 @@
"SerialNumber");
registerProperty(gpu::InventoryPropertyId::BOARD_PART_NUMBER, assetIface,
"PartNumber");
+ registerProperty(gpu::InventoryPropertyId::MARKETING_NAME, assetIface,
+ "Model");
assetIface->initialize();
uuidInterface = objectServer.add_interface(path, uuidIfaceName);
@@ -56,6 +60,11 @@
"UUID");
uuidInterface->initialize();
+ revisionIface = objectServer.add_interface(path, revisionIfaceName);
+ registerProperty(gpu::InventoryPropertyId::DEVICE_PART_NUMBER,
+ revisionIface, "Version");
+ revisionIface->initialize();
+
// Static properties
if (deviceType == gpu::DeviceIdentification::DEVICE_GPU)
{
diff --git a/src/nvidia-gpu/Inventory.hpp b/src/nvidia-gpu/Inventory.hpp
index 9b5b097..ea38f6f 100644
--- a/src/nvidia-gpu/Inventory.hpp
+++ b/src/nvidia-gpu/Inventory.hpp
@@ -59,6 +59,7 @@
std::shared_ptr<sdbusplus::asio::dbus_interface> assetIface;
std::shared_ptr<sdbusplus::asio::dbus_interface> acceleratorInterface;
std::shared_ptr<sdbusplus::asio::dbus_interface> uuidInterface;
+ std::shared_ptr<sdbusplus::asio::dbus_interface> revisionIface;
std::string name;
mctp::MctpRequester& mctpRequester;