Lei YU | 6505e9d | 2020-09-21 17:34:32 +0800 | [diff] [blame] | 1 | #pragma once |
Lei YU | ebd3d09 | 2020-09-27 18:11:48 +0800 | [diff] [blame] | 2 | |
Lei YU | 17bc93d | 2020-09-23 19:55:07 +0800 | [diff] [blame] | 3 | #include <array> |
Lei YU | 8a454c5 | 2020-09-23 16:52:46 +0800 | [diff] [blame] | 4 | #include <cstdint> |
Lei YU | 17bc93d | 2020-09-23 19:55:07 +0800 | [diff] [blame] | 5 | #include <string_view> |
| 6 | |
George Liu | a3a9d2a | 2024-04-03 09:30:45 +0800 | [diff] [blame] | 7 | namespace iei |
Lei YU | 17bc93d | 2020-09-23 19:55:07 +0800 | [diff] [blame] | 8 | { |
Lei YU | 6505e9d | 2020-09-21 17:34:32 +0800 | [diff] [blame] | 9 | |
George Liu | a3a9d2a | 2024-04-03 09:30:45 +0800 | [diff] [blame] | 10 | enum ipmi_iei_net_fns |
Lei YU | 6505e9d | 2020-09-21 17:34:32 +0800 | [diff] [blame] | 11 | { |
George Liu | a3a9d2a | 2024-04-03 09:30:45 +0800 | [diff] [blame] | 12 | NETFN_OEM_IEI = 0x3c, |
Lei YU | 6505e9d | 2020-09-21 17:34:32 +0800 | [diff] [blame] | 13 | }; |
| 14 | |
George Liu | a3a9d2a | 2024-04-03 09:30:45 +0800 | [diff] [blame] | 15 | enum iei_oem_cmds |
Lei YU | 6505e9d | 2020-09-21 17:34:32 +0800 | [diff] [blame] | 16 | { |
| 17 | CMD_OEM_ASSET_INFO = 0x01, |
| 18 | }; |
Lei YU | 8a454c5 | 2020-09-23 16:52:46 +0800 | [diff] [blame] | 19 | |
| 20 | struct AssetInfoHeader |
| 21 | { |
| 22 | uint8_t rwFlag; |
| 23 | uint8_t deviceType; |
| 24 | uint8_t infoType; |
| 25 | uint8_t maskAllPresentLen; |
| 26 | uint8_t enableStatus; |
| 27 | uint8_t maskPresent; |
| 28 | uint8_t maskAllPresent; |
| 29 | uint8_t allInfoDone; |
| 30 | uint16_t totalMessageLen; |
| 31 | } __attribute__((packed)); |
Lei YU | 17bc93d | 2020-09-23 19:55:07 +0800 | [diff] [blame] | 32 | |
| 33 | enum class bios_version_devname |
| 34 | { |
| 35 | BIOS = 0, |
| 36 | ME = 1, |
| 37 | IE = 2, |
| 38 | PCH = 3, |
| 39 | BOARD = 4, |
| 40 | MRC = 5, |
| 41 | CUSTOM_ID = 6, |
| 42 | PCH_STEPPING = 7, |
| 43 | }; |
| 44 | |
| 45 | constexpr std::array<std::string_view, 8> bios_devname{ |
| 46 | "BIOS", "ME", "IE", "PCH", "BOARD", "MRC", "CUSTOM_ID", "PCH_STEPPING", |
| 47 | }; |
| 48 | |
George Liu | a3a9d2a | 2024-04-03 09:30:45 +0800 | [diff] [blame] | 49 | } // namespace iei |