14875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf/* 24875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Copyright 2012 Tilera Corporation. All Rights Reserved. 34875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 44875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * This program is free software; you can redistribute it and/or 54875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * modify it under the terms of the GNU General Public License 64875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * as published by the Free Software Foundation, version 2. 74875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 84875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * This program is distributed in the hope that it will be useful, but 94875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * WITHOUT ANY WARRANTY; without even the implied warranty of 104875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or 114875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * NON INFRINGEMENT. See the GNU General Public License for 124875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * more details. 134875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 144875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 154875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf/* Machine-generated file; do not edit. */ 164875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 174875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 184875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __ARCH_MPIPE_SHM_H__ 194875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#define __ARCH_MPIPE_SHM_H__ 204875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 214875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#include <arch/abi.h> 224875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#include <arch/mpipe_shm_def.h> 234875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 244875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __ASSEMBLER__ 254875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf/** 264875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * MPIPE eDMA Descriptor. 274875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * The eDMA descriptor is written by software and consumed by hardware. It 284875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * is used to specify the location of egress packet data to be sent out of 294875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * the chip via one of the packet interfaces. 304875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 314875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 324875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf__extension__ 334875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalftypedef union 344875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf{ 354875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf struct 364875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf { 374875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 0 */ 384875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 394875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 404875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 414875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Generation number. Used to indicate a valid descriptor in ring. When 424875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * a new descriptor is written into the ring, software must toggle this 434875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * bit. The net effect is that the GEN bit being written into new 444875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * descriptors toggles each time the ring tail pointer wraps. 454875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 464875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t gen : 1; 4788e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf /** 4888e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * For devices with EDMA reorder support, this field allows the 4988e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * descriptor to select the egress FIFO. The associated DMA ring must 5088e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * have ALLOW_EFIFO_SEL enabled. 5188e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf */ 5288e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf uint_reg_t efifo_sel : 6; 534875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. Must be zero. */ 5488e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf uint_reg_t r0 : 1; 554875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Checksum generation enabled for this transfer. */ 564875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum : 1; 574875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 584875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Nothing to be sent. Used, for example, when software has dropped a 594875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * packet but still wishes to return all of the associated buffers. 604875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 614875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ns : 1; 624875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 634875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Notification interrupt will be delivered when packet has been egressed. 644875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 654875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t notif : 1; 664875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 674875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Boundary indicator. When 1, this transfer includes the EOP for this 684875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * command. Must be clear on all but the last descriptor for an egress 694875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * packet. 704875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 714875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t bound : 1; 724875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. Must be zero. */ 734875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t r1 : 4; 744875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 754875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Number of bytes to be sent for this descriptor. When zero, no data 764875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * will be moved and the buffer descriptor will be ignored. If the 774875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * buffer descriptor indicates that it is chained, the low 7 bits of the 784875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * VA indicate the offset within the first buffer (e.g. 127 bytes is the 794875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * maximum offset into the first buffer). If the size exceeds a single 804875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * buffer, subsequent buffer descriptors will be fetched prior to 814875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * processing the next eDMA descriptor in the ring. 824875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 834875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t xfer_size : 14; 844875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. Must be zero. */ 854875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t r2 : 2; 864875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 874875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Destination of checksum relative to CSUM_START relative to the first 884875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * byte moved by this descriptor. Must be zero if CSUM=0 in this 894875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * descriptor. Must be less than XFER_SIZE (e.g. the first byte of the 904875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * CSUM_DEST must be within the span of this descriptor). 914875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 924875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_dest : 8; 934875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 944875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Start byte of checksum relative to the first byte moved by this 954875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * descriptor. If this is not the first descriptor for the egress 964875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * packet, CSUM_START is still relative to the first byte in this 974875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * descriptor. Must be zero if CSUM=0 in this descriptor. 984875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 994875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_start : 8; 1004875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 1014875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Initial value for 16-bit 1's compliment checksum if enabled via CSUM. 1024875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Specified in network order. That is, bits[7:0] will be added to the 1034875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * byte pointed to by CSUM_START and bits[15:8] will be added to the byte 1044875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * pointed to by CSUM_START+1 (with appropriate 1's compliment carries). 1054875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Must be zero if CSUM=0 in this descriptor. 1064875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 1074875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_seed : 16; 1084875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 1094875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_seed : 16; 1104875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_start : 8; 1114875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_dest : 8; 1124875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t r2 : 2; 1134875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t xfer_size : 14; 1144875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t r1 : 4; 1154875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t bound : 1; 1164875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t notif : 1; 1174875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ns : 1; 1184875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum : 1; 11988e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf uint_reg_t r0 : 1; 12088e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf uint_reg_t efifo_sel : 6; 1214875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t gen : 1; 1224875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 1234875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 1244875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 1 */ 1254875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 1264875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 1274875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Virtual address. Must be sign extended by consumer. */ 1284875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf int_reg_t va : 42; 1294875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. */ 1304875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_0 : 6; 1314875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Index of the buffer stack to which this buffer belongs. */ 1324875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t stack_idx : 5; 1334875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. */ 1344875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_1 : 3; 1354875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 13688e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * Instance ID. For devices that support automatic buffer return between 13788e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * mPIPE instances, this field indicates the buffer owner. If the INST 13888e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * field does not match the mPIPE's instance number when a packet is 13988e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * egressed, buffers with HWB set will be returned to the other mPIPE 14088e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * instance. Note that not all devices support multi-mPIPE buffer 14188e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * return. The MPIPE_EDMA_INFO.REMOTE_BUFF_RTN_SUPPORT bit indicates 14288e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * whether the INST field in the buffer descriptor is populated by iDMA 14388e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * hardware. 1444875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 14588e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf uint_reg_t inst : 2; 1464875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 1474875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Always set to one by hardware in iDMA packet descriptors. For eDMA, 1484875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * indicates whether the buffer will be released to the buffer stack 1494875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * manager. When 0, software is responsible for releasing the buffer. 1504875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 1514875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t hwb : 1; 1524875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 1534875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Encoded size of buffer. Set by the ingress hardware for iDMA packet 1544875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * descriptors. For eDMA descriptors, indicates the buffer size if .c 1554875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * indicates a chained packet. If an eDMA descriptor is not chained and 1564875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * the .hwb bit is not set, this field is ignored and the size is 1574875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * specified by the .xfer_size field. 1584875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 0 = 128 bytes 1594875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 1 = 256 bytes 1604875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 2 = 512 bytes 1614875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 3 = 1024 bytes 1624875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 4 = 1664 bytes 1634875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 5 = 4096 bytes 1644875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 6 = 10368 bytes 1654875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 7 = 16384 bytes 1664875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 1674875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t size : 3; 1684875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 1694875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Chaining configuration for the buffer. Indicates that an ingress 1704875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * packet or egress command is chained across multiple buffers, with each 1714875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * buffer's size indicated by the .size field. 1724875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 1734875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t c : 2; 1744875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 1754875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t c : 2; 1764875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t size : 3; 1774875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t hwb : 1; 17888e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf uint_reg_t inst : 2; 1794875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_1 : 3; 1804875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t stack_idx : 5; 1814875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_0 : 6; 1824875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf int_reg_t va : 42; 1834875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 1844875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 1854875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf }; 1864875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 1874875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Word access */ 1884875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t words[2]; 1894875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf} MPIPE_EDMA_DESC_t; 1904875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 1914875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf/** 1924875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * MPIPE Packet Descriptor. 1934875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * The packet descriptor is filled by the mPIPE's classification, 1944875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * load-balancing, and buffer management services. Some fields are consumed 1954875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * by mPIPE hardware, and others are consumed by Tile software. 1964875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 1974875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 1984875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf__extension__ 1994875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalftypedef union 2004875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf{ 2014875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf struct 2024875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf { 2034875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 0 */ 2044875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 2054875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 2064875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2074875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Notification ring into which this packet descriptor is written. 2084875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Typically written by load balancer, but can be overridden by 2094875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * classification program if NR is asserted. 2104875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2114875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t notif_ring : 8; 2124875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Source channel for this packet. Written by mPIPE DMA hardware. */ 2134875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t channel : 5; 2144875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. */ 2154875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_0 : 1; 2164875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2174875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * MAC Error. 2184875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Generated by the MAC interface. Asserted if there was an overrun of 2194875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * the MAC's receive FIFO. This condition generally only occurs if the 2204875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * mPIPE clock is running too slowly. 2214875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2224875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t me : 1; 2234875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2244875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Truncation Error. 2254875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the iDMA hardware. Asserted if packet was truncated due to 2264875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * insufficient space in iPkt buffer 2274875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2284875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t tr : 1; 2294875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2304875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the iDMA hardware. Indicates the number of bytes written 2314875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * to Tile memory. In general, this is the actual size of the packet as 2324875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * received from the MAC. But if the packet is truncated due to running 2334875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * out of buffers or due to the iPkt buffer filling up, then the L2_SIZE 2344875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * will be reduced to reflect the actual number of valid bytes written to 2354875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Tile memory. 2364875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2374875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t l2_size : 14; 2384875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2394875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * CRC Error. 2404875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Generated by the MAC. Asserted if MAC indicated an L2 CRC error or 2414875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * other L2 error (bad length etc.) on the packet. 2424875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2434875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ce : 1; 2444875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2454875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Cut Through. 2464875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the iDMA hardware. Asserted if packet was not completely 2474875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * received before being sent to classifier. L2_Size will indicate 2484875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * number of bytes received so far. 2494875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2504875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ct : 1; 2514875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2524875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the classification program. Used by the load balancer to 2534875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * select the ring into which this packet descriptor is written. 2544875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2554875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t bucket_id : 13; 2564875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. */ 2574875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_1 : 3; 2584875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2594875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Checksum. 2604875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by classification program. When 1, the checksum engine will 2614875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * perform checksum based on the CSUM_SEED, CSUM_START, and CSUM_BYTES 2624875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * fields. The result will be placed in CSUM_VAL. 2634875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2644875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t cs : 1; 2654875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2664875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Notification Ring Select. 2674875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the classification program. When 1, the NotifRingIDX is 2684875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * set by classification program rather than being set by load balancer. 2694875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2704875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t nr : 1; 2714875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2724875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by classification program. Indicates whether packet and 2734875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * descriptor should both be dropped, both be delivered, or only the 2744875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * descriptor should be delivered. 2754875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2764875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t dest : 2; 2774875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2784875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * General Purpose Sequence Number Enable. 2794875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the classification program. When 1, the GP_SQN_SEL field 2804875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * contains the sequence number selector and the GP_SQN field will be 2814875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * replaced with the associated sequence number. When clear, the GP_SQN 2824875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * field is left intact and be used as "Custom" bytes. 2834875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2844875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t sq : 1; 2854875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2864875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * TimeStamp Enable. 2874875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Enable TimeStamp insertion. When clear, timestamp field may be filled 2884875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * with custom data by classifier. When set, hardware inserts the 2894875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * timestamp when the start of packet is received from the MAC. 2904875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2914875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ts : 1; 2924875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 2934875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Packet Sequence Number Enable. 2944875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Enable PacketSQN insertion. When clear, PacketSQN field may be filled 2954875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * with custom data by classifier. When set, hardware inserts the packet 2964875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * sequence number when the packet descriptor is written to a 2974875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * notification ring. 2984875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 2994875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ps : 1; 3004875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 3014875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Buffer Error. 3024875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the iDMA hardware. Asserted if iDMA ran out of buffers 3034875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * while writing the packet. Software must still return any buffer 3044875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * descriptors whose C field indicates a valid descriptor was consumed. 3054875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 3064875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t be : 1; 3074875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 3084875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the classification program. The associated counter is 3094875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * incremented when the packet is sent. 3104875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 3114875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ctr0 : 5; 3124875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. */ 3134875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_2 : 3; 3144875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 3154875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_2 : 3; 3164875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ctr0 : 5; 3174875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t be : 1; 3184875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ps : 1; 3194875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ts : 1; 3204875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t sq : 1; 3214875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t dest : 2; 3224875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t nr : 1; 3234875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t cs : 1; 3244875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_1 : 3; 3254875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t bucket_id : 13; 3264875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ct : 1; 3274875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ce : 1; 3284875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t l2_size : 14; 3294875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t tr : 1; 3304875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t me : 1; 3314875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_0 : 1; 3324875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t channel : 5; 3334875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t notif_ring : 8; 3344875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 3354875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 3364875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 1 */ 3374875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 3384875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 3394875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 3404875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the classification program. The associated counter is 3414875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * incremented when the packet is sent. 3424875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 3434875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ctr1 : 5; 3444875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. */ 3454875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_3 : 3; 3464875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 3474875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by classification program. Indicates the start byte for 3484875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * checksum. Relative to 1st byte received from MAC. 3494875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 3504875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_start : 8; 3514875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 3524875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Checksum seed written by classification program. Overwritten with 3534875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * resultant checksum if CS bit is asserted. The endianness of the CSUM 3544875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * value bits when viewed by Tile software match the packet byte order. 3554875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * That is, bits[7:0] of the resulting checksum value correspond to 3564875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * earlier (more significant) bytes in the packet. To avoid classifier 3574875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * software from having to byte swap the CSUM_SEED, the iDMA checksum 3584875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * engine byte swaps the classifier's result before seeding the checksum 3594875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * calculation. Thus, the CSUM_START byte of packet data is added to 3604875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * bits[15:8] of the CSUM_SEED field generated by the classifier. This 3614875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * byte swap will be visible to Tile software if the CS bit is clear. 3624875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 3634875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_seed_val : 16; 3644875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 3654875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the classification program. Not interpreted by mPIPE 3664875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * hardware. 3674875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 3684875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t custom0 : 32; 3694875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 3704875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t custom0 : 32; 3714875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_seed_val : 16; 3724875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t csum_start : 8; 3734875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_3 : 3; 3744875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t ctr1 : 5; 3754875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 3764875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 3774875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 2 */ 3784875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 3794875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 3804875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 3814875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the classification program. Not interpreted by mPIPE 3824875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * hardware. 3834875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 3844875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t custom1 : 64; 3854875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 3864875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t custom1 : 64; 3874875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 3884875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 3894875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 3 */ 3904875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 3914875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 3924875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 3934875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the classification program. Not interpreted by mPIPE 3944875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * hardware. 3954875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 3964875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t custom2 : 64; 3974875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 3984875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t custom2 : 64; 3994875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 4004875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 4014875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 4 */ 4024875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 4034875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 4044875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 4054875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by the classification program. Not interpreted by mPIPE 4064875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * hardware. 4074875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 4084875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t custom3 : 64; 4094875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 4104875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t custom3 : 64; 4114875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 4124875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 4134875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 5 */ 4144875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 4154875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 4164875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 4174875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Sequence number applied when packet is distributed. Classifier 4184875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * selects which sequence number is to be applied by writing the 13-bit 41988e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * SQN-selector into this field. For devices that support EXT_SQN (as 42088e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * indicated in IDMA_INFO.EXT_SQN_SUPPORT), the GP_SQN can be extended to 42188e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * 32-bits via the IDMA_CTL.EXT_SQN register. In this case the 42288e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * PACKET_SQN will be reduced to 32 bits. 4234875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 4244875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t gp_sqn : 16; 4254875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 4264875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by notification hardware. The packet sequence number is 4274875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * incremented for each packet that wasn't dropped. 4284875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 4294875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t packet_sqn : 48; 4304875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 4314875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t packet_sqn : 48; 4324875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t gp_sqn : 16; 4334875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 4344875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 4354875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 6 */ 4364875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 4374875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 4384875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 4394875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by hardware when the start-of-packet is received by the mPIPE 4404875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * from the MAC. This is the nanoseconds part of the packet timestamp. 4414875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 4424875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t time_stamp_ns : 32; 4434875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 4444875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Written by hardware when the start-of-packet is received by the mPIPE 4454875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * from the MAC. This is the seconds part of the packet timestamp. 4464875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 4474875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t time_stamp_sec : 32; 4484875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 4494875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t time_stamp_sec : 32; 4504875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t time_stamp_ns : 32; 4514875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 4524875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 4534875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /* Word 7 */ 4544875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 4554875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#ifndef __BIG_ENDIAN__ 4564875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Virtual address. Must be sign extended by consumer. */ 4574875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf int_reg_t va : 42; 4584875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. */ 4594875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_4 : 6; 4604875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Index of the buffer stack to which this buffer belongs. */ 4614875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t stack_idx : 5; 4624875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Reserved. */ 4634875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_5 : 3; 4644875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 46588e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * Instance ID. For devices that support automatic buffer return between 46688e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * mPIPE instances, this field indicates the buffer owner. If the INST 46788e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * field does not match the mPIPE's instance number when a packet is 46888e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * egressed, buffers with HWB set will be returned to the other mPIPE 46988e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * instance. Note that not all devices support multi-mPIPE buffer 47088e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * return. The MPIPE_EDMA_INFO.REMOTE_BUFF_RTN_SUPPORT bit indicates 47188e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * whether the INST field in the buffer descriptor is populated by iDMA 47288e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf * hardware. 4734875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 47488e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf uint_reg_t inst : 2; 4754875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 4764875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Always set to one by hardware in iDMA packet descriptors. For eDMA, 4774875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * indicates whether the buffer will be released to the buffer stack 4784875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * manager. When 0, software is responsible for releasing the buffer. 4794875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 4804875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t hwb : 1; 4814875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 4824875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Encoded size of buffer. Set by the ingress hardware for iDMA packet 4834875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * descriptors. For eDMA descriptors, indicates the buffer size if .c 4844875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * indicates a chained packet. If an eDMA descriptor is not chained and 4854875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * the .hwb bit is not set, this field is ignored and the size is 4864875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * specified by the .xfer_size field. 4874875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 0 = 128 bytes 4884875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 1 = 256 bytes 4894875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 2 = 512 bytes 4904875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 3 = 1024 bytes 4914875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 4 = 1664 bytes 4924875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 5 = 4096 bytes 4934875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 6 = 10368 bytes 4944875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * 7 = 16384 bytes 4954875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 4964875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t size : 3; 4974875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** 4984875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * Chaining configuration for the buffer. Indicates that an ingress 4994875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * packet or egress command is chained across multiple buffers, with each 5004875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf * buffer's size indicated by the .size field. 5014875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf */ 5024875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t c : 2; 5034875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#else /* __BIG_ENDIAN__ */ 5044875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t c : 2; 5054875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t size : 3; 5064875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t hwb : 1; 50788e2692a4dff0d1f80e9761ade3db2ea59206c1eChris Metcalf uint_reg_t inst : 2; 5084875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_5 : 3; 5094875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t stack_idx : 5; 5104875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t __reserved_4 : 6; 5114875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf int_reg_t va : 42; 5124875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif 5134875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 5144875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf }; 5154875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 5164875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf /** Word access */ 5174875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf uint_reg_t words[8]; 5184875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf} MPIPE_PDESC_t; 5194875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif /* !defined(__ASSEMBLER__) */ 5204875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf 5214875f69fecab08654972d6fb0d71ee2109d2538cChris Metcalf#endif /* !defined(__ARCH_MPIPE_SHM_H__) */ 522