aboutsummaryrefslogtreecommitdiff
path: root/target-alpha
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2011-04-27 09:22:18 -0700
committerRichard Henderson <rth@anchor.twiddle.net>2011-05-31 10:18:06 -0700
commitfa6e0a6354539582ae98c232982070d99ea14770 (patch)
tree01c3626ca856048196061a00c3c7f9b5a3b9f517 /target-alpha
parenta3b9af162468674cd4bb6e1c7671d7bdabd8699c (diff)
downloadqemu-fa6e0a6354539582ae98c232982070d99ea14770.zip
qemu-fa6e0a6354539582ae98c232982070d99ea14770.tar.gz
qemu-fa6e0a6354539582ae98c232982070d99ea14770.tar.bz2
target-alpha: Remap PIO space for 43-bit KSEG for EV6.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha')
-rw-r--r--target-alpha/helper.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/target-alpha/helper.c b/target-alpha/helper.c
index d0e4db2..32c2cf9 100644
--- a/target-alpha/helper.c
+++ b/target-alpha/helper.c
@@ -220,14 +220,18 @@ static int get_physical_address(CPUState *env, target_ulong addr,
/* Translate the superpage. */
/* ??? When we do more than emulate Unix PALcode, we'll need to
- determine which superpage is actually active. */
- if (saddr < 0 && (saddr >> (TARGET_VIRT_ADDR_SPACE_BITS - 2) & 3) == 2) {
- /* User-space cannot access kseg addresses. */
+ determine which KSEG is actually active. */
+ if (saddr < 0 && ((saddr >> 41) & 3) == 2) {
+ /* User-space cannot access KSEG addresses. */
if (mmu_idx != MMU_KERNEL_IDX) {
goto exit;
}
+ /* For the benefit of the Typhoon chipset, move bit 40 to bit 43.
+ We would not do this if the 48-bit KSEG is enabled. */
phys = saddr & ((1ull << 40) - 1);
+ phys |= (saddr & (1ull << 40)) << 3;
+
prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
ret = -1;
goto exit;