diff options
author | davidch <davidch@FreeBSD.org> | 2008-04-11 23:10:40 +0000 |
---|---|---|
committer | davidch <davidch@FreeBSD.org> | 2008-04-11 23:10:40 +0000 |
commit | 0f2382be0f1c305537f916630e47d0e66eeeb1d2 (patch) | |
tree | 904f60fee1e91d00975104d1b8d8c158f50f23e7 /sys/dev/bce | |
parent | 335d8ade9be6bc1b9aaf91476c046c5710dcef89 (diff) | |
download | FreeBSD-src-0f2382be0f1c305537f916630e47d0e66eeeb1d2.zip FreeBSD-src-0f2382be0f1c305537f916630e47d0e66eeeb1d2.tar.gz |
- Fixed a problem with the send chain consumer index which would cause
TX traffic to sit in the send chain until a received packet kick
started the interrupt handler. This would cause extremely slow
performance when used with NFS over UDP.
- Removed untested polling code.
- Updated copyright year in the file header.
- Removed inadvertent ^M's created by DOS text editor.
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/bce')
-rw-r--r-- | sys/dev/bce/if_bce.c | 876 | ||||
-rw-r--r-- | sys/dev/bce/if_bcefw.h | 1966 | ||||
-rw-r--r-- | sys/dev/bce/if_bcereg.h | 429 |
3 files changed, 1613 insertions, 1658 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 2ecbcd9..4df24e1 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -79,10 +79,10 @@ __FBSDID("$FreeBSD$"); int bce_debug_dma_map_addr_failure = 0; /* Controls how often to simulate a bootcode failure. */ - int bce_debug_bootcode_running_failure = 0;
+ int bce_debug_bootcode_running_failure = 0; #endif -
-
+ + /****************************************************************************/ /* PCI Device ID Table */ /* */ @@ -328,11 +328,6 @@ static void bce_rx_intr (struct bce_softc *); static void bce_tx_intr (struct bce_softc *); static void bce_disable_intr (struct bce_softc *); static void bce_enable_intr (struct bce_softc *); - -#ifdef DEVICE_POLLING -static void bce_poll_locked (struct ifnet *, enum poll_cmd, int); -static void bce_poll (struct ifnet *, enum poll_cmd, int); -#endif static void bce_intr (void *); static void bce_set_rx_mode (struct bce_softc *); static void bce_stats_update (struct bce_softc *); @@ -350,7 +345,7 @@ static device_method_t bce_methods[] = { DEVMETHOD(device_attach, bce_attach), DEVMETHOD(device_detach, bce_detach), DEVMETHOD(device_shutdown, bce_shutdown), -/* Supported by device interface but not used here. */
+/* Supported by device interface but not used here. */ /* DEVMETHOD(device_identify, bce_identify), */ /* DEVMETHOD(device_suspend, bce_suspend), */ /* DEVMETHOD(device_resume, bce_resume), */ @@ -364,7 +359,7 @@ static device_method_t bce_methods[] = { DEVMETHOD(miibus_readreg, bce_miibus_read_reg), DEVMETHOD(miibus_writereg, bce_miibus_write_reg), DEVMETHOD(miibus_statchg, bce_miibus_statchg), -/* Supported by MII interface but not used here. */
+/* Supported by MII interface but not used here. */ /* DEVMETHOD(miibus_linkchg, bce_miibus_linkchg), */ /* DEVMETHOD(miibus_mediainit, bce_miibus_mediainit), */ @@ -404,10 +399,10 @@ SYSCTL_UINT(_hw_bce, OID_AUTO, tso_enable, CTLFLAG_RDTUN, &bce_tso_enable, 0, TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable); SYSCTL_UINT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0, "MSI | INTx selector"); -
-/* ToDo: Add tunable to enable/disable strict MTU handling. */
-/* Currently allows "loose" RX MTU checking (i.e. sets the */
-/* h/w RX MTU to the size of the largest receive buffer, or */
+ +/* ToDo: Add tunable to enable/disable strict MTU handling. */ +/* Currently allows "loose" RX MTU checking (i.e. sets the */ +/* h/w RX MTU to the size of the largest receive buffer, or */ /* 2048 bytes). */ /****************************************************************************/ @@ -599,7 +594,7 @@ bce_attach(device_t dev) DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", __FUNCTION__, sc->bce_shmem_base); - /* Fetch the bootcode revision. */
+ /* Fetch the bootcode revision. */ sc->bce_fw_ver = REG_RD_IND(sc, sc->bce_shmem_base + BCE_DEV_INFO_BC_REV); @@ -782,11 +777,7 @@ bce_attach(device_t dev) /* Use standard mbuf sizes for buffer allocation. */ sc->rx_bd_mbuf_alloc_size = MHLEN; - sc->pg_bd_mbuf_alloc_size = MCLBYTES;
- -#ifdef DEVICE_POLLING - ifp->if_capabilities |= IFCAP_POLLING; -#endif + sc->pg_bd_mbuf_alloc_size = MCLBYTES; ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); @@ -868,7 +859,7 @@ bce_attach(device_t dev) if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) printf("2.5G "); printf(")\n"); -
+ DBPRINT(sc, BCE_FATAL, "%s(): sc = %p\n", __FUNCTION__, sc); @@ -904,11 +895,6 @@ bce_detach(device_t dev) ifp = sc->bce_ifp; -#ifdef DEVICE_POLLING - if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); -#endif - /* Stop and reset the controller. */ BCE_LOCK(sc); @@ -1024,7 +1010,7 @@ bce_reg_wr_ind(struct bce_softc *sc, u32 offset, u32 val) pci_write_config(dev, BCE_PCICFG_REG_WINDOW, val, 4); } -
+ #ifdef BCE_DEBUG /****************************************************************************/ /* Context memory read. */ @@ -1050,7 +1036,7 @@ bce_ctx_rd(struct bce_softc *sc, u32 cid_addr, u32 offset) return(val); } #endif -
+ /****************************************************************************/ /* Context memory write. */ @@ -1269,7 +1255,7 @@ bce_miibus_statchg(device_t dev) val |= BCE_EMAC_MODE_PORT_GMII; break; default: - DBPRINT(sc, BCE_INFO, "Unknown speed, enabling default GMII "
+ DBPRINT(sc, BCE_INFO, "Unknown speed, enabling default GMII " "interface.\n"); val |= BCE_EMAC_MODE_PORT_GMII; } @@ -2692,9 +2678,9 @@ bce_dma_alloc(device_t dev) /* * Create a DMA tag for RX mbufs. - */
- max_size = max_seg_size = ((sc->rx_bd_mbuf_alloc_size < MCLBYTES) ?
- MCLBYTES : sc->rx_bd_mbuf_alloc_size);
+ */ + max_size = max_seg_size = ((sc->rx_bd_mbuf_alloc_size < MCLBYTES) ? + MCLBYTES : sc->rx_bd_mbuf_alloc_size); if (bus_dma_tag_create(sc->parent_tag, 1, @@ -2786,8 +2772,8 @@ bce_dma_alloc(device_t dev) /* * Create a DMA tag for page mbufs. */ - max_size = max_seg_size = ((sc->pg_bd_mbuf_alloc_size < MCLBYTES) ?
- MCLBYTES : sc->rx_bd_mbuf_alloc_size);
+ max_size = max_seg_size = ((sc->pg_bd_mbuf_alloc_size < MCLBYTES) ? + MCLBYTES : sc->rx_bd_mbuf_alloc_size); if (bus_dma_tag_create(sc->parent_tag, 1, @@ -2952,12 +2938,12 @@ bce_load_rv2p_fw(struct bce_softc *sc, u32 *rv2p_code, { int i; u32 val; -
+ /* Set the page size used by RV2P. */ if (rv2p_proc == RV2P_PROC2) { - BCE_RV2P_PROC2_CHG_MAX_BD_PAGE(USABLE_RX_BD_PER_PAGE);
+ BCE_RV2P_PROC2_CHG_MAX_BD_PAGE(USABLE_RX_BD_PER_PAGE); } -
+ for (i = 0; i < rv2p_code_len; i += 8) { REG_WR(sc, BCE_RV2P_INSTR_HIGH, *rv2p_code); rv2p_code++; @@ -4132,7 +4118,7 @@ bce_init_rx_chain(struct bce_softc *sc) sc->rx_cons = 0; sc->rx_prod_bseq = 0; sc->free_rx_bd = USABLE_RX_BD; - sc->max_rx_bd = USABLE_RX_BD;
+ sc->max_rx_bd = USABLE_RX_BD; DBRUN(sc->rx_low_watermark = sc->max_rx_bd); DBRUN(sc->rx_empty_count = 0); @@ -4214,10 +4200,10 @@ bce_fill_rx_chain(struct bce_softc *sc) /* Save the RX chain producer index. */ sc->rx_prod = prod; sc->rx_prod_bseq = prod_bseq; -
- DBRUNIF(((prod & USABLE_RX_BD_PER_PAGE) == USABLE_RX_BD_PER_PAGE),
- BCE_PRINTF("%s(): Invalid rx_prod value: 0x%04X\n",
- __FUNCTION__, sc->rx_prod));
+ + DBRUNIF(((prod & USABLE_RX_BD_PER_PAGE) == USABLE_RX_BD_PER_PAGE), + BCE_PRINTF("%s(): Invalid rx_prod value: 0x%04X\n", + __FUNCTION__, sc->rx_prod)); /* Tell the chip about the waiting rx_bd's. */ REG_WR16(sc, MB_RX_CID_ADDR + BCE_L2CTX_HOST_BDIDX, sc->rx_prod); @@ -4351,7 +4337,7 @@ bce_init_pg_chain(struct bce_softc *sc) static void bce_fill_pg_chain(struct bce_softc *sc) { - u16 prod, prod_idx;
+ u16 prod, prod_idx; DBPRINT(sc, BCE_EXCESSIVE_RECV, "Entering %s()\n", __FUNCTION__); @@ -4363,20 +4349,20 @@ bce_fill_pg_chain(struct bce_softc *sc) if (bce_get_pg_buf(sc, NULL, &prod, &prod_idx)) { /* Bail out if we can't add an mbuf to the chain. */ break; - }
+ } prod = NEXT_PG_BD(prod); } /* Save the page chain producer index. */ sc->pg_prod = prod; - DBRUNIF(((prod & USABLE_RX_BD_PER_PAGE) == USABLE_RX_BD_PER_PAGE),
- BCE_PRINTF("%s(): Invalid pg_prod value: 0x%04X\n",
- __FUNCTION__, sc->pg_prod));
+ DBRUNIF(((prod & USABLE_RX_BD_PER_PAGE) == USABLE_RX_BD_PER_PAGE), + BCE_PRINTF("%s(): Invalid pg_prod value: 0x%04X\n", + __FUNCTION__, sc->pg_prod)); /* Tell the chip about the new rx_bd's in the page chain. */ REG_WR16(sc, MB_RX_CID_ADDR + BCE_L2CTX_HOST_PG_BDIDX, sc->pg_prod); -
+ DBPRINT(sc, BCE_EXCESSIVE_RECV, "Exiting %s()\n", __FUNCTION__); } @@ -4392,7 +4378,7 @@ bce_free_pg_chain(struct bce_softc *sc) { int i; - DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); + DBPRINT(sc, BCE_EXCESSIVE_RESET, "Entering %s()\n", __FUNCTION__); /* Free any mbufs still in the mbuf page chain. */ for (i = 0; i < TOTAL_PG_BD; i++) { @@ -4402,7 +4388,7 @@ bce_free_pg_chain(struct bce_softc *sc) BUS_DMASYNC_POSTREAD); m_freem(sc->pg_mbuf_ptr[i]); sc->pg_mbuf_ptr[i] = NULL; - DBRUN(sc->debug_pg_mbuf_alloc--);
+ DBRUN(sc->debug_pg_mbuf_alloc--); } } @@ -4417,7 +4403,7 @@ bce_free_pg_chain(struct bce_softc *sc) BCE_PRINTF("%s(): Memory leak! Lost %d mbufs from page chain!\n", __FUNCTION__, sc->debug_pg_mbuf_alloc)); - DBPRINT(sc, BCE_VERBOSE_RESET, "Exiting %s()\n", __FUNCTION__); + DBPRINT(sc, BCE_EXCESSIVE_RESET, "Exiting %s()\n", __FUNCTION__); } @@ -4544,7 +4530,7 @@ bce_phy_intr(struct bce_softc *sc) /****************************************************************************/ -/* Reads the receive consumer value from the status block (skipping over */
+/* Reads the receive consumer value from the status block (skipping over */ /* chain page pointer if necessary). */ /* */ /* Returns: */ @@ -4561,6 +4547,7 @@ bce_get_hw_rx_cons(struct bce_softc *sc) return hw_cons; } + /****************************************************************************/ /* Handles received frame interrupt events. */ /* */ @@ -4570,17 +4557,18 @@ bce_get_hw_rx_cons(struct bce_softc *sc) static void bce_rx_intr(struct bce_softc *sc) { - struct ifnet *ifp = sc->bce_ifp;
- struct l2_fhdr *l2fhdr;
- unsigned int pages, pkt_len, rem_len;
- u16 sw_rx_cons, sw_rx_cons_idx, sw_pg_cons, sw_pg_cons_idx, hw_rx_cons;
- u32 status;
-
-#ifdef BCE_DEBUG
- u32 rx_intr_start, rx_intr_end;
- rx_intr_start = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN);
+ struct ifnet *ifp = sc->bce_ifp; + struct l2_fhdr *l2fhdr; + unsigned int pages, pkt_len, rem_len; + u16 sw_rx_cons, sw_rx_cons_idx, sw_pg_cons, sw_pg_cons_idx, hw_rx_cons; + u32 status; + + +#ifdef BCE_DEBUG + u32 timer_start, timer_end; + timer_start = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); sc->rx_interrupts++; -#endif
+#endif /* Prepare the RX chain pages to be accessed by the host CPU. */ for (int i = 0; i < RX_PAGES; i++) @@ -4599,27 +4587,23 @@ bce_rx_intr(struct bce_softc *sc) sw_rx_cons = sc->rx_cons; sw_pg_cons = sc->pg_cons; + DBPRINT(sc, BCE_INFO_RECV, "%s(enter): rx_prod = 0x%04X, " + "rx_cons = 0x%04X, rx_prod_bseq = 0x%08X\n", + __FUNCTION__, sc->rx_prod, sc->rx_cons, sc->rx_prod_bseq); + /* Update some debug statistics counters */ DBRUNIF((sc->free_rx_bd < sc->rx_low_watermark), sc->rx_low_watermark = sc->free_rx_bd); DBRUNIF((sc->free_rx_bd == sc->max_rx_bd), sc->rx_empty_count++); - /* Scan through the receive chain as long as there is work to do */
+ /* Scan through the receive chain as long as there is work to do */ /* ToDo: Consider setting a limit on the number of packets processed. */ while (sw_rx_cons != hw_rx_cons) { struct mbuf *m0; - + /* Convert the producer/consumer indices to an actual rx_bd index. */ sw_rx_cons_idx = RX_CHAIN_IDX(sw_rx_cons); -#ifdef DEVICE_POLLING - if (ifp->if_capenable & IFCAP_POLLING) { - if (sc->bce_rxcycles <= 0) - break; - sc->bce_rxcycles--; - } -#endif - /* Unmap the mbuf from DMA space. */ bus_dmamap_sync(sc->rx_mbuf_tag, sc->rx_mbuf_map[sw_rx_cons_idx], @@ -4632,7 +4616,7 @@ bce_rx_intr(struct bce_softc *sc) sc->rx_mbuf_ptr[sw_rx_cons_idx] = NULL; DBRUN(sc->debug_rx_mbuf_alloc--); sc->free_rx_bd++; -
+ /* * Frames received on the NetXteme II are prepended * with an l2_fhdr structure which provides status @@ -4640,62 +4624,66 @@ bce_rx_intr(struct bce_softc *sc) * VLAN tags and checksum info). The frames are also * automatically adjusted to align the IP header * (i.e. two null bytes are inserted before the - * Ethernet header). As a result the data DMA'd by
- * the controller into the mbuf is as follows:
- * +---------+-----+---------------------+-----+
- * | l2_fhdr | pad | packet data | FCS |
- * +---------+-----+---------------------+-----+
- * The l2_fhdr needs to be checked and skipped and
- * the FCS needs to be stripped before sending the
+ * Ethernet header). As a result the data DMA'd by + * the controller into the mbuf is as follows: + * +---------+-----+---------------------+-----+ + * | l2_fhdr | pad | packet data | FCS | + * +---------+-----+---------------------+-----+ + * The l2_fhdr needs to be checked and skipped and + * the FCS needs to be stripped before sending the * packet up the stack. - */
+ */ l2fhdr = mtod(m0, struct l2_fhdr *); /* Get the packet data + FCS length and the status. */ pkt_len = l2fhdr->l2_fhdr_pkt_len; status = l2fhdr->l2_fhdr_status; -
+ /* - * Skip over the l2_fhdr and pad, resulting in the
+ * Skip over the l2_fhdr and pad, resulting in the * following data in the mbuf: - * +---------------------+-----+
- * | packet data | FCS |
- * +---------------------+-----+
- */
+ * +---------------------+-----+ + * | packet data | FCS | + * +---------------------+-----+ + */ m_adj(m0, sizeof(struct l2_fhdr) + ETHER_ALIGN); -
- /*
- * Check whether the received frame fits in a single
- * mbuf or not (i.e. packet data + FCS <=
- * sc->rx_bd_mbuf_alloc_size bytes).
+ + /* + * Check whether the received frame fits in a single + * mbuf or not (i.e. packet data + FCS <= + * sc->rx_bd_mbuf_alloc_size bytes). */ if (pkt_len > m0->m_len) { /* - * The received frame is larger than a single mbuf.
- * If the frame was a TCP frame then only the TCP
- * header is placed in the mbuf, the remaining
- * payload (including FCS) is placed in the page
- * chain, the SPLIT flag is set, and the header
- * length is placed in the IP checksum field.
- * If the frame is not a TCP frame then the mbuf
- * is filled and the remaining bytes are placed
- * in the page chain.
+ * The received frame is larger than a single mbuf. + * If the frame was a TCP frame then only the TCP + * header is placed in the mbuf, the remaining + * payload (including FCS) is placed in the page + * chain, the SPLIT flag is set, and the header + * length is placed in the IP checksum field. + * If the frame is not a TCP frame then the mbuf + * is filled and the remaining bytes are placed + * in the page chain. */ - if (status & L2_FHDR_STATUS_SPLIT)
- m0->m_len = l2fhdr->l2_fhdr_ip_xsum;
-
- rem_len = pkt_len - m0->m_len;
-
- /* Calculate how many pages to pull off the page chain. */
- /* ToDo: The following assumes that mbuf clusters are 2KB. */
- pages = (rem_len + sc->pg_bd_mbuf_alloc_size) >> 11;
-
+ + DBPRINT(sc, BCE_INFO_RECV, "%s(): Found a large packet.\n", + __FUNCTION__); + + if (status & L2_FHDR_STATUS_SPLIT) + m0->m_len = l2fhdr->l2_fhdr_ip_xsum; + + rem_len = pkt_len - m0->m_len; + + /* Calculate how many pages to pull off the page chain. */ + /* ToDo: The following assumes that mbuf clusters are 2KB. */ + pages = (rem_len + sc->pg_bd_mbuf_alloc_size) >> 11; + /* Pull mbufs off the page chain for the remaining data. */ - while (rem_len > 0) {
- struct mbuf *m_pg;
-
- sw_pg_cons_idx = PG_CHAIN_IDX(sw_pg_cons);
-
+ while (rem_len > 0) { + struct mbuf *m_pg; + + sw_pg_cons_idx = PG_CHAIN_IDX(sw_pg_cons); + /* Remove the mbuf from the page chain. */ m_pg = sc->pg_mbuf_ptr[sw_pg_cons_idx]; sc->pg_mbuf_ptr[sw_pg_cons_idx] = NULL; @@ -4709,43 +4697,51 @@ bce_rx_intr(struct bce_softc *sc) bus_dmamap_unload(sc->pg_mbuf_tag, sc->pg_mbuf_map[sw_pg_cons_idx]); - /* Adjust the mbuf length. */
+ /* Adjust the mbuf length. */ if (rem_len < m_pg->m_len) { /* The mbuf chain is complete. */ m_pg->m_len = rem_len; rem_len = 0; - } else {
- /* More packet data is waiting. */
+ } else { + /* More packet data is waiting. */ rem_len -= m_pg->m_len; - }
-
+ } + /* Concatenate the mbuf cluster to the mbuf. */ m_cat(m0, m_pg); - sw_pg_cons = NEXT_PG_BD(sw_pg_cons);
+ sw_pg_cons = NEXT_PG_BD(sw_pg_cons); } - /* Set the total packet length. */
- m0->m_pkthdr.len = pkt_len;
-
+ /* Set the total packet length. */ + m0->m_pkthdr.len = pkt_len; + } else { /* * The received packet is small and fits in a - * single mbuf (i.e. the l2_fhdr + pad + packet +
- * FCS <= MHLEN). In other words, the packet is
+ * single mbuf (i.e. the l2_fhdr + pad + packet + + * FCS <= MHLEN). In other words, the packet is * 154 bytes or less in size. */ + DBPRINT(sc, BCE_INFO_RECV, "%s(): Found a small packet.\n", + __FUNCTION__); + /* Set the total packet length. */ m0->m_pkthdr.len = m0->m_len = pkt_len; - }
-
- /* Remove the trailing Ethernet FCS. */
- m_adj(m0, -ETHER_CRC_LEN);
-
+ } + + /* Remove the trailing Ethernet FCS. */ + m_adj(m0, -ETHER_CRC_LEN); + /* Check that the resulting mbuf chain is valid. */ DBRUN(m_sanity(m0, FALSE)); + DBRUNIF((m0->m_len < ETHER_HDR_LEN), + BCE_PRINTF("%s(): Unexpected length = %d!.\n", + __FUNCTION__, m0->m_len); + bce_breakpoint(sc)); + DBRUNIF(DB_RANDOMTRUE(bce_debug_l2fhdr_status_check), BCE_PRINTF("Simulating l2_fhdr status error.\n"); status = status | L2_FHDR_ERRORS_PHY_DECODE); @@ -4766,22 +4762,22 @@ bce_rx_intr(struct bce_softc *sc) /* Send the packet to the appropriate interface. */ m0->m_pkthdr.rcvif = ifp; -
- /* Assume no hardware checksum. */
+ + /* Assume no hardware checksum. */ m0->m_pkthdr.csum_flags = 0; -
+ /* Validate the checksum if offload enabled. */ if (ifp->if_capenable & IFCAP_RXCSUM) { /* Check for an IP datagram. */ - if (!(status & L2_FHDR_STATUS_SPLIT) &&
+ if (!(status & L2_FHDR_STATUS_SPLIT) && (status & L2_FHDR_STATUS_IP_DATAGRAM)) { m0->m_pkthdr.csum_flags |= CSUM_IP_CHECKED; /* Check if the IP checksum is valid. */ if ((l2fhdr->l2_fhdr_ip_xsum ^ 0xffff) == 0) m0->m_pkthdr.csum_flags |= CSUM_IP_VALID; - }
+ } /* Check for a valid TCP/UDP frame. */ if (status & (L2_FHDR_STATUS_TCP_SEGMENT | @@ -4820,7 +4816,7 @@ bce_rx_int_next_rx: /* If we have a packet, pass it up the stack */ if (m0) { /* Make sure we don't lose our place when we release the lock. */ - sc->rx_cons = sw_rx_cons;
+ sc->rx_cons = sw_rx_cons; sc->pg_cons = sw_pg_cons; BCE_UNLOCK(sc); @@ -4828,7 +4824,7 @@ bce_rx_int_next_rx: BCE_LOCK(sc); /* Recover our place. */ - sw_rx_cons = sc->rx_cons;
+ sw_rx_cons = sc->rx_cons; sw_pg_cons = sc->pg_cons; } @@ -4854,10 +4850,32 @@ bce_rx_int_next_rx: DBPRINT(sc, BCE_INFO_RECV, "%s(exit): rx_prod = 0x%04X, " "rx_cons = 0x%04X, rx_prod_bseq = 0x%08X\n", - __FUNCTION__, sc->rx_prod, sc->rx_cons, sc->rx_prod_bseq);
-
- DBRUN(rx_intr_end = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN);
- sc->rx_intr_time += (u64) BCE_TIME_DELTA(rx_intr_start, rx_intr_end)); + __FUNCTION__, sc->rx_prod, sc->rx_cons, sc->rx_prod_bseq); + +#ifdef BCE_DEBUG + timer_end = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); + sc->rx_intr_time += (u64) (timer_start > timer_end ? + (timer_start - timer_end) : (~timer_start + timer_end + 1)); +#endif +} + + +/****************************************************************************/ +/* Reads the transmit consumer value from the status block (skipping over */ +/* chain page pointer if necessary). */ +/* */ +/* Returns: */ +/* hw_cons */ +/****************************************************************************/ +static inline u16 +bce_get_hw_tx_cons(struct bce_softc *sc) +{ + u16 hw_cons = sc->status_block->status_tx_quick_consumer_index0; + + if ((hw_cons & USABLE_TX_BD_PER_PAGE) == USABLE_TX_BD_PER_PAGE) + hw_cons++; + + return hw_cons; } @@ -4870,25 +4888,19 @@ bce_rx_int_next_rx: static void bce_tx_intr(struct bce_softc *sc) { - struct status_block *sblk = sc->status_block; struct ifnet *ifp = sc->bce_ifp; u16 hw_tx_cons, sw_tx_cons, sw_tx_chain_cons; -
-#ifdef BCE_DEBUG
- u32 tx_intr_start, tx_intr_end;
- tx_intr_start = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN);
+ +#ifdef BCE_DEBUG + u32 timer_start, timer_end; + timer_start = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); sc->tx_interrupts++; #endif BCE_LOCK_ASSERT(sc); /* Get the hardware's view of the TX consumer index. */ - hw_tx_cons = sc->hw_tx_cons = sblk->status_tx_quick_consumer_index0; - - /* Skip to the next entry if this is a chain page pointer. */ - if ((hw_tx_cons & USABLE_TX_BD_PER_PAGE) == USABLE_TX_BD_PER_PAGE) - hw_tx_cons++; - + hw_tx_cons = sc->hw_tx_cons = bce_get_hw_tx_cons(sc); sw_tx_cons = sc->tx_cons; /* Prevent speculative reads from getting ahead of the status block. */ @@ -4957,9 +4969,7 @@ bce_tx_intr(struct bce_softc *sc) sw_tx_cons = NEXT_TX_BD(sw_tx_cons); /* Refresh hw_cons to see if there's new work. */ - hw_tx_cons = sc->hw_tx_cons = sblk->status_tx_quick_consumer_index0; - if ((hw_tx_cons & USABLE_TX_BD_PER_PAGE) == USABLE_TX_BD_PER_PAGE) - hw_tx_cons++; + hw_tx_cons = sc->hw_tx_cons = bce_get_hw_tx_cons(sc); /* Prevent speculative reads from getting ahead of the status block. */ bus_space_barrier(sc->bce_btag, sc->bce_bhandle, 0, 0, @@ -4979,8 +4989,11 @@ bce_tx_intr(struct bce_softc *sc) } sc->tx_cons = sw_tx_cons; - DBRUN(tx_intr_end = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN);
- sc->tx_intr_time += (u64) BCE_TIME_DELTA(tx_intr_start, tx_intr_end)); +#ifdef BCE_DEBUG + timer_end = REG_RD(sc, BCE_TIMER_25MHZ_FREE_RUN); + sc->tx_intr_time += (u64) (timer_start > timer_end ? + (timer_start - timer_end) : (~timer_start + timer_end + 1)); +#endif } @@ -5068,13 +5081,13 @@ bce_init_locked(struct bce_softc *sc) bcopy(IF_LLADDR(sc->bce_ifp), sc->eaddr, ETHER_ADDR_LEN); bce_set_mac_addr(sc); - /* Calculate and program the hardware Ethernet MTU size. */
- if (ifp->if_mtu <= sc->pg_bd_mbuf_alloc_size)
- /* Be generous on receive if we have room. */
- ether_mtu = sc->pg_bd_mbuf_alloc_size;
- else
- ether_mtu = ifp->if_mtu;
-
+ /* Calculate and program the hardware Ethernet MTU size. */ + if (ifp->if_mtu <= sc->pg_bd_mbuf_alloc_size) + /* Be generous on receive if we have room. */ + ether_mtu = sc->pg_bd_mbuf_alloc_size; + else + ether_mtu = ifp->if_mtu; + ether_mtu += ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + ETHER_CRC_LEN; DBPRINT(sc, BCE_INFO_MISC, "%s(): setting h/w mtu = %d\n", __FUNCTION__, @@ -5104,17 +5117,6 @@ bce_init_locked(struct bce_softc *sc) /* Init TX buffer descriptor chain. */ bce_init_tx_chain(sc); -#ifdef DEVICE_POLLING - /* Disable interrupts if we are polling. */ - if (ifp->if_capenable & IFCAP_POLLING) { - bce_disable_intr(sc); - - REG_WR(sc, BCE_HC_RX_QUICK_CONS_TRIP, - (1 << 16) | sc->bce_rx_quick_cons_trip); - REG_WR(sc, BCE_HC_TX_QUICK_CONS_TRIP, - (1 << 16) | sc->bce_tx_quick_cons_trip); - } else -#endif /* Enable host interrupts. */ bce_enable_intr(sc); @@ -5179,7 +5181,7 @@ bce_mgmt_init_locked_exit: static void bce_init(void *xsc) { - struct bce_softc *sc = xsc;
+ struct bce_softc *sc = xsc; BCE_LOCK(sc); bce_init_locked(sc); @@ -5366,7 +5368,7 @@ bce_tx_encap_skip_tso: #endif DBPRINT(sc, BCE_INFO_SEND, - "%s(): Start: prod = 0x%04X, chain_prod = %04X, " + "%s(start): prod = 0x%04X, chain_prod = 0x%04X, " "prod_bseq = 0x%08X\n", __FUNCTION__, prod, chain_prod, prod_bseq); @@ -5398,7 +5400,7 @@ bce_tx_encap_skip_tso: DBRUNMSG(BCE_EXCESSIVE_SEND, bce_dump_tx_chain(sc, debug_prod, nsegs)); DBPRINT(sc, BCE_INFO_SEND, - "%s(): End: prod = 0x%04X, chain_prod = %04X, " + "%s( end ): prod = 0x%04X, chain_prod = 0x%04X, " "prod_bseq = 0x%08X\n", __FUNCTION__, prod, chain_prod, prod_bseq); @@ -5444,22 +5446,28 @@ bce_start_locked(struct ifnet *ifp) int count = 0; u16 tx_prod, tx_chain_prod; - /* If there's no link or the transmit queue is empty then just exit. */ - if (!sc->bce_link || IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - DBPRINT(sc, BCE_INFO_SEND, "%s(): No link or transmit queue empty.\n", - __FUNCTION__); - goto bce_start_locked_exit; - } - /* prod points to the next free tx_bd. */ tx_prod = sc->tx_prod; tx_chain_prod = TX_CHAIN_IDX(tx_prod); DBPRINT(sc, BCE_INFO_SEND, - "%s(): Start: tx_prod = 0x%04X, tx_chain_prod = %04X, " + "%s(enter): tx_prod = 0x%04X, tx_chain_prod = 0x%04X, " "tx_prod_bseq = 0x%08X\n", __FUNCTION__, tx_prod, tx_chain_prod, sc->tx_prod_bseq); + /* If there's no link or the transmit queue is empty then just exit. */ + if (!sc->bce_link) { + DBPRINT(sc, BCE_INFO_SEND, "%s(): No link.\n", + __FUNCTION__); + goto bce_start_locked_exit; + } + + if (IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + DBPRINT(sc, BCE_INFO_SEND, "%s(): Transmit queue empty.\n", + __FUNCTION__); + goto bce_start_locked_exit; + } + /* * Keep adding entries while there is space in the ring. */ @@ -5502,11 +5510,6 @@ bce_start_locked(struct ifnet *ifp) /* Update the driver's counters. */ tx_chain_prod = TX_CHAIN_IDX(sc->tx_prod); - DBPRINT(sc, BCE_INFO_SEND, - "%s(): End: tx_prod = 0x%04X, tx_chain_prod = 0x%04X, " - "tx_prod_bseq = 0x%08X\n", - __FUNCTION__, tx_prod, tx_chain_prod, sc->tx_prod_bseq); - /* Start the transmit. */ REG_WR16(sc, MB_TX_CID_ADDR + BCE_L2CTX_TX_HOST_BIDX, sc->tx_prod); REG_WR(sc, MB_TX_CID_ADDR + BCE_L2CTX_TX_HOST_BSEQ, sc->tx_prod_bseq); @@ -5515,6 +5518,11 @@ bce_start_locked(struct ifnet *ifp) sc->watchdog_timer = BCE_TX_TIMEOUT; bce_start_locked_exit: + DBPRINT(sc, BCE_INFO_SEND, + "%s(exit ): tx_prod = 0x%04X, tx_chain_prod = 0x%04X, " + "tx_prod_bseq = 0x%08X\n", + __FUNCTION__, tx_prod, tx_chain_prod, sc->tx_prod_bseq); + return; } @@ -5635,50 +5643,6 @@ bce_ioctl(struct ifnet *ifp, u_long command, caddr_t data) mask = ifr->ifr_reqcap ^ ifp->if_capenable; DBPRINT(sc, BCE_INFO_MISC, "Received SIOCSIFCAP = 0x%08X\n", (u32) mask); -#ifdef DEVICE_POLLING - if (mask & IFCAP_POLLING) { - if (ifr->ifr_reqcap & IFCAP_POLLING) { - - /* Setup the poll routine to call. */ - error = ether_poll_register(bce_poll, ifp); - if (error) { - BCE_PRINTF("%s(%d): Error registering poll function!\n", - __FILE__, __LINE__); - goto bce_ioctl_exit; - } - - /* Clear the interrupt. */ - BCE_LOCK(sc); - bce_disable_intr(sc); - - REG_WR(sc, BCE_HC_RX_QUICK_CONS_TRIP, - (1 << 16) | sc->bce_rx_quick_cons_trip); - REG_WR(sc, BCE_HC_TX_QUICK_CONS_TRIP, - (1 << 16) | sc->bce_tx_quick_cons_trip); - - ifp->if_capenable |= IFCAP_POLLING; - BCE_UNLOCK(sc); - } else { - /* Clear the poll routine. */ - error = ether_poll_deregister(ifp); - - /* Enable interrupt even in error case */ - BCE_LOCK(sc); - bce_enable_intr(sc); - - REG_WR(sc, BCE_HC_TX_QUICK_CONS_TRIP, - (sc->bce_tx_quick_cons_trip_int << 16) | - sc->bce_tx_quick_cons_trip); - REG_WR(sc, BCE_HC_RX_QUICK_CONS_TRIP, - (sc->bce_rx_quick_cons_trip_int << 16) | - sc->bce_rx_quick_cons_trip); - - ifp->if_capenable &= ~IFCAP_POLLING; - BCE_UNLOCK(sc); - } - } -#endif /*DEVICE_POLLING */ - /* Toggle the TX checksum capabilites enable flag. */ if (mask & IFCAP_TXCSUM) { ifp->if_capenable ^= IFCAP_TXCSUM; @@ -5730,9 +5694,6 @@ bce_ioctl(struct ifnet *ifp, u_long command, caddr_t data) break; } -#ifdef DEVICE_POLLING -bce_ioctl_exit: -#endif return(error); } @@ -5776,68 +5737,6 @@ bce_watchdog(struct bce_softc *sc) } -#ifdef DEVICE_POLLING -static void -bce_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) -{ - struct bce_softc *sc = ifp->if_softc; - - BCE_LOCK_ASSERT(sc); - - sc->bce_rxcycles = count; - - bus_dmamap_sync(sc->status_tag, sc->status_map, - BUS_DMASYNC_POSTWRITE); - - /* Check for any completed RX frames. */ - if (sc->status_block->status_rx_quick_consumer_index0 != - sc->hw_rx_cons) - bce_rx_intr(sc); - - /* Check for any completed TX frames. */ - if (sc->status_block->status_tx_quick_consumer_index0 != - sc->hw_tx_cons) - bce_tx_intr(sc); - - /* Check for new frames to transmit. */ - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - bce_start_locked(ifp); - -} - - -static void -bce_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) -{ - struct bce_softc *sc = ifp->if_softc; - - BCE_LOCK(sc); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - bce_poll_locked(ifp, cmd, count); - BCE_UNLOCK(sc); -} -#endif /* DEVICE_POLLING */ - - -#if 0 -static inline int -bce_has_work(struct bce_softc *sc) -{ - struct status_block *stat = sc->status_block; - - if ((stat->status_rx_quick_consumer_index0 != sc->hw_rx_cons) || - (stat->status_tx_quick_consumer_index0 != sc->hw_tx_cons)) - return 1; - - if (((stat->status_attn_bits & STATUS_ATTN_BITS_LINK_STATE) != 0) != - bp->link_up) - return 1; - - return 0; -} -#endif - - /* * Interrupt handler. */ @@ -5855,6 +5754,7 @@ bce_intr(void *xsc) struct bce_softc *sc; struct ifnet *ifp; u32 status_attn_bits; + u16 hw_rx_cons, hw_tx_cons; sc = xsc; ifp = sc->bce_ifp; @@ -5864,13 +5764,6 @@ bce_intr(void *xsc) DBRUN(sc->interrupts_generated++); -#ifdef DEVICE_POLLING - if (ifp->if_capenable & IFCAP_POLLING) { - DBPRINT(sc, BCE_INFO_MISC, "Polling enabled!\n"); - goto bce_intr_exit; - } -#endif - bus_dmamap_sync(sc->status_tag, sc->status_map, BUS_DMASYNC_POSTWRITE); @@ -5889,6 +5782,10 @@ bce_intr(void *xsc) BCE_PCICFG_INT_ACK_CMD_USE_INT_HC_PARAM | BCE_PCICFG_INT_ACK_CMD_MASK_INT); + /* Check if the hardware has finished any work. */ + hw_rx_cons = bce_get_hw_rx_cons(sc); + hw_tx_cons = bce_get_hw_tx_cons(sc); + /* Keep processing data as long as there is work to do. */ for (;;) { @@ -5922,11 +5819,11 @@ bce_intr(void *xsc) } /* Check for any completed RX frames. */ - if (sc->status_block->status_rx_quick_consumer_index0 != sc->hw_rx_cons) + if (hw_rx_cons != sc->hw_rx_cons) bce_rx_intr(sc); /* Check for any completed TX frames. */ - if (sc->status_block->status_tx_quick_consumer_index0 != sc->hw_tx_cons) + if (hw_tx_cons != sc->hw_tx_cons) bce_tx_intr(sc); /* Save the status block index value for use during the next interrupt. */ @@ -5937,8 +5834,10 @@ bce_intr(void *xsc) BUS_SPACE_BARRIER_READ); /* If there's no work left then exit the interrupt service routine. */ - if ((sc->status_block->status_rx_quick_consumer_index0 == sc->hw_rx_cons) && - (sc->status_block->status_tx_quick_consumer_index0 == sc->hw_tx_cons)) + hw_rx_cons = bce_get_hw_rx_cons(sc); + hw_tx_cons = bce_get_hw_tx_cons(sc); + + if ((hw_rx_cons == sc->hw_rx_cons) && (hw_tx_cons == sc->hw_tx_cons)) break; } @@ -6347,6 +6246,7 @@ bce_tick(void *xsc) IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) && bootverbose) BCE_PRINTF("Gigabit link up\n"); + /* Now that link is up, handle any outstanding TX traffic. */ if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) bce_start_locked(ifp); @@ -7370,12 +7270,12 @@ bce_dump_l2fhdr(struct bce_softc *sc, int idx, struct l2_fhdr *l2fhdr) static void bce_dump_ctx(struct bce_softc *sc, u16 cid) { - if (cid < TX_CID) {
+ if (cid < TX_CID) { BCE_PRINTF( "----------------------------" " CTX Data " "----------------------------\n"); -
+ BCE_PRINTF(" 0x%04X - (CID) Context ID\n", cid); BCE_PRINTF(" 0x%08X - (L2CTX_HOST_BDIDX) host rx producer index\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_HOST_BDIDX)); @@ -7403,7 +7303,7 @@ bce_dump_ctx(struct bce_softc *sc, u16 cid) BCE_PRINTF( "----------------------------" "----------------" - "----------------------------\n");
+ "----------------------------\n"); } } @@ -7416,8 +7316,8 @@ bce_dump_ctx(struct bce_softc *sc, u16 cid) /****************************************************************************/ static void bce_dump_ftqs(struct bce_softc *sc) -{
- u32 cmd, ctl, cur_depth, max_depth, valid_cnt;
+{ + u32 cmd, ctl, cur_depth, max_depth, valid_cnt; BCE_PRINTF( "----------------------------" @@ -7426,187 +7326,189 @@ bce_dump_ftqs(struct bce_softc *sc) BCE_PRINTF(" FTQ Command Control Depth_Now Max_Depth Valid_Cnt\n"); BCE_PRINTF(" ----- ---------- ---------- ---------- ---------- ----------\n"); -
- /* Setup the generic statistic counters for the FTQ valid count. */
- REG_WR(sc, BCE_HC_STAT_GEN_SEL_0,
- ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PPQ_VALID_CNT << 24) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RXPCQ_VALID_CNT << 16) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RXPQ_VALID_CNT << 8) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RLUPQ_VALID_CNT)));
- REG_WR(sc, BCE_HC_STAT_GEN_SEL_1,
- ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TSCHQ_VALID_CNT << 24) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RDMAQ_VALID_CNT << 16) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PTQ_VALID_CNT << 8) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PMQ_VALID_CNT)));
- REG_WR(sc, BCE_HC_STAT_GEN_SEL_2,
- ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TPATQ_VALID_CNT << 24) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TDMAQ_VALID_CNT << 16) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TXPQ_VALID_CNT << 8) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TBDRQ_VALID_CNT)));
- REG_WR(sc, BCE_HC_STAT_GEN_SEL_3,
- ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_COMQ_VALID_CNT << 24) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_COMTQ_VALID_CNT << 16) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_COMXQ_VALID_CNT << 8) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TASQ_VALID_CNT)));
-
- cmd = REG_RD(sc, 0x23f8); /* RLUP_FTQ_CMD */
- ctl = REG_RD(sc, 0x23fc); /* RLUP_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT0);
- BCE_PRINTF(" RLUP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + /* Setup the generic statistic counters for the FTQ valid count. */ + REG_WR(sc, BCE_HC_STAT_GEN_SEL_0, + ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PPQ_VALID_CNT << 24) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RXPCQ_VALID_CNT << 16) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RXPQ_VALID_CNT << 8) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RLUPQ_VALID_CNT))); + REG_WR(sc, BCE_HC_STAT_GEN_SEL_1, + ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TSCHQ_VALID_CNT << 24) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RDMAQ_VALID_CNT << 16) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PTQ_VALID_CNT << 8) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PMQ_VALID_CNT))); + REG_WR(sc, BCE_HC_STAT_GEN_SEL_2, + ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TPATQ_VALID_CNT << 24) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TDMAQ_VALID_CNT << 16) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TXPQ_VALID_CNT << 8) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TBDRQ_VALID_CNT))); + REG_WR(sc, BCE_HC_STAT_GEN_SEL_3, + ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_COMQ_VALID_CNT << 24) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_COMTQ_VALID_CNT << 16) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_COMXQ_VALID_CNT << 8) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_TASQ_VALID_CNT))); + + + cmd = REG_RD(sc, BCE_RLUP_FTQ_CMD); + ctl = REG_RD(sc, BCE_RLUP_FTQ_CTL); + cur_depth = (ctl & BCE_RLUP_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_RLUP_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT0); + BCE_PRINTF(" RLUP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD_IND(sc, 0xc53f8); /* RXP_FTQ_CMD */
- ctl = REG_RD_IND(sc, 0xc53fc); /* RXP_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT1);
- BCE_PRINTF(" RXP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD_IND(sc, BCE_RXP_FTQ_CMD); + ctl = REG_RD_IND(sc, BCE_RXP_FTQ_CTL); + cur_depth = (ctl & BCE_RXP_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_RXP_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT1); + BCE_PRINTF(" RXP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD_IND(sc, 0xc53b8); /* RXP_CFTQ_CMD */
- ctl = REG_RD_IND(sc, 0xc53bc); /* RXP_CFTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT2);
- BCE_PRINTF(" RXPC 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD_IND(sc, BCE_RXP_CFTQ_CMD); + ctl = REG_RD_IND(sc, BCE_RXP_CFTQ_CTL); + cur_depth = (ctl & BCE_RXP_CFTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_RXP_CFTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT2); + BCE_PRINTF(" RXPC 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD(sc, 0x2b78); /* RV2P_PFTQ_CMD */
- ctl = REG_RD(sc, 0x2b7c); /* RV2P_PFTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT3);
- BCE_PRINTF(" RV2PP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD(sc, BCE_RV2P_PFTQ_CMD); + ctl = REG_RD(sc, BCE_RV2P_PFTQ_CTL); + cur_depth = (ctl & BCE_RV2P_PFTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_RV2P_PFTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT3); + BCE_PRINTF(" RV2PP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD(sc, 0x2bf8); /* RV2P_MFTQ_CMD */
- ctl = REG_RD(sc, 0x2bfc); /* RV2P_MFTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT4);
- BCE_PRINTF(" RV2PM 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD(sc, BCE_RV2P_MFTQ_CMD); + ctl = REG_RD(sc, BCE_RV2P_MFTQ_CTL); + cur_depth = (ctl & BCE_RV2P_MFTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_RV2P_MFTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT4); + BCE_PRINTF(" RV2PM 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD(sc, 0x2bb8); /* RV2P_TFTQ_CMD */
- ctl = REG_RD(sc, 0x2bbc); /* RV2P_TFTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT5);
- BCE_PRINTF(" RV2PT 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD(sc, BCE_RV2P_TFTQ_CMD); + ctl = REG_RD(sc, BCE_RV2P_TFTQ_CTL); + cur_depth = (ctl & BCE_RV2P_TFTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_RV2P_TFTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT5); + BCE_PRINTF(" RV2PT 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD(sc, 0x2ff8); /* RDMA_FTQ_CMD */
- ctl = REG_RD(sc, 0x2ffc); /* RDMA_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT6);
- BCE_PRINTF(" RDMA 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD(sc, BCE_RDMA_FTQ_CMD); + ctl = REG_RD(sc, BCE_RDMA_FTQ_CTL); + cur_depth = (ctl & BCE_RDMA_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_RDMA_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT6); + BCE_PRINTF(" RDMA 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD(sc, 0x4ff8); /* TSCH_FTQ_CMD */
- ctl = REG_RD(sc, 0x4ffc); /* TSCH_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT7);
- BCE_PRINTF(" TSCH 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD(sc, BCE_TSCH_FTQ_CMD); + ctl = REG_RD(sc, BCE_TSCH_FTQ_CTL); + cur_depth = (ctl & BCE_TSCH_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_TSCH_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT7); + BCE_PRINTF(" TSCH 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD(sc, 0x53f8); /* TBDR_FTQ_CMD */
- ctl = REG_RD(sc, 0x53fc); /* TBDR_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT8);
- BCE_PRINTF(" TBDR 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD(sc, BCE_TBDR_FTQ_CMD); + ctl = REG_RD(sc, BCE_TBDR_FTQ_CTL); + cur_depth = (ctl & BCE_TBDR_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_TBDR_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT8); + BCE_PRINTF(" TBDR 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD_IND(sc, 0x453f8); /* TXP_FTQ_CMD */
- ctl = REG_RD_IND(sc, 0x453fc); /* TXP_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT9);
- BCE_PRINTF(" TXP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD_IND(sc, BCE_TXP_FTQ_CMD); + ctl = REG_RD_IND(sc, BCE_TXP_FTQ_CTL); + cur_depth = (ctl & BCE_TXP_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_TXP_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT9); + BCE_PRINTF(" TXP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD(sc, 0x5ff8); /* TDMA_FTQ_CMD */
- ctl = REG_RD(sc, 0x5ffc); /* TDMA_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT10);
- BCE_PRINTF(" TDMA 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD(sc, BCE_TDMA_FTQ_CMD); + ctl = REG_RD(sc, BCE_TDMA_FTQ_CTL); + cur_depth = (ctl & BCE_TDMA_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_TDMA_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT10); + BCE_PRINTF(" TDMA 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD_IND(sc, 0x853f8); /* TPAT_FTQ_CMD */
- ctl = REG_RD_IND(sc, 0x853fc); /* TPAT_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT11);
- BCE_PRINTF(" TPAT 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + + cmd = REG_RD_IND(sc, BCE_TPAT_FTQ_CMD); + ctl = REG_RD_IND(sc, BCE_TPAT_FTQ_CTL); + cur_depth = (ctl & BCE_TPAT_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_TPAT_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT11); + BCE_PRINTF(" TPAT 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD_IND(sc, 0x1c03f8); /* TAS_FTQ_CMD */
- ctl = REG_RD_IND(sc, 0x1c03fc); /* TAS_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT12);
- BCE_PRINTF(" TAS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD_IND(sc, BCE_TAS_FTQ_CMD); + ctl = REG_RD_IND(sc, BCE_TAS_FTQ_CTL); + cur_depth = (ctl & BCE_TAS_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_TAS_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT12); + BCE_PRINTF(" TAS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD_IND(sc, 0x105378); /* COM_COMXQ_FTQ_CMD */
- ctl = REG_RD_IND(sc, 0x10537c); /* COM_COMXQ_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT13);
- BCE_PRINTF(" COMX 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD_IND(sc, BCE_COM_COMXQ_FTQ_CMD); + ctl = REG_RD_IND(sc, BCE_COM_COMXQ_FTQ_CTL); + cur_depth = (ctl & BCE_COM_COMXQ_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_COM_COMXQ_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT13); + BCE_PRINTF(" COMX 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD_IND(sc, 0x1053b8); /* COM_COMTQ_FTQ_CMD */
- ctl = REG_RD_IND(sc, 0x1053bc); /* COM_COMTQ_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT14);
- BCE_PRINTF(" COMT 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD_IND(sc, BCE_COM_COMTQ_FTQ_CMD); + ctl = REG_RD_IND(sc, BCE_COM_COMTQ_FTQ_CTL); + cur_depth = (ctl & BCE_COM_COMTQ_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_COM_COMTQ_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT14); + BCE_PRINTF(" COMT 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD_IND(sc, 0x1053f8); /* COM_COMQ_FTQ_CMD */
- ctl = REG_RD_IND(sc, 0x1053fc); /* COM_COMQ_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT15);
- BCE_PRINTF(" COMX 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD_IND(sc, BCE_COM_COMQ_FTQ_CMD); + ctl = REG_RD_IND(sc, BCE_COM_COMQ_FTQ_CTL); + cur_depth = (ctl & BCE_COM_COMQ_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_COM_COMQ_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT15); + BCE_PRINTF(" COMX 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- /* Setup the generic statistic counters for the FTQ valid count. */
- REG_WR(sc, BCE_HC_STAT_GEN_SEL_0,
- ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CSQ_VALID_CNT << 16) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) |
- (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT)));
-
- cmd = REG_RD_IND(sc, 0x1453f8); /* MCP_MCPQ_FTQ_CMD */
- ctl = REG_RD_IND(sc, 0x1453fc); /* MCP_MCPQ_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT0);
- BCE_PRINTF(" MCP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + /* Setup the generic statistic counters for the FTQ valid count. */ + REG_WR(sc, BCE_HC_STAT_GEN_SEL_0, + ((BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CSQ_VALID_CNT << 16) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) | + (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT))); + + cmd = REG_RD_IND(sc, BCE_MCP_MCPQ_FTQ_CMD); + ctl = REG_RD_IND(sc, BCE_MCP_MCPQ_FTQ_CTL); + cur_depth = (ctl & BCE_MCP_MCPQ_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_MCP_MCPQ_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT0); + BCE_PRINTF(" MCP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD_IND(sc, 0x1853f8); /* CP_CPQ_FTQ_CMD */
- ctl = REG_RD_IND(sc, 0x1853fc); /* CP_CPQ_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT1);
- BCE_PRINTF(" CP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD_IND(sc, BCE_CP_CPQ_FTQ_CMD); + ctl = REG_RD_IND(sc, BCE_CP_CPQ_FTQ_CTL); + cur_depth = (ctl & BCE_CP_CPQ_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_CP_CPQ_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT1); + BCE_PRINTF(" CP 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
- cmd = REG_RD(sc, 0x43f8); /* CSCH_CH_FTQ_CMD */
- ctl = REG_RD(sc, 0x43fc); /* CSCH_CH_FTQ_CTL */
- cur_depth = (ctl & 0xFFC00000) >> 22;
- max_depth = (ctl & 0x003FF000) >> 12;
- valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT2);
- BCE_PRINTF(" CS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n",
+ + cmd = REG_RD(sc, BCE_CSCH_CH_FTQ_CMD); + ctl = REG_RD(sc, BCE_CSCH_CH_FTQ_CTL); + cur_depth = (ctl & BCE_CSCH_CH_FTQ_CTL_CUR_DEPTH) >> 22; + max_depth = (ctl & BCE_CSCH_CH_FTQ_CTL_MAX_DEPTH) >> 12; + valid_cnt = REG_RD(sc, BCE_HC_STAT_GEN_STAT2); + BCE_PRINTF(" CS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); -
+ BCE_PRINTF( "----------------------------" "----------------" @@ -7725,7 +7627,7 @@ bce_dump_pg_chain(struct bce_softc *sc, u16 pg_prod, int count) BCE_PRINTF("rx_bd per page = 0x%08X, usable rx_bd per page = 0x%08X\n", (u32) TOTAL_PG_BD_PER_PAGE, (u32) USABLE_PG_BD_PER_PAGE); - BCE_PRINTF("total rx_bd = 0x%08X, max_pg_bd = 0x%08X\n",
+ BCE_PRINTF("total rx_bd = 0x%08X, max_pg_bd = 0x%08X\n", (u32) TOTAL_PG_BD, (u32) MAX_PG_BD); BCE_PRINTF( @@ -7735,7 +7637,7 @@ bce_dump_pg_chain(struct bce_softc *sc, u16 pg_prod, int count) /* Now print out the rx_bd's themselves. */ for (int i = 0; i < count; i++) { - pgbd = &sc->pg_bd_chain[PG_PAGE(pg_prod)][PG_IDX(pg_prod)];
+ pgbd = &sc->pg_bd_chain[PG_PAGE(pg_prod)][PG_IDX(pg_prod)]; bce_dump_pgbd(sc, pg_prod, pgbd); pg_prod = PG_CHAIN_IDX(pg_prod + 1); } @@ -8361,10 +8263,10 @@ bce_dump_hw_state(struct bce_softc *sc) " Register Dump " "----------------------------\n"); - for (int i = 0x400; i < 0x8000; i += 0x10) {
+ for (int i = 0x400; i < 0x8000; i += 0x10) { BCE_PRINTF("0x%04X: 0x%08X 0x%08X 0x%08X 0x%08X\n", i, REG_RD(sc, i), REG_RD(sc, i + 0x4), - REG_RD(sc, i + 0x8), REG_RD(sc, i + 0xC));
+ REG_RD(sc, i + 0x8), REG_RD(sc, i + 0xC)); } BCE_PRINTF( @@ -8563,9 +8465,9 @@ static void bce_breakpoint(struct bce_softc *sc) { - /*
- * Unreachable code to silence compiler warnings
- * about unused functions.
+ /* + * Unreachable code to silence compiler warnings + * about unused functions. */ if (0) { bce_freeze_controller(sc); @@ -8594,7 +8496,7 @@ bce_breakpoint(struct bce_softc *sc) bce_dump_status_block(sc); bce_dump_driver_state(sc); -
+ /* Call the debugger. */ breakpoint(); diff --git a/sys/dev/bce/if_bcefw.h b/sys/dev/bce/if_bcefw.h index 33d0565..5218b68 100644 --- a/sys/dev/bce/if_bcefw.h +++ b/sys/dev/bce/if_bcefw.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2007 Broadcom Corporation + * Copyright (c) 2006-2008 Broadcom Corporation * David Christensen <davidch@broadcom.com>. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ /* * This file contains firmware data derived from proprietary unpublished - * source code, Copyright (c) 2004, 2005, 2007 Broadcom Corporation. + * source code, Copyright (c) 2004, 2005, 2007, 2008 Broadcom Corporation. * * Permission is hereby granted for the distribution of this firmware data * in hexadecimal or equivalent format, provided this copyright notice is @@ -1323,8 +1323,8 @@ u32 bce_COM_b06FwRodata[(0x14/4) + 1] = { 0x8000f44, 0x8000f78, 0x0 }; u32 bce_COM_b06FwBss[(0xbc/4) + 1] = { 0x0 }; u32 bce_COM_b06FwSbss[(0x38/4) + 1] = { 0x0 }; -u32 bce_COM_b06FwSdata[(0x0/4) + 1] = { 0x0 };
-
+u32 bce_COM_b06FwSdata[(0x0/4) + 1] = { 0x0 }; + int bce_RXP_b06FwReleaseMajor = 0x1; int bce_RXP_b06FwReleaseMinor = 0x0; int bce_RXP_b06FwReleaseFix = 0x0; @@ -3172,7 +3172,7 @@ u32 bce_RXP_b06FwRodata[(0x24/4) + 1] = { u32 bce_RXP_b06FwBss[(0x44c/4) + 1] = { 0x0 }; u32 bce_RXP_b06FwSbss[(0x58/4) + 1] = { 0x0 }; u32 bce_RXP_b06FwSdata[(0x0/4) + 1] = { 0x0 }; -
+ int bce_TPAT_b06FwReleaseMajor = 0x1; int bce_TPAT_b06FwReleaseMinor = 0x0; int bce_TPAT_b06FwReleaseFix = 0x0; @@ -3621,7 +3621,7 @@ u32 bce_TPAT_b06FwRodata[(0x0/4) + 1] = { 0x0 }; u32 bce_TPAT_b06FwBss[(0x450/4) + 1] = { 0x0 }; u32 bce_TPAT_b06FwSbss[(0x44/4) + 1] = { 0x0 }; u32 bce_TPAT_b06FwSdata[(0x0/4) + 1] = { 0x0 }; -
+ int bce_TXP_b06FwReleaseMajor = 0x1; int bce_TXP_b06FwReleaseMinor = 0x0; int bce_TXP_b06FwReleaseFix = 0x0; @@ -4584,7 +4584,7 @@ u32 bce_TXP_b06FwRodata[(0x0/4) + 1] = { 0x0 }; u32 bce_TXP_b06FwBss[(0x14c/4) + 1] = { 0x0 }; u32 bce_TXP_b06FwSbss[(0x68/4) + 1] = { 0x0 }; u32 bce_TXP_b06FwSdata[(0x0/4) + 1] = { 0x0 }; -
+ int bce_CP_b06FwReleaseMajor = 0x1; int bce_CP_b06FwReleaseMinor = 0x0; int bce_CP_b06FwReleaseFix = 0x0; @@ -6061,980 +6061,980 @@ u32 bce_CP_b06FwRodata[(0x130/4) + 1] = { u32 bce_CP_b06FwBss[(0x5d8/4) + 1] = { 0x0 }; u32 bce_CP_b06FwSbss[(0xe9/4) + 1] = { 0x0 }; u32 bce_CP_b06FwSdata[(0x0/4) + 1] = { 0x0 }; -
-u32 bce_rv2p_proc1[] = {
- 0x00000010, 0xb1800002,
- 0x0000001f, 0x01020400,
- 0x00000008, 0xac000001,
- 0x0000000c, 0x2f800001,
- 0x00000000, 0x2b000000,
- 0x00000000, 0x2b800000,
- 0x00000010, 0x203f0059,
- 0x00000010, 0x213f0003,
- 0x00000010, 0x20bf002b,
- 0x00000018, 0x8000fffd,
- 0x00000010, 0xb1b8b011,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x03d80000,
- 0x00000000, 0x2c380000,
- 0x00000008, 0x2c800000,
- 0x00000008, 0x2d000000,
- 0x00000010, 0x91d40000,
- 0x00000008, 0x2d80011c,
- 0x00000008, 0x02000001,
- 0x00000010, 0x91de0000,
- 0x0000000f, 0x42e0001c,
- 0x00000010, 0x91840a11,
- 0x00000010, 0x08660010,
- 0x0000000c, 0x1f800002,
- 0x00000000, 0x2adf0000,
- 0x00000008, 0x2a00000f,
- 0x00000018, 0x8000ffec,
- 0x00000008, 0x02000001,
- 0x0000000f, 0x42e0001c,
- 0x00000010, 0x91840a0e,
- 0x00000008, 0x2c800006,
- 0x00000008, 0x2d000006,
- 0x00000010, 0x91d40000,
- 0x00000008, 0x2d800106,
- 0x00000000, 0x00000000,
- 0x00000010, 0x91de0000,
- 0x00000010, 0x08660007,
- 0x00000018, 0x8000fff2,
- 0x0000000b, 0x2fdf0002,
- 0x0000000c, 0x1f800002,
- 0x00000000, 0x2c070000,
- 0x00000010, 0x91de0000,
- 0x00000018, 0x8000ffdc,
- 0x0000000c, 0x1f800002,
- 0x00000000, 0x00000000,
- 0x00000018, 0x8000ffd9,
- 0x0000000c, 0x29800002,
- 0x0000000c, 0x1f800002,
- 0x00000000, 0x2adf0000,
- 0x00000008, 0x2a000005,
- 0x00000018, 0x8000ffd4,
- 0x00000008, 0x02240034,
- 0x00000018, 0x00040000,
- 0x00000018, 0x8000001b,
- 0x00000018, 0x8000001d,
- 0x00000018, 0x80000048,
- 0x00000018, 0x8000007c,
- 0x00000018, 0x8000007b,
- 0x00000018, 0x80000015,
- 0x00000018, 0x80000014,
- 0x00000018, 0x80000013,
- 0x00000018, 0x80000012,
- 0x00000018, 0x800000b0,
- 0x00000018, 0x80000010,
- 0x00000018, 0x8000000f,
- 0x00000018, 0x8000000e,
- 0x00000018, 0x800000ac,
- 0x00000018, 0x8000000c,
- 0x00000018, 0x8000000b,
- 0x00000018, 0x80000013,
- 0x00000018, 0x80000018,
- 0x00000018, 0x80000008,
- 0x00000018, 0x80000087,
- 0x00000018, 0x80000030,
- 0x00000018, 0x800000a9,
- 0x00000018, 0x800000d2,
- 0x00000018, 0x800000a2,
- 0x00000018, 0x800000f3,
- 0x00000018, 0x80000031,
- 0x00000018, 0x80000000,
- 0x0000000c, 0x1f800001,
- 0x00000000, 0x00000000,
- 0x00000018, 0x8000ffb4,
- 0x00000010, 0x91d40000,
- 0x0000000c, 0x29800001,
- 0x0000000c, 0x1f800001,
- 0x00000008, 0x2a000002,
- 0x00000018, 0x8000ffaf,
- 0x00000010, 0x91d40000,
- 0x0000000c, 0x29800001,
- 0x0000000c, 0x1f800001,
- 0x00000000, 0x29420000,
- 0x00000008, 0x2a000002,
- 0x00000018, 0x8000ffa9,
- 0x00000018, 0x8000ffa8,
- 0x00000010, 0xb1bcb010,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x03d80000,
- 0x00000000, 0x2c3c0000,
- 0x00000008, 0x2c8000b0,
- 0x00000008, 0x2d000008,
- 0x00000010, 0x91d40000,
- 0x00000008, 0x2d800150,
- 0x00000000, 0x00000000,
- 0x00000010, 0x205f0000,
- 0x00000008, 0x2c800000,
- 0x00000008, 0x2d000000,
- 0x00000008, 0x2d800108,
- 0x00000010, 0x91de0000,
- 0x00000010, 0x2c6201b9,
- 0x00000018, 0x80000005,
- 0x00000008, 0x2c8000b0,
- 0x00000008, 0x2d000008,
- 0x00000010, 0x91d40000,
- 0x00000008, 0x2d800108,
- 0x0000000c, 0x29800000,
- 0x0000000c, 0x1f800000,
- 0x00000010, 0x91de0000,
- 0x00000000, 0x2adf0000,
- 0x00000008, 0x2a000006,
- 0x00000018, 0x8000ff8e,
- 0x00000010, 0x91d40000,
- 0x0000000c, 0x29800001,
- 0x0000000c, 0x1f800001,
- 0x00000008, 0x2a00000b,
- 0x00000018, 0x8000ff89,
- 0x00000018, 0x00020000,
- 0x00000010, 0xb1a0b011,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x2c200000,
- 0x00000008, 0x2c800000,
- 0x00000008, 0x2d000000,
- 0x00000010, 0x91d40000,
- 0x00000008, 0x2d80011c,
- 0x00000010, 0x001f0000,
- 0x00000010, 0x91de0000,
- 0x0000000f, 0x47600008,
- 0x0000000f, 0x060e0001,
- 0x00000000, 0x0f580000,
- 0x00000000, 0x0a640000,
- 0x00000000, 0x0ae50000,
- 0x00000009, 0x0b66ffff,
- 0x00000000, 0x0d610000,
- 0x00000018, 0x80000013,
- 0x0000000f, 0x47600008,
- 0x0000000b, 0x2fdf0002,
- 0x00000008, 0x2c800000,
- 0x00000008, 0x2d000000,
- 0x00000010, 0x91d40000,
- 0x00000008, 0x2d80011c,
- 0x0000000f, 0x060e0001,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x0f580000,
- 0x00000010, 0x91de0000,
- 0x00000000, 0x0a640000,
- 0x00000000, 0x0ae50000,
- 0x00000009, 0x0b66ffff,
- 0x00000000, 0x0d610000,
- 0x00000000, 0x02620000,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x309a0000,
- 0x00000000, 0x31040000,
- 0x00000000, 0x0c961800,
- 0x00000009, 0x0c99ffff,
- 0x00000004, 0xcc993400,
- 0x00000010, 0xb1963202,
- 0x00000008, 0x0f800000,
- 0x0000000c, 0x29800001,
- 0x00000010, 0x00220002,
- 0x0000000c, 0x29520001,
- 0x0000000c, 0x29520000,
- 0x00000008, 0x0200000e,
- 0x00000008, 0x0280001a,
- 0x00000010, 0xb1c40a02,
- 0x00000008, 0x02000003,
- 0x00000008, 0x22000001,
- 0x0000000c, 0x1f800001,
- 0x00000000, 0x2adf0000,
- 0x00000000, 0x2a000800,
- 0x00000018, 0x8000ff53,
- 0x00000008, 0x2c8000b0,
- 0x00000008, 0x2d000008,
- 0x00000010, 0x91a0b008,
- 0x00000010, 0x91d40000,
- 0x0000000c, 0x31620018,
- 0x00000008, 0x2d800001,
- 0x00000000, 0x00000000,
- 0x00000010, 0x91de0000,
- 0x00000008, 0xac000001,
- 0x00000018, 0x8000000e,
- 0x00000000, 0x0380b000,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x2c004000,
- 0x00000010, 0x91d40000,
- 0x00000008, 0x2d800101,
- 0x00000000, 0x00000000,
- 0x00000010, 0x91de0000,
- 0x0000000c, 0x31620018,
- 0x00000008, 0x2d800001,
- 0x00000000, 0x00000000,
- 0x00000010, 0x91de0000,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x2c000e00,
- 0x0000000c, 0x29800001,
- 0x0000000c, 0x1f800001,
- 0x00000008, 0x2a000007,
- 0x00000018, 0x8000ff38,
- 0x00000010, 0xb1a0b015,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x03d80000,
- 0x00000000, 0x2c200000,
- 0x00000008, 0x2c8000b0,
- 0x00000008, 0x2d000008,
- 0x00000010, 0x91d40000,
- 0x00000008, 0x2d800150,
- 0x00000000, 0x00000000,
- 0x00000010, 0x205f0000,
- 0x00000008, 0x2c800000,
- 0x00000008, 0x2d000000,
- 0x00000008, 0x2d800108,
- 0x00000010, 0x91de0000,
- 0x00000010, 0x2c620002,
- 0x00000018, 0x8000000a,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x2c070000,
- 0x0000000c, 0x1f800001,
- 0x00000010, 0x91de0000,
- 0x00000018, 0x8000ff23,
- 0x00000008, 0x2c8000b0,
- 0x00000008, 0x2d000008,
- 0x00000010, 0x91d40000,
- 0x00000008, 0x2d800108,
- 0x0000000c, 0x29800001,
- 0x0000000c, 0x1f800001,
- 0x00000010, 0x91de0000,
- 0x00000000, 0x2adf0000,
- 0x00000008, 0x2a00000a,
- 0x00000018, 0x8000ff19,
- 0x00000010, 0x91d40000,
- 0x0000000c, 0x29800001,
- 0x0000000c, 0x1f800001,
- 0x00000008, 0x2a000009,
- 0x00000018, 0x8000ff14,
- 0x00000010, 0x91d40000,
- 0x00000010, 0x91a03c02,
- 0x00000010, 0xb1e66207,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x2c310000,
- 0x00000009, 0x2cb1007f,
- 0x00000008, 0x2cd90000,
- 0x00000008, 0x2d000000,
- 0x00000008, 0x2d80010d,
- 0x00000010, 0xb1a80007,
- 0x00000010, 0x205f0000,
- 0x00000000, 0x2c200000,
- 0x00000000, 0x2ca70000,
- 0x00000008, 0x2d000010,
- 0x00000008, 0x2d800108,
- 0x00000000, 0x00000000,
- 0x00000010, 0x91de0000,
- 0x00000010, 0xb1a60010,
- 0x00000010, 0x001f0000,
- 0x0000000f, 0x0f300007,
- 0x00000000, 0x0a600000,
- 0x00000000, 0x0ae10000,
- 0x0000000f, 0x4b620008,
- 0x00000009, 0x0b1600ff,
- 0x00000000, 0x0d620000,
- 0x00000009, 0x0d1a00ff,
- 0x00000010, 0x07300003,
- 0x0000000c, 0x0d1a0008,
- 0x0000000c, 0x0b160008,
- 0x0000000f, 0x4ce30018,
- 0x00000000, 0x0c992c00,
- 0x00000004, 0xcc993400,
- 0x00000008, 0x0f800000,
- 0x0000000c, 0x29800001,
- 0x00000000, 0x33310000,
- 0x00000008, 0x22000016,
- 0x00000000, 0x2adf0000,
- 0x00000008, 0x2a00000c,
- 0x00000010, 0x009f0000,
- 0x00000000, 0x0f200000,
- 0x0000000c, 0x1f800001,
- 0x00000018, 0x8000feea,
- 0x0000000f, 0x47220008,
- 0x00000009, 0x070e000f,
- 0x00000008, 0x070e0008,
- 0x00000008, 0x02800001,
- 0x00000007, 0x02851c00,
- 0x00000008, 0x82850001,
- 0x00000000, 0x02854c00,
- 0x00000007, 0x42851c00,
- 0x00000003, 0xc3aa5200,
- 0x00000000, 0x03b10e00,
- 0x00000007, 0x4b071c00,
- 0x0000000f, 0x0f300007,
- 0x0000000f, 0x0a960003,
- 0x00000000, 0x0a955c00,
- 0x00000000, 0x4a005a00,
- 0x00000000, 0x0c960a00,
- 0x00000009, 0x0c99ffff,
- 0x00000008, 0x0d00ffff,
- 0x00000010, 0xb1963202,
- 0x00000008, 0x0f800005,
- 0x00000010, 0xb1a80009,
- 0x00000010, 0x205f0000,
- 0x0000000b, 0x2fdf0002,
- 0x00000000, 0x2c200000,
- 0x00000000, 0x2ca70000,
- 0x00000008, 0x2d000010,
- 0x00000008, 0x2d800108,
- 0x00000000, 0x00000000,
- 0x00000010, 0x91de0000,
- 0x0000000c, 0x29800001,
- 0x00000010, 0x001f0000,
- 0x0000000c, 0x1f800001,
- 0x00000000, 0x2adf0000,
- 0x00000008, 0x2a00000d,
- 0x00000018, 0x8000fec7,
- 0x00000010, 0x91d40000,
- 0x0000000c, 0x29800001,
- 0x0000000c, 0x1f800001,
- 0x00000008, 0x2a000007,
- 0x00000018, 0x8000fec2,
- 0x00000008, 0x03050004,
- 0x00000006, 0x83040c00,
- 0x00000008, 0x02850200,
- 0x00000000, 0x86050c00,
- 0x00000001, 0x860c0e00,
- 0x00000008, 0x02040004,
- 0x00000000, 0x02041800,
- 0x00000000, 0x83871800,
- 0x00000018, 0x00020000
-};
-
-
-u32 bce_rv2p_proc2[] = {
- 0x00000010, 0xb1800004,
- 0x0000001f, 0x01020400,
- 0x00000008, 0x050000ff,
- 0x00000018, 0x00020000,
- 0x00000000, 0x2a000000,
- 0x00000010, 0xb1d40000,
- 0x00000008, 0x02540007,
- 0x00000018, 0x00040000,
- 0x00000018, 0x8000000f,
- 0x00000018, 0x8000000f,
- 0x00000018, 0x80000017,
- 0x00000018, 0x800000d0,
- 0x00000018, 0x800000e5,
- 0x00000018, 0x8000010d,
- 0x00000018, 0x800000cf,
- 0x00000018, 0x800001c9,
- 0x00000018, 0x800001c0,
- 0x00000018, 0x800000d2,
- 0x00000018, 0x8000000b,
- 0x00000018, 0x800001c5,
- 0x00000018, 0x80000218,
- 0x00000018, 0x80000044,
- 0x00000018, 0x800000b7,
- 0x00000018, 0x80000000,
- 0x0000000c, 0x29800001,
- 0x00000000, 0x2a000000,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x20530000,
- 0x00000018, 0x8000ffe9,
- 0x0000000c, 0x29800001,
- 0x00000000, 0x2a000000,
- 0x00000018, 0x8000ffe6,
- 0x00000018, 0x00020000,
- 0x0000000c, 0x29800001,
- 0x00000010, 0x91de0000,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x2f80aa00,
- 0x00000000, 0x2a000000,
- 0x00000000, 0x0d610000,
- 0x00000000, 0x03620000,
- 0x00000000, 0x2c400000,
- 0x00000000, 0x02638c00,
- 0x00000000, 0x26460000,
- 0x00000008, 0x02040012,
- 0x00000010, 0xb9060826,
- 0x00000000, 0x0f580000,
- 0x00000000, 0x0a640000,
- 0x00000000, 0x0ae50000,
- 0x00000009, 0x0b66ffff,
- 0x00000000, 0x0c000000,
- 0x00000000, 0x0b800000,
- 0x00000008, 0x0cc60012,
- 0x00000008, 0x0f800003,
- 0x00000000, 0x00000000,
- 0x00000010, 0x009f0000,
- 0x00000008, 0x27110012,
- 0x00000000, 0x66900000,
- 0x00000008, 0xa31b0012,
- 0x00000010, 0xb1980003,
- 0x00000010, 0x001f0000,
- 0x00000008, 0x0f800004,
- 0x00000008, 0x22000003,
- 0x00000008, 0x2c80000c,
- 0x00000008, 0x2d00000c,
- 0x00000010, 0x009f0000,
- 0x00000000, 0x25960000,
- 0x0000000c, 0x29800000,
- 0x00000000, 0x06660000,
- 0x00000000, 0x86611800,
- 0x00000009, 0x0260000f,
- 0x0000000f, 0x02040002,
- 0x00000010, 0xb60c0803,
- 0x0000000c, 0x1fbf0000,
- 0x0000000c, 0x33660010,
- 0x00000000, 0x32140000,
- 0x00000000, 0x32950000,
- 0x00000005, 0x73662c00,
- 0x00000000, 0x31e32e00,
- 0x00000008, 0x2d800010,
- 0x00000010, 0x20530000,
- 0x00000010, 0x91de0000,
- 0x00000018, 0x8000ffb4,
- 0x00000000, 0x23000000,
- 0x00000009, 0x25e6ffff,
- 0x00000008, 0x2200000b,
- 0x0000000c, 0x69520000,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x20530000,
- 0x00000018, 0x8000ffad,
- 0x0000000c, 0x29800001,
- 0x00000010, 0x91de0000,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x2f80aa00,
- 0x00000000, 0x2a000000,
- 0x00000008, 0x2c800040,
- 0x00000008, 0x2d000020,
- 0x00000008, 0x2d80011c,
- 0x00000000, 0x00000000,
- 0x00000010, 0x91de0000,
- 0x0000000f, 0x42ea0010,
- 0x00000010, 0x004f0004,
- 0x00000010, 0xb7469200,
- 0x00000008, 0x02490012,
- 0x00000010, 0xb5840a00,
- 0x00000000, 0x0d610000,
- 0x00000010, 0xba66345a,
- 0x00000000, 0x03620000,
- 0x00000010, 0xb8630c58,
- 0x00000008, 0x83050012,
- 0x00000010, 0x004f0002,
- 0x00000000, 0x03490000,
- 0x00000001, 0x83068c00,
- 0x00000000, 0x83c60c00,
- 0x00000010, 0xb1870010,
- 0x00000000, 0x0b6e0000,
- 0x00000018, 0x8000ff8f,
- 0x00000001, 0x06691400,
- 0x00000010, 0x918c0002,
- 0x00000008, 0xb4e90001,
- 0x00000010, 0xb1e92c4c,
- 0x00000000, 0x86692c00,
- 0x00000000, 0x02000000,
- 0x00000009, 0x02eaffff,
- 0x00000010, 0x000c0002,
- 0x00000000, 0x02040a00,
- 0x0000000f, 0x460c0001,
- 0x0000000f, 0x02850001,
- 0x00000010, 0x918c01fc,
- 0x00000010, 0xb7040e43,
- 0x00000000, 0x2c400000,
- 0x00000000, 0x0f580000,
- 0x00000000, 0x0d610000,
- 0x00000000, 0x0a640000,
- 0x00000000, 0x0ae50000,
- 0x00000009, 0x0b66ffff,
- 0x00000000, 0x0c000000,
- 0x00000000, 0x0b800000,
- 0x00000008, 0x0c860012,
- 0x00000008, 0x0f800003,
- 0x0000000c, 0x29520000,
- 0x00000010, 0x009f0000,
- 0x00000008, 0x27110012,
- 0x00000000, 0x66900000,
- 0x00000000, 0x26460000,
- 0x00000000, 0x23060000,
- 0x00000010, 0xb1980005,
- 0x00000010, 0x001f0000,
- 0x00000008, 0x0f800004,
- 0x00000000, 0x00000000,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x32140000,
- 0x00000000, 0x32950000,
- 0x00000000, 0x31e32e00,
- 0x00000005, 0x73662c00,
- 0x00000000, 0x25960000,
- 0x00000010, 0xb1870016,
- 0x0000000c, 0x29800000,
- 0x0000000f, 0x0f6b0007,
- 0x00000000, 0x0d690000,
- 0x00000000, 0x0a6c0000,
- 0x00000000, 0x0aed0000,
- 0x00000000, 0x0b6e0000,
- 0x00000000, 0x0b800000,
- 0x00000000, 0x0c870000,
- 0x0000000c, 0x69520001,
- 0x00000008, 0x0f800003,
- 0x00000010, 0x20530000,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x22c58c00,
- 0x00000000, 0x231b0000,
- 0x00000000, 0x27110000,
- 0x00000000, 0x26900000,
- 0x00000010, 0xb8170e03,
- 0x0000000c, 0x29800000,
- 0x00000018, 0x8000fff7,
- 0x00000010, 0xb1980002,
- 0x00000008, 0x0f800004,
- 0x00000008, 0x2200001a,
- 0x00000008, 0x2c80000c,
- 0x00000008, 0x2d00000c,
- 0x00000008, 0x2d800010,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x0d6e0000,
- 0x00000003, 0xe7cf3400,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x91de0000,
- 0x00000010, 0xb1870007,
- 0x00000000, 0x36140000,
- 0x00000000, 0x36950000,
- 0x00000000, 0x37160000,
- 0x00000008, 0x2c800050,
- 0x00000008, 0x2d000030,
- 0x00000008, 0x2d80000c,
- 0x00000010, 0x20530000,
- 0x00000018, 0x8000ff43,
- 0x00000000, 0x26460000,
- 0x00000000, 0x23000000,
- 0x00000009, 0x25e6ffff,
- 0x00000000, 0x0b6e0000,
- 0x00000003, 0xe7cf2c00,
- 0x00000008, 0x2200001b,
- 0x0000000c, 0x69520000,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x20530000,
- 0x00000018, 0x8000ff39,
- 0x00000000, 0x2fd50000,
- 0x00000000, 0x2a000000,
- 0x00000010, 0x003f000b,
- 0x00000000, 0x06660000,
- 0x00000000, 0x86611800,
- 0x00000009, 0x026000f0,
- 0x00000010, 0xb70c0807,
- 0x0000000c, 0x73660010,
- 0x00000008, 0x2c800018,
- 0x00000008, 0x2d000018,
- 0x00000008, 0x2d800002,
- 0x0000000c, 0x5fbf0000,
- 0x00000010, 0x91de0000,
- 0x00000018, 0x8000ff2b,
- 0x0000000c, 0x29800001,
- 0x00000018, 0x8000ff29,
- 0x0000000c, 0x29800001,
- 0x00000000, 0x2a000000,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x0f008000,
- 0x00000008, 0x0f800007,
- 0x00000018, 0x800000f3,
- 0x0000000c, 0x29800001,
- 0x00000010, 0x91de0000,
- 0x00000000, 0x2fd50000,
- 0x00000000, 0x2a000000,
- 0x00000009, 0x0261ffff,
- 0x0000000d, 0x70e10001,
- 0x00000018, 0x800000d8,
- 0x00000000, 0x2c400000,
- 0x00000008, 0x2c8000c4,
- 0x00000008, 0x2d00001c,
- 0x00000008, 0x2d800001,
- 0x00000005, 0x70e10800,
- 0x00000010, 0x91de0000,
- 0x00000018, 0x8000ff15,
- 0x0000000c, 0x29800001,
- 0x00000010, 0x91de0000,
- 0x00000000, 0x2fd50000,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x02700000,
- 0x00000000, 0x0d620000,
- 0x00000000, 0xbb630800,
- 0x00000000, 0x2a000000,
- 0x00000000, 0x0f400000,
- 0x00000000, 0x2c400000,
- 0x0000000c, 0x73e7001b,
- 0x00000010, 0x0ce7000e,
- 0x00000000, 0x286d0000,
- 0x0000000f, 0x65ed0010,
- 0x00000009, 0x266dffff,
- 0x00000018, 0x80000034,
- 0x00000008, 0x02000004,
- 0x00000010, 0x91c40803,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x20530000,
- 0x00000018, 0x800000bc,
- 0x00000008, 0x2c8000b8,
- 0x00000008, 0x2d000010,
- 0x00000008, 0x2d800048,
- 0x00000018, 0x80000005,
- 0x00000008, 0x2c8000c4,
- 0x00000008, 0x2d00001c,
- 0x00000008, 0x2d800001,
- 0x00000000, 0x00000000,
- 0x00000010, 0x205f0000,
- 0x00000008, 0x2c800048,
- 0x00000008, 0x2d000068,
- 0x00000008, 0x2d800104,
- 0x00000000, 0x00000000,
- 0x00000010, 0x91de0000,
- 0x00000000, 0x27f60000,
- 0x00000010, 0xb87a9e04,
- 0x00000008, 0x2200000d,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x20530000,
- 0x00000018, 0x8000feec,
- 0x0000000c, 0x29800001,
- 0x00000010, 0x91de0000,
- 0x00000000, 0x2fd50000,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x02700000,
- 0x00000000, 0x0d620000,
- 0x00000000, 0xbb630800,
- 0x00000000, 0x2a000000,
- 0x00000010, 0x0e670011,
- 0x00000000, 0x286d0000,
- 0x0000000f, 0x65ed0010,
- 0x00000009, 0x266dffff,
- 0x00000004, 0xb8f1a000,
- 0x00000000, 0x0f400000,
- 0x0000000c, 0x73e7001c,
- 0x00000018, 0x8000000b,
- 0x00000008, 0x02000004,
- 0x00000010, 0x91c40802,
- 0x0000000c, 0x29800000,
- 0x00000000, 0x2c1e0000,
- 0x00000008, 0x2c8000b8,
- 0x00000008, 0x2d000010,
- 0x00000008, 0x2d800048,
- 0x00000010, 0x20530000,
- 0x00000010, 0x91de0000,
- 0x00000018, 0x8000fed2,
- 0x00000000, 0x06820000,
- 0x00000010, 0x001f0000,
- 0x00000010, 0x0ce70030,
- 0x00000000, 0x03720000,
- 0x00000000, 0x0cf60000,
- 0x00000003, 0x8ced3200,
- 0x00000000, 0xa8190c00,
- 0x00000010, 0xb872322b,
- 0x00000000, 0x03ca0000,
- 0x0000000f, 0x65680010,
- 0x00000000, 0x0bcf0000,
- 0x00000000, 0x27f20000,
- 0x00000000, 0x08510000,
- 0x00000000, 0x28ed0000,
- 0x00000004, 0xb9723200,
- 0x00000000, 0x03720000,
- 0x00000003, 0xbbf60c00,
- 0x00000000, 0x03440000,
- 0x00000008, 0x22000010,
- 0x00000010, 0xb7ef3204,
- 0x0000000c, 0x21420004,
- 0x0000000c, 0x73e70019,
- 0x00000000, 0x3bf60000,
- 0x00000000, 0x07520000,
- 0x00000000, 0x29000000,
- 0x0000000c, 0x29800000,
- 0x00000000, 0x00000000,
- 0x00000010, 0x20530000,
- 0x00000000, 0x22060000,
- 0x0000000c, 0x61420004,
- 0x00000000, 0x25070000,
- 0x00000000, 0x27970000,
- 0x00000000, 0x28940000,
- 0x00000000, 0x290e0000,
- 0x00000010, 0x0ce70010,
- 0x00000010, 0xb873320f,
- 0x0000000f, 0x436c0010,
- 0x00000000, 0x03f30c00,
- 0x00000000, 0x03f30000,
- 0x00000000, 0x83990e00,
- 0x00000001, 0x83860e00,
- 0x00000000, 0x83060e00,
- 0x00000003, 0xf66c0c00,
- 0x00000000, 0x39f30e00,
- 0x00000000, 0x3af50e00,
- 0x00000000, 0x7a740000,
- 0x0000000f, 0x43680010,
- 0x00000001, 0x83860e00,
- 0x00000000, 0x83060e00,
- 0x00000003, 0xf4680c00,
- 0x00000000, 0x286d0000,
- 0x00000010, 0xb1e9a059,
- 0x00000000, 0x03690000,
- 0x00000010, 0xb1f60c57,
- 0x00000000, 0x0a6a0000,
- 0x00000000, 0x0aeb0000,
- 0x00000009, 0x0b6cffff,
- 0x00000000, 0x0c000000,
- 0x00000000, 0x0be90000,
- 0x00000003, 0x8cf6a000,
- 0x0000000c, 0x09800002,
- 0x00000010, 0x009f0000,
- 0x00000010, 0xb8173209,
- 0x00000000, 0x35140000,
- 0x00000000, 0x35950000,
- 0x00000005, 0x766c2c00,
- 0x00000000, 0x34970000,
- 0x00000004, 0xb8f12e00,
- 0x00000010, 0x001f0000,
- 0x00000008, 0x0f800004,
- 0x00000018, 0x8000fff7,
- 0x00000000, 0x03e90000,
- 0x00000010, 0xb8f6a01b,
- 0x00000010, 0x2013001a,
- 0x00000010, 0xb1f10e19,
- 0x00000000, 0x83973200,
- 0x00000000, 0x38700e00,
- 0x00000000, 0xbb760e00,
- 0x00000000, 0x3bf60000,
- 0x00000000, 0x37d00000,
- 0x0000000c, 0x73e7001a,
- 0x00000003, 0xb8f1a000,
- 0x00000000, 0x32140000,
- 0x00000000, 0x32950000,
- 0x00000005, 0x73e72c00,
- 0x00000000, 0x33190000,
- 0x00000005, 0x74680000,
- 0x00000010, 0x0ce7000d,
- 0x00000008, 0x22000009,
- 0x00000000, 0x07520000,
- 0x00000000, 0x29000000,
- 0x0000000c, 0x73e70019,
- 0x0000000f, 0x65680010,
- 0x0000000c, 0x21420004,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x20530000,
- 0x0000000c, 0x61420004,
- 0x00000000, 0x290e0000,
- 0x00000018, 0x80000002,
- 0x00000010, 0x91973206,
- 0x00000000, 0x35140000,
- 0x00000000, 0x35950000,
- 0x00000005, 0x766c2c00,
- 0x00000000, 0x34990000,
- 0x00000004, 0xb8f13200,
- 0x00000000, 0x83690c00,
- 0x00000010, 0xb1860015,
- 0x00000000, 0x28e90000,
- 0x00000008, 0x22000004,
- 0x00000009, 0x2470ffff,
- 0x0000000f, 0x65700010,
- 0x00000000, 0x23ec0000,
- 0x00000000, 0x03690000,
- 0x00000010, 0xb8660c07,
- 0x00000009, 0x036cffff,
- 0x00000000, 0x326a0000,
- 0x00000000, 0x32eb0000,
- 0x00000005, 0x73e70c00,
- 0x00000000, 0x33690000,
- 0x00000005, 0x74680000,
- 0x0000000c, 0x73e7001c,
- 0x00000000, 0x03690000,
- 0x00000010, 0xb1f60c12,
- 0x00000010, 0xb1d00c11,
- 0x0000000c, 0x21420005,
- 0x0000000c, 0x33e7001c,
- 0x00000018, 0x8000000e,
- 0x00000010, 0x2e67000d,
- 0x00000000, 0x03690000,
- 0x00000010, 0xb1f60c0b,
- 0x00000010, 0xb1d00c0a,
- 0x00000000, 0x03440000,
- 0x00000008, 0x2200000c,
- 0x00000000, 0x07520000,
- 0x00000000, 0x29000000,
- 0x0000000c, 0x29800000,
- 0x0000000c, 0x33e7001c,
- 0x00000010, 0x20530000,
- 0x00000000, 0x22060000,
- 0x00000000, 0x290e0000,
- 0x00000018, 0x000d0000,
- 0x00000000, 0x06820000,
- 0x00000010, 0x2de7000d,
- 0x00000010, 0x0ce7000c,
- 0x00000000, 0x27f20000,
- 0x00000010, 0xb96d9e0a,
- 0x00000000, 0xa86d9e00,
- 0x00000009, 0x0361ffff,
- 0x00000010, 0xb7500c07,
- 0x00000008, 0x2200000f,
- 0x0000000f, 0x65680010,
- 0x00000000, 0x29000000,
- 0x0000000c, 0x29800000,
- 0x0000000c, 0x33e7001b,
- 0x00000010, 0x20530000,
- 0x00000018, 0x000d0000,
- 0x0000000c, 0x29800001,
- 0x00000000, 0x2a000000,
- 0x00000010, 0x001f0000,
- 0x0000000f, 0x0f470007,
- 0x00000008, 0x0f800008,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x20530000,
- 0x00000018, 0x8000fe2e,
- 0x0000000c, 0x29800001,
- 0x00000010, 0x91de0000,
- 0x00000000, 0x2fd50000,
- 0x00000010, 0x001f0000,
- 0x00000000, 0x33510000,
- 0x00000000, 0x2a000000,
- 0x00000010, 0xb1c60023,
- 0x0000000f, 0x0f500007,
- 0x00000000, 0x0a600000,
- 0x00000000, 0x0ae10000,
- 0x0000000f, 0x4b620008,
- 0x00000009, 0x0b1600ff,
- 0x0000000f, 0x4c620010,
- 0x00000000, 0x0d620000,
- 0x00000009, 0x0d1a00ff,
- 0x00000010, 0x07500003,
- 0x0000000c, 0x0d1a0008,
- 0x0000000c, 0x0b160008,
- 0x00000000, 0x0cc60000,
- 0x00000000, 0x0b800000,
- 0x00000000, 0x06980000,
- 0x00000008, 0x0f800003,
- 0x00000010, 0x06c20004,
- 0x0000000c, 0x29000002,
- 0x00000010, 0x26420002,
- 0x0000000c, 0x29520003,
- 0x00000008, 0x22000001,
- 0x00000010, 0x009f0000,
- 0x00000000, 0x231b0000,
- 0x00000000, 0x27111a00,
- 0x00000000, 0x66900000,
- 0x0000000c, 0x29520000,
- 0x00000010, 0xb1973209,
- 0x0000000c, 0x29800000,
- 0x00000000, 0x06980000,
- 0x00000010, 0x20530000,
- 0x0000000c, 0x29520003,
- 0x00000000, 0x22c58c00,
- 0x00000010, 0x001f0000,
- 0x00000008, 0x0f800003,
- 0x00000018, 0x8000fff3,
- 0x00000010, 0xb1c80013,
- 0x00000010, 0xb1c60003,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x20530000,
- 0x0000000c, 0x29520000,
- 0x0000000c, 0x29520003,
- 0x00000010, 0x06c20002,
- 0x0000000c, 0x29520002,
- 0x00000000, 0x22c58c00,
- 0x00000000, 0x27650000,
- 0x00000000, 0x26e40000,
- 0x00000008, 0x22000016,
- 0x00000010, 0xb1c60003,
- 0x00000000, 0x23480000,
- 0x00000010, 0xb1800005,
- 0x00000000, 0x23480000,
- 0x0000000c, 0x29800000,
- 0x0000000f, 0x0f500007,
- 0x00000018, 0x80000012,
- 0x00000008, 0x22000016,
- 0x0000000c, 0x29800000,
- 0x00000000, 0x30140000,
- 0x00000000, 0x30950000,
- 0x00000010, 0x07500003,
- 0x00000009, 0x0b1600ff,
- 0x00000009, 0x0d1a00ff,
- 0x0000000f, 0x31160008,
- 0x00000000, 0x31623400,
- 0x00000003, 0xf1623000,
- 0x00000010, 0x205f0000,
- 0x00000000, 0x2c510000,
- 0x00000009, 0x2cd1007f,
- 0x00000008, 0x2cd90000,
- 0x00000008, 0x2d000000,
- 0x00000008, 0x2d80000c,
- 0x00000000, 0x00000000,
- 0x00000010, 0x91de0000,
- 0x00000010, 0x05c20004,
- 0x00000000, 0x33000000,
- 0x00000008, 0x0f800007,
- 0x00000010, 0x009f0000,
- 0x00000010, 0x20530000,
- 0x00000018, 0x8000fdda,
- 0x0000000c, 0x29800001,
- 0x00000000, 0x2fd50000,
- 0x00000000, 0x2a000000,
- 0x0000000f, 0x0f500007,
- 0x00000010, 0xb1c6002c,
- 0x0000000f, 0x47420008,
- 0x00000009, 0x070e000f,
- 0x00000008, 0x070e0008,
- 0x00000010, 0x001f0000,
- 0x00000008, 0x09000001,
- 0x00000007, 0x09121c00,
- 0x00000003, 0xcbca9200,
- 0x00000000, 0x0b97a200,
- 0x00000007, 0x4b171c00,
- 0x0000000f, 0x0a960003,
- 0x00000000, 0x0a959c00,
- 0x00000000, 0x4a009a00,
- 0x00000008, 0x82120001,
- 0x00000001, 0x0c170800,
- 0x00000000, 0x02180000,
- 0x00000000, 0x0c978c00,
- 0x00000008, 0x0d00ffff,
- 0x00000008, 0x0f800006,
- 0x0000000c, 0x29000000,
- 0x00000010, 0x06c20004,
- 0x0000000c, 0x29520002,
- 0x00000010, 0x26420002,
- 0x0000000c, 0x29520003,
- 0x00000008, 0x22000001,
- 0x00000010, 0x009f0000,
- 0x00000010, 0xb197320c,
- 0x00000000, 0x231b0000,
- 0x00000000, 0x27110800,
- 0x00000000, 0x66900000,
- 0x0000000c, 0x29800000,
- 0x00000000, 0x02180000,
- 0x00000010, 0x20530000,
- 0x0000000c, 0x29520003,
- 0x00000000, 0x22c53600,
- 0x00000010, 0x001f0000,
- 0x00000008, 0x0f800006,
- 0x00000018, 0x8000fff4,
- 0x00000000, 0x231b0000,
- 0x00000000, 0x27110800,
- 0x00000000, 0x66900000,
- 0x00000010, 0xb1c8000b,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x20530000,
- 0x0000000c, 0x29520000,
- 0x0000000c, 0x29520003,
- 0x00000010, 0x06c20002,
- 0x0000000c, 0x29520002,
- 0x00000000, 0x22c58c00,
- 0x00000000, 0x27650000,
- 0x00000000, 0x26e40000,
- 0x00000000, 0x23480000,
- 0x00000008, 0x22000017,
- 0x0000000c, 0x29800000,
- 0x00000010, 0x001f0000,
- 0x00000010, 0x20530000,
- 0x00000018, 0x8000fd9d
-};
-
-/*
- * The RV2P block must be configured for the system
- * page size, or more specifically, the number of
- * usable rx_bd's per page, and should be called
- * as follows prior to loading the RV2P firmware:
- *
- * BCE_RV2P_PROC2_CHG_MAX_BD_PAGE(USABLE_RX_BD_PER_PAGE)
- *
- * The default value is 0xFF.
- */
-#define BCE_RV2P_PROC2_MAX_BD_PAGE_LOC 5
-#define BCE_RV2P_PROC2_CHG_MAX_BD_PAGE(value) { \
- bce_rv2p_proc2[BCE_RV2P_PROC2_MAX_BD_PAGE_LOC] = \
- (bce_rv2p_proc2[BCE_RV2P_PROC2_MAX_BD_PAGE_LOC] & ~0xFFFF) | (value);\
-}
-
-
+u32 bce_rv2p_proc1[] = { + 0x00000010, 0xb1800002, + 0x0000001f, 0x01020400, + 0x00000008, 0xac000001, + 0x0000000c, 0x2f800001, + 0x00000000, 0x2b000000, + 0x00000000, 0x2b800000, + 0x00000010, 0x203f0059, + 0x00000010, 0x213f0003, + 0x00000010, 0x20bf002b, + 0x00000018, 0x8000fffd, + 0x00000010, 0xb1b8b011, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x03d80000, + 0x00000000, 0x2c380000, + 0x00000008, 0x2c800000, + 0x00000008, 0x2d000000, + 0x00000010, 0x91d40000, + 0x00000008, 0x2d80011c, + 0x00000008, 0x02000001, + 0x00000010, 0x91de0000, + 0x0000000f, 0x42e0001c, + 0x00000010, 0x91840a11, + 0x00000010, 0x08660010, + 0x0000000c, 0x1f800002, + 0x00000000, 0x2adf0000, + 0x00000008, 0x2a00000f, + 0x00000018, 0x8000ffec, + 0x00000008, 0x02000001, + 0x0000000f, 0x42e0001c, + 0x00000010, 0x91840a0e, + 0x00000008, 0x2c800006, + 0x00000008, 0x2d000006, + 0x00000010, 0x91d40000, + 0x00000008, 0x2d800106, + 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, + 0x00000010, 0x08660007, + 0x00000018, 0x8000fff2, + 0x0000000b, 0x2fdf0002, + 0x0000000c, 0x1f800002, + 0x00000000, 0x2c070000, + 0x00000010, 0x91de0000, + 0x00000018, 0x8000ffdc, + 0x0000000c, 0x1f800002, + 0x00000000, 0x00000000, + 0x00000018, 0x8000ffd9, + 0x0000000c, 0x29800002, + 0x0000000c, 0x1f800002, + 0x00000000, 0x2adf0000, + 0x00000008, 0x2a000005, + 0x00000018, 0x8000ffd4, + 0x00000008, 0x02240034, + 0x00000018, 0x00040000, + 0x00000018, 0x8000001b, + 0x00000018, 0x8000001d, + 0x00000018, 0x80000048, + 0x00000018, 0x8000007c, + 0x00000018, 0x8000007b, + 0x00000018, 0x80000015, + 0x00000018, 0x80000014, + 0x00000018, 0x80000013, + 0x00000018, 0x80000012, + 0x00000018, 0x800000b0, + 0x00000018, 0x80000010, + 0x00000018, 0x8000000f, + 0x00000018, 0x8000000e, + 0x00000018, 0x800000ac, + 0x00000018, 0x8000000c, + 0x00000018, 0x8000000b, + 0x00000018, 0x80000013, + 0x00000018, 0x80000018, + 0x00000018, 0x80000008, + 0x00000018, 0x80000087, + 0x00000018, 0x80000030, + 0x00000018, 0x800000a9, + 0x00000018, 0x800000d2, + 0x00000018, 0x800000a2, + 0x00000018, 0x800000f3, + 0x00000018, 0x80000031, + 0x00000018, 0x80000000, + 0x0000000c, 0x1f800001, + 0x00000000, 0x00000000, + 0x00000018, 0x8000ffb4, + 0x00000010, 0x91d40000, + 0x0000000c, 0x29800001, + 0x0000000c, 0x1f800001, + 0x00000008, 0x2a000002, + 0x00000018, 0x8000ffaf, + 0x00000010, 0x91d40000, + 0x0000000c, 0x29800001, + 0x0000000c, 0x1f800001, + 0x00000000, 0x29420000, + 0x00000008, 0x2a000002, + 0x00000018, 0x8000ffa9, + 0x00000018, 0x8000ffa8, + 0x00000010, 0xb1bcb010, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x03d80000, + 0x00000000, 0x2c3c0000, + 0x00000008, 0x2c8000b0, + 0x00000008, 0x2d000008, + 0x00000010, 0x91d40000, + 0x00000008, 0x2d800150, + 0x00000000, 0x00000000, + 0x00000010, 0x205f0000, + 0x00000008, 0x2c800000, + 0x00000008, 0x2d000000, + 0x00000008, 0x2d800108, + 0x00000010, 0x91de0000, + 0x00000010, 0x2c6201b9, + 0x00000018, 0x80000005, + 0x00000008, 0x2c8000b0, + 0x00000008, 0x2d000008, + 0x00000010, 0x91d40000, + 0x00000008, 0x2d800108, + 0x0000000c, 0x29800000, + 0x0000000c, 0x1f800000, + 0x00000010, 0x91de0000, + 0x00000000, 0x2adf0000, + 0x00000008, 0x2a000006, + 0x00000018, 0x8000ff8e, + 0x00000010, 0x91d40000, + 0x0000000c, 0x29800001, + 0x0000000c, 0x1f800001, + 0x00000008, 0x2a00000b, + 0x00000018, 0x8000ff89, + 0x00000018, 0x00020000, + 0x00000010, 0xb1a0b011, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x2c200000, + 0x00000008, 0x2c800000, + 0x00000008, 0x2d000000, + 0x00000010, 0x91d40000, + 0x00000008, 0x2d80011c, + 0x00000010, 0x001f0000, + 0x00000010, 0x91de0000, + 0x0000000f, 0x47600008, + 0x0000000f, 0x060e0001, + 0x00000000, 0x0f580000, + 0x00000000, 0x0a640000, + 0x00000000, 0x0ae50000, + 0x00000009, 0x0b66ffff, + 0x00000000, 0x0d610000, + 0x00000018, 0x80000013, + 0x0000000f, 0x47600008, + 0x0000000b, 0x2fdf0002, + 0x00000008, 0x2c800000, + 0x00000008, 0x2d000000, + 0x00000010, 0x91d40000, + 0x00000008, 0x2d80011c, + 0x0000000f, 0x060e0001, + 0x00000010, 0x001f0000, + 0x00000000, 0x0f580000, + 0x00000010, 0x91de0000, + 0x00000000, 0x0a640000, + 0x00000000, 0x0ae50000, + 0x00000009, 0x0b66ffff, + 0x00000000, 0x0d610000, + 0x00000000, 0x02620000, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x309a0000, + 0x00000000, 0x31040000, + 0x00000000, 0x0c961800, + 0x00000009, 0x0c99ffff, + 0x00000004, 0xcc993400, + 0x00000010, 0xb1963202, + 0x00000008, 0x0f800000, + 0x0000000c, 0x29800001, + 0x00000010, 0x00220002, + 0x0000000c, 0x29520001, + 0x0000000c, 0x29520000, + 0x00000008, 0x0200000e, + 0x00000008, 0x0280001a, + 0x00000010, 0xb1c40a02, + 0x00000008, 0x02000003, + 0x00000008, 0x22000001, + 0x0000000c, 0x1f800001, + 0x00000000, 0x2adf0000, + 0x00000000, 0x2a000800, + 0x00000018, 0x8000ff53, + 0x00000008, 0x2c8000b0, + 0x00000008, 0x2d000008, + 0x00000010, 0x91a0b008, + 0x00000010, 0x91d40000, + 0x0000000c, 0x31620018, + 0x00000008, 0x2d800001, + 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, + 0x00000008, 0xac000001, + 0x00000018, 0x8000000e, + 0x00000000, 0x0380b000, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x2c004000, + 0x00000010, 0x91d40000, + 0x00000008, 0x2d800101, + 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, + 0x0000000c, 0x31620018, + 0x00000008, 0x2d800001, + 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x2c000e00, + 0x0000000c, 0x29800001, + 0x0000000c, 0x1f800001, + 0x00000008, 0x2a000007, + 0x00000018, 0x8000ff38, + 0x00000010, 0xb1a0b015, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x03d80000, + 0x00000000, 0x2c200000, + 0x00000008, 0x2c8000b0, + 0x00000008, 0x2d000008, + 0x00000010, 0x91d40000, + 0x00000008, 0x2d800150, + 0x00000000, 0x00000000, + 0x00000010, 0x205f0000, + 0x00000008, 0x2c800000, + 0x00000008, 0x2d000000, + 0x00000008, 0x2d800108, + 0x00000010, 0x91de0000, + 0x00000010, 0x2c620002, + 0x00000018, 0x8000000a, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x2c070000, + 0x0000000c, 0x1f800001, + 0x00000010, 0x91de0000, + 0x00000018, 0x8000ff23, + 0x00000008, 0x2c8000b0, + 0x00000008, 0x2d000008, + 0x00000010, 0x91d40000, + 0x00000008, 0x2d800108, + 0x0000000c, 0x29800001, + 0x0000000c, 0x1f800001, + 0x00000010, 0x91de0000, + 0x00000000, 0x2adf0000, + 0x00000008, 0x2a00000a, + 0x00000018, 0x8000ff19, + 0x00000010, 0x91d40000, + 0x0000000c, 0x29800001, + 0x0000000c, 0x1f800001, + 0x00000008, 0x2a000009, + 0x00000018, 0x8000ff14, + 0x00000010, 0x91d40000, + 0x00000010, 0x91a03c02, + 0x00000010, 0xb1e66207, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x2c310000, + 0x00000009, 0x2cb1007f, + 0x00000008, 0x2cd90000, + 0x00000008, 0x2d000000, + 0x00000008, 0x2d80010d, + 0x00000010, 0xb1a80007, + 0x00000010, 0x205f0000, + 0x00000000, 0x2c200000, + 0x00000000, 0x2ca70000, + 0x00000008, 0x2d000010, + 0x00000008, 0x2d800108, + 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, + 0x00000010, 0xb1a60010, + 0x00000010, 0x001f0000, + 0x0000000f, 0x0f300007, + 0x00000000, 0x0a600000, + 0x00000000, 0x0ae10000, + 0x0000000f, 0x4b620008, + 0x00000009, 0x0b1600ff, + 0x00000000, 0x0d620000, + 0x00000009, 0x0d1a00ff, + 0x00000010, 0x07300003, + 0x0000000c, 0x0d1a0008, + 0x0000000c, 0x0b160008, + 0x0000000f, 0x4ce30018, + 0x00000000, 0x0c992c00, + 0x00000004, 0xcc993400, + 0x00000008, 0x0f800000, + 0x0000000c, 0x29800001, + 0x00000000, 0x33310000, + 0x00000008, 0x22000016, + 0x00000000, 0x2adf0000, + 0x00000008, 0x2a00000c, + 0x00000010, 0x009f0000, + 0x00000000, 0x0f200000, + 0x0000000c, 0x1f800001, + 0x00000018, 0x8000feea, + 0x0000000f, 0x47220008, + 0x00000009, 0x070e000f, + 0x00000008, 0x070e0008, + 0x00000008, 0x02800001, + 0x00000007, 0x02851c00, + 0x00000008, 0x82850001, + 0x00000000, 0x02854c00, + 0x00000007, 0x42851c00, + 0x00000003, 0xc3aa5200, + 0x00000000, 0x03b10e00, + 0x00000007, 0x4b071c00, + 0x0000000f, 0x0f300007, + 0x0000000f, 0x0a960003, + 0x00000000, 0x0a955c00, + 0x00000000, 0x4a005a00, + 0x00000000, 0x0c960a00, + 0x00000009, 0x0c99ffff, + 0x00000008, 0x0d00ffff, + 0x00000010, 0xb1963202, + 0x00000008, 0x0f800005, + 0x00000010, 0xb1a80009, + 0x00000010, 0x205f0000, + 0x0000000b, 0x2fdf0002, + 0x00000000, 0x2c200000, + 0x00000000, 0x2ca70000, + 0x00000008, 0x2d000010, + 0x00000008, 0x2d800108, + 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, + 0x0000000c, 0x29800001, + 0x00000010, 0x001f0000, + 0x0000000c, 0x1f800001, + 0x00000000, 0x2adf0000, + 0x00000008, 0x2a00000d, + 0x00000018, 0x8000fec7, + 0x00000010, 0x91d40000, + 0x0000000c, 0x29800001, + 0x0000000c, 0x1f800001, + 0x00000008, 0x2a000007, + 0x00000018, 0x8000fec2, + 0x00000008, 0x03050004, + 0x00000006, 0x83040c00, + 0x00000008, 0x02850200, + 0x00000000, 0x86050c00, + 0x00000001, 0x860c0e00, + 0x00000008, 0x02040004, + 0x00000000, 0x02041800, + 0x00000000, 0x83871800, + 0x00000018, 0x00020000 +}; + + +u32 bce_rv2p_proc2[] = { + 0x00000010, 0xb1800004, + 0x0000001f, 0x01020400, + 0x00000008, 0x050000ff, + 0x00000018, 0x00020000, + 0x00000000, 0x2a000000, + 0x00000010, 0xb1d40000, + 0x00000008, 0x02540007, + 0x00000018, 0x00040000, + 0x00000018, 0x8000000f, + 0x00000018, 0x8000000f, + 0x00000018, 0x80000017, + 0x00000018, 0x800000d0, + 0x00000018, 0x800000e5, + 0x00000018, 0x8000010d, + 0x00000018, 0x800000cf, + 0x00000018, 0x800001c9, + 0x00000018, 0x800001c0, + 0x00000018, 0x800000d2, + 0x00000018, 0x8000000b, + 0x00000018, 0x800001c5, + 0x00000018, 0x80000218, + 0x00000018, 0x80000044, + 0x00000018, 0x800000b7, + 0x00000018, 0x80000000, + 0x0000000c, 0x29800001, + 0x00000000, 0x2a000000, + 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, + 0x00000018, 0x8000ffe9, + 0x0000000c, 0x29800001, + 0x00000000, 0x2a000000, + 0x00000018, 0x8000ffe6, + 0x00000018, 0x00020000, + 0x0000000c, 0x29800001, + 0x00000010, 0x91de0000, + 0x00000010, 0x001f0000, + 0x00000000, 0x2f80aa00, + 0x00000000, 0x2a000000, + 0x00000000, 0x0d610000, + 0x00000000, 0x03620000, + 0x00000000, 0x2c400000, + 0x00000000, 0x02638c00, + 0x00000000, 0x26460000, + 0x00000008, 0x02040012, + 0x00000010, 0xb9060826, + 0x00000000, 0x0f580000, + 0x00000000, 0x0a640000, + 0x00000000, 0x0ae50000, + 0x00000009, 0x0b66ffff, + 0x00000000, 0x0c000000, + 0x00000000, 0x0b800000, + 0x00000008, 0x0cc60012, + 0x00000008, 0x0f800003, + 0x00000000, 0x00000000, + 0x00000010, 0x009f0000, + 0x00000008, 0x27110012, + 0x00000000, 0x66900000, + 0x00000008, 0xa31b0012, + 0x00000010, 0xb1980003, + 0x00000010, 0x001f0000, + 0x00000008, 0x0f800004, + 0x00000008, 0x22000003, + 0x00000008, 0x2c80000c, + 0x00000008, 0x2d00000c, + 0x00000010, 0x009f0000, + 0x00000000, 0x25960000, + 0x0000000c, 0x29800000, + 0x00000000, 0x06660000, + 0x00000000, 0x86611800, + 0x00000009, 0x0260000f, + 0x0000000f, 0x02040002, + 0x00000010, 0xb60c0803, + 0x0000000c, 0x1fbf0000, + 0x0000000c, 0x33660010, + 0x00000000, 0x32140000, + 0x00000000, 0x32950000, + 0x00000005, 0x73662c00, + 0x00000000, 0x31e32e00, + 0x00000008, 0x2d800010, + 0x00000010, 0x20530000, + 0x00000010, 0x91de0000, + 0x00000018, 0x8000ffb4, + 0x00000000, 0x23000000, + 0x00000009, 0x25e6ffff, + 0x00000008, 0x2200000b, + 0x0000000c, 0x69520000, + 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, + 0x00000018, 0x8000ffad, + 0x0000000c, 0x29800001, + 0x00000010, 0x91de0000, + 0x00000010, 0x001f0000, + 0x00000000, 0x2f80aa00, + 0x00000000, 0x2a000000, + 0x00000008, 0x2c800040, + 0x00000008, 0x2d000020, + 0x00000008, 0x2d80011c, + 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, + 0x0000000f, 0x42ea0010, + 0x00000010, 0x004f0004, + 0x00000010, 0xb7469200, + 0x00000008, 0x02490012, + 0x00000010, 0xb5840a00, + 0x00000000, 0x0d610000, + 0x00000010, 0xba66345a, + 0x00000000, 0x03620000, + 0x00000010, 0xb8630c58, + 0x00000008, 0x83050012, + 0x00000010, 0x004f0002, + 0x00000000, 0x03490000, + 0x00000001, 0x83068c00, + 0x00000000, 0x83c60c00, + 0x00000010, 0xb1870010, + 0x00000000, 0x0b6e0000, + 0x00000018, 0x8000ff8f, + 0x00000001, 0x06691400, + 0x00000010, 0x918c0002, + 0x00000008, 0xb4e90001, + 0x00000010, 0xb1e92c4c, + 0x00000000, 0x86692c00, + 0x00000000, 0x02000000, + 0x00000009, 0x02eaffff, + 0x00000010, 0x000c0002, + 0x00000000, 0x02040a00, + 0x0000000f, 0x460c0001, + 0x0000000f, 0x02850001, + 0x00000010, 0x918c01fc, + 0x00000010, 0xb7040e43, + 0x00000000, 0x2c400000, + 0x00000000, 0x0f580000, + 0x00000000, 0x0d610000, + 0x00000000, 0x0a640000, + 0x00000000, 0x0ae50000, + 0x00000009, 0x0b66ffff, + 0x00000000, 0x0c000000, + 0x00000000, 0x0b800000, + 0x00000008, 0x0c860012, + 0x00000008, 0x0f800003, + 0x0000000c, 0x29520000, + 0x00000010, 0x009f0000, + 0x00000008, 0x27110012, + 0x00000000, 0x66900000, + 0x00000000, 0x26460000, + 0x00000000, 0x23060000, + 0x00000010, 0xb1980005, + 0x00000010, 0x001f0000, + 0x00000008, 0x0f800004, + 0x00000000, 0x00000000, + 0x00000010, 0x001f0000, + 0x00000000, 0x32140000, + 0x00000000, 0x32950000, + 0x00000000, 0x31e32e00, + 0x00000005, 0x73662c00, + 0x00000000, 0x25960000, + 0x00000010, 0xb1870016, + 0x0000000c, 0x29800000, + 0x0000000f, 0x0f6b0007, + 0x00000000, 0x0d690000, + 0x00000000, 0x0a6c0000, + 0x00000000, 0x0aed0000, + 0x00000000, 0x0b6e0000, + 0x00000000, 0x0b800000, + 0x00000000, 0x0c870000, + 0x0000000c, 0x69520001, + 0x00000008, 0x0f800003, + 0x00000010, 0x20530000, + 0x00000010, 0x001f0000, + 0x00000000, 0x22c58c00, + 0x00000000, 0x231b0000, + 0x00000000, 0x27110000, + 0x00000000, 0x26900000, + 0x00000010, 0xb8170e03, + 0x0000000c, 0x29800000, + 0x00000018, 0x8000fff7, + 0x00000010, 0xb1980002, + 0x00000008, 0x0f800004, + 0x00000008, 0x2200001a, + 0x00000008, 0x2c80000c, + 0x00000008, 0x2d00000c, + 0x00000008, 0x2d800010, + 0x00000010, 0x001f0000, + 0x00000000, 0x0d6e0000, + 0x00000003, 0xe7cf3400, + 0x0000000c, 0x29800000, + 0x00000010, 0x91de0000, + 0x00000010, 0xb1870007, + 0x00000000, 0x36140000, + 0x00000000, 0x36950000, + 0x00000000, 0x37160000, + 0x00000008, 0x2c800050, + 0x00000008, 0x2d000030, + 0x00000008, 0x2d80000c, + 0x00000010, 0x20530000, + 0x00000018, 0x8000ff43, + 0x00000000, 0x26460000, + 0x00000000, 0x23000000, + 0x00000009, 0x25e6ffff, + 0x00000000, 0x0b6e0000, + 0x00000003, 0xe7cf2c00, + 0x00000008, 0x2200001b, + 0x0000000c, 0x69520000, + 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, + 0x00000018, 0x8000ff39, + 0x00000000, 0x2fd50000, + 0x00000000, 0x2a000000, + 0x00000010, 0x003f000b, + 0x00000000, 0x06660000, + 0x00000000, 0x86611800, + 0x00000009, 0x026000f0, + 0x00000010, 0xb70c0807, + 0x0000000c, 0x73660010, + 0x00000008, 0x2c800018, + 0x00000008, 0x2d000018, + 0x00000008, 0x2d800002, + 0x0000000c, 0x5fbf0000, + 0x00000010, 0x91de0000, + 0x00000018, 0x8000ff2b, + 0x0000000c, 0x29800001, + 0x00000018, 0x8000ff29, + 0x0000000c, 0x29800001, + 0x00000000, 0x2a000000, + 0x00000010, 0x001f0000, + 0x00000000, 0x0f008000, + 0x00000008, 0x0f800007, + 0x00000018, 0x800000f3, + 0x0000000c, 0x29800001, + 0x00000010, 0x91de0000, + 0x00000000, 0x2fd50000, + 0x00000000, 0x2a000000, + 0x00000009, 0x0261ffff, + 0x0000000d, 0x70e10001, + 0x00000018, 0x800000d8, + 0x00000000, 0x2c400000, + 0x00000008, 0x2c8000c4, + 0x00000008, 0x2d00001c, + 0x00000008, 0x2d800001, + 0x00000005, 0x70e10800, + 0x00000010, 0x91de0000, + 0x00000018, 0x8000ff15, + 0x0000000c, 0x29800001, + 0x00000010, 0x91de0000, + 0x00000000, 0x2fd50000, + 0x00000010, 0x001f0000, + 0x00000000, 0x02700000, + 0x00000000, 0x0d620000, + 0x00000000, 0xbb630800, + 0x00000000, 0x2a000000, + 0x00000000, 0x0f400000, + 0x00000000, 0x2c400000, + 0x0000000c, 0x73e7001b, + 0x00000010, 0x0ce7000e, + 0x00000000, 0x286d0000, + 0x0000000f, 0x65ed0010, + 0x00000009, 0x266dffff, + 0x00000018, 0x80000034, + 0x00000008, 0x02000004, + 0x00000010, 0x91c40803, + 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, + 0x00000018, 0x800000bc, + 0x00000008, 0x2c8000b8, + 0x00000008, 0x2d000010, + 0x00000008, 0x2d800048, + 0x00000018, 0x80000005, + 0x00000008, 0x2c8000c4, + 0x00000008, 0x2d00001c, + 0x00000008, 0x2d800001, + 0x00000000, 0x00000000, + 0x00000010, 0x205f0000, + 0x00000008, 0x2c800048, + 0x00000008, 0x2d000068, + 0x00000008, 0x2d800104, + 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, + 0x00000000, 0x27f60000, + 0x00000010, 0xb87a9e04, + 0x00000008, 0x2200000d, + 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, + 0x00000018, 0x8000feec, + 0x0000000c, 0x29800001, + 0x00000010, 0x91de0000, + 0x00000000, 0x2fd50000, + 0x00000010, 0x001f0000, + 0x00000000, 0x02700000, + 0x00000000, 0x0d620000, + 0x00000000, 0xbb630800, + 0x00000000, 0x2a000000, + 0x00000010, 0x0e670011, + 0x00000000, 0x286d0000, + 0x0000000f, 0x65ed0010, + 0x00000009, 0x266dffff, + 0x00000004, 0xb8f1a000, + 0x00000000, 0x0f400000, + 0x0000000c, 0x73e7001c, + 0x00000018, 0x8000000b, + 0x00000008, 0x02000004, + 0x00000010, 0x91c40802, + 0x0000000c, 0x29800000, + 0x00000000, 0x2c1e0000, + 0x00000008, 0x2c8000b8, + 0x00000008, 0x2d000010, + 0x00000008, 0x2d800048, + 0x00000010, 0x20530000, + 0x00000010, 0x91de0000, + 0x00000018, 0x8000fed2, + 0x00000000, 0x06820000, + 0x00000010, 0x001f0000, + 0x00000010, 0x0ce70030, + 0x00000000, 0x03720000, + 0x00000000, 0x0cf60000, + 0x00000003, 0x8ced3200, + 0x00000000, 0xa8190c00, + 0x00000010, 0xb872322b, + 0x00000000, 0x03ca0000, + 0x0000000f, 0x65680010, + 0x00000000, 0x0bcf0000, + 0x00000000, 0x27f20000, + 0x00000000, 0x08510000, + 0x00000000, 0x28ed0000, + 0x00000004, 0xb9723200, + 0x00000000, 0x03720000, + 0x00000003, 0xbbf60c00, + 0x00000000, 0x03440000, + 0x00000008, 0x22000010, + 0x00000010, 0xb7ef3204, + 0x0000000c, 0x21420004, + 0x0000000c, 0x73e70019, + 0x00000000, 0x3bf60000, + 0x00000000, 0x07520000, + 0x00000000, 0x29000000, + 0x0000000c, 0x29800000, + 0x00000000, 0x00000000, + 0x00000010, 0x20530000, + 0x00000000, 0x22060000, + 0x0000000c, 0x61420004, + 0x00000000, 0x25070000, + 0x00000000, 0x27970000, + 0x00000000, 0x28940000, + 0x00000000, 0x290e0000, + 0x00000010, 0x0ce70010, + 0x00000010, 0xb873320f, + 0x0000000f, 0x436c0010, + 0x00000000, 0x03f30c00, + 0x00000000, 0x03f30000, + 0x00000000, 0x83990e00, + 0x00000001, 0x83860e00, + 0x00000000, 0x83060e00, + 0x00000003, 0xf66c0c00, + 0x00000000, 0x39f30e00, + 0x00000000, 0x3af50e00, + 0x00000000, 0x7a740000, + 0x0000000f, 0x43680010, + 0x00000001, 0x83860e00, + 0x00000000, 0x83060e00, + 0x00000003, 0xf4680c00, + 0x00000000, 0x286d0000, + 0x00000010, 0xb1e9a059, + 0x00000000, 0x03690000, + 0x00000010, 0xb1f60c57, + 0x00000000, 0x0a6a0000, + 0x00000000, 0x0aeb0000, + 0x00000009, 0x0b6cffff, + 0x00000000, 0x0c000000, + 0x00000000, 0x0be90000, + 0x00000003, 0x8cf6a000, + 0x0000000c, 0x09800002, + 0x00000010, 0x009f0000, + 0x00000010, 0xb8173209, + 0x00000000, 0x35140000, + 0x00000000, 0x35950000, + 0x00000005, 0x766c2c00, + 0x00000000, 0x34970000, + 0x00000004, 0xb8f12e00, + 0x00000010, 0x001f0000, + 0x00000008, 0x0f800004, + 0x00000018, 0x8000fff7, + 0x00000000, 0x03e90000, + 0x00000010, 0xb8f6a01b, + 0x00000010, 0x2013001a, + 0x00000010, 0xb1f10e19, + 0x00000000, 0x83973200, + 0x00000000, 0x38700e00, + 0x00000000, 0xbb760e00, + 0x00000000, 0x3bf60000, + 0x00000000, 0x37d00000, + 0x0000000c, 0x73e7001a, + 0x00000003, 0xb8f1a000, + 0x00000000, 0x32140000, + 0x00000000, 0x32950000, + 0x00000005, 0x73e72c00, + 0x00000000, 0x33190000, + 0x00000005, 0x74680000, + 0x00000010, 0x0ce7000d, + 0x00000008, 0x22000009, + 0x00000000, 0x07520000, + 0x00000000, 0x29000000, + 0x0000000c, 0x73e70019, + 0x0000000f, 0x65680010, + 0x0000000c, 0x21420004, + 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, + 0x0000000c, 0x61420004, + 0x00000000, 0x290e0000, + 0x00000018, 0x80000002, + 0x00000010, 0x91973206, + 0x00000000, 0x35140000, + 0x00000000, 0x35950000, + 0x00000005, 0x766c2c00, + 0x00000000, 0x34990000, + 0x00000004, 0xb8f13200, + 0x00000000, 0x83690c00, + 0x00000010, 0xb1860015, + 0x00000000, 0x28e90000, + 0x00000008, 0x22000004, + 0x00000009, 0x2470ffff, + 0x0000000f, 0x65700010, + 0x00000000, 0x23ec0000, + 0x00000000, 0x03690000, + 0x00000010, 0xb8660c07, + 0x00000009, 0x036cffff, + 0x00000000, 0x326a0000, + 0x00000000, 0x32eb0000, + 0x00000005, 0x73e70c00, + 0x00000000, 0x33690000, + 0x00000005, 0x74680000, + 0x0000000c, 0x73e7001c, + 0x00000000, 0x03690000, + 0x00000010, 0xb1f60c12, + 0x00000010, 0xb1d00c11, + 0x0000000c, 0x21420005, + 0x0000000c, 0x33e7001c, + 0x00000018, 0x8000000e, + 0x00000010, 0x2e67000d, + 0x00000000, 0x03690000, + 0x00000010, 0xb1f60c0b, + 0x00000010, 0xb1d00c0a, + 0x00000000, 0x03440000, + 0x00000008, 0x2200000c, + 0x00000000, 0x07520000, + 0x00000000, 0x29000000, + 0x0000000c, 0x29800000, + 0x0000000c, 0x33e7001c, + 0x00000010, 0x20530000, + 0x00000000, 0x22060000, + 0x00000000, 0x290e0000, + 0x00000018, 0x000d0000, + 0x00000000, 0x06820000, + 0x00000010, 0x2de7000d, + 0x00000010, 0x0ce7000c, + 0x00000000, 0x27f20000, + 0x00000010, 0xb96d9e0a, + 0x00000000, 0xa86d9e00, + 0x00000009, 0x0361ffff, + 0x00000010, 0xb7500c07, + 0x00000008, 0x2200000f, + 0x0000000f, 0x65680010, + 0x00000000, 0x29000000, + 0x0000000c, 0x29800000, + 0x0000000c, 0x33e7001b, + 0x00000010, 0x20530000, + 0x00000018, 0x000d0000, + 0x0000000c, 0x29800001, + 0x00000000, 0x2a000000, + 0x00000010, 0x001f0000, + 0x0000000f, 0x0f470007, + 0x00000008, 0x0f800008, + 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, + 0x00000018, 0x8000fe2e, + 0x0000000c, 0x29800001, + 0x00000010, 0x91de0000, + 0x00000000, 0x2fd50000, + 0x00000010, 0x001f0000, + 0x00000000, 0x33510000, + 0x00000000, 0x2a000000, + 0x00000010, 0xb1c60023, + 0x0000000f, 0x0f500007, + 0x00000000, 0x0a600000, + 0x00000000, 0x0ae10000, + 0x0000000f, 0x4b620008, + 0x00000009, 0x0b1600ff, + 0x0000000f, 0x4c620010, + 0x00000000, 0x0d620000, + 0x00000009, 0x0d1a00ff, + 0x00000010, 0x07500003, + 0x0000000c, 0x0d1a0008, + 0x0000000c, 0x0b160008, + 0x00000000, 0x0cc60000, + 0x00000000, 0x0b800000, + 0x00000000, 0x06980000, + 0x00000008, 0x0f800003, + 0x00000010, 0x06c20004, + 0x0000000c, 0x29000002, + 0x00000010, 0x26420002, + 0x0000000c, 0x29520003, + 0x00000008, 0x22000001, + 0x00000010, 0x009f0000, + 0x00000000, 0x231b0000, + 0x00000000, 0x27111a00, + 0x00000000, 0x66900000, + 0x0000000c, 0x29520000, + 0x00000010, 0xb1973209, + 0x0000000c, 0x29800000, + 0x00000000, 0x06980000, + 0x00000010, 0x20530000, + 0x0000000c, 0x29520003, + 0x00000000, 0x22c58c00, + 0x00000010, 0x001f0000, + 0x00000008, 0x0f800003, + 0x00000018, 0x8000fff3, + 0x00000010, 0xb1c80013, + 0x00000010, 0xb1c60003, + 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, + 0x0000000c, 0x29520000, + 0x0000000c, 0x29520003, + 0x00000010, 0x06c20002, + 0x0000000c, 0x29520002, + 0x00000000, 0x22c58c00, + 0x00000000, 0x27650000, + 0x00000000, 0x26e40000, + 0x00000008, 0x22000016, + 0x00000010, 0xb1c60003, + 0x00000000, 0x23480000, + 0x00000010, 0xb1800005, + 0x00000000, 0x23480000, + 0x0000000c, 0x29800000, + 0x0000000f, 0x0f500007, + 0x00000018, 0x80000012, + 0x00000008, 0x22000016, + 0x0000000c, 0x29800000, + 0x00000000, 0x30140000, + 0x00000000, 0x30950000, + 0x00000010, 0x07500003, + 0x00000009, 0x0b1600ff, + 0x00000009, 0x0d1a00ff, + 0x0000000f, 0x31160008, + 0x00000000, 0x31623400, + 0x00000003, 0xf1623000, + 0x00000010, 0x205f0000, + 0x00000000, 0x2c510000, + 0x00000009, 0x2cd1007f, + 0x00000008, 0x2cd90000, + 0x00000008, 0x2d000000, + 0x00000008, 0x2d80000c, + 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, + 0x00000010, 0x05c20004, + 0x00000000, 0x33000000, + 0x00000008, 0x0f800007, + 0x00000010, 0x009f0000, + 0x00000010, 0x20530000, + 0x00000018, 0x8000fdda, + 0x0000000c, 0x29800001, + 0x00000000, 0x2fd50000, + 0x00000000, 0x2a000000, + 0x0000000f, 0x0f500007, + 0x00000010, 0xb1c6002c, + 0x0000000f, 0x47420008, + 0x00000009, 0x070e000f, + 0x00000008, 0x070e0008, + 0x00000010, 0x001f0000, + 0x00000008, 0x09000001, + 0x00000007, 0x09121c00, + 0x00000003, 0xcbca9200, + 0x00000000, 0x0b97a200, + 0x00000007, 0x4b171c00, + 0x0000000f, 0x0a960003, + 0x00000000, 0x0a959c00, + 0x00000000, 0x4a009a00, + 0x00000008, 0x82120001, + 0x00000001, 0x0c170800, + 0x00000000, 0x02180000, + 0x00000000, 0x0c978c00, + 0x00000008, 0x0d00ffff, + 0x00000008, 0x0f800006, + 0x0000000c, 0x29000000, + 0x00000010, 0x06c20004, + 0x0000000c, 0x29520002, + 0x00000010, 0x26420002, + 0x0000000c, 0x29520003, + 0x00000008, 0x22000001, + 0x00000010, 0x009f0000, + 0x00000010, 0xb197320c, + 0x00000000, 0x231b0000, + 0x00000000, 0x27110800, + 0x00000000, 0x66900000, + 0x0000000c, 0x29800000, + 0x00000000, 0x02180000, + 0x00000010, 0x20530000, + 0x0000000c, 0x29520003, + 0x00000000, 0x22c53600, + 0x00000010, 0x001f0000, + 0x00000008, 0x0f800006, + 0x00000018, 0x8000fff4, + 0x00000000, 0x231b0000, + 0x00000000, 0x27110800, + 0x00000000, 0x66900000, + 0x00000010, 0xb1c8000b, + 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, + 0x0000000c, 0x29520000, + 0x0000000c, 0x29520003, + 0x00000010, 0x06c20002, + 0x0000000c, 0x29520002, + 0x00000000, 0x22c58c00, + 0x00000000, 0x27650000, + 0x00000000, 0x26e40000, + 0x00000000, 0x23480000, + 0x00000008, 0x22000017, + 0x0000000c, 0x29800000, + 0x00000010, 0x001f0000, + 0x00000010, 0x20530000, + 0x00000018, 0x8000fd9d +}; + +/* + * The RV2P block must be configured for the system + * page size, or more specifically, the number of + * usable rx_bd's per page, and should be called + * as follows prior to loading the RV2P firmware: + * + * BCE_RV2P_PROC2_CHG_MAX_BD_PAGE(USABLE_RX_BD_PER_PAGE) + * + * The default value is 0xFF. + */ +#define BCE_RV2P_PROC2_MAX_BD_PAGE_LOC 5 +#define BCE_RV2P_PROC2_CHG_MAX_BD_PAGE(value) { \ + bce_rv2p_proc2[BCE_RV2P_PROC2_MAX_BD_PAGE_LOC] = \ + (bce_rv2p_proc2[BCE_RV2P_PROC2_MAX_BD_PAGE_LOC] & ~0xFFFF) | (value);\ +} + + + diff --git a/sys/dev/bce/if_bcereg.h b/sys/dev/bce/if_bcereg.h index 48aabc1..e25386f 100644 --- a/sys/dev/bce/if_bcereg.h +++ b/sys/dev/bce/if_bcereg.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2007 Broadcom Corporation + * Copyright (c) 2006-2008 Broadcom Corporation * David Christensen <davidch@broadcom.com>. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,10 +32,6 @@ #ifndef _BCE_H_DEFINED #define _BCE_H_DEFINED -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" -#endif - #include <sys/param.h> #include <sys/endian.h> #include <sys/systm.h> @@ -96,42 +92,43 @@ #undef __BIG_ENDIAN #define __LITTLE_ENDIAN 1 #endif -
-#define BCE_DWORD_PRINTFB \
- "\020" \
- "\40b31" \
- "\37b30" \
- "\36b29" \
- "\35b28" \
- "\34b27" \
- "\33b26" \
- "\32b25" \
- "\31b24" \
- "\30b23" \
- "\27b22" \
- "\26b21" \
- "\25b20" \
- "\24b19" \
- "\23b18" \
- "\22b17" \
- "\21b16" \
- "\20b15" \
- "\17b14" \
- "\16b13" \
- "\15b12" \
- "\14b11" \
- "\13b10" \
- "\12b9" \
- "\11b8" \
- "\10b7" \
- "\07b6" \
- "\06b5" \
- "\05b4" \
- "\04b3" \
- "\03b2" \
- "\02b1" \
- "\01b0"
-
+ +#define BCE_DWORD_PRINTFB \ + "\020" \ + "\40b31" \ + "\37b30" \ + "\36b29" \ + "\35b28" \ + "\34b27" \ + "\33b26" \ + "\32b25" \ + "\31b24" \ + "\30b23" \ + "\27b22" \ + "\26b21" \ + "\25b20" \ + "\24b19" \ + "\23b18" \ + "\22b17" \ + "\21b16" \ + "\20b15" \ + "\17b14" \ + "\16b13" \ + "\15b12" \ + "\14b11" \ + "\13b10" \ + "\12b9" \ + "\11b8" \ + "\10b7" \ + "\07b6" \ + "\06b5" \ + "\05b4" \ + "\04b3" \ + "\03b2" \ + "\02b1" \ + "\01b0" + + /****************************************************************************/ /* Debugging macros and definitions. */ /****************************************************************************/ @@ -224,13 +221,13 @@ #define BCE_LOG_MSG(m) (BCE_CODE_PATH(m) && BCE_MSG_LEVEL(m)) #ifdef BCE_DEBUG -
-/*
- * Calculate the time delta between two reads
- * of the 25MHz free running clock.
- */
-#define BCE_TIME_DELTA(start, end) (start > end ? (start - end) : \
- (~start + end + 1))
+ +/* + * Calculate the time delta between two reads + * of the 25MHz free running clock. + */ +#define BCE_TIME_DELTA(start, end) (start > end ? (start - end) : \ + (~start + end + 1)) /* Print a message based on the logging level and code path. */ #define DBPRINT(sc, level, format, args...) \ @@ -238,12 +235,12 @@ device_printf(sc->bce_dev, format, ## args); \ } -/* Runs a particular command when debugging is enabled. */
-#define DBRUN(args...) \
- do { \
- args; \
- } while (0)
-
+/* Runs a particular command when debugging is enabled. */ +#define DBRUN(args...) \ + do { \ + args; \ + } while (0) + /* Runs a particular command based on the logging level and code path. */ #define DBRUNMSG(msg, args...) \ if (BCE_LOG_MSG(msg)) { \ @@ -284,7 +281,7 @@ #else #define DBPRINT(level, format, args...) -#define DBRUN(args...)
+#define DBRUN(args...) #define DBRUNMSG(msg, args...) #define DBRUNLV(level, args...) #define DBRUNCP(cp, args...) @@ -1058,7 +1055,7 @@ struct l2_fhdr { #define L2_FHDR_STATUS_TCP_SEGMENT (1<<14) #define L2_FHDR_STATUS_UDP_DATAGRAM (1<<15) - #define L2_FHDR_STATUS_SPLIT (1<<16)
+ #define L2_FHDR_STATUS_SPLIT (1<<16) #define L2_FHDR_ERRORS_BAD_CRC (1<<17) #define L2_FHDR_ERRORS_PHY_DECODE (1<<18) #define L2_FHDR_ERRORS_ALIGNMENT (1<<19) @@ -1081,38 +1078,38 @@ struct l2_fhdr { #endif }; -#define BCE_L2FHDR_PRINTFB \
- "\20" \
- "\40UDP_XSUM_ERR" \
- "\37b30" \
- "\36b29" \
- "\35TCP_XSUM_ERR" \
- "\34b27" \
- "\33b26" \
- "\32b25" \
- "\31b24" \
- "\30b23" \
- "\27b22" \
- "\26GIANT_ERR" \
- "\25SHORT_ERR" \
- "\24ALIGN_ERR" \
- "\23PHY_ERR" \
- "\22CRC_ERR" \
- "\21SPLIT" \
- "\20UDP" \
- "\17TCP" \
- "\16IP" \
- "\15b12" \
- "\14b11" \
- "\13b10" \
- "\12b09" \
- "\11RSS" \
- "\10SNAP" \
- "\07VLAN" \
- "\06P4" \
- "\05P3" \
- "\04P2"
-
+#define BCE_L2FHDR_PRINTFB \ + "\20" \ + "\40UDP_XSUM_ERR" \ + "\37b30" \ + "\36b29" \ + "\35TCP_XSUM_ERR" \ + "\34b27" \ + "\33b26" \ + "\32b25" \ + "\31b24" \ + "\30b23" \ + "\27b22" \ + "\26GIANT_ERR" \ + "\25SHORT_ERR" \ + "\24ALIGN_ERR" \ + "\23PHY_ERR" \ + "\22CRC_ERR" \ + "\21SPLIT" \ + "\20UDP" \ + "\17TCP" \ + "\16IP" \ + "\15b12" \ + "\14b11" \ + "\13b10" \ + "\12b09" \ + "\11RSS" \ + "\10SNAP" \ + "\07VLAN" \ + "\06P4" \ + "\05P3" \ + "\04P2" + /* * l2_context definition @@ -1147,13 +1144,13 @@ struct l2_fhdr { */ #define BCE_L2CTX_BD_PRE_READ 0x00000000 #define BCE_L2CTX_CTX_SIZE 0x00000000 -#define BCE_L2CTX_CTX_TYPE 0x00000000
-#define BCE_L2CTX_LO_WATER_MARK_DEFAULT 32
-#define BCE_L2CTX_LO_WATER_MARK_SCALE 4
-#define BCE_L2CTX_LO_WATER_MARK_DIS 0
-#define BCE_L2CTX_HI_WATER_MARK_SHIFT 4
-#define BCE_L2CTX_HI_WATER_MARK_SCALE 16
-#define BCE_L2CTX_WATER_MARKS_MSK 0x000000ff
+#define BCE_L2CTX_CTX_TYPE 0x00000000 +#define BCE_L2CTX_LO_WATER_MARK_DEFAULT 32 +#define BCE_L2CTX_LO_WATER_MARK_SCALE 4 +#define BCE_L2CTX_LO_WATER_MARK_DIS 0 +#define BCE_L2CTX_HI_WATER_MARK_SHIFT 4 +#define BCE_L2CTX_HI_WATER_MARK_SCALE 16 +#define BCE_L2CTX_WATER_MARKS_MSK 0x000000ff #define BCE_L2CTX_CTX_TYPE_SIZE_L2 ((0x20/20)<<16) #define BCE_L2CTX_CTX_TYPE_CTX_BD_CHN_TYPE (0xf<<28) @@ -1166,18 +1163,18 @@ struct l2_fhdr { #define BCE_L2CTX_NX_BDHADDR_HI 0x00000010 #define BCE_L2CTX_NX_BDHADDR_LO 0x00000014 #define BCE_L2CTX_NX_BDIDX 0x00000018 -
-/* Page Buffer Descriptor Index */
-#define BCE_L2CTX_HOST_PG_BDIDX 0x00000044
-/* SKB and Page Buffer Size */
-#define BCE_L2CTX_PG_BUF_SIZE 0x00000048
-/* Page Chain BD Context */
-#define BCE_L2CTX_RBDC_KEY 0x0000004c
-#define BCE_L2CTX_RBDC_JUMBO_KEY 0x3ffe
+ +/* Page Buffer Descriptor Index */ +#define BCE_L2CTX_HOST_PG_BDIDX 0x00000044 +/* SKB and Page Buffer Size */ +#define BCE_L2CTX_PG_BUF_SIZE 0x00000048 +/* Page Chain BD Context */ +#define BCE_L2CTX_RBDC_KEY 0x0000004c +#define BCE_L2CTX_RBDC_JUMBO_KEY 0x3ffe /* Page Chain Next BD Host Address */ -#define BCE_L2CTX_NX_PG_BDHADDR_HI 0x00000050
-#define BCE_L2CTX_NX_PG_BDHADDR_LO 0x00000054
-#define BCE_L2CTX_NX_PG_BDIDX 0x00000058
+#define BCE_L2CTX_NX_PG_BDHADDR_HI 0x00000050 +#define BCE_L2CTX_NX_PG_BDHADDR_LO 0x00000054 +#define BCE_L2CTX_NX_PG_BDIDX 0x00000058 /* @@ -3113,26 +3110,61 @@ struct l2_fhdr { #define BCE_RPM_ACPI_DBG_BUF_W31 0x000019f4 #define BCE_RPM_ACPI_DBG_BUF_W32 0x000019f8 #define BCE_RPM_ACPI_DBG_BUF_W33 0x000019fc -
-/*
- * timer_reg definition
- * offset: 0x4400
- */
- -#define BCE_TIMER_COMMAND 0x00004400
-#define BCE_TIMER_COMMAND_ENABLED (1L<<0)
-
-#define BCE_TIMER_STATUS 0x00004404
-#define BCE_TIMER_STATUS_CMP_FTQ_WAIT (1L<<0)
-#define BCE_TIMER_STATUS_POLL_PASS_CNT (1L<<8)
-#define BCE_TIMER_STATUS_TMR1_CNT (1L<<9)
-#define BCE_TIMER_STATUS_TMR2_CNT (1L<<10)
-#define BCE_TIMER_STATUS_TMR3_CNT (1L<<11)
-#define BCE_TIMER_STATUS_TMR4_CNT (1L<<12)
-#define BCE_TIMER_STATUS_TMR5_CNT (1L<<13)
-
-#define BCE_TIMER_25MHZ_FREE_RUN 0x00004448
-
+ + +/* + * rlup_reg definition + * offset: 0x2000 + */ +#define BCE_RLUP_FTQ_CMD 0x000023f8 +#define BCE_RLUP_FTQ_CTL 0x000023fc +#define BCE_RLUP_FTQ_CTL_MAX_DEPTH (0x3ffL<<12) +#define BCE_RLUP_FTQ_CTL_CUR_DEPTH (0x3ffL<<22) + + + +/* + * rdma_reg definition + * offset: 0x2c00 + */ +#define BCE_RDMA_FTQ_CMD 0x00002ff8 +#define BCE_RDMA_FTQ_CTL 0x00002ffc +#define BCE_RDMA_FTQ_CTL_MAX_DEPTH (0x3ffL<<12) +#define BCE_RDMA_FTQ_CTL_CUR_DEPTH (0x3ffL<<22) + + + +/* + * timer_reg definition + * offset: 0x4400 + */ + +#define BCE_TIMER_COMMAND 0x00004400 +#define BCE_TIMER_COMMAND_ENABLED (1L<<0) + +#define BCE_TIMER_STATUS 0x00004404 +#define BCE_TIMER_STATUS_CMP_FTQ_WAIT (1L<<0) +#define BCE_TIMER_STATUS_POLL_PASS_CNT (1L<<8) +#define BCE_TIMER_STATUS_TMR1_CNT (1L<<9) +#define BCE_TIMER_STATUS_TMR2_CNT (1L<<10) +#define BCE_TIMER_STATUS_TMR3_CNT (1L<<11) +#define BCE_TIMER_STATUS_TMR4_CNT (1L<<12) +#define BCE_TIMER_STATUS_TMR5_CNT (1L<<13) + +#define BCE_TIMER_25MHZ_FREE_RUN 0x00004448 + + +/* + * tsch_reg definition + * offset: 0x4c00 + */ + +#define BCE_TSCH_FTQ_CMD 0x00004ff8 +#define BCE_TSCH_FTQ_CTL 0x00004ffc +#define BCE_TSCH_FTQ_CTL_MAX_DEPTH (0x3ffL<<12) +#define BCE_TSCH_FTQ_CTL_CUR_DEPTH (0x3ffL<<22) + + /* * rbuf_reg definition @@ -3426,6 +3458,16 @@ struct l2_fhdr { #define BCE_MQ_MEM_RD_DATA2_VALUE (0x3fffffffL<<0) +/* + * csch_reg definition + * offset: 0x4000 + */ +#define BCE_CSCH_COMMAND 0x00004000 +#define BCE_CSCH_CH_FTQ_CMD 0x000043f8 +#define BCE_CSCH_CH_FTQ_CTL 0x000043fc +#define BCE_CSCH_CH_FTQ_CTL_MAX_DEPTH (0x3ffL<<12) +#define BCE_CSCH_CH_FTQ_CTL_CUR_DEPTH (0x3ffL<<22) + /* * tbdr_reg definition @@ -4458,6 +4500,16 @@ struct l2_fhdr { /* + * tas_reg definition + * offset: 0x1c0000 + */ +#define BCE_TAS_FTQ_CMD 0x001c03f8 +#define BCE_TAS_FTQ_CTL 0x001c03fc +#define BCE_TAS_FTQ_CTL_MAX_DEPTH (0x3ffL<<12) +#define BCE_TAS_FTQ_CTL_CUR_DEPTH (0x3ffL<<22) + + +/* * mcp_reg definition * offset: 0x140000 */ @@ -4566,37 +4618,37 @@ struct l2_fhdr { /****************************************************************************/ /****************************************************************************/ -/* Begin firmware definitions. */
-/****************************************************************************/
-/* The following definitions refer to pre-defined locations in processor */
-/* memory space which allows the driver to enable particular functionality */
-/* within the firmware or read specfic information about the running */
+/* Begin firmware definitions. */ +/****************************************************************************/ +/* The following definitions refer to pre-defined locations in processor */ +/* memory space which allows the driver to enable particular functionality */ +/* within the firmware or read specfic information about the running */ /* firmware. */ -/****************************************************************************/
-
-/*
- * Perfect match control register.
- * 0 = Default. All received unicst packets matching MAC address
- * BCE_EMAC_MAC_MATCH[0:1,8:9,10:11,12:13,14:15] are sent to receive queue
- * 0, all other perfect match registers are reserved.
- * 1 = All received unicast packets matching MAC address
- * BCE_EMAC_MAC_MATCH[0:1] are mapped to receive queue 0,
- * BCE_EMAC_MAC_MATCH[2:3] is mapped to receive queue 1, etc.
- * 2 = All received unicast packets matching any BCE_EMAC_MAC_MATCH[] register
- * are sent to receive queue 0.
- */
-#define BCE_RXP_PM_CTRL 0x0e00d0
-
-/*
- * This firmware statistic records the number of frames that
- * were dropped because there were no buffers available in the
- * receive chain.
- */
-#define BCE_COM_NO_BUFFERS 0x120084
+/****************************************************************************/ + +/* + * Perfect match control register. + * 0 = Default. All received unicst packets matching MAC address + * BCE_EMAC_MAC_MATCH[0:1,8:9,10:11,12:13,14:15] are sent to receive queue + * 0, all other perfect match registers are reserved. + * 1 = All received unicast packets matching MAC address + * BCE_EMAC_MAC_MATCH[0:1] are mapped to receive queue 0, + * BCE_EMAC_MAC_MATCH[2:3] is mapped to receive queue 1, etc. + * 2 = All received unicast packets matching any BCE_EMAC_MAC_MATCH[] register + * are sent to receive queue 0. + */ +#define BCE_RXP_PM_CTRL 0x0e00d0 + +/* + * This firmware statistic records the number of frames that + * were dropped because there were no buffers available in the + * receive chain. + */ +#define BCE_COM_NO_BUFFERS 0x120084 /****************************************************************************/ /* End firmware definitions. */ /****************************************************************************/ -
+ #define NUM_MC_HASH_REGISTERS 8 @@ -4661,14 +4713,14 @@ struct l2_fhdr { /* Use the natural page size of the host CPU. */ /* XXX: This has only been tested on amd64/i386 systems using 4KB pages. */ #define BCM_PAGE_BITS PAGE_SHIFT -#define BCM_PAGE_SIZE PAGE_SIZE
+#define BCM_PAGE_SIZE PAGE_SIZE #define BCM_PAGE_MASK (BCM_PAGE_SIZE - 1) -#define BCM_PAGES(x) ((((x) + BCM_PAGE_SIZE - 1) & BCM_PAGE_MASK) >> BCM_PAGE_BITS)
+#define BCM_PAGES(x) ((((x) + BCM_PAGE_SIZE - 1) & BCM_PAGE_MASK) >> BCM_PAGE_BITS) -/*
- * Page count must remain a power of 2 for all
- * of the math to work correctly.
- */
+/* + * Page count must remain a power of 2 for all + * of the math to work correctly. + */ #define TX_PAGES 2 #define TOTAL_TX_BD_PER_PAGE (BCM_PAGE_SIZE / sizeof(struct tx_bd)) #define USABLE_TX_BD_PER_PAGE (TOTAL_TX_BD_PER_PAGE - 1) @@ -4685,10 +4737,10 @@ struct l2_fhdr { #define TX_PAGE(x) (((x) & ~USABLE_TX_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) #define TX_IDX(x) ((x) & USABLE_TX_BD_PER_PAGE) -/*
- * Page count must remain a power of 2 for all
- * of the math to work correctly.
- */
+/* + * Page count must remain a power of 2 for all + * of the math to work correctly. + */ #define RX_PAGES 2 #define TOTAL_RX_BD_PER_PAGE (BCM_PAGE_SIZE / sizeof(struct rx_bd)) #define USABLE_RX_BD_PER_PAGE (TOTAL_RX_BD_PER_PAGE - 1) @@ -4705,11 +4757,11 @@ struct l2_fhdr { #define RX_PAGE(x) (((x) & ~USABLE_RX_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) #define RX_IDX(x) ((x) & USABLE_RX_BD_PER_PAGE) -/*
- * To accomodate jumbo frames, the page chain should
- * be 4 times larger than the receive chain.
- */
-#define PG_PAGES (RX_PAGES * 4)
+/* + * To accomodate jumbo frames, the page chain should + * be 4 times larger than the receive chain. + */ +#define PG_PAGES (RX_PAGES * 4) #define TOTAL_PG_BD_PER_PAGE (BCM_PAGE_SIZE / sizeof(struct rx_bd)) #define USABLE_PG_BD_PER_PAGE (TOTAL_PG_BD_PER_PAGE - 1) #define TOTAL_PG_BD (TOTAL_PG_BD_PER_PAGE * PG_PAGES) @@ -4724,7 +4776,7 @@ struct l2_fhdr { #define PG_PAGE(x) (((x) & ~USABLE_PG_BD_PER_PAGE) >> (BCM_PAGE_BITS - 4)) #define PG_IDX(x) ((x) & USABLE_PG_BD_PER_PAGE) -
+ /* Context size. */ #define CTX_SHIFT 7 #define CTX_SIZE (1 << CTX_SHIFT) @@ -4910,7 +4962,7 @@ struct bce_softc #define BCE_NO_WOL_FLAG 0x00000008 #define BCE_USING_DAC_FLAG 0x00000010 #define BCE_USING_MSI_FLAG 0x00000020 -#define BCE_MFW_ENABLE_FLAG 0x00000040
+#define BCE_MFW_ENABLE_FLAG 0x00000040 /* PHY specific flags. */ u32 bce_phy_flags; @@ -4983,8 +5035,8 @@ struct bce_softc u32 rx_prod_bseq; /* Counts the bytes used. */ u16 tx_prod; u16 tx_cons; - u32 tx_prod_bseq; /* Counts the bytes used. */
- u16 pg_prod;
+ u32 tx_prod_bseq; /* Counts the bytes used. */ + u16 pg_prod; u16 pg_cons; int bce_link; @@ -4995,8 +5047,8 @@ struct bce_softc /* Frame size and mbuf allocation size for RX frames. */ u32 max_frame_size; - int rx_bd_mbuf_alloc_size;
- int pg_bd_mbuf_alloc_size;
+ int rx_bd_mbuf_alloc_size; + int pg_bd_mbuf_alloc_size; /* Receive mode settings (i.e promiscuous, multicast, etc.). */ u32 rx_mode; @@ -5020,7 +5072,7 @@ struct bce_softc struct rx_bd *rx_bd_chain[RX_PAGES]; bus_addr_t rx_bd_chain_paddr[RX_PAGES]; - /* H/W maintained page buffer descriptor chain structure. */
+ /* H/W maintained page buffer descriptor chain structure. */ bus_dma_tag_t pg_bd_chain_tag; bus_dmamap_t pg_bd_chain_map[PG_PAGES]; struct rx_bd *pg_bd_chain[PG_PAGES]; @@ -5062,11 +5114,11 @@ struct bce_softc /* Track the number of buffer descriptors in use. */ u16 free_rx_bd; - u16 max_rx_bd;
+ u16 max_rx_bd; u16 used_tx_bd; u16 max_tx_bd; u16 free_pg_bd; - u16 max_pg_bd;
+ u16 max_pg_bd; /* Provides access to hardware statistics through sysctl. */ u64 stat_IfHCInOctets; @@ -5134,10 +5186,12 @@ struct bce_softc /* TX DMA mapping failure counter. */ u32 tx_dma_map_failures; + u64 rx_intr_time; + #ifdef BCE_DEBUG /* Track the number of enqueued mbufs. */ int debug_tx_mbuf_alloc; - int debug_rx_mbuf_alloc;
+ int debug_rx_mbuf_alloc; int debug_pg_mbuf_alloc; /* Track how many and what type of interrupts are generated. */ @@ -5145,23 +5199,22 @@ struct bce_softc u32 interrupts_handled; u32 rx_interrupts; u32 tx_interrupts; -
- /* Track interrupt time (25MHz clock). */
- u64 rx_intr_time;
- u64 tx_intr_time;
+ + /* Track interrupt time (25MHz clock). */ + u64 tx_intr_time; u32 rx_low_watermark; /* Lowest number of rx_bd's free. */ - u32 rx_empty_count; /* Number of times the RX chain was empty. */
-
+ u32 rx_empty_count; /* Number of times the RX chain was empty. */ + u32 pg_low_watermark; /* Lowest number of pages free. */ - u32 pg_empty_count; /* Number of times the page chain was empty. */
+ u32 pg_empty_count; /* Number of times the page chain was empty. */ u32 tx_hi_watermark; /* Greatest number of tx_bd's used. */ u32 tx_full_count; /* Number of times the TX chain was full. */ -
+ /* Simulated mbuf allocation failure counter. */ - u32 debug_mbuf_sim_alloc_failed;
-
+ u32 debug_mbuf_sim_alloc_failed; + u32 l2fhdr_status_errors; u32 unexpected_attentions; u32 lost_status_block_updates; |