Revision History +-----+-------------+----------------------------------------------------+ | Rev | Edited By | Changes | +-----+-------------+----------------------------------------------------+ | 1.1 | Yuming Chen | Initial document, part of the one-pager. | +-----+-------------+----------------------------------------------------+ | 1.2 | Yuming Chen | (1) Change the "Type" of the "local-mac-address" | | | | property to "Prop-encoded-array of six | | | | prop-encoded-bytes" | | | | (2) Simplify the description of the "reg" property | | | | (3) Change the integer value of the "max-frame- | | | | size" property from 00 00 24 00 to 00002400 | | | | (4) Change the integer value of the "address- | | | | bits" property from 00 00 00 30 to 00000030 | | | | (5) Change the "Value" of the "fcode-rom-offset" | | | | property to "000N0000, where N is 0, 1, 2 | | | | and 3" | +-----+-------------+----------------------------------------------------+ | 1.3 | Yuming Chen | (1) property name "assigned-address" should be | | | | "assigned-addresses" | | | | (2) Simplify the description of the "assigned- | | | | addresses" property | +-----+-------------+----------------------------------------------------+ | 1.4 | Yuming Chen | Add 'mac-addresses' property | |-----+-------------+----------------------------------------------------+ | 1.5 | Raghu S | Add new property values to "phy-type" property | |-----+-------------+----------------------------------------------------+ | 1.6 | Eric B | Add new property value to "phy-type" property | |-----+-------------+----------------------------------------------------+ 4. Technical Description: 4.1 Details: The driver implements standard methods specified by IEEE 1275-1994 to configure the Neptune, to allocate system resources, to transmit or receive packets, and to detect and report errors. The FCode driver creates device properties in addition to the properties published by the system OpenBoot. The driver also implements a selftest method to do register and loopback tests and a reset method for resetting the device. 4.1.1 Open Firmware-defined Methods for Network Device The driver provides the following network interface methods required by the IEEE 1275 standard, open ( -- okay? ) Prepare the device for subsequent use. Initialize buffers, select a DMA channel, reset, configure and enable functional modules. Initialize obp-tftp package. close ( -- ) Close the previously opened device. Free buffers, close obp-tftp package. read ( addr len -- actual ) Read network packets from the device into memory buffer, return actual number of bytes read. write ( addr len -- actual ) Write network packets from memory buffer to the device, return actual number of bytes written. load ( addr -- size ) Load a file to the host memory over the network through the network interface. 4.1.2 Open Firmware-defined Generic Methods The driver also provides the following generic methods defined by the IEEE 1275-1994 standard, selftest ( -- 0|error-code ) Do register and loopback tests. reset ( -- ) Put the Neptune into a quiescent state. 4.1.3 Device Properties 4.1.3.1 Common Properties Among All Neptune Based Network Interface Devices "name" S Type: Prop-encoded-string Contents: Standard property to define the name of the device Value: "network" "device_type" S Type: Prop-encoded-string Contents: Standard property name to specify the implemented interface Value: "network" "network-interface-type" S Type: Prop-encoded-string Contents: Sun private property to identify the type of the interface Value: "ethernet" "max-frame-size" S Type: Prop-encoded-integer Contents: Standard property to indicate maximum allowable packet size Value: 00002400 (Hex) "address-bits" S Type: Prop-encoded-integer Contents: Standard property to indicate number of network address bits Value: 00000030 (Hex) "reg" S Type: Prop-encoded-array of prop-encoded-integers Contents: Standard property to display the information about the device's registers Value: Specified in "PCI-Express Binding to IEEE 1275" "compatible" S Type: Prop-encoded-array of prop-encoded-strings Contents: Standard property to define alternate "name" property values Value: "pciex108e,abcd.108e.0.0" "pciex108e,abcd.108e.0" "pciex108e,abcd.0" "pciex108e,abcd" "pciexclass,020000" "pciexclass,0200" 4.1.3.2 Properties Depending on Board Design "model" S Type: Prop-encoded-string Contents: Standard property to define a manufacturer's model information Value: "SUNW,pcie-2xgf" for the 2x10G fiber board "SUNW,pcie-qgc" for the 4x1G copper board "SUNW,pcie-neptune" for any onboard Neptune interface Note: IEEE 1275 defines "model" as "Manufacturer's model number". But like existing Sun network FCode drivers, we set the value to a string describing the device "board-model" S Type: Prop-encoded-string Contents: A Sun private property to define the board's "part number" and revision number Value: "501-XXXX-YY", where XXXX is a four digits Sun "part number" for the board and YY is a two digits revision number. Both XXXX and YY are in decimal Note: "board-model" has been used by existing network FCode drivers as a device property although it was defined by FWARC/2000/460 as a vital product data (VPD) rather than a device property "phy-type" S Type: Prop-encoded-string Contents: Sun private property to indicate the type of the physical layer Value: "xgc" for 10Gb copper "xgf" for 10Gb fiber "mif" for 1G/100M/10M copper "pcs" for 1Gb fiber "xgsd" for 10G SerDes "gsd" for 1G SerDes "gsdc" for 1G copper Note: FWARC/2006/556 proposed "xgc" and "xgf" as values for for the "phy-type" property. Existing network interface FCode drivers use "pcs" to indicate a 1G fiber interface and "mif" to indicate a 1G/100M/10M copper interface. "mif" was approved by FWARC/2000/460 as a VDP but not as a device property. "pcs" has not been specified by any FWARC case. This one-pager proposes to add "mif" and "pcs" as new values for the "phy-type" property. "version" S Type: Prop-encoded-string Contents: Sun private property to display the FCode driver information Value: For example, "2XGF 10G Ethernet Adapter FCode 2.3 06/11/19" Note: "version" has been used by existing network interface FCode drivers as a device property although it was only defined by FWARC/2000/460 as a VPD. This property is useful for users to get the information about the FCode "local-mac-address" S Type: Prop-encoded-array of six prop-encoded-bytes Contents: Standard property to specify pre-assigned network address Value: Six bytes of MAC addresses "mac-addresses" S Type: Prop-encoded-array of six prop-encoded-bytes Contents: Standard property to specify pre-assigned network addresses Value: Concatenation of multiple MAC addresses, each MAC address is six bytes long. 4.1.3.3 Properties Created by System OpenBoot Using the Infor- mation Retrieved From the PCIe configuration registers "vendor-id" S Type: Prop-encoded-integer Contents: Standard property to indicate vendor ID of a PCI device Value: 0000108e "device-id" S Type: Prop-encoded-integer Contents: Standard property to indicate device ID of a PCI device Value: 0000abcd "subsystem-vendor-id" S Type: Prop-encoded-integer Contents: Standard property to indicate subsystem-vendor ID of a PCI device Value: 0000108e "assigned-addresses" S Type: Prop-encoded-array of pairs of phy-addr and size. phys-addr is Prop-encoded-phys. size is Prop-encoded-integer. Contents: Standard property to indicate assigned physical addresses Value: Specified by "PCI-Express Binding to IEEE 1275" "fcode-rom-offset" S Type: Prop-encoded-integer Contents: Standard property to denote the offset of the FCode image within the device's Expansion ROM Value: 000N0000 Where N is 0, 1, 2 and 3 for the four Neptune PCIe functions "class-code" S Type: Prop-encoded-integer Contents: Standard property to indicate the type of the device Value: 00020000 to represent "Network controller" "revision-id" S Type: Prop-encoded-integer Contents: Standard property to identify the revision number of the PCIe function Value: A 4-byte hex number "interrupts" S Type: Prop-encoded-integer Contents: Standard property to identify interrupt pins seen in PCI-based systems. Neptune uses this property to identify simulated INTx interrupt signals. Value: 00000001, 00000002, 00000003 and 00000004 for the four Neptune PCIe functions