199a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause 299a2dd95SBruce Richardson * Copyright(c) 2015 Intel Corporation 399a2dd95SBruce Richardson */ 499a2dd95SBruce Richardson 599a2dd95SBruce Richardson #ifndef _RTE_DEV_INFO_H_ 699a2dd95SBruce Richardson #define _RTE_DEV_INFO_H_ 799a2dd95SBruce Richardson 8*dbf9fc1dSBrian Dooley #ifdef __cplusplus 9*dbf9fc1dSBrian Dooley extern "C" { 10*dbf9fc1dSBrian Dooley #endif 11*dbf9fc1dSBrian Dooley 1299a2dd95SBruce Richardson #include <stdint.h> 1399a2dd95SBruce Richardson 1499a2dd95SBruce Richardson /* 1599a2dd95SBruce Richardson * Placeholder for accessing device registers 1699a2dd95SBruce Richardson */ 1799a2dd95SBruce Richardson struct rte_dev_reg_info { 1899a2dd95SBruce Richardson void *data; /**< Buffer for return registers */ 1999a2dd95SBruce Richardson uint32_t offset; /**< Start register table location for access */ 2099a2dd95SBruce Richardson uint32_t length; /**< Number of registers to fetch */ 2199a2dd95SBruce Richardson uint32_t width; /**< Size of device register */ 2299a2dd95SBruce Richardson uint32_t version; /**< Device version */ 2399a2dd95SBruce Richardson }; 2499a2dd95SBruce Richardson 2599a2dd95SBruce Richardson /* 26bf73419dSAndrew Rybchenko * Placeholder for accessing device EEPROM 2799a2dd95SBruce Richardson */ 2899a2dd95SBruce Richardson struct rte_dev_eeprom_info { 29bf73419dSAndrew Rybchenko void *data; /**< Buffer for return EEPROM */ 30bf73419dSAndrew Rybchenko uint32_t offset; /**< Start EEPROM address for access*/ 31bf73419dSAndrew Rybchenko uint32_t length; /**< Length of EEPROM region to access */ 3299a2dd95SBruce Richardson uint32_t magic; /**< Device-specific key, such as device-id */ 3399a2dd95SBruce Richardson }; 3499a2dd95SBruce Richardson 3599a2dd95SBruce Richardson /** 36bf73419dSAndrew Rybchenko * Placeholder for accessing plugin module EEPROM 3799a2dd95SBruce Richardson */ 3899a2dd95SBruce Richardson struct rte_eth_dev_module_info { 39bf73419dSAndrew Rybchenko uint32_t type; /**< Type of plugin module EEPROM */ 40bf73419dSAndrew Rybchenko uint32_t eeprom_len; /**< Length of plugin module EEPROM */ 4199a2dd95SBruce Richardson }; 4299a2dd95SBruce Richardson 4399a2dd95SBruce Richardson /* EEPROM Standards for plug in modules */ 4499a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8079 0x1 4599a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8079_LEN 256 4699a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8472 0x2 4799a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8472_LEN 512 4899a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8636 0x3 4999a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8636_LEN 256 5099a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8636_MAX_LEN 640 5199a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8436 0x4 5299a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8436_LEN 256 5399a2dd95SBruce Richardson #define RTE_ETH_MODULE_SFF_8436_MAX_LEN 640 5499a2dd95SBruce Richardson 55*dbf9fc1dSBrian Dooley #ifdef __cplusplus 56*dbf9fc1dSBrian Dooley } 57*dbf9fc1dSBrian Dooley #endif 58*dbf9fc1dSBrian Dooley 5999a2dd95SBruce Richardson #endif /* _RTE_DEV_INFO_H_ */ 60