summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2014-01-29 20:48:26 +0000
committerbrooks <brooks@FreeBSD.org>2014-01-29 20:48:26 +0000
commit63fe90dcd8b2fc3d5acd50b81ae0ed650e09329a (patch)
tree974f7ca5fd09f747815e36e3adf132486015e47e
parent647b92bf0a989dc8e99ced34a4fd33e2e1d6dc96 (diff)
downloadFreeBSD-src-63fe90dcd8b2fc3d5acd50b81ae0ed650e09329a.zip
FreeBSD-src-63fe90dcd8b2fc3d5acd50b81ae0ed650e09329a.tar.gz
MFC r256745:
MFP4: Change 227630 by bz@bz_zenith on 2013/04/12 08:50:27 Implement soft reset setting sr in sr and just in case loop endlessly afterwards. Sponsored by: DARPA/AFRL
-rw-r--r--sys/mips/beri/beri_machdep.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/mips/beri/beri_machdep.c b/sys/mips/beri/beri_machdep.c
index a1bfadb..85dd153 100644
--- a/sys/mips/beri/beri_machdep.c
+++ b/sys/mips/beri/beri_machdep.c
@@ -116,14 +116,19 @@ mips_init(void)
/*
* Perform a board-level soft-reset.
- *
- * XXXRW: BERI doesn't yet have a board-level soft-reset.
*/
void
platform_reset(void)
{
- panic("%s: not yet", __func__);
+ /* XXX SMP will likely require us to do more. */
+ __asm__ __volatile__(
+ "mfc0 $k0, $12\n\t"
+ "li $k1, 0x00100000\n\t"
+ "or $k0, $k0, $k1\n\t"
+ "mtc0 $k0, $12\n");
+ for( ; ; )
+ __asm__ __volatile("wait");
}
void
OpenPOWER on IntegriCloud