Loading...
Searching...
No Matches
fru_mr_rec_t Struct Reference
MultiRecord area

MultiRecord area record type. More...

`#include <fru.h>`

## Data Fields

fru_mr_type_t | type
| Record Type.
union { |
struct { |
} psu
| PSU Information, see IPMI FRU spec section 18.1. More...
struct { |
} dco
| DC Output, see IPMI FRU spec section 18.2. More...
struct { |
} edco
| Extended DC Output, see IPMI FRU spec section 18.2a. More...
struct { |
} dcl
| DC Load, see IPMI FRU spec section 18.3. More...
struct { |
} edcl
| Extended DC Load, see IPMI FRU spec section 18.3a. More...
struct { |
fru_mr_mgmt_type_t subtype |
| Management Access Record subtype. More...
char data [FRU_MR_MGMT_MAXDATA+1] |
| Management Access Record data. More...
} mgmt
| Management Access Record, see IPMI FRU spec section 18.4. More...
struct { |
} bcr
| Base Compatibility Record, see IPMI FRU spec section 18.5. More...
struct { |
} ecr
| Extended Compatibility Record, see IPMI FRU spec section 18.6. More...
struct { |
union { |
struct { |
} smbus
| Fixed SMBus Addresses, see section 4.3.1. More...
struct { |
} legacy
| Legacy-Device Alerts, see section 4.3.2. More...
struct { |
} rc
| Remote Control, see section 4.3.3. More...
} |
} asf
| Alert Standard Format records, see ASF spec (DSP0136), revision 2.0. More...
struct { |
union { |
struct { |
fru_nvme_ff_t formfactor |
| Form-Factor as per NVMe-MI 1.2b Figure 160. More...
uint8_t p1v8_init |
uint8_t p1v8_max |
uint8_t p3v3_init |
uint8_t p3v3_max |
uint8_t p3v3_aux_max |
uint8_t p5v_init |
uint8_t p5v_max |
uint8_t p12v_init |
uint8_t p12v_max |
uint8_t ptherm_max |
uint64_t capacity_lo |
| Total capacity, higher 8 bytes, 13:6 of 13, host-endian. More...
uint32_t capacity_mid |
| Total capacity, middle 4 bytes, 5:2 of 13, host-endian. More...
uint8_t capacity_hi |
| Total capacity, middle 4 bytes, 1 of 13. More...
} info
| NVMe Record, see section 8.2.3. More...
struct { |
} pcie
| NVMe PCIe Port Record, see section 8.2.4. More...
struct { |
} topology
| NVMe Topology Record, see section 8.2.4. More...
} |
} nvme
| NVMe Records, see NVMe-MI specification revision 1.2b. More...
struct { |
uint32_t mfg_id |
| Manufacturer ID, 24 bits. More...
fru_field_enc_t enc |
| OEM data encoding. More...
char data [FRU_MRR_OEM_MAXDATA] |
| OEM data. More...
} oem
| OEM Record, see IPMI FRU spec section 18.7. More...
struct { |
uint8_t type |
| The actual record Type. More...
fru_field_enc_t enc |
| OEM data encoding. More...
char data [FRU_MRR_RAW_MAXDATA] |
| Raw data. More...
} raw
| Custom Raw Record. More...
}; |

## Detailed Description

MultiRecord area record type.

Describes a record of any supported multirecord area record type in decoded form. Comprises a number of type-specific structs combined in a union. You only need to fill in the fields of the struct that correspond to the selected record type.

All byte arrays are stored as hex strings in this structure. All integer types are stored as host-endian integers. All string types are stored as C-strings.

Example

fru_recrec_t rec = {};
const int mr_myoem_type = FRU_MR_OEM_START + 1;
rec.type = mr_myoem_type;
rec.oem.type = FRU_FE_TEXT;
strncpy(rec.oem.data, "Some OEM data", sizeof(rec.oem.data));
// Alternatively:
rec.type = mr_myoem_type;
rec.oem.type = FRU_FE_BINARY;
strncpy(rec.oem.data, "01020304DEADC0DE", sizeof(rec.oem.data));
FRU_FE_BINARY
@ FRU_FE_BINARY
Encode the field as binary, the value is a hex string (e.g., 1337C0DE).
Definition fru.h:273
FRU_FE_TEXT
@ FRU_FE_TEXT
Encode the field as plain text (ASCII+Latin1).
Definition fru.h:284
FRU_MR_OEM_START
@ FRU_MR_OEM_START
Start of OEM range.
Definition fru.h:1236

## Field Documentation

## [union]

union { ... } fru_mr_rec_t

## [struct]

struct { ... } fru_mr_rec_t::asf

Alert Standard Format records, see ASF spec (DSP0136), revision 2.0.

TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::bcr

Base Compatibility Record, see IPMI FRU spec section 18.5.

TODO: Not yet implemented

## capacity_hi

uint8_t fru_mr_rec_t::capacity_hi

Total capacity, middle 4 bytes, 1 of 13.

## capacity_lo

uint64_t fru_mr_rec_t::capacity_lo

Total capacity, higher 8 bytes, 13:6 of 13, host-endian.

## capacity_mid

uint32_t fru_mr_rec_t::capacity_mid

Total capacity, middle 4 bytes, 5:2 of 13, host-endian.

## data

char fru_mr_rec_t::data[FRU_MRR_RAW_MAXDATA]

Management Access Record data.

Raw data.

OEM data.

Most data in this type of record are just plain text strings. The "System GUID" (UUID) subtype data is binary, but as usual for libfru, a hex string representation is expected/stored here.

Note
  The "System GUID" (FRU_MR_MGMT_SYS_UUID) data string is expected to be Big-Endian on input, and will be stored here in the same format on output. The generated binary file output will use SMBIOS-compatible Little-Endian encoding for the first three fields, and the same encoding is expected from an input binary FRU file.

## [struct]

struct { ... } fru_mr_rec_t::dcl

DC Load, see IPMI FRU spec section 18.3.

TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::dco

DC Output, see IPMI FRU spec section 18.2.

TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::ecr

Extended Compatibility Record, see IPMI FRU spec section 18.6.

TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::edcl

Extended DC Load, see IPMI FRU spec section 18.3a.

TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::edco

Extended DC Output, see IPMI FRU spec section 18.2a.

TODO: Not yet implemented

## enc

fru_field_enc_t fru_mr_rec_t::enc

OEM data encoding.

Supported are:

- FRU_FE_TEXT (plain text, Latin1 only, auto len)
- FRU_FE_BINARY (hex string data)

Functions fru_load_file() and fru_load_buffer() always autodetect the encoding of OEM records, and set the type field accordingly.

Supported are:

- FRU_FE_TEXT (plain text, Latin1 only, auto len)
- FRU_FE_BINARY (hex string data)

Functions fru_load_file() and fru_load_buffer() always load the otherwise unsupported records as raw and always autodetect the encoding of such records, seting enc field accordingly.

## formfactor

fru_nvme_ff_t fru_mr_rec_t::formfactor

Form-Factor as per NVMe-MI 1.2b Figure 160.

## [struct]

struct { ... } fru_mr_rec_t::info

NVMe Record, see section 8.2.3.

TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::legacy

Legacy-Device Alerts, see section 4.3.2.

TODO: Not yet implemented

## mfg_id

uint32_t fru_mr_rec_t::mfg_id

Manufacturer ID, 24 bits.

## [struct]

struct { ... } fru_mr_rec_t::mgmt

Management Access Record, see IPMI FRU spec section 18.4.

## [struct]

struct { ... } fru_mr_rec_t::nvme

NVMe Records, see NVMe-MI specification revision 1.2b.

TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::oem

OEM Record, see IPMI FRU spec section 18.7.

TODO: Not yet implemented

## p12v_init

uint8_t fru_mr_rec_t::p12v_init

## p12v_max

uint8_t fru_mr_rec_t::p12v_max

## p1v8_init

uint8_t fru_mr_rec_t::p1v8_init

## p1v8_max

uint8_t fru_mr_rec_t::p1v8_max

## p3v3_aux_max

uint8_t fru_mr_rec_t::p3v3_aux_max

## p3v3_init

uint8_t fru_mr_rec_t::p3v3_init

## p3v3_max

uint8_t fru_mr_rec_t::p3v3_max

## p5v_init

uint8_t fru_mr_rec_t::p5v_init

## p5v_max

uint8_t fru_mr_rec_t::p5v_max

## [struct]

struct { ... } fru_mr_rec_t::pcie

NVMe PCIe Port Record, see section 8.2.4.

TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::psu

PSU Information, see IPMI FRU spec section 18.1.

TODO: Not yet implemented

## ptherm_max

uint8_t fru_mr_rec_t::ptherm_max

## [struct]

struct { ... } fru_mr_rec_t::raw

Custom Raw Record.

Use for unsupported types.

This entry is for adding any raw data, even if a specific type is not supported by libfru yet. TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::rc

Remote Control, see section 4.3.3.

TODO: Not yet implemented

## [struct]

struct { ... } fru_mr_rec_t::smbus

Fixed SMBus Addresses, see section 4.3.1.

TODO: Not yet implemented

## subtype

fru_mr_mgmt_type_t fru_mr_rec_t::subtype

Management Access Record subtype.

## [struct]

struct { ... } fru_mr_rec_t::topology

NVMe Topology Record, see section 8.2.4.

TODO: Not yet implemented

## type [1/2]

uint8_t fru_mr_rec_t::type

The actual record Type.

## type [2/2]

fru_mr_type_t fru_mr_rec_t::type

Record Type.

The documentation for this struct was generated from the following file:

- fru.h