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