summaryrefslogtreecommitdiffstats
path: root/bsps/powerpc/shared/mmu
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/powerpc/shared/mmu')
-rw-r--r--bsps/powerpc/shared/mmu/e500-mmu.c3
-rw-r--r--bsps/powerpc/shared/mmu/pte121.c12
2 files changed, 13 insertions, 2 deletions
diff --git a/bsps/powerpc/shared/mmu/e500-mmu.c b/bsps/powerpc/shared/mmu/e500-mmu.c
index ee69172e46..3f62a293e6 100644
--- a/bsps/powerpc/shared/mmu/e500-mmu.c
+++ b/bsps/powerpc/shared/mmu/e500-mmu.c
@@ -71,6 +71,7 @@
*/
#include <rtems.h>
#include <rtems/bspIo.h>
+#include <rtems/score/sysstate.h>
#include <inttypes.h>
#include <stdio.h>
@@ -125,7 +126,7 @@ myprintf(FILE *f, char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- if (!f || !_impure_ptr->__sdidinit) {
+ if (!f || !_System_state_Is_up(_System_state_Get())) {
/*
* Might be called at an early stage when
* stdio is not yet initialized.
diff --git a/bsps/powerpc/shared/mmu/pte121.c b/bsps/powerpc/shared/mmu/pte121.c
index 778d6353a9..e97c86b9ba 100644
--- a/bsps/powerpc/shared/mmu/pte121.c
+++ b/bsps/powerpc/shared/mmu/pte121.c
@@ -158,7 +158,14 @@
static uint32_t
seg2vsid (uint32_t ea)
{
- __asm__ volatile ("mfsrin %0, %0":"=r" (ea):"0" (ea));
+ __asm__ volatile (
+ ".machine \"push\"\n"
+ ".machine \"any\"\n"
+ "mfsrin %0, %0\n"
+ ".machine \"pop\"" :
+ "=r" (ea) :
+ "0" (ea)
+ );
return ea & ((1 << LD_VSID_SIZE) - 1);
}
#else
@@ -620,6 +627,8 @@ triv121PgTblActivate (Triv121PgTbl pt)
* - restore original MSR
*/
__asm__ __volatile (
+ " .machine \"push\"\n"
+ " .machine \"any\"\n"
" mtctr %[tmp0]\n"
/* Get MSR and switch interrupts off - just in case.
* Also switch the MMU off; the book
@@ -651,6 +660,7 @@ triv121PgTblActivate (Triv121PgTbl pt)
/* restore original MSR */
" mtmsr %[tmp0]\n"
" isync \n"
+ " .machine \"pop\"\n"
:[tmp0]"+r&"(tmp0), [tmp1]"+b&"(tmp1), [tmp2]"+b&"(tmp2)
:[ea_range]"i"(FLUSH_EA_RANGE), [pg_sz]"i" (1 << LD_PG_SIZE),
[sdr1]"i"(SDR1), [sdr1val]"r" (sdr1)