1 /* PALcode and C runtime functions for the CLIPPER system emulation.
3 Copyright (C) 2011 Richard Henderson
5 This file is part of QEMU PALcode.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the text
15 of the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING. If not see
19 <http://www.gnu.org/licenses/>. */
27 * Do any system specific setup necessary.
38 lda t0, TYPHOON_CCHIP_DIR0
39 lda t1, TYPHOON_CCHIP_DIR2
40 lda t2, TYPHOON_CCHIP_IIC0
41 lda t3, TYPHOON_CCHIP_IIC2
60 * Load the SRM interrupt vector for the system.
68 * a1 = interrupt vector
75 mfpr a1, ptCpuDIR // Load int mask for this CPU
77 beq a1, CallPal_Rti // No interrupts asserted?
79 cttz a1, a1 // Find the first asserted interrupt.
81 cmpeq a1, 55, a0 // Is this an ISA interrupt?
82 addq a1, 16, a1 // PCI interrupt numbers start at 16
85 LOAD_PHYS_PCHIP0_IACK a1 // IACK results in the ISA irq
96 * Unmask a PCI interrupt
107 * Mask a PCI interrupt
123 .type pci_io_base, @object
126 .quad PIO_KSEG_ADDR + TYPHOON_PCHIP0_PCI_IO
129 .type pci_conf_base, @object
130 .size pci_conf_base, 8
132 .quad PIO_KSEG_ADDR + TYPHOON_PCHIP0_PCI_CONF
136 .type pci_mem_base, @object
137 .size pci_mem_base, 8
139 .quad PIO_KSEG_ADDR + TYPHOON_PCHIP0_PCI_MEM