diff options
-rw-r--r-- | sys/alpha/alpha/dec_kn8ae.c | 2 | ||||
-rw-r--r-- | sys/alpha/alpha/machdep.c | 23 | ||||
-rw-r--r-- | sys/alpha/alpha/prom.c | 22 | ||||
-rw-r--r-- | sys/alpha/alpha/trap.c | 7 | ||||
-rw-r--r-- | sys/alpha/conf/NOTES | 4 | ||||
-rw-r--r-- | sys/alpha/include/db_machdep.h | 10 | ||||
-rw-r--r-- | sys/alpha/tlsb/dwlpx.c | 17 | ||||
-rw-r--r-- | sys/alpha/tlsb/tlsb.c | 12 | ||||
-rw-r--r-- | sys/conf/files | 1 | ||||
-rw-r--r-- | sys/conf/options | 3 | ||||
-rw-r--r-- | sys/modules/osf1/Makefile | 4 | ||||
-rw-r--r-- | sys/pci/simos.c | 357 | ||||
-rw-r--r-- | sys/pci/simos.h | 74 |
13 files changed, 3 insertions, 533 deletions
diff --git a/sys/alpha/alpha/dec_kn8ae.c b/sys/alpha/alpha/dec_kn8ae.c index e9deca9..4e38f4b 100644 --- a/sys/alpha/alpha/dec_kn8ae.c +++ b/sys/alpha/alpha/dec_kn8ae.c @@ -31,8 +31,6 @@ * SUCH DAMAGE. */ -#include "opt_simos.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/termios.h> diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 3e7dcbb..98afcd1 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -90,7 +90,6 @@ #include "opt_compat.h" #include "opt_ddb.h" -#include "opt_simos.h" #include "opt_msgbuf.h" #include "opt_maxmem.h" @@ -477,27 +476,13 @@ alpha_init(pfn, ptb, bim, bip, biv) nobootinfo: bootinfo.ssym = (u_long)&_end; bootinfo.esym = (u_long)&_end; -#ifdef SIMOS - { - char* p = (char*)bootinfo.ssym + 8; - if (p[EI_MAG0] == ELFMAG0 - && p[EI_MAG1] == ELFMAG1 - && p[EI_MAG2] == ELFMAG2 - && p[EI_MAG3] == ELFMAG3) { - bootinfo.ssym = (u_long) p; - bootinfo.esym = (u_long)p + *(u_long*)(p - 8); - } - } -#endif bootinfo.hwrpb_phys = ((struct rpb *)HWRPB_ADDR)->rpb_phys; bootinfo.hwrpb_size = ((struct rpb *)HWRPB_ADDR)->rpb_size; init_prom_interface((struct rpb *)HWRPB_ADDR); prom_getenv(PROM_E_BOOTED_OSFLAGS, bootinfo.boot_flags, sizeof bootinfo.boot_flags); -#ifndef SIMOS prom_getenv(PROM_E_BOOTED_FILE, bootinfo.booted_kernel, sizeof bootinfo.booted_kernel); -#endif prom_getenv(PROM_E_BOOTED_DEV, bootinfo.booted_dev, sizeof bootinfo.booted_dev); } @@ -634,12 +619,6 @@ alpha_init(pfn, ptb, bim, bip, biv) kernstartpfn = atop(ALPHA_K0SEG_TO_PHYS(kernstart)); kernendpfn = atop(ALPHA_K0SEG_TO_PHYS(kernend)); -#ifdef SIMOS - /* - * SimOS console puts the bootstrap stack after kernel - */ - kernendpfn += 4; -#endif /* * Find out how much memory is available, by looking at @@ -1092,7 +1071,6 @@ bzero(void *buf, size_t len) void DELAY(int n) { -#ifndef SIMOS unsigned long pcc0, pcc1, curcycle, cycles; int usec; @@ -1129,7 +1107,6 @@ DELAY(int n) } pcc0 = pcc1; } -#endif } /* diff --git a/sys/alpha/alpha/prom.c b/sys/alpha/alpha/prom.c index 58c9cf9..ea7ab44 100644 --- a/sys/alpha/alpha/prom.c +++ b/sys/alpha/alpha/prom.c @@ -27,8 +27,6 @@ * $FreeBSD$ */ -#include "opt_simos.h" - #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ /* __KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.22 1998/02/27 04:03:00 thorpej Exp $"); */ @@ -99,18 +97,12 @@ static int alpha_console; void init_bootstrap_console() { -#ifndef SIMOS char buf[4]; -#endif init_prom_interface(hwrpb); -#ifdef SIMOS - alpha_console = 0; -#else prom_getenv(PROM_E_TTY_DEV, buf, 4); alpha_console = buf[0] - '0'; -#endif promcnattach(alpha_console); } @@ -194,20 +186,6 @@ enter_prom() s = intr_disable(); if (!prom_mapped) { -#ifdef SIMOS - /* - * SimOS console uses floating point. - */ - if (curthread != PCPU_GET(fpcurthread)) { - alpha_pal_wrfen(1); - if (PCPU_GET(fpcurthread)) { - savefpstate(&PCPU_GET(fpcurthread)->td_pcb->pcb_fp); - PCPU_GET(fpcurthread)->td_pcb->pcb_hw.apcb_flags &= ~ALPHA_PCB_FLAGS_FEN; - } - PCPU_SET(fpcurthread, curthread); - restorefpstate(&PCPU_GET(fpcurthread)->td_pcb->pcb_fp); - } -#endif if (!pmap_uses_prom_console()) panic("enter_prom"); lev1map = rom_lev1map(); /* XXX */ diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c index e1e8f99..70f673e 100644 --- a/sys/alpha/alpha/trap.c +++ b/sys/alpha/alpha/trap.c @@ -31,7 +31,6 @@ /* #include "opt_fix_unaligned_vax_fp.h" */ #include "opt_ddb.h" #include "opt_ktrace.h" -#include "opt_simos.h" #include <sys/param.h> #include <sys/systm.h> @@ -380,11 +379,7 @@ trap(a0, a1, a2, entry, framep) * might have set a breakpoint. */ if (a0 == ALPHA_IF_CODE_BUGCHK || - a0 == ALPHA_IF_CODE_BPT -#ifdef SIMOS - || a0 == ALPHA_IF_CODE_GENTRAP -#endif - ) { + a0 == ALPHA_IF_CODE_BPT) { if (kdb_trap(a0, a1, a2, entry, framep)) goto out; } diff --git a/sys/alpha/conf/NOTES b/sys/alpha/conf/NOTES index 2ce42d4..4f79310 100644 --- a/sys/alpha/conf/NOTES +++ b/sys/alpha/conf/NOTES @@ -253,7 +253,3 @@ device cardbus ##################################################################### # SIMULATOR OPTIONS - -# Include support for running under the SIMOS simulator. -device simos -options SIMOS diff --git a/sys/alpha/include/db_machdep.h b/sys/alpha/include/db_machdep.h index 6c57783..ccd033e 100644 --- a/sys/alpha/include/db_machdep.h +++ b/sys/alpha/include/db_machdep.h @@ -36,7 +36,6 @@ */ #include "opt_ddb.h" -#include "opt_simos.h" #include <sys/param.h> #include <vm/vm.h> @@ -55,11 +54,7 @@ extern db_regs_t ddb_regs; /* register state */ #define PC_REGS(regs) ((db_addr_t)(regs)->tf_regs[FRAME_PC]) -#ifdef SIMOS -#define BKPT_INST 0x000000aa /* gentrap instruction */ -#else #define BKPT_INST 0x00000080 /* breakpoint instruction */ -#endif #define BKPT_SIZE (4) /* size of breakpoint inst */ #define BKPT_SET(inst) (BKPT_INST) @@ -67,13 +62,8 @@ extern db_regs_t ddb_regs; /* register state */ (ddb_regs.tf_regs[FRAME_PC] -= BKPT_SIZE); #define SOFTWARE_SSTEP 1 /* no hardware support */ -#ifdef SIMOS -#define IS_BREAKPOINT_TRAP(type, code) ((type) == ALPHA_KENTRY_IF && \ - (code) == ALPHA_IF_CODE_GENTRAP) -#else #define IS_BREAKPOINT_TRAP(type, code) ((type) == ALPHA_KENTRY_IF && \ (code) == ALPHA_IF_CODE_BPT) -#endif #define IS_WATCHPOINT_TRAP(type, code) 0 /* diff --git a/sys/alpha/tlsb/dwlpx.c b/sys/alpha/tlsb/dwlpx.c index cae0648..8917c7e 100644 --- a/sys/alpha/tlsb/dwlpx.c +++ b/sys/alpha/tlsb/dwlpx.c @@ -58,8 +58,6 @@ * SUCH DAMAGE. */ -#include "opt_simos.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -123,11 +121,7 @@ struct dwlpx_softc { static driver_intr_t dwlpx_intr; static u_int32_t imaskcache[DWLPX_NIONODE][DWLPX_NHOSE][NHPC]; -#ifdef SIMOS -extern void simos_intr(int); -#else static void dwlpx_eintr(unsigned long); -#endif /* * Direct-mapped window: 2G at 2G @@ -745,16 +739,6 @@ dwlpx_dma_init(struct dwlpx_softc *sc) /* */ -#ifdef SIMOS -static void -dwlpx_intr(void *arg) -{ - - simos_intr(0); -} - -#else /* !SIMOS */ - static void dwlpx_intr(void *arg) { @@ -842,7 +826,6 @@ dwlpx_eintr(unsigned long vec) REGVAL(PCIA_ERR(i) + sc->sysbase) = hpcs[i].err; } } -#endif /* SIMOS */ static device_method_t dwlpx_methods[] = { /* Device interface */ diff --git a/sys/alpha/tlsb/tlsb.c b/sys/alpha/tlsb/tlsb.c index ea4ff54..e9f6976 100644 --- a/sys/alpha/tlsb/tlsb.c +++ b/sys/alpha/tlsb/tlsb.c @@ -36,8 +36,6 @@ * found on AlphaServer 8200 and 8400 systems. */ -#include "opt_simos.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -130,19 +128,9 @@ tlsb_probe(device_t dev) /* * Check for invalid address. */ -#ifdef SIMOS - if (node != 0 && node != 8) { - continue; - } else if (node == 0) { - tldev = TLDEV_DTYPE_SCPU4; - } else { - tldev = TLDEV_DTYPE_KFTIA; - } -#else if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))) continue; tldev = TLSB_GET_NODEREG(node, TLDEV); -#endif if (tldev == 0) { /* Nothing at this node. */ continue; diff --git a/sys/conf/files b/sys/conf/files index 0ee8d19..b4f8088 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1505,7 +1505,6 @@ pci/if_xl.c optional xl pci/intpm.c optional intpm pci/meteor.c count meteor pci nowerror pci/ncr.c optional ncr -pci/simos.c optional simos nowerror pci/viapm.c optional viapm pci/xrpu.c optional xrpu posix4/ksched.c optional _kposix_priority_scheduling diff --git a/sys/conf/options b/sys/conf/options index 7a16efc..854d85b9 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -529,9 +529,6 @@ COM_MULTIPORT opt_sio.h BREAK_TO_DEBUGGER opt_comconsole.h ALT_BREAK_TO_DEBUGGER opt_comconsole.h -# Include tweaks for running under the SimOS machine simulator. -SIMOS opt_simos.h - # options for bus/device framework BUS_DEBUG opt_bus.h diff --git a/sys/modules/osf1/Makefile b/sys/modules/osf1/Makefile index b19f1f8..9ac0b56 100644 --- a/sys/modules/osf1/Makefile +++ b/sys/modules/osf1/Makefile @@ -7,8 +7,8 @@ MAINTAINER= gallatin@FreeBSD.org KMOD= osf1 SRCS= osf1_ioctl.c osf1_misc.c osf1_signal.c osf1_sysent.c \ osf1_mount.c imgact_osf1.c osf1_sysvec.c opt_compat.h \ - opt_simos.h opt_ddb.h opt_mac.h opt_nfs.h device_if.h \ - bus_if.h vnode_if.h + opt_ddb.h opt_mac.h opt_nfs.h device_if.h bus_if.h \ + vnode_if.h #CFLAGS+= -g diff --git a/sys/pci/simos.c b/sys/pci/simos.c deleted file mode 100644 index 040e042..0000000 --- a/sys/pci/simos.c +++ /dev/null @@ -1,357 +0,0 @@ -/*- - * Copyright (c) 1998 Doug Rabson - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD$ - */ - -#ifdef COMPILING_LINT -#warning "The simos driver is broken and is not compiled with LINT" -#else - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/malloc.h> -#include <sys/bio.h> -#include <sys/buf.h> -#include <sys/proc.h> - -#include <cam/cam.h> -#include <cam/cam_ccb.h> -#include <cam/cam_sim.h> -#include <cam/cam_xpt_sim.h> -#include <cam/cam_debug.h> - -#include <cam/scsi/scsi_all.h> -#include <cam/scsi/scsi_message.h> - -#include <machine/clock.h> -#include <vm/vm.h> -#include <vm/vm_param.h> -#include <vm/pmap.h> -#include <sys/kernel.h> - -#include <pci/simos.h> - -#include <pci/pcireg.h> -#include <pci/pcivar.h> - -#ifndef COMPAT_OLDPCI -#error "The simos device requires the old pci compatibility shims" -#endif - -#include <machine/alpha_cpu.h> - -struct simos_softc { - int sc_unit; - SimOS_SCSI* sc_regs; - - /* - * SimOS only supports one pending command. - */ - struct cam_sim *sc_sim; - struct cam_path *sc_path; - struct ccb_scsiio *sc_pending; -}; - -struct simos_softc* simosp[10]; - -static u_long simos_unit; - -static const char *simos_probe(pcici_t tag, pcidi_t type); -static void simos_attach(pcici_t config_d, int unit); -static void simos_action(struct cam_sim *sim, union ccb *ccb); -static void simos_poll(struct cam_sim *sim); - -struct pci_device simos_driver = { - "simos", - simos_probe, - simos_attach, - &simos_unit, - NULL -}; -COMPAT_PCI_DRIVER (simos, simos_driver); - -static const char * -simos_probe(pcici_t tag, pcidi_t type) -{ - switch (type) { - case 0x1291|(0x1291<<16): - return "SimOS SCSI"; - default: - return NULL; - } - -} - -static void -simos_attach(pcici_t config_id, int unit) -{ - struct simos_softc* sc; - struct cam_devq *devq; - - sc = malloc(sizeof(struct simos_softc), M_DEVBUF, M_WAITOK | M_ZERO); - simosp[unit] = sc; - - sc->sc_unit = unit; - sc->sc_regs = (SimOS_SCSI*) SIMOS_SCSI_ADDR; - sc->sc_pending = 0; - - devq = cam_simq_alloc(/*maxopenings*/1); - if (devq == NULL) - return; - - sc->sc_sim = cam_sim_alloc(simos_action, simos_poll, "simos", sc, unit, - /*untagged*/1, /*tagged*/0, devq); - if (sc->sc_sim == NULL) { - cam_simq_free(devq); - return; - } - - if (xpt_bus_register(sc->sc_sim, /*bus*/0) != CAM_SUCCESS) { - cam_sim_free(sc->sc_sim, /*free_devq*/TRUE); - return; - } - - if (xpt_create_path(&sc->sc_path, /*periph*/NULL, - cam_sim_path(sc->sc_sim), CAM_TARGET_WILDCARD, - CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - xpt_bus_deregister(cam_sim_path(sc->sc_sim)); - cam_sim_free(sc->sc_sim, /*free_devq*/TRUE); - return; - } - - alpha_register_pci_scsi(config_id->bus, config_id->slot, sc->sc_sim); - - return; -} - -static void -simos_start(struct simos_softc* sc, struct ccb_scsiio *csio) -{ - struct scsi_generic *cmd; - int cmdlen; - caddr_t data; - int datalen; - int s; - u_int8_t* p; - int i, count, target; - vm_offset_t va; - vm_size_t size; - - cmd = (struct scsi_generic *) &csio->cdb_io.cdb_bytes; - cmdlen = csio->cdb_len; - data = csio->data_ptr; - datalen = csio->dxfer_len; - - /* - * Simos doesn't understand some commands - */ - if (cmd->opcode == START_STOP || cmd->opcode == PREVENT_ALLOW - || cmd->opcode == SYNCHRONIZE_CACHE) { - csio->ccb_h.status = CAM_REQ_CMP; - xpt_done((union ccb *) csio); - return; - } - - if (sc->sc_pending) { - /* - * Don't think this can happen. - */ - printf("simos_start: can't start command while one is pending\n"); - csio->ccb_h.status = CAM_BUSY; - xpt_done((union ccb *) csio); - return; - } - - s = splcam(); - - csio->ccb_h.status |= CAM_SIM_QUEUED; - sc->sc_pending = csio; - - target = csio->ccb_h.target_id; - - /* - * Copy the command into SimOS' buffer - */ - p = (u_int8_t*) cmd; - count = cmdlen; - for (i = 0; i < count; i++) - sc->sc_regs->cmd[i] = *p++; - sc->sc_regs->length = count; - sc->sc_regs->target = target; - sc->sc_regs->lun = csio->ccb_h.target_lun; - - /* - * Setup the segment descriptors. - */ - va = (vm_offset_t) data; - size = datalen; - i = 0; - while (size > 0) { - vm_size_t len = PAGE_SIZE - (va & PAGE_MASK); - if (len > size) - len = size; - sc->sc_regs->sgMap[i].pAddr = vtophys(va); - sc->sc_regs->sgMap[i].len = len; - size -= len; - va += len; - i++; - } - sc->sc_regs->sgLen = i; - - /* - * Start the i/o. - */ - alpha_wmb(); - sc->sc_regs->startIO = 1; - alpha_wmb(); - - splx(s); -} - -static void -simos_done(struct simos_softc* sc) -{ - struct ccb_scsiio* csio = sc->sc_pending; - int s, done; - - /* - * Spurious interrupt caused by my bogus interrupt broadcasting. - */ - if (!csio) - return; - - sc->sc_pending = 0; - - done = sc->sc_regs->done[csio->ccb_h.target_id]; - if (!done) - return; - - s = splcam(); - - if (done >> 16) - /* Error detected */ - csio->ccb_h.status = CAM_CMD_TIMEOUT; - else - csio->ccb_h.status = CAM_REQ_CMP; - - /* - * Ack the interrupt to clear it. - */ - sc->sc_regs->done[csio->ccb_h.target_id] = 1; - alpha_wmb(); - - xpt_done((union ccb *) csio); - - splx(s); -} - -static void -simos_action(struct cam_sim *sim, union ccb *ccb) -{ - struct simos_softc* sc = (struct simos_softc *)sim->softc; - - switch (ccb->ccb_h.func_code) { - case XPT_SCSI_IO: - { - struct ccb_scsiio *csio; - - csio = &ccb->csio; - simos_start(sc, csio); - break; - } - - case XPT_CALC_GEOMETRY: - { - struct ccb_calc_geometry *ccg; - u_int32_t size_mb; - u_int32_t secs_per_cylinder; - - ccg = &ccb->ccg; - size_mb = ccg->volume_size - / ((1024L * 1024L) / ccg->block_size); - - ccg->heads = 64; - ccg->secs_per_track = 32; - - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - break; - } - - case XPT_RESET_BUS: - { - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - break; - } - - case XPT_PATH_INQ: - { - struct ccb_pathinq *cpi = &ccb->cpi; - - cpi->version_num = 1; /* XXX??? */ - cpi->max_target = 2; - cpi->max_lun = 0; - cpi->initiator_id = 7; - cpi->bus_id = sim->bus_id; - cpi->base_transfer_speed = 3300; - strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "SimOS", HBA_IDLEN); - strncpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); - cpi->unit_number = sim->unit_number; - - cpi->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - break; - } - - default: - ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); - break; - } -} - -static void -simos_poll(struct cam_sim *sim) -{ - simos_done(cam_sim_softc(sim)); -} - -void -simos_intr(int unit) -{ - /* XXX bogus */ - struct simos_softc* sc = simosp[unit]; - - simos_done(sc); -} - - -#endif /* !COMPILING_LINT */ diff --git a/sys/pci/simos.h b/sys/pci/simos.h deleted file mode 100644 index e703074..0000000 --- a/sys/pci/simos.h +++ /dev/null @@ -1,74 +0,0 @@ -/*- - * Copyright (c) 1998 Doug Rabson - * All rights reserved. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD$ - */ - -/* - * Copyright (C) 1998 by the Board of Trustees - * of Leland Stanford Junior University. - * Copyright (C) 1998 Digital Equipment Corporation - * - * This file is part of the SimOS distribution. - * See LICENSE file for terms of the license. - * - */ - - - - -#ifndef _SIMOS_SCSI_H -#define _SIMOS_SCSI_H - -#define SIMOS_SCSI_ADDR 0xfffffcc500000000 -#define SIMOS_SCSI_ADDR_32 0xffffffffa5000000 -#define SIMOS_SCSI_MAXDMA_LEN 128 -#define SIMOS_SCSI_MAXTARG 16 -#define SIMOS_SCSI_MAXLUN 16 - -#define SIMOS_SCSI_REGS ((struct SimOS_SCSI *)SIMOS_SCSI_ADDR) -#define SIMOS_SCSI_REGS_32 ((struct SimOS_SCSI *)SIMOS_SCSI_ADDR_32) - -typedef unsigned long SCSIReg; - - -typedef struct SimOS_SCSI { - SCSIReg startIO; /* write-only */ - SCSIReg done[SIMOS_SCSI_MAXTARG]; /* read-write (write=ack) */ - - SCSIReg target; /* data fields */ - SCSIReg lun; - SCSIReg cmd[12]; - SCSIReg length; - SCSIReg sgLen; - struct { - SCSIReg pAddr; - SCSIReg len; - } sgMap[SIMOS_SCSI_MAXDMA_LEN]; - - -} SimOS_SCSI; - -#endif |