Home | History | Annotate | Line # | Download | only in pci
pci_eb164_intr.s revision 1.5.32.1
      1  1.5.32.1  jdolecek /* $NetBSD: pci_eb164_intr.s,v 1.5.32.1 2002/02/11 20:06:42 jdolecek Exp $ */
      2       1.1       cgd 
      3       1.1       cgd /*
      4       1.1       cgd  * Copyright (c) 1996 Carnegie-Mellon University.
      5       1.1       cgd  * All rights reserved.
      6       1.1       cgd  *
      7       1.1       cgd  * Author: Chris G. Demetriou
      8       1.1       cgd  *
      9       1.1       cgd  * Permission to use, copy, modify and distribute this software and
     10       1.1       cgd  * its documentation is hereby granted, provided that both the copyright
     11       1.1       cgd  * notice and this permission notice appear in all copies of the
     12       1.1       cgd  * software, derivative works or modified versions, and any portions
     13       1.1       cgd  * thereof, and that both notices appear in supporting documentation.
     14       1.1       cgd  *
     15       1.1       cgd  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16       1.1       cgd  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17       1.1       cgd  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18       1.1       cgd  *
     19       1.1       cgd  * Carnegie Mellon requests users of this software to return to
     20       1.1       cgd  *
     21       1.1       cgd  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22       1.1       cgd  *  School of Computer Science
     23       1.1       cgd  *  Carnegie Mellon University
     24       1.1       cgd  *  Pittsburgh PA 15213-3890
     25       1.1       cgd  *
     26       1.1       cgd  * any improvements or extensions that they make and grant Carnegie the
     27       1.1       cgd  * rights to redistribute these changes.
     28       1.1       cgd  */
     29       1.1       cgd 
     30       1.1       cgd /*
     31       1.1       cgd  * The description of how to enable and disable interrupts in the
     32       1.1       cgd  * AlphaPC 164 motherboard technical reference manual is incorrect,
     33       1.1       cgd  * at least for the OSF/1 PALcode.
     34       1.1       cgd  *
     35       1.1       cgd  * These functions were written by disassembling a Digital UNIX kernel's
     36       1.1       cgd  * eb164_intrdsabl and eb164_intrenabl functions (because they had
     37       1.1       cgd  * interesting names), and then playing with them to see how to call
     38       1.1       cgd  * them correctly.
     39       1.1       cgd  *
     40       1.1       cgd  * It looks like the right thing to do is to call them with the interrupt
     41       1.1       cgd  * request that you want to enable or disable (presumably in the range
     42       1.1       cgd  * 0 -> 23, since there are 3 8-bit interrupt-enable bits in the
     43       1.1       cgd  * interrupt mask PLD).
     44       1.1       cgd  */
     45       1.2       cgd 
     46       1.4       cgd #include <machine/asm.h>
     47       1.1       cgd 
     48  1.5.32.1  jdolecek __KERNEL_RCSID(0, "$NetBSD: pci_eb164_intr.s,v 1.5.32.1 2002/02/11 20:06:42 jdolecek Exp $");
     49       1.1       cgd 
     50       1.1       cgd 	.text
     51       1.1       cgd LEAF(eb164_intr_enable,1)
     52       1.1       cgd 	mov	a0, a1
     53       1.1       cgd 	ldiq	a0, 0x34
     54       1.1       cgd 	call_pal PAL_cserve
     55       1.1       cgd 	RET
     56       1.1       cgd 	END(eb164_intr_enable)
     57       1.1       cgd 
     58       1.1       cgd 	.text
     59       1.1       cgd LEAF(eb164_intr_disable,1)
     60       1.1       cgd 	mov	a0, a1
     61       1.1       cgd 	ldiq	a0, 0x35
     62       1.1       cgd 	call_pal PAL_cserve
     63       1.1       cgd 	RET
     64  1.5.32.1  jdolecek 	END(eb164_intr_disable)
     65