summaryrefslogtreecommitdiff
path: root/hw/iommu.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-01 14:51:24 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-01 14:51:24 +0000
commitc52428fcb1b3381f6ef3c64a26dfd55c5c874da6 (patch)
tree289581b32943ecbeed84c37e6b6a852c4ffa4379 /hw/iommu.c
parent5ad6bb97a4a1fa2f230a28f83b7b8ed85de81c22 (diff)
downloadqemu-c52428fcb1b3381f6ef3c64a26dfd55c5c874da6.tar.gz
qemu-c52428fcb1b3381f6ef3c64a26dfd55c5c874da6.tar.bz2
qemu-c52428fcb1b3381f6ef3c64a26dfd55c5c874da6.zip
Prevent overwriting fixed bits in AFSR
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3752 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/iommu.c')
-rw-r--r--hw/iommu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/iommu.c b/hw/iommu.c
index ad5826e4e3..784a780c8f 100644
--- a/hw/iommu.c
+++ b/hw/iommu.c
@@ -74,6 +74,7 @@ do { printf("IOMMU: " fmt , ##args); } while (0)
#define IOMMU_AFSR_ME 0x00080000 /* Multiple errors occurred */
#define IOMMU_AFSR_RD 0x00040000 /* A read operation was in progress */
#define IOMMU_AFSR_FAV 0x00020000 /* IOMMU afar has valid contents */
+#define IOMMU_AFSR_MASK 0xff0fffff
#define IOMMU_AFAR (0x1004 >> 2)
@@ -179,6 +180,9 @@ static void iommu_mem_writew(void *opaque, target_phys_addr_t addr,
DPRINTF("page flush %x\n", val);
s->regs[saddr] = val & IOMMU_PGFLUSH_MASK;
break;
+ case IOMMU_AFSR:
+ s->regs[saddr] = (val & IOMMU_AFSR_MASK) | IOMMU_AFSR_RESV;
+ break;
case IOMMU_SBCFG0:
case IOMMU_SBCFG1:
case IOMMU_SBCFG2: