2 * HP-PARISC Lasi chipset emulation.
4 * (C) 2019 by Helge Deller <deller@gmx.de>
6 * This work is licensed under the GNU GPL license version 2 or later.
8 * Documentation available at:
9 * https://parisc.wiki.kernel.org/images-parisc/7/79/Lasi_ers.pdf
15 #include "exec/address-spaces.h"
16 #include "hw/pci/pci_host.h"
17 #include "hw/boards.h"
19 #define TYPE_LASI_CHIP "lasi-chip"
20 OBJECT_DECLARE_SIMPLE_TYPE(LasiState
, LASI_CHIP
)
22 #define LASI_IRR 0x00 /* RO */
28 #define LASI_LPT 0x02000
29 #define LASI_AUDIO 0x04000
30 #define LASI_UART 0x05000
31 #define LASI_LAN 0x07000
32 #define LASI_RTC 0x09000
33 #define LASI_FDC 0x0A000
35 #define LASI_PCR 0x0C000 /* LASI Power Control register */
36 #define LASI_ERRLOG 0x0C004 /* LASI Error Logging register */
37 #define LASI_VER 0x0C008 /* LASI Version Control register */
38 #define LASI_IORESET 0x0C00C /* LASI I/O Reset register */
39 #define LASI_AMR 0x0C010 /* LASI Arbitration Mask register */
40 #define LASI_IO_CONF 0x7FFFE /* LASI primary configuration register */
41 #define LASI_IO_CONF2 0x7FFFF /* LASI secondary configuration register */
43 #define LASI_BIT(x) (1ul << (x))
44 #define LASI_IRQ_BITS (LASI_BIT(5) | LASI_BIT(7) | LASI_BIT(8) | LASI_BIT(9) \
45 | LASI_BIT(13) | LASI_BIT(14) | LASI_BIT(16) | LASI_BIT(17) \
46 | LASI_BIT(18) | LASI_BIT(19) | LASI_BIT(20) | LASI_BIT(21) \
49 #define ICR_BUS_ERROR_BIT LASI_BIT(8) /* bit 8 in ICR */
50 #define ICR_TOC_BIT LASI_BIT(1) /* bit 1 in ICR */
54 #define LASI_IRQ_HPA 14
55 #define LASI_IRQ_UART_HPA 5
56 #define LASI_IRQ_LPT_HPA 7
57 #define LASI_IRQ_LAN_HPA 8
58 #define LASI_IRQ_SCSI_HPA 9
59 #define LASI_IRQ_AUDIO_HPA 13
60 #define LASI_IRQ_PS2KBD_HPA 26
61 #define LASI_IRQ_PS2MOU_HPA 26
64 PCIHostState parent_obj
;
76 MemoryRegion this_mem
;