Subject: Re: Gigabit Ethernet support on gmac?
To: None <port-macppc@netbsd.org>
From: Monroe Williams <monroe@criticalpath.com>
List: port-macppc
Date: 10/17/2001 12:05:17
Markus W Kilbinger <kilbi@rad.rwth-aachen.de> writes:
>>>>>> "Jason" == Jason R Thorpe <thorpej@wasabisystems.com> writes:
> 
>   Jason> If you use NetBSD-current, you should try the new "gem"
>   Jason> driver. The "gem" is the Sun Gig-E, which is the same as
>   Jason> the Apple "GMAC".
> 
>   Jason> The "gm" driver in the macppc port was apparently
>   Jason> reverse-engineered, and the "gem" driver is MUCH more
>   Jason> complete.

If this is true, the macppc GENERIC config should probably be using it.

> Ends up with:
> 
> cc  -O2 -Werror -Wall -Wreturn-type -Wpointer-arith -Wno-main
> -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -msoft-float  -I.
> -I../../../../arch -I../../../.. -nostdinc -DNEWPMAP -DLKM -DDIAGNOSTIC
> -DNMBCLUSTERS="0x1000" -DMAXUSERS=32  -D_KERNEL -D_KERNEL_OPT -Dmacppc  -c
> ../../../../dev/ic/gem.c
> cc1: warnings being treated as errors
> ../../../../dev/ic/gem.c: In function `gem_init':
> ../../../../dev/ic/gem.c:749: warning: implicit declaration of function
> `bus_space_write_8'
> 
> ... at the moment on my tibook.
> 

I see that sys/arch/macppc/include/bus.h includes the following:

> #if 0   /* Cause a link error for bus_space_write_8 */
> #define bus_space_write_8               !!! unimplemented !!!
> #endif

but doesn't actually define bus_space_write_8.

Any idea how it should be implemented?  The version in the sparc port is
pretty straightforward, but it doesn't appear to do anything with the
bus_space_tag_t argument.  I'm guessing this is not safe to ignore on the
powerpc.  I don't see an implementation in include/bus.h in any of the
existing powerpc-based ports, nor in arch/powerpc.

-- monroe
------------------------------------------------------------------------
Monroe Williams                                  monroe@criticalpath.com