j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2008-07-16 13:48:43 +0200 (Wed, 16 Jul 2008) New Revision: 203
Modified: openbios-devel/arch/sparc64/openbios.c Log: Add trap table setting function to client interface
Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-07-16 11:47:23 UTC (rev 202) +++ openbios-devel/arch/sparc64/openbios.c 2008-07-16 11:48:43 UTC (rev 203) @@ -179,6 +179,19 @@ { "map", mmu_map }, };
+/* + ( addr -- ? ) +*/ +static void +set_trap_table(void) +{ + unsigned long addr; + + addr = POP(); + asm("wrpr %0, %%tba\n" + : : "r" (addr)); +} + static void cpu_generic_init(const struct cpudef *cpu) { unsigned long iu_version; @@ -244,6 +257,11 @@ fword("encode-int"); push_str("mmu"); fword("property"); + + // Trap table + push_str("/packages/client-iface"); + fword("find-device"); + bind_func("SUNW,set-trap-table", set_trap_table); }
static const struct cpudef sparc_defs[] = {