/* * A few places around the kernel check this to see if * they need to call us to do things in a Starfire specific * way.
*/ int this_is_starfire = 0;
/* * Each Starfire board has 32 registers which perform translation * and delivery of traditional interrupt packets into the extended * Starfire hardware format. Essentially UPAID's now have 2 more * bits than in all previous Sun5 systems.
*/ struct starfire_irqinfo { unsignedlong imap_slots[32]; unsignedlong tregs[32]; struct starfire_irqinfo *next; int upaid, hwmid;
};
staticstruct starfire_irqinfo *sflist = NULL;
/* Beam me up Scott(McNeil)y... */ void starfire_hookup(int upaid)
{ struct starfire_irqinfo *p; unsignedlong treg_base, hwmid, i;
p = kmalloc(sizeof(*p), GFP_KERNEL); if (!p) {
prom_printf("starfire_hookup: No memory, this is insane.\n");
prom_halt();
}
treg_base = 0x100fc000000UL;
hwmid = ((upaid & 0x3c) << 1) |
((upaid & 0x40) >> 4) |
(upaid & 0x3);
p->hwmid = hwmid;
treg_base += (hwmid << 33UL);
treg_base += 0x200UL; for (i = 0; i < 32; i++) {
p->imap_slots[i] = 0UL;
p->tregs[i] = treg_base + (i * 0x10UL); /* Lets play it safe and not overwrite existing mappings */ if (upa_readl(p->tregs[i]) != 0)
p->imap_slots[i] = 0xdeadbeaf;
}
p->upaid = upaid;
p->next = sflist;
sflist = p;
}
bus_hwmid = (((unsignedlong)imap) >> 33) & 0x7f; for (p = sflist; p != NULL; p = p->next) if (p->hwmid == bus_hwmid) break; if (p == NULL) {
prom_printf("XFIRE: Cannot find irqinfo for imap %016lx\n",
((unsignedlong)imap));
prom_halt();
} for (i = 0; i < 32; i++) { if (p->imap_slots[i] == imap ||
p->imap_slots[i] == 0UL) break;
} if (i == 32) {
printk("starfire_translate: Are you kidding me?\n");
panic("Lucy in the sky....");
}
p->imap_slots[i] = imap;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.