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