Subject: Re: Sun PCI periphs
To: None <current-users@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: current-users
Date: 04/01/1999 08:39:01
mjacob@feral.com wrote:

> > I think there is the endian problem. Some PCI drivers don't
> > work on big endian machines. Of cource, it is not Sun specific.
> 
> Sun pci bridge chips do the approprate swizzling.

Ok, then bus_space(9) don't have to take care of the endian.

But there are still some problem. We should do swapping on:

1) read/write values in different size stream from the target value size
  (u_int8_t structure members in u_int16_t stream, etc.)

2) passing non-stream values to/from the device via DMA
  (see /sys/dev/pci/pcscp.c, PR kern/7279 etc.)

Anyway, many files in /sys/dev/{pci,ic}/ have `#if BYTE_ORDER == ...'
ifdefs.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp