33#define PCIE_ADV_SWITCHING (0x03)
34#define ETHERNET (0x05)
35#define SERIAL_RAPID_IO (0x06)
42#define GEN1_NO_SSC (0x00)
43#define GEN1_SSC (0x01)
44#define GEN2_NO_SSC (0x02)
45#define GEN2_SSC (0x03)
48#define BASE_1G_BX (0x00)
49#define BASE_10G_BX4 (0x01)
52#define MBAUD_1250 (0x00)
53#define MBAUD_2500 (0x01)
54#define MBAUD_3125 (0x02)
55#define MBAUD_5000 (0x03)
56#define MBAUD_6250 (0x04)
67#define PLL_PRSNT (0x02)
75#define RECEIVER (0x00)
79#define UNSPEC_FAMILY (0x00)
83#define PCI_RESERVED (0x02)
86#define KHz(v) (v*1000)
87#define MHz(v) (v*1000000)
88#define GHz(v) (v*1000000000)
91#define EXACT_MATCHES (0x00)
92#define MATCHES_01 (0x01)
93#define MATCHES_10 (0x02)
96#define UNUSED_PORT 0x1F
98#define current_in_ma(curr) (uint8_t)(curr/100)
101#define FMC_SINGLE_WIDTH (0x00)
102#define FMC_DOUBLE_WIDTH (0x01)
105#define FMC_CONN_LPC (0x00)
106#define FMC_CONN_HPC (0x01)
107#define FMC_CONN_NOT_FITTED (0x03)
110#define MEZZANINE_TO_CARRIER (0x00)
111#define CARRIER_TO_MEZZANINE (0x01)
217 uint8_t link_grouping_id;
218 uint16_t link_type_ext:4,
221 uint8_t amc_channel_id;
223 uint8_t amc_channel_id;
224 uint16_t lane_bit_flag:4,
227 uint8_t link_grouping_id;
228 uint8_t assymetric_match:2,
324#define DIRECT_CLOCK_CONNECTION(id, activation_control, pll_use, clock_source_receiver, family, accuracy, freq_Hz, min_Hz, max_Hz) \
326 .clock_activation_control = activation_control, \
327 .indirect_clock_descriptor_cnt = 0, \
328 .direct_clock_descriptor_cnt = 1, \
329 .direct_descriptor = { .pll_connection = pll_use, \
330 .clock_assymetric_match = clock_source_receiver, \
331 .clock_family = family, \
332 .accuracy_level = accuracy, \
333 .clock_frequency = { (uint8_t)(((uint32_t)freq_Hz) & 0xFF), (uint8_t)((((uint32_t)freq_Hz) & 0xFF00) >> 8), (uint8_t)((((uint32_t)freq_Hz) & 0xFF0000) >> 16), (uint8_t)((((uint32_t)freq_Hz) & 0xFF000000) >> 24) }, \
334 .clock_minimum_frequency = { (uint8_t)(((uint32_t)min_Hz) & 0xFF), (uint8_t)((((uint32_t)min_Hz) & 0xFF00) >> 8), (uint8_t)((((uint32_t)min_Hz) & 0xFF0000) >> 16), (uint8_t)((((uint32_t)min_Hz) & 0xFF000000) >> 24) }, \
335 .clock_maximum_frequency = { (uint8_t)(((uint32_t)max_Hz) & 0xFF), (uint8_t)((((uint32_t)max_Hz) & 0xFF00) >> 8), (uint8_t)((((uint32_t)max_Hz) & 0xFF0000) >> 16), (uint8_t)((((uint32_t)max_Hz) & 0xFF000000) >> 24) } } \
338#define INDIRECT_CLOCK_CONNECTION(id, activation_control, pll_use, clock_source_receiver, indirect_id) \
340 .clock_activation_control = activation_control, \
341 .indirect_clock_descriptor_cnt = 1, \
342 .direct_clock_descriptor_cnt = 0, \
343 .indirect_descriptor = { .pll_connection = pll_use, \
344 .clock_assymetric_match = clock_source_receiver, \
345 .dependent_clock_id = indirect_id, \
349#define GENERIC_POINT_TO_POINT_RECORD(id, port0, port1, port2, port3, protocol, extension, matches) \
359 .amc_channel_id = id, \
360 .lane_bit_flag = 0xF, \
361 .link_type = protocol, \
362 .link_type_ext = extension, \
363 .link_grouping_id = 0, \
364 .assymetric_match = matches, \
430uint8_t
fru_header_build( uint8_t **buffer,
size_t int_use_off,
size_t chassis_off,
size_t board_off,
size_t product_off,
size_t multirecord_off );
431uint8_t
board_info_area_build( uint8_t **buffer, uint8_t lang, uint32_t mfg_time,
const char *manuf,
const char *name,
const char *sn,
const char *pn,
const char *file_id );
432uint8_t
chassis_info_area_build( uint8_t **buffer, uint8_t type,
const char *pn,
const char *sn, uint8_t *custom_data,
size_t custom_data_sz );
433uint8_t
product_info_area_build( uint8_t **buffer, uint8_t lang,
const char *manuf,
const char *name,
const char *part_model,
const char *version,
const char *serial,
const char *asset_tag,
const char *file_id );
438uint8_t
fmc_subtype_record_build( uint8_t **buffer, uint8_t clock_dir, uint8_t module_size, uint8_t p1_conn_size, uint8_t p2_conn_size, uint8_t p1_a_count, uint8_t p1_b_count, uint8_t p2_a_count, uint8_t p2_b_count, uint8_t p1_gbt, uint8_t p2_gbt, uint8_t eol );
439uint8_t
dc_load_record_build( uint8_t **buffer, uint16_t nominal_volt, uint16_t min_volt, uint16_t max_volt, uint16_t ripple_noise, uint16_t min_load, uint16_t max_load, uint8_t eol );
440uint8_t
dc_output_record_build( uint8_t **buffer, uint16_t nominal_volt, uint16_t neg_dev, uint16_t pos_dev, uint16_t ripple_noise, uint16_t min_draw, uint16_t max_draw, uint8_t eol );
uint8_t fru_header_build(uint8_t **buffer, size_t int_use_off, size_t chassis_off, size_t board_off, size_t product_off, size_t multirecord_off)
Definition fru_editor.c:35
uint8_t chassis_info_area_build(uint8_t **buffer, uint8_t type, const char *pn, const char *sn, uint8_t *custom_data, size_t custom_data_sz)
Definition fru_editor.c:62
uint8_t amc_point_to_point_record_build(uint8_t **buffer, amc_p2p_descriptor_t *p2p_desc, uint8_t desc_count)
Definition fru_editor.c:289
struct fmc_subtype_rec fmc_subtype_rec_t
uint8_t product_info_area_build(uint8_t **buffer, uint8_t lang, const char *manuf, const char *name, const char *part_model, const char *version, const char *serial, const char *asset_tag, const char *file_id)
Definition fru_editor.c:181
struct clock_config_descriptor clock_config_descriptor_t
struct fru_common_header fru_common_header_t
size_t amc_fru_info_build(uint8_t **buffer)
Definition amc_fru.c:6
struct indirect_clock_descriptor indirect_clock_descriptor_t
amc_link_descriptor_t
Definition fru_editor.h:231
struct dc_load_rec dc_load_rec_t
uint8_t module_current_record_build(uint8_t **buffer, uint8_t current)
Definition fru_editor.c:252
struct zone3_compatibility_rec zone3_compatibility_rec_t
struct dc_output_rec dc_output_rec_t
struct amc_clock_config_record amc_clock_config_record_t
struct fru_multirecord_area_header fru_multirecord_area_header_t
struct direct_clock_descriptor direct_clock_descriptor_t
amc_channel_descriptor_t
Definition fru_editor.h:210
uint8_t fmc_subtype_record_build(uint8_t **buffer, uint8_t clock_dir, uint8_t module_size, uint8_t p1_conn_size, uint8_t p2_conn_size, uint8_t p1_a_count, uint8_t p1_b_count, uint8_t p2_a_count, uint8_t p2_b_count, uint8_t p1_gbt, uint8_t p2_gbt, uint8_t eol)
Definition fru_editor.c:411
struct fru_internal_use_area fru_internal_use_area_t
uint8_t zone3_compatibility_record_build(uint8_t **buffer, uint32_t compat_code)
Definition fru_editor.c:368
uint8_t board_info_area_build(uint8_t **buffer, uint8_t lang, uint32_t mfg_time, const char *manuf, const char *name, const char *sn, const char *pn, const char *file_id)
Definition fru_editor.c:114
struct amc_point_to_point_record amc_point_to_point_record_t
struct __attribute__((__packed__))
Definition fru_editor.h:196
uint8_t dc_load_record_build(uint8_t **buffer, uint16_t nominal_volt, uint16_t min_volt, uint16_t max_volt, uint16_t ripple_noise, uint16_t min_load, uint16_t max_load, uint8_t eol)
Definition fru_editor.c:466
uint8_t amc_point_to_point_clock_build(uint8_t **buffer, clock_config_descriptor_t *clk_desc, uint8_t desc_count)
Definition fru_editor.c:331
uint8_t dc_output_record_build(uint8_t **buffer, uint16_t nominal_volt, uint16_t neg_dev, uint16_t pos_dev, uint16_t ripple_noise, uint16_t min_draw, uint16_t max_draw, uint8_t eol)
Definition fru_editor.c:511
size_t rtm_fru_info_build(uint8_t **buffer)
Definition rtm_fru.c:3
Definition fru_editor.h:308
uint8_t manuf_id[3]
Definition fru_editor.h:310
uint8_t descriptor_cnt
Definition fru_editor.h:318
uint8_t rec_fmt_ver
Definition fru_editor.h:315
clock_config_descriptor_t descriptors[]
Definition fru_editor.h:320
fru_multirecord_area_header_t hdr
Definition fru_editor.h:309
uint8_t resource_id
Definition fru_editor.h:317
uint8_t picmg_rec_id
Definition fru_editor.h:314
Definition fru_editor.h:233
amc_channel_descriptor_t channel_desc
Definition fru_editor.h:234
amc_link_descriptor_t link_desc
Definition fru_editor.h:235
Definition fru_editor.h:238
uint8_t oem_guid_list[0]
Definition fru_editor.h:248
uint8_t rec_fmt_ver
Definition fru_editor.h:245
uint8_t record_type
Definition fru_editor.h:256
uint8_t manuf_id[3]
Definition fru_editor.h:240
amc_p2p_descriptor_t p2p_descriptor[]
Definition fru_editor.h:260
uint8_t amc_channel_descriptor_cnt
Definition fru_editor.h:258
uint8_t picmg_rec_id
Definition fru_editor.h:244
uint8_t oem_guid_cnt
Definition fru_editor.h:247
fru_multirecord_area_header_t hdr
Definition fru_editor.h:239
uint8_t connected_dev_id
Definition fru_editor.h:254
uint8_t reserved
Definition fru_editor.h:255
Definition fru_editor.h:293
uint8_t direct_clock_descriptor_cnt
Definition fru_editor.h:303
uint8_t clock_id
Definition fru_editor.h:294
uint8_t clock_activation_control
Definition fru_editor.h:299
uint8_t reserved
Definition fru_editor.h:300
uint8_t indirect_clock_descriptor_cnt
Definition fru_editor.h:302
direct_clock_descriptor_t direct_descriptor
Definition fru_editor.h:305
Definition fru_editor.h:404
fru_multirecord_area_header_t hdr
Definition fru_editor.h:405
uint8_t output_number
Definition fru_editor.h:406
uint8_t max_spec_volt[2]
Definition fru_editor.h:410
uint8_t reserved
Definition fru_editor.h:407
uint8_t min_current_load[2]
Definition fru_editor.h:412
uint8_t max_current_load[2]
Definition fru_editor.h:413
uint8_t ripple_noise_pkpk[2]
Definition fru_editor.h:411
uint8_t min_spec_volt[2]
Definition fru_editor.h:409
uint8_t nominal_voltage[2]
Definition fru_editor.h:408
Definition fru_editor.h:416
uint8_t max_pos_dev[2]
Definition fru_editor.h:423
uint8_t output_number
Definition fru_editor.h:418
uint8_t standby
Definition fru_editor.h:420
uint8_t nominal_voltage[2]
Definition fru_editor.h:421
uint8_t max_neg_dev[2]
Definition fru_editor.h:422
fru_multirecord_area_header_t hdr
Definition fru_editor.h:417
uint8_t ripple_noise_pkpk[2]
Definition fru_editor.h:424
uint8_t max_current_draw[2]
Definition fru_editor.h:426
uint8_t min_current_draw[2]
Definition fru_editor.h:425
uint8_t reserved
Definition fru_editor.h:419
Definition fru_editor.h:276
uint8_t clock_assymetric_match
Definition fru_editor.h:282
uint8_t clock_maximum_frequency[4]
Definition fru_editor.h:290
uint8_t reserved
Definition fru_editor.h:284
uint8_t clock_frequency[4]
Definition fru_editor.h:288
uint8_t clock_family
Definition fru_editor.h:286
uint8_t accuracy_level
Definition fru_editor.h:287
uint8_t clock_minimum_frequency[4]
Definition fru_editor.h:289
uint8_t pll_connection
Definition fru_editor.h:283
Definition fru_editor.h:382
fru_multirecord_area_header_t hdr
Definition fru_editor.h:383
uint8_t module_size
Definition fru_editor.h:394
uint8_t p2_conn_size
Definition fru_editor.h:392
uint8_t subtype
Definition fru_editor.h:389
uint8_t p1_b_signals
Definition fru_editor.h:396
uint8_t reserved
Definition fru_editor.h:390
uint8_t p1_conn_size
Definition fru_editor.h:393
uint8_t p1_gbt
Definition fru_editor.h:400
uint8_t max_tck_clk
Definition fru_editor.h:401
uint8_t version
Definition fru_editor.h:388
uint8_t p2_gbt
Definition fru_editor.h:399
uint8_t p2_b_signals
Definition fru_editor.h:398
uint8_t manuf_id[3]
Definition fru_editor.h:384
uint8_t p1_a_signals
Definition fru_editor.h:395
uint8_t clk_dir
Definition fru_editor.h:391
uint8_t p2_a_signals
Definition fru_editor.h:397
Definition fru_editor.h:168
uint8_t uint8_t data
Definition fru_editor.h:178
uint8_t format_version
Definition fru_editor.h:175
Definition fru_editor.h:184
uint8_t rec_fmt_ver
Definition fru_editor.h:191
uint8_t picmg_rec_id
Definition fru_editor.h:190
uint8_t current
Definition fru_editor.h:193
fru_multirecord_area_header_t hdr
Definition fru_editor.h:185
Definition fru_editor.h:263
uint8_t reserved
Definition fru_editor.h:271
uint8_t clock_assymetric_match
Definition fru_editor.h:269
uint8_t dependent_clock_id
Definition fru_editor.h:273
uint8_t pll_connection
Definition fru_editor.h:270
Definition fru_editor.h:369
uint8_t compat_designator[4]
Definition fru_editor.h:379
uint8_t picmg_rec_id
Definition fru_editor.h:375
uint8_t manuf_id[3]
Definition fru_editor.h:371
uint8_t rec_fmt_ver
Definition fru_editor.h:376
uint8_t interface_id_type
Definition fru_editor.h:377
fru_multirecord_area_header_t hdr
Definition fru_editor.h:370
uint8_t user_manuf_id[3]
Definition fru_editor.h:378