Programmer’s Guide BCM5722
10/15/07
Broadcom Corporation
Document 5722-PG101-R Initialization Page 86
34. Set the BD Ring replenish threshold for RX Producer Ring. The threshold values indicate the number of buffer descriptors
that must be indicated by the host software before a DMA is initiated to fetch additional receive descriptors in order to
replenish used receive descriptors. The recommended configuration value for the Standard Receive BD Ring Replenish
Threshold (see “Standard Receive BD Producer Ring Replenish Threshold Register (Offset
0x2C18–0x2C1B)—BCM5722, BCM5755, BCM5755M, BCM5756M, BCM5757, BCM5754, BCM5787 Only” on
page 290) is 25.
35. Initialize send ring producer index registers in mailbox. Clear (i.e., zero) the send bd ring host producer index (see “Send
BD Ring Host Producer Index Register (Offset 0x300–0x307)” on page 240 for host standard and flat modes and “Send
BD Ring Host Producer Indices Registers (Offset 0x5900–0x5907)” on page 325 for indirect mode). It is unnecessary to
clear both the high- and low-priority mailbox registers.
36. Initialize send rings. The Send RCBs are located in the Miscellaneous Memory region from 0x100 to 0x1FF. Host
software should be careful to initialize the host physical memory address, based on allocation routines specific to the OS/
RTOS. The MAC will cache ¼ of the available Send BDs in NIC local memory, so the host driver must set up the NIC
local address. The following formula should be used to calculate the NIC Send Ring address:
NIC Ring Address = 0x4000 + (Ring_Number * sizeof(Send_Buffer_Descriptor) *
NO_BDS_IN_RING) / 4
37.
Disable unused Receive Return Rings. Host software should write the RCB_FLAG_RING_DISABLED bit to the flags
field of the ring control blocks of all unused Receive Return Rings.
38. Initialize Receive Return Rings. The Receive Return Ring RCBs are located in the Miscellaneous Memory region from
0x200 to 0x2FF. Host software should be careful to initialize the host physical memory address, based on allocation
routines specific to the OS/RTOS. The Max_Len field indicates the ring size and it can be configured to either 32 or 64
or 128 or 256 or 512. The NIC RingAddress field of RCB is an invalid field for Rx Return Rings and hence host driver
should set NIC Ring Address to 0x0000.
39. Initialize the Receive Producer Ring mailbox registers. Software should write the value 0x00000000 (clear) to the low 32
bits of the Receive BD Standard Producer Ring Index mailbox (see “Receive BD Standard Producer Ring Index Register
(Offset 0x268–0x26F)” on page 239 for host standard and flat modes). If software is using register indirect mode, the
receive BD Standard Producer Ring index register (see “Receive BD Standard Producer Ring Index Register (Offset
0x5868–0x586F)” on page 325) may be cleared. It is unnecessary to clear both the high- and low-priority mailbox
registers.
Table 37: Recommended BCM5722 Ethernet controller Standard Ring Initialization Settings for Internal Memory
Only
RCB Data Field Recommended Value Notes
NIC Ring Address(32-bits) 0x6000
Max_Length 0x200 Number of Elements in the ring. The valid configuration
values are 32, 64, 128, 256, and 512.
Note: Host software must insure that on systems that support more than 4 GB of physical memory, Send
Rings, Receive Return Rings, Producer Rings, and packet buffers are not allocated across the 4 GB
memory boundary. For example, if the starting memory address of the Standard Receive Buffer Ring is
below 4 GB and the ending address is above 4 GB, a read DMA PCI host address overflow error may be
generated (see “Read DMA Status Register (Offset 0x4804)” on page 313).
Note: The Standard RX Producer threshold value should be set very low. Some O/S may run short of
memory resource, and the number of BDs that are made available will decrease proportionally.
Note: The maximum number of Send BDs (buffer descriptors) for a single packet is (0.75)*(ring size).