Annotation of sys/arch/vax/include/scb.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: scb.h,v 1.9 2007/04/10 18:31:44 miod Exp $ */
! 2: /* $NetBSD: scb.h,v 1.11 2000/07/10 09:14:34 ragge Exp $ */
! 3:
! 4: /*
! 5: * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
! 6: * All rights reserved.
! 7: *
! 8: * Redistribution and use in source and binary forms, with or without
! 9: * modification, are permitted provided that the following conditions
! 10: * are met:
! 11: * 1. Redistributions of source code must retain the above copyright
! 12: * notice, this list of conditions and the following disclaimer.
! 13: * 2. Redistributions in binary form must reproduce the above copyright
! 14: * notice, this list of conditions and the following disclaimer in the
! 15: * documentation and/or other materials provided with the distribution.
! 16: * 3. All advertising materials mentioning features or use of this software
! 17: * must display the following acknowledgement:
! 18: * This product includes software developed at Ludd, University of Lule}.
! 19: * 4. The name of the author may not be used to endorse or promote products
! 20: * derived from this software without specific prior written permission
! 21: *
! 22: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 23: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! 24: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
! 25: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
! 26: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
! 27: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! 28: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! 29: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! 30: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
! 31: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! 32: */
! 33: #ifndef _VAX_SCB_H
! 34: #define _VAX_SCB_H
! 35:
! 36: /*
! 37: * Definition of the System Control Block. More about it can be
! 38: * found in the Vax Architecture Reference Manual, section 6.6.
! 39: */
! 40: struct scb {
! 41: void *scb_unused; /* First unused vector */
! 42: void *scb_mcheck;
! 43: void *scb_kspinv;
! 44: void *scb_powfail;
! 45: void *scb_privinst; /* 10 Privileged Instruction fault */
! 46: void *scb_xfcinst;
! 47: void *scb_resop;
! 48: void *scb_resad;
! 49: void *scb_accessv; /* 20 Access Control violation fault */
! 50: void *scb_transinv;
! 51: void *scb_trace;
! 52: void *scb_breakp;
! 53: void *scb_compat; /* 30 Compatibility instruction fault */
! 54: void *scb_arith;
! 55: void *scb_unused1;
! 56: void *scb_unused2;
! 57: void *scb_chmk; /* 40 CHMK */
! 58: void *scb_chme;
! 59: void *scb_chms;
! 60: void *scb_chmu;
! 61: void *scb_sbisilo; /* 50 SBI Silo compare */
! 62: void *scb_cmrd;
! 63: void *scb_sbialert;
! 64: void *scb_sbifault;
! 65: void *scb_memwtimo; /* 60 Memory write timeout */
! 66: void *scb_unused3;
! 67: void *scb_unused4;
! 68: void *scb_unused5;
! 69: void *scb_unused6; /* 70 unused */
! 70: void *scb_unused7;
! 71: void *scb_unused8;
! 72: void *scb_unused9;
! 73: void *scb_unused10; /* 80 unused */
! 74: void *scb_softint1;
! 75: void *scb_softint2;
! 76: void *scb_softint3;
! 77: void *scb_softint4; /* 90 Software interrupt level 4 */
! 78: void *scb_softint5;
! 79: void *scb_softint6;
! 80: void *scb_softint7;
! 81: void *scb_softint8; /* A0 Software interrupt level 8 */
! 82: void *scb_softint9;
! 83: void *scb_softinta;
! 84: void *scb_softintb;
! 85: void *scb_softintc; /* B0 Software interrupt level C */
! 86: void *scb_softintd;
! 87: void *scb_softinte;
! 88: void *scb_softintf;
! 89: void *scb_timer; /* C0 Interval timer */
! 90: void *scb_unused11;
! 91: void *scb_unused12;
! 92: void *scb_unused13;
! 93: void *scb_unused14; /* D0 Unused */
! 94: void *scb_unused15;
! 95: void *scb_unused16;
! 96: void *scb_unused17;
! 97: void *scb_unused18; /* E0 Unused */
! 98: void *scb_unused19;
! 99: void *scb_unused20;
! 100: void *scb_unused21;
! 101: void *scb_csrint;
! 102: void *scb_cstint; /* F0 Console storage transmit interrupt */
! 103: void *scb_ctrint;
! 104: void *scb_cttint;
! 105: struct ivec_dsp *scb_nexvec[4][16]; /* Nexus interrupt vectors */
! 106: };
! 107:
! 108: #define SCB_KSTACK 0
! 109: #define SCB_ISTACK 1
! 110:
! 111: #define vecnum(bus, ipl, tr) (256+(ipl-0x14)*64+tr*4+bus*256)
! 112:
! 113: /*
! 114: * This struct is used when setting up interrupt vectors dynamically.
! 115: * It puts a opaque 32 bit quantity on the stack and also has a placeholder
! 116: * for evcount structure.
! 117: */
! 118: struct ivec_dsp {
! 119: char pushr; /* pushr */
! 120: char pushrarg; /* $0x3f */
! 121: char jsb;
! 122: char mode;
! 123: long displacement;
! 124: void (*hoppaddr)(void *);
! 125: void *pushlarg;
! 126: struct evcount *ev;
! 127: };
! 128:
! 129: #ifdef _KERNEL
! 130: extern const struct ivec_dsp idsptch;
! 131: extern struct scb *scb;
! 132: extern struct ivec_dsp *scb_vec;
! 133:
! 134: extern paddr_t scb_init (paddr_t);
! 135: extern int scb_vecref (int *, int *);
! 136: extern void scb_fake (int, int);
! 137: extern void scb_vecalloc (int, void(*)(void *), void *, int, struct evcount *);
! 138: #endif /* _KERNEL */
! 139:
! 140: #endif /* _VAX_SCB_H */
CVSweb