I'm currently preparing to check the existing wireless drivers and cardbus
0.2 on SPARC, among others to bring the ath(7D) driver to SPARC as discussed
here:
http://www.opensolaris.org/jive/thread.jspa?messageID=18945䨁
Doing so on O/N 20060327, I ran into a couple of problems:
* cardbus 0.2:
Here's where by far most of the problems lie:
I had to discover which build the modified files were based on: some of
them contained versions considerably older than current O/N.
It seems like I had to discard the changed versions of
common/pcmcia/cis/cis_handlers.c, common/pcmcia/cs/cs.c, and
common/pcmcia/sys/cis.h, while merging changes to
common/pcmcia/nexus/pcmcia.c.
Apart from that, there are some inconsistencies:
* -I$(UTSBASE)/sun4u seems completely wrong in i86pc/{cardbus,
pcic}/Makefile, but necessary to find a couple of PCI headers
(<sys/pci/pci_types.h>, <sys/pci/pci_nexus.h>, <sys/pci/pci_regs.h>,
<sys/pci/pci_iommu.h>), these files probably need to move to common.
* ddi_{put, get}{l, b} are only in <sys/ddi_obsolete.h> and have to be
replaced by ddi_{put, get}{32, 8} instead.
* dnode_t has been replaced by pnode_t.
* It seems strange that the x86 files reside in i86pc/{cardbus, pcic},
while the sparc ones are in sparc/{cardbus, pcic}. Either the code is
only isa-dependent, in which case the x86 code belongs into intel, or
it is implarch dependent, which would mean the sparc code should go
into sun4[uv]. I've found this inconsistency in many cases, with no
clear indication why a given driver lived in one directory or the
other.
* Even with the changes above, which made the code compile on x86, the
sparc build still failed:
cardbus.c fails to compile on sparc:
"../../common/io/cardbus.c", line 528: syntax error before or at: psm_intr_op_t
psm_intr_op_t only defined in usr/src/uts/i86pc/sys/psm_types.h
"../../common/pcmcia/nexus/pcmcia.c", line 4849: syntax error before or at: =
ddi_ispec_t is only used in
./common/io/cardbus.c:#include "sys/nexusintr_impl.h" /* for ddi_ispec_t */
./common/pcmcia/nexus/pcmcia.c: ddi_ispec_t *ip = (ddi_ispec_t
*)hdlp->ih_private;
./common/pcmcia/nexus/pcmcia.c: ddi_ispec_t *ip = (ddi_ispec_t
*)hdlp->ih_private;
but no definition anywhere.
I haven't further investigated this yet.
* ath 0.2:
I've located the sparcv9 version of hal.o with ATH_HAL_VERSION "0.9.16.3"
and built successfully so far. I've yet to actually try the resulting
driver.
* pcwl 0.1:
This source tarball provides modified files already present in O/N, so you
have to figure out what build they originally came from and detect the
differences yourself.
During a nightly -p build, make clobber failed in pkgdefs/SUNWpcwl on x86
only. I've no idea why yet.
* pcan 0.1:
The source tarball lacks the modified files necessary to integrate into
an ON build, i.e.
pkgdefs/Makefile
uts/common/Makefile.files
uts/intel/Makefile.intel.shared
uts/sparc/Makefile.sparc.shared
It would be really useful to indicate which build the sources were tested
against and to provide *diffs* against the modified files so the changes
can easily be applied to later sources. I've made the necessary changes
myself, but run into a problem:
pcan.c fails to compile at all:
+ /opt/onstudio10/SUNWspro/bin/cc -xarch=amd64 -Ui386 -U__i386 -xO3
../../intel/amd64/ml/amd64.il -D_ASM_INLINES -Xa -xspace -Wu,-xmodel=kernel
-Wu,-save_args -v -xildoff -g -xc99=%none -W0,-noglobal -errtags=yes
-errwarn=%all -xc99=%none -v -D_KERNEL -D_SYSCALL32 -D_SYSCALL32_IMPL -D_ELF64
-D_DDI_STRICT -Dsun -D__sun -D__SVR4 -DDEBUG -D_SIMULATOR_SUPPORT -DC2_AUDIT
-I../../intel -I../../common/pcmcia -I../../i86pc -Y I,../../common -c -o
debug64/pcan.o ../../common/io/pcmcia/pcan.c
"../../common/io/pcmcia/pcan.c", line 408: warning: implicitly declaring
function to return int: REG_WRITE() (E_IMPLICIT_DECL_FUNC_RETURN_INT)
"../../common/io/pcmcia/pcan.c", line 1304: warning: implicitly declaring
function to return int: REG_READ() (E_IMPLICIT_DECL_FUNC_RETURN_INT)
"../../common/io/pcmcia/pcan.c", line 1916: warning: implicitly declaring
function to return int: REG_READ_P() (E_IMPLICIT_DECL_FUNC_RETURN_INT)
"../../common/io/pcmcia/pcan.c", line 1978: warning: implicitly declaring
function to return int: REG_WRITE_P() (E_IMPLICIT_DECL_FUNC_RETURN_INT)
cc: acomp failed for ../../common/io/pcmcia/pcan.c
*** Error code 2
dmake: Warning: Command failed for target `debug64/pcan.o'
I've found no definition of those four macros at all.
Any suggestions for the compile failures above (both x86 and sparc)?
Thanks.
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University