Clear on-demand BAT entries to properly restore OpenFirmware's

address space

Approved by: benno
This commit is contained in:
Peter Grehan 2002-09-19 04:31:39 +00:00
parent d6ce71e50a
commit 1ce0c6b147
2 changed files with 12 additions and 0 deletions

View File

@ -129,6 +129,12 @@ openfirmware(void *args)
srsave[i] = mfsrin(i << ADDR_SR_SHFT);
mtsrin(i << ADDR_SR_SHFT, ofw_pmap.pm_sr[i]);
}
/*
* Clear battable[] translations
*/
__asm __volatile("mtdbatu 2, %0\n"
"mtdbatu 3, %0" : : "r" (0));
isync();
}

View File

@ -129,6 +129,12 @@ openfirmware(void *args)
srsave[i] = mfsrin(i << ADDR_SR_SHFT);
mtsrin(i << ADDR_SR_SHFT, ofw_pmap.pm_sr[i]);
}
/*
* Clear battable[] translations
*/
__asm __volatile("mtdbatu 2, %0\n"
"mtdbatu 3, %0" : : "r" (0));
isync();
}