From d9d9b32072b0d82600b8f88b6ec9b104ecff914c Mon Sep 17 00:00:00 2001 From: Adrian Chiris Date: Sun, 23 Nov 2014 15:05:07 +0200 Subject: [PATCH] - added new files to tools_layouts (for MGIR register) - mtcr_ul - added support for iCMD via Virtual CR-Space only --- include/mtcr_ul/mtcr.h | 4 +- mtcr_ul/Makefile.am | 2 +- mtcr_ul/mtcr_icmd_cif.h | 107 +++++ mtcr_ul/mtcr_int_defs.h | 11 +- mtcr_ul/mtcr_ul.c | 3 + mtcr_ul/mtcr_ul_icmd_cif.c | 399 +++++++++++++++++ tools_layouts/register_access_sib_layouts.c | 464 ++++++++++++++++++++ tools_layouts/register_access_sib_layouts.h | 206 +++++++++ 8 files changed, 1189 insertions(+), 7 deletions(-) create mode 100644 mtcr_ul/mtcr_icmd_cif.h create mode 100644 mtcr_ul/mtcr_ul_icmd_cif.c create mode 100644 tools_layouts/register_access_sib_layouts.c create mode 100644 tools_layouts/register_access_sib_layouts.h diff --git a/include/mtcr_ul/mtcr.h b/include/mtcr_ul/mtcr.h index a704bd3..9f56c33 100644 --- a/include/mtcr_ul/mtcr.h +++ b/include/mtcr_ul/mtcr.h @@ -1,6 +1,5 @@ /* - * - * Copyright (c) 2013 Mellanox Technologies Ltd. All rights reserved. + * Copyright (C) Jan 2013 Mellanox Technologies Ltd. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -94,6 +93,7 @@ typedef enum MError { ME_ICMD_UNKNOWN_STATUS, ME_ICMD_ICM_NOT_AVAIL, ME_ICMD_WRITE_PROTECT, + ME_ICMD_BAD_SIGNATURE, //errors regarding Tools CMDIF ME_CMDIF_BUSY = 0x300, diff --git a/mtcr_ul/Makefile.am b/mtcr_ul/Makefile.am index 9222dc2..dd1b68d 100644 --- a/mtcr_ul/Makefile.am +++ b/mtcr_ul/Makefile.am @@ -37,7 +37,7 @@ lib_LIBRARIES = libmtcr_ul.a libmtcr_ul_a_SOURCES = mtcr_ul.c mtcr_ib.h mtcr_int_defs.h\ mtcr_tools_cif.c mtcr_tools_cif.h\ - mtcr_icmd_cif.c mtcr_icmd_cif.h\ + mtcr_ul_icmd_cif.c mtcr_icmd_cif.h\ packets_common.c packets_common.h\ packets_layout.c packets_layout.h libmtcr_ul_a_CFLAGS = -W -Wall -g -MP -MD -fPIC -DMTCR_API="" -DMST_UL diff --git a/mtcr_ul/mtcr_icmd_cif.h b/mtcr_ul/mtcr_icmd_cif.h new file mode 100644 index 0000000..8fbe11a --- /dev/null +++ b/mtcr_ul/mtcr_icmd_cif.h @@ -0,0 +1,107 @@ +/* + * Copyright (C) Jan 2013 Mellanox Technologies Ltd. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +#ifndef _MTCR_ICMD_CIF /* guard */ +#define _MTCR_ICMD_CIF + +#ifdef __cplusplus +extern "C" { +#endif + + + + +#include +#ifdef MST_UL +#include +#endif +#include + +/* --------- Typedefs & Constants ---------------------------------- */ + +#define IN +#define OUT +#define INOUT + +#define FLASH_REG_ACCESS 0x9001 + +/* --------- Functional API ---------------------------------------- */ +/** + * Create a device-context for the command-interface of a ConnectIB device. + * @param[in] mf Open mfile to the desired device. + * @return zero value on success, non zero value on failure. + **/ +int icmd_open(mfile *mf); + +/** + * Close an open device-context for the command-interface of a + * ConnectIB device. + * @param[in] dev A pointer to a device context, previously + * obtained by a call to gcif_open. + **/ +void icmd_close(mfile *mf); + +/** + * Handles the send command procedure. + * for completeness, but calling it is strongly advised against. + * @param[in] dev A pointer to a device context, previously + * obtained by a call to gcif_open. + * @return One of the GCIF_STATUS_* values, or a raw + * status value (as indicated in cr-space). + **/ +int icmd_send_command_int(mfile *mf, + IN int opcode, + INOUT void* data, + IN int write_data_size, + IN int read_data_size, + IN int skip_write); + +/** + * Take the Tools-HCR semaphore. This functionality is provided + * for completeness, but calling it is strongly advised against. + * @param[in] dev A pointer to a device context, previously + * obtained by a call to gcif_open. + * @return One of the GCIF_STATUS_* values, or a raw + * status value (as indicated in cr-space). + **/ +int icmd_take_semaphore(mfile *mf); + +#undef IN +#undef OUT +#undef INOUT + +#ifdef __cplusplus +} +#endif + +#endif /* _MTCR_ICMD_CIF guard */ diff --git a/mtcr_ul/mtcr_int_defs.h b/mtcr_ul/mtcr_int_defs.h index cdb7aa8..fb2e505 100644 --- a/mtcr_ul/mtcr_int_defs.h +++ b/mtcr_ul/mtcr_int_defs.h @@ -45,10 +45,13 @@ typedef int (*f_mclose) (mfile* mf); typedef struct icmd_params_t { - int icmd_opened; - int took_semaphore; - int ctrl_addr; - int cmd_addr; + int icmd_opened; + int took_semaphore; + int ctrl_addr; + int cmd_addr; + int semaphore_addr; + int static_cfg_not_done_addr; + int static_cfg_not_done_offs; }icmd_params; struct mfile_t { diff --git a/mtcr_ul/mtcr_ul.c b/mtcr_ul/mtcr_ul.c index dd26653..a54e70b 100644 --- a/mtcr_ul/mtcr_ul.c +++ b/mtcr_ul/mtcr_ul.c @@ -34,6 +34,7 @@ * */ + //use memory mapped /dev/mem for access #define CONFIG_ENABLE_MMAP 1 //mmap /dev/mem for memory access (does not work on sparc) @@ -1828,6 +1829,8 @@ const char* m_err2str(MError status) return "ME_ICMD_WRITE_PROTECT"; case ME_ICMD_UNKNOWN_STATUS: return "ME_ICMD_UNKNOWN_STATUS"; + case ME_ICMD_BAD_SIGNATURE: + return "ME_ICMD_BAD_SIGNATURE"; // TOOLS HCR access errors case ME_CMDIF_BUSY: diff --git a/mtcr_ul/mtcr_ul_icmd_cif.c b/mtcr_ul/mtcr_ul_icmd_cif.c new file mode 100644 index 0000000..0bfa979 --- /dev/null +++ b/mtcr_ul/mtcr_ul_icmd_cif.c @@ -0,0 +1,399 @@ + +/* + - Mellanox Confidential and Proprietary - + * + * Copyright (C) Jan 2013, Mellanox Technologies Ltd. ALL RIGHTS RESERVED. + * + * Except as specifically permitted herein, no portion of the information, + * including but not limited to object code and source code, may be reproduced, + * modified, distributed, republished or otherwise exploited in any form or by + * any means for any purpose without the prior written permission of Mellanox + * Technologies Ltd. Use of software subject to the terms and conditions + * detailed in the file "LICENSE.txt". + * + */ +#include +#include +#include + +#include +#include +#include "mtcr_icmd_cif.h" + +//#define _DEBUG_MODE // un-comment this to enable debug prints + +#define IN +#define OUT +#define INOUT + +#define STAT_CFG_NOT_DONE_ADDR_CIB 0xb0004 +#define STAT_CFG_NOT_DONE_ADDR_CX4 0xb0004 +#define STAT_CFG_NOT_DONE_ADDR_SW_IB 0x80010 +#define STAT_CFG_NOT_DONE_BITOFF_CIB 31 +#define STAT_CFG_NOT_DONE_BITOFF_CX4 31 +#define STAT_CFG_NOT_DONE_BITOFF_SW_IB 0 +#define BUSY_BITOFF 0 +#define BUSY_BITLEN 1 +#define OPCODE_BITOFF 16 +#define OPCODE_BITLEN 16 +#define STATUS_BITOFF 8 +#define STATUS_BITLEN 8 + +/* + * Virtual CR-Space ICMD addresses + */ + +#define VCR_CTRL_ADDR 0x6404010 +#define VCR_SEMAPHORE62 0x6406000 +#define VCR_CAP_ADDR 0x6405000 +#define VCR_MODE_ADDR 0x6405008 +#define VCR_MAGIC_PAT "virtiCMD" +#define VCR_CMD_ADDR 0x6400000 +#define VCR_CMD_SIZE 0x4000 + + + +#define MWRITE_BUF(mf, offset, data, byte_len) \ + (((unsigned)(mwrite_buffer((mf), (offset), (data), (byte_len))) != (unsigned)(byte_len)) \ + ? ME_ICMD_STATUS_CR_FAIL : ME_OK) +#define MREAD_BUF(mf, offset, data, byte_len) \ + (((unsigned)(mread_buffer((mf), (offset), (data), (byte_len))) != (unsigned)(byte_len)) \ + ? ME_ICMD_STATUS_CR_FAIL : ME_OK) + +#define MWRITE4_BLOCK(mf, offset, data, byte_len) \ + (((unsigned)(mwrite4_block((mf), (offset), (data), (byte_len))) != (unsigned)(byte_len)) \ + ? ME_ICMD_STATUS_CR_FAIL : ME_OK) +#define MREAD4_BLOCK(mf, offset, data, byte_len) \ + (((unsigned)(mread4_block((mf), (offset), (data), (byte_len))) != (unsigned)(byte_len)) \ + ? ME_ICMD_STATUS_CR_FAIL : ME_OK) + +#define MWRITE4(mf, offset, value) \ + (((unsigned)(mwrite4((mf), (offset), (value))) != 4U) \ + ? ME_ICMD_STATUS_CR_FAIL : ME_OK) +#define MREAD4(mf, offset, ptr) \ + (((unsigned)(mread4((mf), (offset), (ptr))) != 4U) \ + ? ME_ICMD_STATUS_CR_FAIL : ME_OK) + +#ifdef _DEBUG_MODE +#define DBG_PRINTF(...) fprintf(stderr, __VA_ARGS__) +#else +#define DBG_PRINTF(...) +#endif + +enum { + RW_READ = 0x1, + RW_WRITE = 0x0 +}; + +/*********************************************** + * + * get correct addresses for : STAT_CCFG_NOT_DONE_ADDR, SEMAPHORE_ADDR, HCR_ADDR, CMD_PTR_ADDR + * according to Hw devid + */ + +#define HW_ID_ADDR 0xf0014 +#define CIB_HW_ID 511 +#define CX4_HW_ID 521 +#define SW_IB_HW_ID 583 +#define SW_EN_HW_ID 585 + +#define GET_ADDR(mf, addr_cib, addr_cx4, addr_sw_ib, addr)\ + do {\ + u_int32_t _hw_id;\ + MREAD4((mf), (HW_ID_ADDR), &(_hw_id));\ + switch (_hw_id & 0xffff) {\ + case (CX4_HW_ID):\ + addr = addr_cx4;\ + break;\ + case (SW_IB_HW_ID):\ + case (SW_EN_HW_ID):\ + addr = addr_sw_ib;\ + break;\ + default:\ + addr = addr_cib;\ + break;\ + }\ + } while(0) + +/*************************************************************************************/ + +/* + * go - Sets the busy bit to 1, wait untill it is 0 again. + */ +static int go(mfile *mf) { + u_int32_t reg, + busy; + int i, wait; + + DBG_PRINTF("Go()\n"); + + if (MREAD4(mf, mf->icmd.ctrl_addr, ®)) return ME_ICMD_STATUS_CR_FAIL; + busy = EXTRACT(reg, BUSY_BITOFF, BUSY_BITLEN); + if (busy) + return ME_ICMD_STATUS_IFC_BUSY; + + reg = MERGE(reg, 1, BUSY_BITOFF, BUSY_BITLEN); + if (MWRITE4(mf, mf->icmd.ctrl_addr, reg)) return ME_ICMD_STATUS_CR_FAIL; + + DBG_PRINTF("Busy-bit raised. Waiting for command to exec...\n"); + + // wait for command to execute + i = 0; wait = 1; + do { + if (++i > 1024) { // this number of iterations should take ~~30sec, which is the defined command t/o + DBG_PRINTF("Execution timed-out\n"); + return ME_ICMD_STATUS_EXECUTE_TO; + } + + DBG_PRINTF("Waiting for busy-bit to clear (iteration #%d)...\n", i); + + if (i > 5) { // after some iteration put sleeps bwtween busy-wait + msleep(wait); // don't hog the cpu with busy-wait + if (wait < 8) wait *= 2; // exponential backoff - up-to 8ms between polls + } + if (MREAD4(mf, mf->icmd.ctrl_addr, ®)) return ME_ICMD_STATUS_CR_FAIL; + busy = EXTRACT(reg, BUSY_BITOFF, BUSY_BITLEN); + + } while (busy); + + DBG_PRINTF("Command completed!\n"); + + return ME_OK; +} + +/* + * set_opcode + */ +static int set_opcode(mfile *mf, u_int16_t opcode) { + u_int32_t reg; + + if (MREAD4(mf, mf->icmd.ctrl_addr, ®)) return ME_ICMD_STATUS_CR_FAIL; + reg = MERGE(reg, opcode, OPCODE_BITOFF, OPCODE_BITLEN); + if (MWRITE4(mf, mf->icmd.ctrl_addr, reg)) return ME_ICMD_STATUS_CR_FAIL; + + return ME_OK; +} + +/* + * get_status + */ + +static int translate_status(int status) { + switch (status) { + case 0x0: + return ME_OK; + case 0x1: + return ME_ICMD_INVALID_OPCODE; + case 0x2: + return ME_ICMD_INVALID_CMD; + case 0x3: + return ME_ICMD_OPERATIONAL_ERROR; + case 0x4: + return ME_ICMD_BAD_PARAM; + case 0x5: + return ME_ICMD_BUSY; + case 0x6: + return ME_ICMD_ICM_NOT_AVAIL; + case 0x7: + return ME_ICMD_WRITE_PROTECT; + default: + return ME_ICMD_UNKNOWN_STATUS; + } +} +static int get_status(mfile *mf) { + u_int32_t reg; + + if (MREAD4(mf, mf->icmd.ctrl_addr, ®)) return ME_ICMD_STATUS_CR_FAIL; + return translate_status(EXTRACT(reg, STATUS_BITOFF, STATUS_BITLEN)); +} + +/* + * icmd_is_cmd_ifc_ready + */ +static int icmd_is_cmd_ifc_ready(mfile *mf) { + u_int32_t reg; + if (MREAD4(mf, mf->icmd.static_cfg_not_done_addr, ®)) return ME_ICMD_STATUS_CR_FAIL; + u_int32_t bit_val = EXTRACT(reg, mf->icmd.static_cfg_not_done_offs, 1); + /* adrianc: for SWITCHIB the polarity of this bit is opposite than CONNECTIB/CONNECTX4 + i.e for CONNECTIB/CONNECTX4: this bit is 1 while fw is loading(indicating configuration is not done), then this bit is set to 0 by fw when the configurations + are finished. + for SWITCHIB: this bit indicates "configuration done" i.e when 0 the fw is not ready and when 1 we are ready*/ + // atm the polarity hasnt changed + // ugly Hack to save code: we use the same macro as GET_ADDR (use a block to avoid compilation errors) + u_int32_t expected_val; + + { + // CIB CX4 SW-IB + GET_ADDR(mf, 0, 0, 0, expected_val); // we expect the bit_val to be : 0- CIB , 1- CX4/SWIB + } + return (bit_val == expected_val) ? ME_OK: ME_ICMD_STATUS_ICMD_NOT_READY; +} + +/* + * icmd_clear_semaphore + */ +int icmd_clear_semaphore(mfile *mf) { + DBG_PRINTF("Clearing semaphore\n"); + // open icmd interface by demand + int ret; + if ((ret = icmd_open(mf))) { + return ret; + } + + if (MWRITE4(mf, mf->icmd.semaphore_addr, 0)) return ME_ICMD_STATUS_CR_FAIL; + mf->icmd.took_semaphore = 0; + return ME_OK; +} + +/* + * icmd_take_semaphore + */ +int icmd_take_semaphore(mfile *mf) { + // open icmd interface by demand + int ret; + if ((ret = icmd_open(mf))) { + return ret; + } + u_int32_t r; + unsigned retries = 0; + + DBG_PRINTF("Taking semaphore...\n"); + + do { // loop while the semaphore is taken by someone else + if (++retries > 256) { + return ME_ICMD_STATUS_SEMAPHORE_TO; + } + if (MREAD4(mf, mf->icmd.semaphore_addr, &r)) return ME_ICMD_STATUS_CR_FAIL; + if (! r) + break; + msleep(rand() % 20); + } while (r); + + mf->icmd.took_semaphore = 1; + DBG_PRINTF("Semaphore taken successfully...\n"); + + return ME_OK; +} + +int icmd_send_command(mfile *mf, + IN int opcode, + INOUT void* data, + IN int data_size, + IN int skip_write) +{ + return icmd_send_command_int(mf, opcode, data, data_size, data_size, skip_write); +} + +/* + * icmd_send_command + */ +int icmd_send_command_int(mfile *mf, + IN int opcode, + INOUT void* data, + IN int write_data_size, + IN int read_data_size, + IN int skip_write) +{ + + int ret; + // open icmd interface by demand + if ((ret = icmd_open(mf))) { + return ret; + } + + if ((ret = icmd_is_cmd_ifc_ready(mf))) + { + return ret; + } + + if ((ret = icmd_take_semaphore(mf))) { + return ret; + } + + if ((ret = set_opcode(mf, opcode))) { + goto cleanup; + } + + if (!skip_write) + { + if ((ret = MWRITE_BUF(mf, mf->icmd.cmd_addr, data, write_data_size))) { + goto cleanup; + } + } + + if ((ret = go(mf))) { + goto cleanup; + } + + if ((ret = get_status(mf))) { + goto cleanup; + } + + if ((ret = MREAD_BUF(mf, mf->icmd.cmd_addr, data, read_data_size))) { + goto cleanup; + } + + ret = ME_OK; +cleanup: + icmd_clear_semaphore(mf); + return ret; +} + +static int icmd_init_vcr(mfile* mf) +{ + // check signature + char sig[sizeof(VCR_MAGIC_PAT) + 1] = {0}; + if (mread_buffer(mf, VCR_CAP_ADDR, (u_int8_t*)sig, 4) != 4) { + return ME_CR_ERROR; + } + + if (strncmp(VCR_MAGIC_PAT, sig, sizeof(VCR_MAGIC_PAT))) { + return ME_ICMD_BAD_SIGNATURE; + } + // we support iCMD via virtual cr-space , update addressess accordingly + mf->icmd.cmd_addr = VCR_CMD_ADDR; + mf->icmd.ctrl_addr = VCR_CTRL_ADDR; + mf->icmd.semaphore_addr = VCR_SEMAPHORE62; + // adrianc: they should provide this bit as well in virtual cr-space atm get from cr-space + GET_ADDR(mf,STAT_CFG_NOT_DONE_ADDR_CIB, STAT_CFG_NOT_DONE_ADDR_CX4, STAT_CFG_NOT_DONE_ADDR_SW_IB, mf->icmd.static_cfg_not_done_addr); + GET_ADDR(mf, STAT_CFG_NOT_DONE_BITOFF_CIB, STAT_CFG_NOT_DONE_BITOFF_CIB, STAT_CFG_NOT_DONE_BITOFF_SW_IB, mf->icmd.static_cfg_not_done_offs); + mf->icmd.icmd_opened = 1; + return ME_OK; +} + +int icmd_open(mfile *mf) +{ + u_int32_t access_type; + int ret; + + if (mf->icmd.icmd_opened) { + return ME_OK; + } + mf->icmd.took_semaphore = 0; + // check if we support icmd in virtual CR-Space + if (mget_mdevs_type(mf, &access_type)) { + return ME_ICMD_BAD_PARAM; + } + + if (access_type == MTCR_ACCESS_CONFIG) { + // check signature + ret = icmd_init_vcr(mf); + if (ret != ME_ICMD_BAD_SIGNATURE) { + return ret; + } + } + return ME_ICMD_NOT_SUPPORTED; +} + +/* + * icmd_close + */ + +void icmd_close(mfile *mf) { + if (mf) { + if (mf->icmd.took_semaphore) + icmd_clear_semaphore(mf); + mf->icmd.icmd_opened = 0; + } +} + diff --git a/tools_layouts/register_access_sib_layouts.c b/tools_layouts/register_access_sib_layouts.c new file mode 100644 index 0000000..bc742e3 --- /dev/null +++ b/tools_layouts/register_access_sib_layouts.c @@ -0,0 +1,464 @@ +/* + * Copyright (C) Jan 2013 Mellanox Technologies Ltd. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ +/*** + *** This file was generated at "2014-11-12 13:18:59" + *** by: + *** > /mswg/release/eat_me/last_release/adabe_plugins/adb2c/adb2pack.py --input adb/register_access/register_access_sib.adb --file-prefix register_access_sib --prefix register_access_sib_ + ***/ +#include "register_access_sib_layouts.h" + +void register_access_sib_IB_PSID__pack(const struct register_access_sib_IB_PSID_ *ptr_struct, u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + for (i=0; i < 4; i++) { + offset=adb2c_calc_array_field_address(0, 32, i, 128, 1); + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int64_t)ptr_struct->PS_ID[i]); + } + +} + +void register_access_sib_IB_PSID__unpack(struct register_access_sib_IB_PSID_ *ptr_struct, const u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + for (i=0; i < 4; i++) { + offset=adb2c_calc_array_field_address(0, 32, i, 128, 1); + ptr_struct->PS_ID[i] = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + } + +} + +void register_access_sib_IB_PSID__print(const struct register_access_sib_IB_PSID_ *ptr_struct, FILE* file, int indent_level){ + adb2c_add_indentation(file, indent_level); + fprintf(file, "======== IB_PSID_ ========\n"); + int i=0; + (void)i;(void)ptr_struct; + (void)file; + (void)indent_level; + + for (i=0; i < 4; i++) { + adb2c_add_indentation(file, indent_level); + fprintf(file, "PS_ID[%3d] : "U32H_FMT"\n", i, ptr_struct->PS_ID[i]); + } + +} + +int register_access_sib_IB_PSID__size(){ + return 16; +} + +void register_access_sib_IB_PSID__dump(const struct register_access_sib_IB_PSID_ *ptr_struct, FILE* file) { + register_access_sib_IB_PSID__print(ptr_struct, file, 0); +} + +void register_access_sib_IB_SWInfo__pack(const struct register_access_sib_IB_SWInfo_ *ptr_struct, u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + offset=24; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->VerSubMinor); + + offset=16; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->VerMinor); + + offset=8; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->VerMajor); + +} + +void register_access_sib_IB_SWInfo__unpack(struct register_access_sib_IB_SWInfo_ *ptr_struct, const u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + offset=24; + ptr_struct->VerSubMinor = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + + offset=16; + ptr_struct->VerMinor = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + + offset=8; + ptr_struct->VerMajor = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + +} + +void register_access_sib_IB_SWInfo__print(const struct register_access_sib_IB_SWInfo_ *ptr_struct, FILE* file, int indent_level){ + adb2c_add_indentation(file, indent_level); + fprintf(file, "======== IB_SWInfo_ ========\n"); + int i=0; + (void)i;(void)ptr_struct; + (void)file; + (void)indent_level; + + adb2c_add_indentation(file, indent_level); + fprintf(file, "VerSubMinor : "UH_FMT"\n", ptr_struct->VerSubMinor); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "VerMinor : "UH_FMT"\n", ptr_struct->VerMinor); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "VerMajor : "UH_FMT"\n", ptr_struct->VerMajor); + +} + +int register_access_sib_IB_SWInfo__size(){ + return 32; +} + +void register_access_sib_IB_SWInfo__dump(const struct register_access_sib_IB_SWInfo_ *ptr_struct, FILE* file) { + register_access_sib_IB_SWInfo__print(ptr_struct, file, 0); +} + +void register_access_sib_IB_FWInfo__pack(const struct register_access_sib_IB_FWInfo_ *ptr_struct, u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + offset=24; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->SubMinor); + + offset=16; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->Minor); + + offset=8; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->Major); + + offset=32; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int64_t)ptr_struct->BuildID); + + offset=80; + adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->Year); + + offset=72; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->Day); + + offset=64; + adb2c_push_bits_to_buff(ptr_buff, offset, 8, (u_int32_t)ptr_struct->Month); + + offset=112; + adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->Hour); + + offset=128; + register_access_sib_IB_PSID__pack(&(ptr_struct->PSID), ptr_buff + offset/8); + + offset=256; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int64_t)ptr_struct->INIFileNum); + + offset=288; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int64_t)ptr_struct->extended_major); + + offset=320; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int64_t)ptr_struct->extended_minor); + + offset=352; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int64_t)ptr_struct->extended_subminor); + +} + +void register_access_sib_IB_FWInfo__unpack(struct register_access_sib_IB_FWInfo_ *ptr_struct, const u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + offset=24; + ptr_struct->SubMinor = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + + offset=16; + ptr_struct->Minor = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + + offset=8; + ptr_struct->Major = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + + offset=32; + ptr_struct->BuildID = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + + offset=80; + ptr_struct->Year = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); + + offset=72; + ptr_struct->Day = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + + offset=64; + ptr_struct->Month = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 8); + + offset=112; + ptr_struct->Hour = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); + + offset=128; + register_access_sib_IB_PSID__unpack(&(ptr_struct->PSID), ptr_buff + offset/8); + + offset=256; + ptr_struct->INIFileNum = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + + offset=288; + ptr_struct->extended_major = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + + offset=320; + ptr_struct->extended_minor = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + + offset=352; + ptr_struct->extended_subminor = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + +} + +void register_access_sib_IB_FWInfo__print(const struct register_access_sib_IB_FWInfo_ *ptr_struct, FILE* file, int indent_level){ + adb2c_add_indentation(file, indent_level); + fprintf(file, "======== IB_FWInfo_ ========\n"); + int i=0; + (void)i;(void)ptr_struct; + (void)file; + (void)indent_level; + + adb2c_add_indentation(file, indent_level); + fprintf(file, "SubMinor : "UH_FMT"\n", ptr_struct->SubMinor); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "Minor : "UH_FMT"\n", ptr_struct->Minor); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "Major : "UH_FMT"\n", ptr_struct->Major); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "BuildID : "U32H_FMT"\n", ptr_struct->BuildID); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "Year : "UH_FMT"\n", ptr_struct->Year); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "Day : "UH_FMT"\n", ptr_struct->Day); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "Month : "UH_FMT"\n", ptr_struct->Month); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "Hour : "UH_FMT"\n", ptr_struct->Hour); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "PSID:\n"); + register_access_sib_IB_PSID__print(&(ptr_struct->PSID), file, indent_level + 1); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "INIFileNum : "U32H_FMT"\n", ptr_struct->INIFileNum); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "extended_major : "U32H_FMT"\n", ptr_struct->extended_major); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "extended_minor : "U32H_FMT"\n", ptr_struct->extended_minor); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "extended_subminor : "U32H_FMT"\n", ptr_struct->extended_subminor); + +} + +int register_access_sib_IB_FWInfo__size(){ + return 64; +} + +void register_access_sib_IB_FWInfo__dump(const struct register_access_sib_IB_FWInfo_ *ptr_struct, FILE* file) { + register_access_sib_IB_FWInfo__print(ptr_struct, file, 0); +} + +void register_access_sib_IB_HWInfo__pack(const struct register_access_sib_IB_HWInfo_ *ptr_struct, u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + offset=16; + adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->DEVID); + + offset=0; + adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->REVID); + + offset=59; + adb2c_push_bits_to_buff(ptr_buff, offset, 5, (u_int32_t)ptr_struct->pvs); + + offset=80; + adb2c_push_bits_to_buff(ptr_buff, offset, 16, (u_int32_t)ptr_struct->hw_dev_id); + + offset=224; + adb2c_push_integer_to_buff(ptr_buff, offset, 4, (u_int64_t)ptr_struct->UpTime); + +} + +void register_access_sib_IB_HWInfo__unpack(struct register_access_sib_IB_HWInfo_ *ptr_struct, const u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + offset=16; + ptr_struct->DEVID = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); + + offset=0; + ptr_struct->REVID = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); + + offset=59; + ptr_struct->pvs = (u_int8_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 5); + + offset=80; + ptr_struct->hw_dev_id = (u_int16_t)adb2c_pop_bits_from_buff(ptr_buff, offset, 16); + + offset=224; + ptr_struct->UpTime = (u_int32_t)adb2c_pop_integer_from_buff(ptr_buff, offset, 4); + +} + +void register_access_sib_IB_HWInfo__print(const struct register_access_sib_IB_HWInfo_ *ptr_struct, FILE* file, int indent_level){ + adb2c_add_indentation(file, indent_level); + fprintf(file, "======== IB_HWInfo_ ========\n"); + int i=0; + (void)i;(void)ptr_struct; + (void)file; + (void)indent_level; + + adb2c_add_indentation(file, indent_level); + fprintf(file, "DEVID : "UH_FMT"\n", ptr_struct->DEVID); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "REVID : "UH_FMT"\n", ptr_struct->REVID); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "pvs : "UH_FMT"\n", ptr_struct->pvs); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "hw_dev_id : "UH_FMT"\n", ptr_struct->hw_dev_id); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "UpTime : "U32H_FMT"\n", ptr_struct->UpTime); + +} + +int register_access_sib_IB_HWInfo__size(){ + return 32; +} + +void register_access_sib_IB_HWInfo__dump(const struct register_access_sib_IB_HWInfo_ *ptr_struct, FILE* file) { + register_access_sib_IB_HWInfo__print(ptr_struct, file, 0); +} + +void register_access_sib_mgir_pack(const struct register_access_sib_mgir *ptr_struct, u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + offset=0; + register_access_sib_IB_HWInfo__pack(&(ptr_struct->HWInfo), ptr_buff + offset/8); + + offset=256; + register_access_sib_IB_FWInfo__pack(&(ptr_struct->FWInfo), ptr_buff + offset/8); + + offset=768; + register_access_sib_IB_SWInfo__pack(&(ptr_struct->SWInfo), ptr_buff + offset/8); + +} + +void register_access_sib_mgir_unpack(struct register_access_sib_mgir *ptr_struct, const u_int8_t* ptr_buff){ + u_int32_t offset; + int i=0; + (void)offset; + (void)i; + (void)ptr_struct; + (void)ptr_buff; + + offset=0; + register_access_sib_IB_HWInfo__unpack(&(ptr_struct->HWInfo), ptr_buff + offset/8); + + offset=256; + register_access_sib_IB_FWInfo__unpack(&(ptr_struct->FWInfo), ptr_buff + offset/8); + + offset=768; + register_access_sib_IB_SWInfo__unpack(&(ptr_struct->SWInfo), ptr_buff + offset/8); + +} + +void register_access_sib_mgir_print(const struct register_access_sib_mgir *ptr_struct, FILE* file, int indent_level){ + adb2c_add_indentation(file, indent_level); + fprintf(file, "======== mgir ========\n"); + int i=0; + (void)i;(void)ptr_struct; + (void)file; + (void)indent_level; + + adb2c_add_indentation(file, indent_level); + fprintf(file, "HWInfo:\n"); + register_access_sib_IB_HWInfo__print(&(ptr_struct->HWInfo), file, indent_level + 1); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "FWInfo:\n"); + register_access_sib_IB_FWInfo__print(&(ptr_struct->FWInfo), file, indent_level + 1); + + adb2c_add_indentation(file, indent_level); + fprintf(file, "SWInfo:\n"); + register_access_sib_IB_SWInfo__print(&(ptr_struct->SWInfo), file, indent_level + 1); + +} + +int register_access_sib_mgir_size(){ + return 128; +} + +void register_access_sib_mgir_dump(const struct register_access_sib_mgir *ptr_struct, FILE* file) { + register_access_sib_mgir_print(ptr_struct, file, 0); +} + diff --git a/tools_layouts/register_access_sib_layouts.h b/tools_layouts/register_access_sib_layouts.h new file mode 100644 index 0000000..e926b5a --- /dev/null +++ b/tools_layouts/register_access_sib_layouts.h @@ -0,0 +1,206 @@ +/* + * Copyright (C) Jan 2013 Mellanox Technologies Ltd. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +/*** + *** This file was generated at "2014-11-12 13:18:59" + *** by: + *** > /mswg/release/eat_me/last_release/adabe_plugins/adb2c/adb2pack.py --input adb/register_access/register_access_sib.adb --file-prefix register_access_sib --prefix register_access_sib_ + ***/ +#ifndef REGISTER_ACCESS_SIB_LAYOUTS_H +#define REGISTER_ACCESS_SIB_LAYOUTS_H + + +#ifdef __cplusplus +extern "C" { +#endif + +#include "adb_to_c_utils.h"/* Description - */ +/* Size in bytes - 16 */ +struct register_access_sib_IB_PSID_ { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - PS - ID */ + /* 0.0 - 16.31 */ + u_int32_t PS_ID[4]; +}; + +/* Description - SW Info */ +/* Size in bytes - 32 */ +struct register_access_sib_IB_SWInfo_ { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - */ + /* 0.0 - 0.7 */ + u_int8_t VerSubMinor; + /* Description - */ + /* 0.8 - 0.15 */ + u_int8_t VerMinor; + /* Description - */ + /* 0.16 - 0.23 */ + u_int8_t VerMajor; +}; + +/* Description - FW Info */ +/* Size in bytes - 64 */ +struct register_access_sib_IB_FWInfo_ { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - */ + /* 0.0 - 0.7 */ + u_int8_t SubMinor; + /* Description - */ + /* 0.8 - 0.15 */ + u_int8_t Minor; + /* Description - */ + /* 0.16 - 0.23 */ + u_int8_t Major; +/*---------------- DWORD[1] (Offset 0x4) ----------------*/ + /* Description - */ + /* 4.0 - 8.31 */ + u_int32_t BuildID; +/*---------------- DWORD[2] (Offset 0x8) ----------------*/ + /* Description - */ + /* 8.0 - 8.15 */ + u_int16_t Year; + /* Description - */ + /* 8.16 - 8.23 */ + u_int8_t Day; + /* Description - */ + /* 8.24 - 12.31 */ + u_int8_t Month; +/*---------------- DWORD[3] (Offset 0xc) ----------------*/ + /* Description - */ + /* 12.0 - 12.15 */ + u_int16_t Hour; +/*---------------- DWORD[4] (Offset 0x10) ----------------*/ + /* Description - */ + /* 16.0 - 32.31 */ + struct register_access_sib_IB_PSID_ PSID; +/*---------------- DWORD[8] (Offset 0x20) ----------------*/ + /* Description - */ + /* 32.0 - 36.31 */ + u_int32_t INIFileNum; +/*---------------- DWORD[9] (Offset 0x24) ----------------*/ + /* Description - */ + /* 36.0 - 40.31 */ + u_int32_t extended_major; +/*---------------- DWORD[10] (Offset 0x28) ----------------*/ + /* Description - */ + /* 40.0 - 44.31 */ + u_int32_t extended_minor; +/*---------------- DWORD[11] (Offset 0x2c) ----------------*/ + /* Description - */ + /* 44.0 - 48.31 */ + u_int32_t extended_subminor; +}; + +/* Description - HW Info */ +/* Size in bytes - 32 */ +struct register_access_sib_IB_HWInfo_ { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - */ + /* 0.0 - 0.15 */ + u_int16_t DEVID; + /* Description - */ + /* 0.16 - 4.31 */ + u_int16_t REVID; +/*---------------- DWORD[1] (Offset 0x4) ----------------*/ + /* Description - Maximum supported V_CORE voltage for the device. (in 50mV increments). */ + /* 4.0 - 4.4 */ + u_int8_t pvs; +/*---------------- DWORD[2] (Offset 0x8) ----------------*/ + /* Description - the device_id in HW, used by tools */ + /* 8.0 - 8.15 */ + u_int16_t hw_dev_id; +/*---------------- DWORD[7] (Offset 0x1c) ----------------*/ + /* Description - Time (in sec) since last reset */ + /* 28.0 - 32.31 */ + u_int32_t UpTime; +}; + +/* Description - */ +/* Size in bytes - 128 */ +struct register_access_sib_mgir { +/*---------------- DWORD[0] (Offset 0x0) ----------------*/ + /* Description - */ + /* 0.0 - 32.31 */ + struct register_access_sib_IB_HWInfo_ HWInfo; +/*---------------- DWORD[8] (Offset 0x20) ----------------*/ + /* Description - */ + /* 32.0 - 96.31 */ + struct register_access_sib_IB_FWInfo_ FWInfo; +/*---------------- DWORD[24] (Offset 0x60) ----------------*/ + /* Description - */ + /* 96.0 - 128.31 */ + struct register_access_sib_IB_SWInfo_ SWInfo; +}; + +/*================= PACK/UNPACK/PRINT FUNCTIONS ======================*/ +/* IB_PSID_ */ +void register_access_sib_IB_PSID__pack(const struct register_access_sib_IB_PSID_ *ptr_struct, u_int8_t* ptr_buff); +void register_access_sib_IB_PSID__unpack(struct register_access_sib_IB_PSID_ *ptr_struct, const u_int8_t* ptr_buff); +void register_access_sib_IB_PSID__print(const struct register_access_sib_IB_PSID_ *ptr_struct, FILE* file, int indent_level); +int register_access_sib_IB_PSID__size(); +#define REGISTER_ACCESS_SIB_IB_PSID__SIZE (0x10) +void register_access_sib_IB_PSID__dump(const struct register_access_sib_IB_PSID_ *ptr_struct, FILE* file); +/* IB_SWInfo_ */ +void register_access_sib_IB_SWInfo__pack(const struct register_access_sib_IB_SWInfo_ *ptr_struct, u_int8_t* ptr_buff); +void register_access_sib_IB_SWInfo__unpack(struct register_access_sib_IB_SWInfo_ *ptr_struct, const u_int8_t* ptr_buff); +void register_access_sib_IB_SWInfo__print(const struct register_access_sib_IB_SWInfo_ *ptr_struct, FILE* file, int indent_level); +int register_access_sib_IB_SWInfo__size(); +#define REGISTER_ACCESS_SIB_IB_SWINFO__SIZE (0x20) +void register_access_sib_IB_SWInfo__dump(const struct register_access_sib_IB_SWInfo_ *ptr_struct, FILE* file); +/* IB_FWInfo_ */ +void register_access_sib_IB_FWInfo__pack(const struct register_access_sib_IB_FWInfo_ *ptr_struct, u_int8_t* ptr_buff); +void register_access_sib_IB_FWInfo__unpack(struct register_access_sib_IB_FWInfo_ *ptr_struct, const u_int8_t* ptr_buff); +void register_access_sib_IB_FWInfo__print(const struct register_access_sib_IB_FWInfo_ *ptr_struct, FILE* file, int indent_level); +int register_access_sib_IB_FWInfo__size(); +#define REGISTER_ACCESS_SIB_IB_FWINFO__SIZE (0x40) +void register_access_sib_IB_FWInfo__dump(const struct register_access_sib_IB_FWInfo_ *ptr_struct, FILE* file); +/* IB_HWInfo_ */ +void register_access_sib_IB_HWInfo__pack(const struct register_access_sib_IB_HWInfo_ *ptr_struct, u_int8_t* ptr_buff); +void register_access_sib_IB_HWInfo__unpack(struct register_access_sib_IB_HWInfo_ *ptr_struct, const u_int8_t* ptr_buff); +void register_access_sib_IB_HWInfo__print(const struct register_access_sib_IB_HWInfo_ *ptr_struct, FILE* file, int indent_level); +int register_access_sib_IB_HWInfo__size(); +#define REGISTER_ACCESS_SIB_IB_HWINFO__SIZE (0x20) +void register_access_sib_IB_HWInfo__dump(const struct register_access_sib_IB_HWInfo_ *ptr_struct, FILE* file); +/* mgir */ +void register_access_sib_mgir_pack(const struct register_access_sib_mgir *ptr_struct, u_int8_t* ptr_buff); +void register_access_sib_mgir_unpack(struct register_access_sib_mgir *ptr_struct, const u_int8_t* ptr_buff); +void register_access_sib_mgir_print(const struct register_access_sib_mgir *ptr_struct, FILE* file, int indent_level); +int register_access_sib_mgir_size(); +#define REGISTER_ACCESS_SIB_MGIR_SIZE (0x80) +void register_access_sib_mgir_dump(const struct register_access_sib_mgir *ptr_struct, FILE* file); + +#ifdef __cplusplus +} +#endif + +#endif // REGISTER_ACCESS_SIB_LAYOUTS_H -- 2.46.0