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>
This commit is contained in:
mjacob 2000-12-04 17:21:46 +00:00
parent 77dd285b04
commit 97cf6bcc60
2 changed files with 39 additions and 2 deletions

View File

@ -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 */

View File

@ -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)