summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-06-25 14:47:13 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-06-25 14:47:13 +0000
commit5fb1c936ecd9670806b53e08abacebc63e437e9b (patch)
treefaca30681c59c8334c4e6afc26b46ac850d05be2 /sys
parent4e906bfb5f42c3b2a20d119f0ed35e82dfaf295b (diff)
Switch to genassym.cf and sync Makefile with other ports.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/conf/Makefile.sparc43
-rw-r--r--sys/arch/sparc/sparc/genassym.c228
-rw-r--r--sys/arch/sparc/sparc/genassym.cf188
3 files changed, 210 insertions, 249 deletions
diff --git a/sys/arch/sparc/conf/Makefile.sparc b/sys/arch/sparc/conf/Makefile.sparc
index c07c977f718..fde20997f1b 100644
--- a/sys/arch/sparc/conf/Makefile.sparc
+++ b/sys/arch/sparc/conf/Makefile.sparc
@@ -1,6 +1,7 @@
+# $OpenBSD: Makefile.sparc,v 1.10 1997/06/25 14:47:11 downsj Exp $
# $NetBSD: Makefile.sparc,v 1.32.4.1 1996/06/12 20:26:32 pk Exp $
-# Makefile for NetBSD
+# Makefile for OpenBSD
#
# This makefile is constructed from a machine description:
# config machineid
@@ -27,23 +28,29 @@ CPP?= cpp
LD?= ld
MKDEP?= mkdep
STRIP?= strip
-TOUCH?= touch -f -c
+TOUCH?= touch
# source tree is located via $S relative to the compilation directory
-S= ../../../..
-SPARC= ../..
+.ifndef S
+S!= cd ../../../..; pwd
+.endif
+SPARC= $S/arch/sparc
-INCLUDES= -I. -I$S/arch -I$S
+INCLUDES= -nostdinc -I. -I$S/arch -I$S
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL
-GCCWFLAGS= #-Werror -Wall -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS= ${DEBUG} -O2 ${GCCWFLAGS}
+
+CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-uninitialized -Wno-format
+
+CFLAGS= ${DEBUG} -O2 ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS}
# add `-mno-fpu' to work around gcc (last noticed in v2.7.2) bug
CFLAGS+= -mno-fpu
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -N -p -Ttext F8004000 -e start
STRIPFLAGS= -d
+TOUCHFLAGS= -f -c
-HOSTCC?= ${CC}
+HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -71,14 +78,14 @@ LIBCOMPAT= ${COMPATLIB_PROF}
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
DRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
DRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
+
%OBJS
%CFILES
@@ -110,14 +117,10 @@ LINKFLAGS+= -x
%LOAD
-assym.h: genassym
- ./genassym >assym.h
-
-genassym: genassym.o
- ${HOSTCC} -o $@ genassym.o
-
-genassym.o: ${SPARC}/sparc/genassym.c
- ${HOSTED_C}
+assym.h: $S/kern/genassym.sh ${SPARC}/sparc/genassym.cf
+ sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
+ ${PARAM} < ${SPARC}/sparc/genassym.cf > assym.h.tmp && \
+ mv -f assym.h.tmp assym.h
param.c: $S/conf/param.c
rm -f param.c
@@ -162,8 +165,6 @@ depend:: .depend
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SPARC}/sparc/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
- ${MKDEP} -a ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} ${PARAM} \
- ${SPARC}/sparc/genassym.c
# depend on root or device configuration
@@ -173,7 +174,7 @@ autoconf.o conf.o: Makefile
uipc_proto.o vfs_conf.o: Makefile
# depend on maxusers
-genassym.o machdep.o: Makefile
+machdep.o: Makefile
# depend on CPU configuration
bwtwo.o cgsix.o cgthree.o cgtwo.o cons.o dma.o esp.o fb.o if_ie.o: Makefile
diff --git a/sys/arch/sparc/sparc/genassym.c b/sys/arch/sparc/sparc/genassym.c
deleted file mode 100644
index ac0b0b8e36b..00000000000
--- a/sys/arch/sparc/sparc/genassym.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/* $NetBSD: genassym.c,v 1.17.4.1 1996/06/12 20:31:21 pk Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)genassym.c 8.1 (Berkeley) 6/11/93
- */
-
-#include <sys/param.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/map.h>
-#include <sys/proc.h>
-#include <sys/mbuf.h>
-#include <sys/msgbuf.h>
-#include <sys/syscall.h>
-#include <sys/user.h>
-#include <sys/device.h>
-#include <sys/disklabel.h>
-#include <sys/disk.h>
-
-#include <machine/pmap.h>
-#include <machine/cpu.h>
-
-#include <machine/oldmon.h>
-#include <machine/bsd_openprom.h>
-
-#ifdef notyet
-#include <sparc/dev/zsreg.h>
-#include <sparc/dev/zsvar.h>
-#endif
-#include <dev/ic/am7930reg.h>
-#include <sparc/dev/amd7930var.h>
-
-#include <sparc/dev/fdreg.h>
-#include <sparc/dev/fdvar.h>
-
-#include <stdio.h>
-#include <stddef.h>
-
-#define off(what, str, mem) def(what, (int)offsetof(str, mem))
-
-void def __P((char *, int));
-void flush __P((void));
-int main __P((void));
-
-void
-def(what, where)
- char *what;
- int where;
-{
-
- if (printf("#define\t%s\t%d\n", what, where) < 0) {
- perror("printf");
- exit(1);
- }
-}
-
-void
-flush()
-{
-
- if (fflush(stdout)) {
- perror("fflush");
- exit(1);
- }
-}
-
-int
-main()
-{
-
- /* general constants */
- def("BSD", BSD);
- def("SUN4_PGSHIFT", SUN4_PGSHIFT);
- def("SUN4CM_PGSHIFT", SUN4CM_PGSHIFT);
- def("USRSTACK", USRSTACK);
-
- /* proc fields and values */
- off("P_ADDR", struct proc, p_addr);
- off("P_STAT", struct proc, p_stat);
- off("P_WCHAN", struct proc, p_wchan);
- off("P_VMSPACE", struct proc, p_vmspace);
- def("SRUN", SRUN);
-
- /* VM structure fields */
- off("VM_PMAP", struct vmspace, vm_pmap);
- off("VM_PMAP_CTX", struct vmspace, vm_pmap.pm_ctx);
- off("VM_PMAP_CTXNUM", struct vmspace, vm_pmap.pm_ctxnum);
-
- /* interrupt/fault metering */
- off("V_SWTCH", struct vmmeter, v_swtch);
- off("V_INTR", struct vmmeter, v_intr);
- off("V_FAULTS", struct vmmeter, v_faults);
-
- /* PTE bits and related information */
- def("PG_W", PG_W);
- def("PG_VSHIFT", PG_VSHIFT);
- def("PG_PROTSHIFT", PG_PROTSHIFT);
- def("PG_PROTUREAD", PG_PROTUREAD);
- def("PG_PROTUWRITE", PG_PROTUWRITE);
-#if defined(SUN4M)
- def("SRMMU_TETYPE", SRMMU_TETYPE);
- def("SRMMU_TEPTE", SRMMU_TEPTE);
- def("SRMMU_PROT_MASK", SRMMU_PROT_MASK);
- def("PPROT_R_RW", PPROT_R_RW);
- def("PPROT_RX_RX", PPROT_RX_RX);
- def("PPROT_RWX_RWX", PPROT_RWX_RWX);
- def("PPROT_WRITE", PPROT_WRITE);
-#endif
-
- /* FPU state */
- off("FS_REGS", struct fpstate, fs_regs);
- off("FS_FSR", struct fpstate, fs_fsr);
- off("FS_QSIZE", struct fpstate, fs_qsize);
- off("FS_QUEUE", struct fpstate, fs_queue);
- def("FSR_QNE", FSR_QNE);
-
- /* system calls */
- def("SYS_sigreturn", SYS_sigreturn);
- def("SYS_execve", SYS_execve);
- def("SYS_exit", SYS_exit);
-
- /* errno */
- def("EFAULT", EFAULT);
- def("ENAMETOOLONG", ENAMETOOLONG);
-
- /* PCB fields */
- off("PCB_NSAVED", struct pcb, pcb_nsaved);
- off("PCB_ONFAULT", struct pcb, pcb_onfault);
- off("PCB_PSR", struct pcb, pcb_psr);
- off("PCB_RW", struct pcb, pcb_rw);
- off("PCB_SP", struct pcb, pcb_sp);
- off("PCB_PC", struct pcb, pcb_pc);
- off("PCB_UW", struct pcb, pcb_uw);
- off("PCB_WIM", struct pcb, pcb_wim);
-
- /* interrupt enable register PTE */
- def("IE_REG_PTE_PG", PG_V | PG_W | PG_S | PG_NC | PG_OBIO);
-
-#ifdef notyet
- /* ZSCC interrupt fields */
- off("ZSC_A", struct zs_softc, sc_a);
- off("ZSC_B", struct zs_softc, sc_b);
-/* off("ZL_WREG", struct zs_line, zl_wreg); */
- off("ZL_TBC", struct zs_line, zl_tbc);
- off("ZL_TBA", struct zs_line, zl_tba);
- off("ZL_RBPUT", struct zs_line, zl_rbput);
- off("ZL_RBUF", struct zs_line, zl_rbuf);
- def("ZSRR1_DO_bit", ffs(ZSRR1_DO) - 1);
-#endif
- /* audio trap handler fields */
- off("AU_AMD", struct auio, au_amd);
- off("AU_RDATA", struct auio, au_rdata);
- off("AU_REND", struct auio, au_rend);
- off("AU_PDATA", struct auio, au_pdata);
- off("AU_PEND", struct auio, au_pend);
- off("AU_EVCNT", struct auio, au_intrcnt.ev_count);
-
- off("AMD_IR", struct amd7930, ir);
- off("AMD_BBRB", struct amd7930, bbrb);
- off("AMD_BBTB", struct amd7930, bbtb);
-
- def("PROM_BASE", PROM_BASE);
-
- off("PV_NODEOPS", struct promvec, pv_nodeops);
- off("PV_HALT", struct promvec, pv_halt);
- off("PV_EVAL", struct promvec, pv_fortheval.v0_eval);
- off("PV_ROMVEC_VERS", struct promvec, pv_romvec_vers);
-
- off("NO_NEXTNODE", struct nodeops, no_nextnode);
- off("NO_GETPROP", struct nodeops, no_getprop);
-
- off("OLDMON_PRINTF", struct om_vector, printf);
- off("OLDMON_HALT", struct om_vector, exitToMon);
-
- /* floppy trap handler fields */
- off("FDC_REG_MSR", struct fdcio, fdcio_reg_msr);
- off("FDC_REG_FIFO", struct fdcio, fdcio_reg_fifo);
- off("FDC_ISTATE", struct fdcio, fdcio_istate);
- off("FDC_STATUS", struct fdcio, fdcio_status);
- off("FDC_NSTAT", struct fdcio, fdcio_nstat);
- off("FDC_DATA", struct fdcio, fdcio_data);
- off("FDC_TC", struct fdcio, fdcio_tc);
- off("FDC_EVCNT", struct fdcio, fdcio_intrcnt.ev_count);
-
- flush();
-
- return(0);
-}
diff --git a/sys/arch/sparc/sparc/genassym.cf b/sys/arch/sparc/sparc/genassym.cf
new file mode 100644
index 00000000000..338ff4b89b0
--- /dev/null
+++ b/sys/arch/sparc/sparc/genassym.cf
@@ -0,0 +1,188 @@
+# $OpenBSD: genassym.cf,v 1.1 1997/06/25 14:47:12 downsj Exp $
+#
+# Copyright (c) 1992, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This software was developed by the Computer Systems Engineering group
+# at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+# contributed to Berkeley.
+#
+# All advertising materials mentioning features or use of this software
+# must display the following acknowledgement:
+# This product includes software developed by the University of
+# California, Lawrence Berkeley Laboratory.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+# must display the following acknowledgement:
+# This product includes software developed by the University of
+# California, Berkeley and its contributors.
+# 4. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# @(#)genassym.c 8.1 (Berkeley) 6/11/93
+#
+
+include <sys/param.h>
+include <sys/buf.h>
+include <sys/proc.h>
+include <sys/map.h>
+include <sys/proc.h>
+include <sys/mbuf.h>
+include <sys/msgbuf.h>
+include <sys/syscall.h>
+include <sys/user.h>
+include <sys/device.h>
+include <sys/disklabel.h>
+include <sys/disk.h>
+
+include <machine/pmap.h>
+include <machine/cpu.h>
+
+include <machine/oldmon.h>
+include <machine/bsd_openprom.h>
+
+ifdef notyet
+include <sparc/dev/zsreg.h>
+include <sparc/dev/zsvar.h>
+endif
+include <dev/ic/am7930reg.h>
+include <sparc/dev/amd7930var.h>
+
+include <sparc/dev/fdreg.h>
+include <sparc/dev/fdvar.h>
+
+# general constants
+define BSD BSD
+define SUN4_PGSHIFT SUN4_PGSHIFT
+define SUN4CM_PGSHIFT SUN4CM_PGSHIFT
+define USRSTACK USRSTACK
+
+# proc fields and values
+define P_ADDR offsetof(struct proc, p_addr)
+define P_STAT offsetof(struct proc, p_stat)
+define P_WCHAN offsetof(struct proc, p_wchan)
+define P_VMSPACE offsetof(struct proc, p_vmspace)
+define SRUN SRUN
+
+# VM structure fields
+define VM_PMAP offsetof(struct vmspace, vm_pmap)
+define VM_PMAP_CTX offsetof(struct vmspace, vm_pmap.pm_ctx)
+define VM_PMAP_CTXNUM offsetof(struct vmspace, vm_pmap.pm_ctxnum)
+
+# interrupt/fault metering
+define V_SWTCH offsetof(struct vmmeter, v_swtch)
+define V_INTR offsetof(struct vmmeter, v_intr)
+define V_FAULTS offsetof(struct vmmeter, v_faults)
+
+# PTE bits and related information
+define PG_W PG_W
+define PG_VSHIFT PG_VSHIFT
+define PG_PROTSHIFT PG_PROTSHIFT
+define PG_PROTUREAD PG_PROTUREAD
+define PG_PROTUWRITE PG_PROTUWRITE
+ifdef SUN4M
+define SRMMU_TETYPE SRMMU_TETYPE
+define SRMMU_TEPTE SRMMU_TEPTE
+define SRMMU_PROT_MASK SRMMU_PROT_MASK
+define PPROT_R_RW PPROT_R_RW
+define PPROT_RX_RX PPROT_RX_RX
+define PPROT_RWX_RWX PPROT_RWX_RWX
+define PPROT_WRITE PPROT_WRITE
+endif
+
+# FPU state
+define FS_REGS offsetof(struct fpstate, fs_regs)
+define FS_FSR offsetof(struct fpstate, fs_fsr)
+define FS_QSIZE offsetof(struct fpstate, fs_qsize)
+define FS_QUEUE offsetof(struct fpstate, fs_queue)
+define FSR_QNE FSR_QNE
+
+# system calls
+define SYS_sigreturn SYS_sigreturn
+define SYS_execve SYS_execve
+define SYS_exit SYS_exit
+
+# errno
+define EFAULT EFAULT
+define ENAMETOOLONG ENAMETOOLONG
+
+# PCB fields
+define PCB_NSAVED offsetof(struct pcb, pcb_nsaved)
+define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
+define PCB_PSR offsetof(struct pcb, pcb_psr)
+define PCB_RW offsetof(struct pcb, pcb_rw)
+define PCB_SP offsetof(struct pcb, pcb_sp)
+define PCB_PC offsetof(struct pcb, pcb_pc)
+define PCB_UW offsetof(struct pcb, pcb_uw)
+define PCB_WIM offsetof(struct pcb, pcb_wim)
+
+# interrupt enable register PTE
+define IE_REG_PTE_PG PG_V | PG_W | PG_S | PG_NC | PG_OBIO
+
+ifdef notyet
+# ZSCC interrupt fields
+define ZSC_A offsetof(struct zs_softc, sc_a)
+define ZSC_B offsetof(struct zs_softc, sc_b)
+# define ZL_WREG offsetof(struct zs_line, zl_wreg)
+define ZL_TBC offsetof(struct zs_line, zl_tbc)
+define ZL_TBA offsetof(struct zs_line, zl_tba)
+define ZL_RBPUT offsetof(struct zs_line, zl_rbput)
+define ZL_RBUF offsetof(struct zs_line, zl_rbuf)
+define ZSRR1_DO_bit ffs(ZSRR1_DO) - 1
+endif
+
+# audio trap handler fields
+define AU_AMD offsetof(struct auio, au_amd)
+define AU_RDATA offsetof(struct auio, au_rdata)
+define AU_REND offsetof(struct auio, au_rend)
+define AU_PDATA offsetof(struct auio, au_pdata)
+define AU_PEND offsetof(struct auio, au_pend)
+define AU_EVCNT offsetof(struct auio, au_intrcnt.ev_count)
+
+define AMD_IR offsetof(struct amd7930, ir)
+define AMD_BBRB offsetof(struct amd7930, bbrb)
+define AMD_BBTB offsetof(struct amd7930, bbtb)
+
+define PROM_BASE PROM_BASE
+
+define PV_NODEOPS offsetof(struct promvec, pv_nodeops)
+define PV_HALT offsetof(struct promvec, pv_halt)
+define PV_EVAL offsetof(struct promvec, pv_fortheval.v0_eval)
+define PV_ROMVEC_VERS offsetof(struct promvec, pv_romvec_vers)
+
+define NO_NEXTNODE offsetof(struct nodeops, no_nextnode)
+define NO_GETPROP offsetof(struct nodeops, no_getprop)
+
+define OLDMON_PRINTF offsetof(struct om_vector, printf)
+define OLDMON_HALT offsetof(struct om_vector, exitToMon)
+
+# floppy trap handler fields
+define FDC_REG_MSR offsetof(struct fdcio, fdcio_reg_msr)
+define FDC_REG_FIFO offsetof(struct fdcio, fdcio_reg_fifo)
+define FDC_ISTATE offsetof(struct fdcio, fdcio_istate)
+define FDC_STATUS offsetof(struct fdcio, fdcio_status)
+define FDC_NSTAT offsetof(struct fdcio, fdcio_nstat)
+define FDC_DATA offsetof(struct fdcio, fdcio_data)
+define FDC_TC offsetof(struct fdcio, fdcio_tc)
+define FDC_EVCNT offsetof(struct fdcio, fdcio_intrcnt.ev_count)