[eepro100] Endian Question
Donald Becker
becker@scyld.com
Thu, 13 Jul 2000 01:13:37 -0400 (EDT)
On Wed, 12 Jul 2000, Naga R Narayanaswamy wrote:
> This is a general question on the 82559 chip.
>
> I want to know if one can change the endian operating mode in 82559
> chip.
No.
This shouldn't be an issue, though. The recent versions of the driver
have explicit macros that swap the descriptor fields for big-endian
machines.
The run-time overhead for explicit byte swap exists only for big-endian
machines, and it's a single-cycle instruction on most machines. The drivers
are written so that byte swapping happens at compile time wherever
possible.
The greater overhead is in uglier driver code, but it's not too bad.
Especially not compared to e.g. Solaris drivers.
> For e.g., in 21143, through CSR0 (Bus Mode Register), descriptor byte
> ordering mode can be changed. When the bit DBO is set, 21143 operates
> in big endian byte ordering mode. Also by setting BLE the data buffer
> is affected.
About a year ago I converted the Tulip driver to do explicit byte-swaps as
well. The problem is that few work-alike chips support descriptor byte
swapping, and neither does the 21040. Converting the driver was far easier
than answering the "this will work, that will not" documentation, and the
zillion emails that say "yes, the web page is correct".
> Is it possible to do the same in 82559. I want to be able to set the
> 82559
> to operate in big endian format. My understanding is
> Intel chips are little endian and PCI bus operates in little endian.
All Intel processor chips are little endian, since the beginning of time
(Unix time, 1970 ;-> ). Intel helped defined the PCI specs, and PCI is
unabashedly little endian. Even if it were trivial to put big-endian
support in the i82559 (and it's not), Intel would not have done it.
Donald Becker becker@scyld.com
Scyld Computing Corporation http://www.scyld.com
410 Severn Ave. Suite 210 Beowulf Clusters / Linux Installations
Annapolis MD 21403