Exemplo n.º 1
0
void
undefined_init(void)
{
    int loop;

    /* Not actually necessary -- the initialiser is just NULL */
    for (loop = 0; loop < NUM_UNKNOWN_HANDLERS; ++loop)
        LIST_INIT(&undefined_handlers[loop]);

    /* Install handler for CP15 emulation */
    cp15_uh.uh_handler = cp15_trapper;
    install_coproc_handler_static(SYSTEM_COPROC, &cp15_uh);

    /* Install handler for GDB breakpoints */
    gdb_uh.uh_handler = gdb_trapper;
    install_coproc_handler_static(CORE_UNKNOWN_HANDLER, &gdb_uh);
#ifdef THUMB_CODE
    gdb_uh_thumb.uh_handler = gdb_trapper;
    install_coproc_handler_static(THUMB_UNKNOWN_HANDLER, &gdb_uh_thumb);
#endif
}
Exemplo n.º 2
0
void
undefined_init()
{
	int loop;

	/* Not actually necessary -- the initialiser is just NULL */
	for (loop = 0; loop < MAX_COPROCS; ++loop)
		LIST_INIT(&undefined_handlers[loop]);

	/* Install handler for GDB breakpoints */
	gdb_uh.uh_handler = gdb_trapper;
	install_coproc_handler_static(0, &gdb_uh);
}
Exemplo n.º 3
0
void *
install_coproc_handler(int coproc, undef_handler_t handler)
{
	struct undefined_handler *uh;

	KASSERT(coproc >= 0 && coproc < MAX_COPROCS, ("bad coproc"));
	KASSERT(handler != NULL, ("handler is NULL")); /* Used to be legal. */

	/* XXX: M_TEMP??? */
	uh = malloc(sizeof(*uh), M_TEMP, M_WAITOK);
	uh->uh_handler = handler;
	install_coproc_handler_static(coproc, uh);
	return uh;
}
Exemplo n.º 4
0
void *
install_coproc_handler(int coproc, undef_handler_t handler)
{
    struct undefined_handler *uh;

    KASSERT(coproc >= 0 && coproc < NUM_UNKNOWN_HANDLERS);
    KASSERT(handler != NULL); /* Used to be legal. */

    uh = kmem_alloc(sizeof(*uh), KM_NOSLEEP);
    KASSERT(uh != NULL);
    uh->uh_handler = handler;
    install_coproc_handler_static(coproc, uh);
    return uh;
}
Exemplo n.º 5
0
void *
install_coproc_handler(int coproc, undef_handler_t handler)
{
	struct undefined_handler *uh;

	KASSERT(coproc >= 0 && coproc < MAX_COPROCS);
	KASSERT(handler != NULL); /* Used to be legal. */

	/* XXX: M_TEMP??? */
	MALLOC(uh, struct undefined_handler *, sizeof(*uh), M_TEMP, M_WAITOK);
	uh->uh_handler = handler;
	install_coproc_handler_static(coproc, uh);
	return uh;
}