diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-24 19:44:09 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-24 19:44:09 +0000 |
commit | 40ce0a9a8f498dc4c766f55760eea49b3f55069e (patch) | |
tree | 65d1caaafabe10233fd5f0514daf9a08b957a6b8 /target-sparc/helper.c | |
parent | 9437454a8427c1b32de4ab7a426615ea237e59c6 (diff) |
CPU boot mode
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3231 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/helper.c')
-rw-r--r-- | target-sparc/helper.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target-sparc/helper.c b/target-sparc/helper.c index b78e5dfb88..af8bc96948 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -110,7 +110,14 @@ int get_physical_address (CPUState *env, target_phys_addr_t *physical, int *prot unsigned long page_offset; virt_addr = address & TARGET_PAGE_MASK; + if ((env->mmuregs[0] & MMU_E) == 0) { /* MMU disabled */ + // Boot mode: instruction fetches are taken from PROM + if (rw == 2 && (env->mmuregs[0] & MMU_BM)) { + *physical = 0xff0000000ULL | (address & 0x3ffffULL); + *prot = PAGE_READ | PAGE_EXEC; + return 0; + } *physical = address; *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; return 0; |