diff options
author | mjacob <mjacob@FreeBSD.org> | 2000-12-04 17:21:46 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2000-12-04 17:21:46 +0000 |
commit | 97cf6bcc60c2786fa1949119b0bb7e9e2fdce887 (patch) | |
tree | 1c216b3a0ab9d15e895047ed72894256b8842b27 /sys/alpha | |
parent | 77dd285b0401334ee7129e0271e74019309c7609 (diff) | |
download | FreeBSD-src-97cf6bcc60c2786fa1949119b0bb7e9e2fdce887.zip FreeBSD-src-97cf6bcc60c2786fa1949119b0bb7e9e2fdce887.tar.gz |
Fix for vanilla PC164 systems to use a slightly different PALcode magic
tweak to enable/disable interrupt sources. Seems to work. It is unclear
how many of the PC164 models actually might needs this, and whether or
not there are other hidden issues.
Obtained from:Bernd Walter <ticso@cicely8.cicely.de>
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/dec_eb164.c | 11 | ||||
-rw-r--r-- | sys/alpha/pci/pci_eb164_intr.s | 30 |
2 files changed, 39 insertions, 2 deletions
diff --git a/sys/alpha/alpha/dec_eb164.c b/sys/alpha/alpha/dec_eb164.c index e1efa03..ca7c993 100644 --- a/sys/alpha/alpha/dec_eb164.c +++ b/sys/alpha/alpha/dec_eb164.c @@ -57,6 +57,8 @@ static void dec_eb164_cons_init __P((void)); static void eb164_intr_init(void); extern void eb164_intr_enable(int irq); extern void eb164_intr_disable(int irq); +extern void eb164_intr_enable_icsr(int irq); +extern void eb164_intr_disable_icsr(int irq); extern int siocnattach __P((int, int)); extern int siogdbattach __P((int, int)); @@ -76,8 +78,13 @@ dec_eb164_init() platform.cons_init = dec_eb164_cons_init; platform.pci_intr_init = eb164_intr_init; platform.pci_intr_map = NULL; - platform.pci_intr_disable = eb164_intr_disable; - platform.pci_intr_enable = eb164_intr_enable; + if (strncmp(platform.model, "Digital AlphaPC 164 ", 20) == 0) { + platform.pci_intr_disable = eb164_intr_disable_icsr; + platform.pci_intr_enable = eb164_intr_enable_icsr; + } else { + platform.pci_intr_disable = eb164_intr_disable; + platform.pci_intr_enable = eb164_intr_enable; + } } extern int comconsole; /* XXX for forcing comconsole when srm serial console is used */ diff --git a/sys/alpha/pci/pci_eb164_intr.s b/sys/alpha/pci/pci_eb164_intr.s index 7121e44..089f79d 100644 --- a/sys/alpha/pci/pci_eb164_intr.s +++ b/sys/alpha/pci/pci_eb164_intr.s @@ -63,3 +63,33 @@ LEAF(eb164_intr_disable,1) call_pal PAL_cserve RET END(eb164_intr_disable) + + .text +LEAF(eb164_intr_enable_icsr,1) + mov a0, a1 + ldiq a0, 0x34 + call_pal PAL_cserve + ldiq a0, 0x08 /* Allow PALRES */ + call_pal PAL_cserve + .long 0x66100118 /* hw_mfpr a0, icsr */ + ldah a1, 0x0020 /* IMSK1 */ + or a0, a1, a0 + xor a0, a1, a0 + .long 0x76100118 /* hw_mtpr a0, icsr */ + ldiq a0, 0x09 /* Disable PALRES */ + call_pal PAL_cserve + RET + END(eb164_intr_enable_icsr) + + .text +LEAF(eb164_intr_disable_icsr,1) + ldiq a0, 0x08 /* Allow PALRES */ + call_pal PAL_cserve + .long 0x66100118 /* hw_mfpr a0, icsr */ + ldah a1, 0x0020 /* IMSK1 */ + or a0, a1, a0 + .long 0x76100118 /* hw_mtpr a0, icsr */ + ldiq a0, 0x09 /* Disable PALRES */ + call_pal PAL_cserve + RET + END(eb164_intr_disable_icsr) |