Home | History | Annotate | Line # | Download | only in pci
pci_eb64plus_intr.s revision 1.2.52.1
      1  1.2.52.1  skrll /* $NetBSD: pci_eb64plus_intr.s,v 1.2.52.1 2004/09/18 14:31:12 skrll 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  * This file hacked from pci_eb164_intr.s
     32       1.1    cgd  *
     33       1.1    cgd  * These functions were written by disassembling a Digital UNIX kernel's
     34       1.1    cgd  * eb64p_intrdsabl and eb64p_intrenabl functions (because they had
     35       1.1    cgd  * interesting names, and looked like the eb164 versions which were
     36       1.1    cgd  * known to already work), and then playing with them to see how to call
     37       1.1    cgd  * them correctly.
     38       1.1    cgd  *
     39       1.1    cgd  * It looks like the right thing to do is to call them with the interrupt
     40       1.1    cgd  * request that you want to enable or disable (presumably in the range
     41       1.1    cgd  * 0 -> 23, since there are 3 8-bit interrupt-enable bits in the
     42       1.1    cgd  * interrupt mask PLD).
     43       1.1    cgd  */
     44       1.1    cgd 
     45       1.1    cgd #include <machine/asm.h>
     46       1.1    cgd 
     47  1.2.52.1  skrll __KERNEL_RCSID(0, "$NetBSD: pci_eb64plus_intr.s,v 1.2.52.1 2004/09/18 14:31:12 skrll Exp $");
     48       1.1    cgd 
     49       1.1    cgd 	.text
     50       1.1    cgd LEAF(eb64plus_intr_enable,1)
     51       1.1    cgd 	mov	a0, a1
     52       1.1    cgd 	ldiq	a0, 0x34
     53       1.1    cgd 	call_pal PAL_cserve
     54       1.1    cgd 	RET
     55       1.1    cgd 	END(eb64plus_intr_enable)
     56       1.1    cgd 
     57       1.1    cgd 	.text
     58       1.1    cgd LEAF(eb64plus_intr_disable,1)
     59       1.1    cgd 	mov	a0, a1
     60       1.1    cgd 	ldiq	a0, 0x35
     61       1.1    cgd 	call_pal PAL_cserve
     62       1.1    cgd 	RET
     63  1.2.52.1  skrll 	END(eb64plus_intr_disable)
     64