mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Add trap table setting function to client interface
git-svn-id: svn://coreboot.org/openbios/openbios-devel@203 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -179,6 +179,19 @@ NODE_METHODS(mmu) = {
|
|||||||
{ "map", mmu_map },
|
{ "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)
|
static void cpu_generic_init(const struct cpudef *cpu)
|
||||||
{
|
{
|
||||||
unsigned long iu_version;
|
unsigned long iu_version;
|
||||||
@@ -244,6 +257,11 @@ static void cpu_generic_init(const struct cpudef *cpu)
|
|||||||
fword("encode-int");
|
fword("encode-int");
|
||||||
push_str("mmu");
|
push_str("mmu");
|
||||||
fword("property");
|
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[] = {
|
static const struct cpudef sparc_defs[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user