Skip to content

Commit 928d2a2

Browse files
committed
Update system info reader and support files for v2.1
1 parent 442361e commit 928d2a2

File tree

9 files changed

+23
-17
lines changed

9 files changed

+23
-17
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#######################################################################################################################
2-
### Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All rights reserved.
2+
### Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All rights reserved.
33
#######################################################################################################################
44

55
cmake_minimum_required(VERSION 3.16)

source/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#######################################################################################################################
2-
### Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All rights reserved.
2+
### Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All rights reserved.
33
#######################################################################################################################
44

55
project(system_info)
@@ -43,4 +43,4 @@ if (DRIVER_OVERRIDES_ENABLE_PACKAGING)
4343
RUNTIME DESTINATION bin COMPONENT driver_overrides_api
4444
LIBRARY DESTINATION lib COMPONENT driver_overrides_api)
4545
install(FILES driver_overrides_reader.h DESTINATION inc COMPONENT driver_overrides_api)
46-
endif ()
46+
endif ()

source/definitions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
// Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
55
/// @brief JSON key definitions
@@ -123,4 +123,4 @@ static constexpr const char* kNodeStringDevDriver = "devdriver";
123123
static constexpr const char* kNodeStringTag = "tag";
124124
static constexpr const char* kNodeStringLinux = "linux";
125125
static constexpr const char* kNodeStringWindows = "windows";
126-
#endif
126+
#endif

source/driver_overrides_definitions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
// Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
55
/// @brief Definitions for Driver Override RDF chunk.

source/driver_overrides_reader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
// Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
55
/// @brief Driver Overrides reader implementation

source/driver_overrides_reader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
// Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
55
/// @brief Driver Overrides reader definition
@@ -75,4 +75,4 @@ namespace driver_overrides_utils
7575
};
7676
} // namespace driver_overrides_utils
7777

78-
#endif
78+
#endif

source/system_info_reader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
// Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
55
/// @brief System info reader implementation
@@ -227,6 +227,7 @@ namespace system_info_utils
227227
/// @param [in, out] pci_info The structure to be populated with the parsed PCI info.
228228
virtual void ProcessGpuPciNode(const nlohmann::json& pci_root, PciInfo& pci_info)
229229
{
230+
pci_info.id = 0;
230231
pci_info.bus = Get<uint32_t>(pci_root, kNodeStringPciBus, 0);
231232
pci_info.device = Get<uint32_t>(pci_root, kNodeStringDevice, 0);
232233
pci_info.function = Get<uint32_t>(pci_root, kNodeStringPciFunction, 0);

source/system_info_reader.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
// Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2022-2025 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
55
/// @brief System info reader definition
@@ -86,11 +86,16 @@ namespace system_info_utils
8686
};
8787

8888
/// @brief Structure containing a single GPU's PCI connection info.
89-
struct PciInfo
89+
union PciInfo
9090
{
91-
uint32_t bus; ///< The device bus number.
92-
uint32_t device; ///< The device number.
93-
uint32_t function; ///< The device function number.
91+
struct
92+
{
93+
uint32_t function : 8; ///< PCI function number in the system for this GPU.
94+
uint32_t device : 8; ///< PCI device number in the system for this GPU.
95+
uint32_t bus : 8; ///< PCI bus number in the system for this GPU.
96+
uint32_t reserved : 8; ///< Reserved for future use.
97+
};
98+
uint32_t id; ///< Fields packed as 32-bit uint identifier.
9499
};
95100

96101
/// @brief Structure containing clock timestamp info.
@@ -247,4 +252,4 @@ namespace system_info_utils
247252
};
248253
} // namespace system_info_utils
249254

250-
#endif
255+
#endif

source/version.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//=============================================================================
2-
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
2+
// Copyright (c) 2023-2025 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
55
/// @brief System info version header

0 commit comments

Comments
 (0)