MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mips_pic_map_fixed_intrs

Function mips_pic_map_fixed_intrs

freebsd/mips/mips/mips_pic.c:524–543  ·  view source on GitHub ↗

* * Produce fixed IRQ mappings for all MIPS IRQs. * * Non-FDT/OFW MIPS targets do not provide an equivalent to OFW_BUS_MAP_INTR(); * it is instead necessary to reserve INTRNG IRQ# 0-7 for use by MIPS device * drivers that assume INTRNG IRQs 0-7 are directly mapped to MIPS IRQs 0-7. * * XXX: There is no support in INTRNG for reserving a fixed IRQ range. However, * we should be called prio

Source from the content-addressed store, hash-verified

522 * regular unix error code will be returned.
523 */
524int
525mips_pic_map_fixed_intrs(void)
526{
527 int error;
528
529 for (u_int i = 0; i < nitems(mips_pic_intrs); i++) {
530 struct mips_pic_intr *intr;
531
532 if ((error = mips_pic_map_fixed_intr(i, &intr)))
533 return (error);
534
535 /* INTRNG IRQs 0-7 must be directly mapped to MIPS IRQs 0-7 */
536 if (intr->intr_irq != intr->mips_irq) {
537 panic("invalid IRQ mapping: %u->%u", intr->intr_irq,
538 intr->mips_irq);
539 }
540 }
541
542 return (0);
543}
544
545/**
546 * If @p r references a MIPS interrupt mapped by the MIPS32 interrupt

Callers 1

nexus_attachFunction · 0.85

Calls 2

mips_pic_map_fixed_intrFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected