u32 maccfg1; /* mac configuration reg. 1 */
u32 maccfg2; /* mac configuration reg. 2 */
u32 ipgifg; /* interframe gap reg. */
u32 hafdup; /* half-duplex reg. */
u8 res1[0x10];
u8 miimng[0x18]; /* MII management structure moved to _mii.h */
u32 ifctl; /* interface control reg */
u32 ifstat; /* interface statux reg */
u32 macstnaddr1; /* mac station address part 1 reg */
u32 macstnaddr2; /* mac station address part 2 reg */
u8 res2[0x8];
u32 uempr; /* UCC Ethernet Mac parameter reg */
u32 utbipar; /* UCC tbi address reg */
u16 uescr; /* UCC Ethernet statistics control reg */
u8 res3[0x180 - 0x15A];
u32 tx64; /* Total number of frames (including bad frames) transmitted that were exactly of the minimal length (64 for un tagged, 68 for tagged, or with length exactly equal to the
parameter MINLength */
u32 tx127; /* Total number of frames (including bad frames) transmitted that were between MINLength (Including FCS length==4) and 127
octets */
u32 tx255; /* Total number of frames (including bad frames) transmitted that were between 128
(Including FCS length==4) and 255 octets */
u32 rx64; /* Total number of frames received including bad frames that were exactly of the mninimal
length (64 bytes) */
u32 rx127; /* Total number of frames (including bad frames) received that were between MINLength
(Including FCS length==4) and 127 octets */
u32 rx255; /* Total number of frames (including bad frames) received that were between 128
(Including FCS length==4) and 255 octets */
u32 txok; /* Total number of octets residing in frames that where involved in successful
transmission */
u16 txcf; /* Total number of PAUSE control frames
transmitted by this MAC */
u8 res4[0x2];
u32 tmca; /* Total number of frames that were transmitted successfully with the group address bit set
that are not broadcast frames */
u32 tbca; /* Total number of frames transmitted successfully that had destination address
field equal to the broadcast address */
u32 rxfok; /* Total number of frames received OK */
u32 rxbok; /* Total number of octets received OK */
u32 rbyt; /* Total number of octets received including octets in bad frames. Must be implemented in HW because it includes octets in frames that
never even reach the UCC */
u32 rmca; /* Total number of frames that were received successfully with the group address bit set
that are not broadcast frames */
u32 rbca; /* Total number of frames received successfully that had destination address equal to the
broadcast address */
u32 scar; /* Statistics carry register */
u32 scam; /* Statistics caryy mask register */
u8 res5[0x200 - 0x1c4];
} __packed;
/* UCC GETH IPGIFG (Inter-frame Gap / Inter-Frame Gap Register) */ #define IPGIFG_NON_BACK_TO_BACK_IFG_PART1_SHIFT (31 - 7) /* Non back-to-back inter frame gap part 1.
<< shift */ #define IPGIFG_NON_BACK_TO_BACK_IFG_PART2_SHIFT (31 - 15) /* Non back-to-back inter frame gap part 2.
<< shift */ #define IPGIFG_MINIMUM_IFG_ENFORCEMENT_SHIFT (31 - 23) /* Mimimum IFG Enforcement
<< shift */ #define IPGIFG_BACK_TO_BACK_IFG_SHIFT (31 - 31) /* back-to-back inter frame gap << shift
*/ #define IPGIFG_NON_BACK_TO_BACK_IFG_PART1_MAX 127 /* Non back-to-back inter frame gap part
1. max val */ #define IPGIFG_NON_BACK_TO_BACK_IFG_PART2_MAX 127 /* Non back-to-back inter frame gap part
2. max val */ #define IPGIFG_MINIMUM_IFG_ENFORCEMENT_MAX 255 /* Mimimum IFG
Enforcement max val */ #define IPGIFG_BACK_TO_BACK_IFG_MAX 127 /* back-to-back inter
frame gap max val */ #define IPGIFG_NBTB_CS_IPG_MASK 0x7F000000 #define IPGIFG_NBTB_IPG_MASK 0x007F0000 #define IPGIFG_MIN_IFG_MASK 0x0000FF00 #define IPGIFG_BTB_IPG_MASK 0x0000007F
/* Send Queue Queue-Descriptor */ struct ucc_geth_send_queue_qd {
u32 bd_ring_base; /* pointer to BD ring base address */
u8 res0[0x8];
u32 last_bd_completed_address;/* initialize to last entry in BD ring */
u8 res1[0x30];
} __packed;
struct ucc_geth_scheduler {
u16 cpucount0; /* CPU packet counter */
u16 cpucount1; /* CPU packet counter */
u16 cecount0; /* QE packet counter */
u16 cecount1; /* QE packet counter */
u16 cpucount2; /* CPU packet counter */
u16 cpucount3; /* CPU packet counter */
u16 cecount2; /* QE packet counter */
u16 cecount3; /* QE packet counter */
u16 cpucount4; /* CPU packet counter */
u16 cpucount5; /* CPU packet counter */
u16 cecount4; /* QE packet counter */
u16 cecount5; /* QE packet counter */
u16 cpucount6; /* CPU packet counter */
u16 cpucount7; /* CPU packet counter */
u16 cecount6; /* QE packet counter */
u16 cecount7; /* QE packet counter */
u32 weightstatus[NUM_TX_QUEUES]; /* accumulated weight factor */
u32 rtsrshadow; /* temporary variable handled by QE */
u32 time; /* temporary variable handled by QE */
u32 ttl; /* temporary variable handled by QE */
u32 mblinterval; /* max burst length interval */
u16 nortsrbytetime; /* normalized value of byte time in tsr units */
u8 fracsiz; /* radix 2 log value of denom. of
NorTSRByteTime */
u8 res0[1];
u8 strictpriorityq; /* Strict Priority Mask register */
u8 txasap; /* Transmit ASAP register */
u8 extrabw; /* Extra BandWidth register */
u8 oldwfqmask; /* temporary variable handled by QE */
u8 weightfactor[NUM_TX_QUEUES]; /**< weight factor for queues */
u32 minw; /* temporary variable handled by QE */
u8 res1[0x70 - 0x64];
} __packed;
struct ucc_geth_tx_firmware_statistics_pram {
u32 sicoltx; /* single collision */
u32 mulcoltx; /* multiple collision */
u32 latecoltxfr; /* late collision */
u32 frabortduecol; /* frames aborted due to transmit collision */
u32 frlostinmactxer; /* frames lost due to internal MAC error transmission that are not counted on any
other counter */
u32 carriersenseertx; /* carrier sense error */
u32 frtxok; /* frames transmitted OK */
u32 txfrexcessivedefer; /* frames with defferal time greater than
specified threshold */
u32 txpkts256; /* total packets (including bad) between 256
and 511 octets */
u32 txpkts512; /* total packets (including bad) between 512
and 1023 octets */
u32 txpkts1024; /* total packets (including bad) between 1024
and 1518 octets */
u32 txpktsjumbo; /* total packets (including bad) between 1024
and MAXLength octets */
} __packed;
struct ucc_geth_rx_firmware_statistics_pram {
u32 frrxfcser; /* frames with crc error */
u32 fraligner; /* frames with alignment error */
u32 inrangelenrxer; /* in range length error */
u32 outrangelenrxer; /* out of range length error */
u32 frtoolong; /* frame too long */
u32 runt; /* runt */
u32 verylongevent; /* very long event */
u32 symbolerror; /* symbol error */
u32 dropbsy; /* drop because of BD not ready */
u8 res0[0x8];
u32 mismatchdrop; /* drop because of MAC filtering (e.g. address
or type mismatch) */
u32 underpkts; /* total frames less than 64 octets */
u32 pkts256; /* total frames (including bad) between 256 and
511 octets */
u32 pkts512; /* total frames (including bad) between 512 and
1023 octets */
u32 pkts1024; /* total frames (including bad) between 1024
and 1518 octets */
u32 pktsjumbo; /* total frames (including bad) between 1024
and MAXLength octets */
u32 frlossinmacer; /* frames lost because of internal MAC error
that is not counted in any other counter */
u32 pausefr; /* pause frames */
u8 res1[0x4];
u32 removevlan; /* total frames that had their VLAN tag removed
*/
u32 replacevlan; /* total frames that had their VLAN tag
replaced */
u32 insertvlan; /* total frames that had their VLAN tag
inserted */
} __packed;
struct ucc_geth_rx_interrupt_coalescing_entry {
u32 interruptcoalescingmaxvalue; /* interrupt coalescing max
value */
u32 interruptcoalescingcounter; /* interrupt coalescing counter, initialize to
interruptcoalescingmaxvalue */
} __packed;
struct ucc_geth_tx_global_pram {
u16 temoder;
u8 res0[0x38 - 0x02];
u32 sqptr; /* a base pointer to send queue memory region */
u32 schedulerbasepointer; /* a base pointer to scheduler memory
region */
u32 txrmonbaseptr; /* base pointer to Tx RMON statistics counter */
u32 tstate; /* tx internal state. High byte contains
function code */
u8 iphoffset[TX_IP_OFFSET_ENTRY_MAX];
u32 vtagtable[0x8]; /* 8 4-byte VLAN tags */
u32 tqptr; /* a base pointer to the Tx Queues Memory
Region */
u8 res2[0x78 - 0x74];
u64 snums_en;
u32 l2l3baseptr; /* top byte consists of a few other bit fields */
u16 mtu[8];
u8 res3[0xa8 - 0x94];
u32 wrrtablebase; /* top byte is reserved */
u8 res4[0xc0 - 0xac];
} __packed;
/* structure representing Extended Filtering Global Parameters in PRAM */ struct ucc_geth_exf_global_pram {
u32 l2pcdptr; /* individual address filter, high */
u8 res0[0x10 - 0x04];
} __packed;
struct ucc_geth_rx_global_pram {
u32 remoder; /* ethernet mode reg. */
u32 rqptr; /* base pointer to the Rx Queues Memory Region*/
u32 res0[0x1];
u8 res1[0x20 - 0xC];
u16 typeorlen; /* cutoff point less than which, type/len field
is considered length */
u8 res2[0x1];
u8 rxgstpack; /* acknowledgement on GRACEFUL STOP RX command*/
u32 rxrmonbaseptr; /* base pointer to Rx RMON statistics counter */
u8 res3[0x30 - 0x28];
u32 intcoalescingptr; /* Interrupt coalescing table pointer */
u8 res4[0x36 - 0x34];
u8 rstate; /* rx internal state. High byte contains
function code */
u8 res5[0x46 - 0x37];
u16 mrblr; /* max receive buffer length reg. */
u32 rbdqptr; /* base pointer to RxBD parameter table
description */
u16 mflr; /* max frame length reg. */
u16 minflr; /* min frame length reg. */
u16 maxd1; /* max dma1 length reg. */
u16 maxd2; /* max dma2 length reg. */
u32 ecamptr; /* external CAM address */
u32 l2qt; /* VLAN priority mapping table. */
u32 l3qt[0x8]; /* IP priority mapping table. */
u16 vlantype; /* vlan type */
u16 vlantci; /* default vlan tci */
u8 addressfiltering[64]; /* address filtering data structure */
u32 exfGlobalParam; /* base address for extended filtering global
parameters */
u8 res6[0x100 - 0xC4]; /* Initialize to zero */
} __packed;
/* GETH Tx firmware statistics structure, used when calling
UCC_GETH_GetStatistics. */ struct ucc_geth_tx_firmware_statistics {
u32 sicoltx; /* single collision */
u32 mulcoltx; /* multiple collision */
u32 latecoltxfr; /* late collision */
u32 frabortduecol; /* frames aborted due to transmit collision */
u32 frlostinmactxer; /* frames lost due to internal MAC error transmission that are not counted on any
other counter */
u32 carriersenseertx; /* carrier sense error */
u32 frtxok; /* frames transmitted OK */
u32 txfrexcessivedefer; /* frames with defferal time greater than
specified threshold */
u32 txpkts256; /* total packets (including bad) between 256
and 511 octets */
u32 txpkts512; /* total packets (including bad) between 512
and 1023 octets */
u32 txpkts1024; /* total packets (including bad) between 1024
and 1518 octets */
u32 txpktsjumbo; /* total packets (including bad) between 1024
and MAXLength octets */
} __packed;
/* GETH Rx firmware statistics structure, used when calling
UCC_GETH_GetStatistics. */ struct ucc_geth_rx_firmware_statistics {
u32 frrxfcser; /* frames with crc error */
u32 fraligner; /* frames with alignment error */
u32 inrangelenrxer; /* in range length error */
u32 outrangelenrxer; /* out of range length error */
u32 frtoolong; /* frame too long */
u32 runt; /* runt */
u32 verylongevent; /* very long event */
u32 symbolerror; /* symbol error */
u32 dropbsy; /* drop because of BD not ready */
u8 res0[0x8];
u32 mismatchdrop; /* drop because of MAC filtering (e.g. address
or type mismatch) */
u32 underpkts; /* total frames less than 64 octets */
u32 pkts256; /* total frames (including bad) between 256 and
511 octets */
u32 pkts512; /* total frames (including bad) between 512 and
1023 octets */
u32 pkts1024; /* total frames (including bad) between 1024
and 1518 octets */
u32 pktsjumbo; /* total frames (including bad) between 1024
and MAXLength octets */
u32 frlossinmacer; /* frames lost because of internal MAC error
that is not counted in any other counter */
u32 pausefr; /* pause frames */
u8 res1[0x4];
u32 removevlan; /* total frames that had their VLAN tag removed
*/
u32 replacevlan; /* total frames that had their VLAN tag
replaced */
u32 insertvlan; /* total frames that had their VLAN tag
inserted */
} __packed;
/* GETH hardware statistics structure, used when calling
UCC_GETH_GetStatistics. */ struct ucc_geth_hardware_statistics {
u32 tx64; /* Total number of frames (including bad frames) transmitted that were exactly of the minimal length (64 for un tagged, 68 for tagged, or with length exactly equal to the
parameter MINLength */
u32 tx127; /* Total number of frames (including bad frames) transmitted that were between MINLength (Including FCS length==4) and 127
octets */
u32 tx255; /* Total number of frames (including bad frames) transmitted that were between 128
(Including FCS length==4) and 255 octets */
u32 rx64; /* Total number of frames received including bad frames that were exactly of the mninimal
length (64 bytes) */
u32 rx127; /* Total number of frames (including bad frames) received that were between MINLength
(Including FCS length==4) and 127 octets */
u32 rx255; /* Total number of frames (including bad frames) received that were between 128
(Including FCS length==4) and 255 octets */
u32 txok; /* Total number of octets residing in frames that where involved in successful
transmission */
u16 txcf; /* Total number of PAUSE control frames
transmitted by this MAC */
u32 tmca; /* Total number of frames that were transmitted successfully with the group address bit set
that are not broadcast frames */
u32 tbca; /* Total number of frames transmitted successfully that had destination address
field equal to the broadcast address */
u32 rxfok; /* Total number of frames received OK */
u32 rxbok; /* Total number of octets received OK */
u32 rbyt; /* Total number of octets received including octets in bad frames. Must be implemented in HW because it includes octets in frames that
never even reach the UCC */
u32 rmca; /* Total number of frames that were received successfully with the group address bit set
that are not broadcast frames */
u32 rbca; /* Total number of frames received successfully that had destination address equal to the
broadcast address */
} __packed;
/* Alignments */ #define UCC_GETH_RX_GLOBAL_PRAM_ALIGNMENT 256 #define UCC_GETH_TX_GLOBAL_PRAM_ALIGNMENT 128 #define UCC_GETH_THREAD_RX_PRAM_ALIGNMENT 128 #define UCC_GETH_THREAD_TX_PRAM_ALIGNMENT 64 #define UCC_GETH_THREAD_DATA_ALIGNMENT 256 /* spec gives values based on num of threads, but always using the maximum is
easier */ #define UCC_GETH_SEND_QUEUE_QUEUE_DESCRIPTOR_ALIGNMENT 32 #define UCC_GETH_SCHEDULER_ALIGNMENT 8 /* This is a guess */ #define UCC_GETH_TX_STATISTICS_ALIGNMENT 4 /* This is a guess */ #define UCC_GETH_RX_STATISTICS_ALIGNMENT 4 /* This is a guess */ #define UCC_GETH_RX_INTERRUPT_COALESCING_ALIGNMENT 64 #define UCC_GETH_RX_BD_QUEUES_ALIGNMENT 8 /* This is a guess */ #define UCC_GETH_RX_PREFETCHED_BDS_ALIGNMENT 128 /* This is a guess */ #define UCC_GETH_RX_EXTENDED_FILTERING_GLOBAL_PARAMETERS_ALIGNMENT 8 /* This is a guess
*/ #define UCC_GETH_RX_BD_RING_ALIGNMENT 32 #define UCC_GETH_TX_BD_RING_ALIGNMENT 32 #define UCC_GETH_MRBLR_ALIGNMENT 128 #define UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT 4 #define UCC_GETH_TX_BD_RING_SIZE_MEMORY_ALIGNMENT 32 #define UCC_GETH_RX_DATA_BUF_ALIGNMENT 64
/* UCC GETH Rx Quality of Service Mode */ enum ucc_geth_qos_mode {
UCC_GETH_QOS_MODE_DEFAULT = 0x0, /* default queue */
UCC_GETH_QOS_MODE_QUEUE_NUM_FROM_L2_CRITERIA = 0x1, /* queue determined by L2
criteria */
UCC_GETH_QOS_MODE_QUEUE_NUM_FROM_L3_CRITERIA = 0x2 /* queue determined by L3
criteria */
};
/* UCC GETH Statistics Gathering Mode - These are bit flags, 'or' them together
for combined functionality */ enum ucc_geth_statistics_gathering_mode {
UCC_GETH_STATISTICS_GATHERING_MODE_NONE = 0x00000000, /* No statistics
gathering */
UCC_GETH_STATISTICS_GATHERING_MODE_HARDWARE = 0x00000001,/* Enable hardware statistics gathering
*/
UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX = 0x00000004,/*Enable firmware tx statistics gathering
*/
UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX = 0x00000008/* Enable firmware rx statistics gathering
*/
};
/* UCC GETH Pad and CRC Mode - Note, Padding without CRC is not possible */ enum ucc_geth_maccfg2_pad_and_crc_mode {
UCC_GETH_PAD_AND_CRC_MODE_NONE
= MACCFG2_PAD_AND_CRC_MODE_NONE, /* Neither Padding short frames
nor CRC */
UCC_GETH_PAD_AND_CRC_MODE_CRC_ONLY
= MACCFG2_PAD_AND_CRC_MODE_CRC_ONLY, /* Append
CRC only */
UCC_GETH_PAD_AND_CRC_MODE_PAD_AND_CRC =
MACCFG2_PAD_AND_CRC_MODE_PAD_AND_CRC
};
/* UCC GETH upsmr Flow Control Mode */ enum ucc_geth_flow_control_mode {
UPSMR_AUTOMATIC_FLOW_CONTROL_MODE_NONE = 0x00000000, /* No automatic flow control
*/
UPSMR_AUTOMATIC_FLOW_CONTROL_MODE_PAUSE_WHEN_EMERGENCY
= 0x00004000 /* Send pause frame when RxFIFO reaches its
emergency threshold */
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.