1 1.7 thorpej /* $NetBSD: pci_eb164_intr.s,v 1.7 2020/09/22 15:24:02 thorpej 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.7 thorpej __KERNEL_RCSID(0, "$NetBSD: pci_eb164_intr.s,v 1.7 2020/09/22 15:24:02 thorpej Exp $"); 49 1.7 thorpej 50 1.7 thorpej /* 51 1.7 thorpej * void eb164_intr_enable(pci_chipset_tag_t, int irq); 52 1.7 thorpej * void eb164_intr_disenable(pci_chipset_tag_t, int irq); 53 1.7 thorpej */ 54 1.1 cgd 55 1.1 cgd .text 56 1.7 thorpej LEAF(eb164_intr_enable,2) 57 1.1 cgd ldiq a0, 0x34 58 1.1 cgd call_pal PAL_cserve 59 1.1 cgd RET 60 1.1 cgd END(eb164_intr_enable) 61 1.1 cgd 62 1.1 cgd .text 63 1.7 thorpej LEAF(eb164_intr_disable,2) 64 1.1 cgd ldiq a0, 0x35 65 1.1 cgd call_pal PAL_cserve 66 1.1 cgd RET 67 1.6 ross END(eb164_intr_disable) 68