diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-20 16:01:51 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-20 16:01:51 +0000 |
commit | 5e3b100b65ea3af8e9a31507541e26d5e439e377 (patch) | |
tree | 437491486c45f10319cb5fc5c3381b2782101687 | |
parent | d69d2ca9b4125e738dfc5eee908dfac12fc3f870 (diff) |
Change ldl_phys to cpu_physical_memory_read, fix pte address
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3197 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | hw/iommu.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/iommu.c b/hw/iommu.c index c36178cdcd..c9b9db57dc 100644 --- a/hw/iommu.c +++ b/hw/iommu.c @@ -202,7 +202,8 @@ static CPUWriteMemoryFunc *iommu_mem_write[3] = { static uint32_t iommu_page_get_flags(IOMMUState *s, target_phys_addr_t addr) { - uint32_t iopte, ret; + uint32_t ret; + target_phys_addr_t iopte; #ifdef DEBUG_IOMMU target_phys_addr_t pa = addr; #endif @@ -210,9 +211,10 @@ static uint32_t iommu_page_get_flags(IOMMUState *s, target_phys_addr_t addr) iopte = s->regs[IOMMU_BASE] << 4; addr &= ~s->iostart; iopte += (addr >> (PAGE_SHIFT - 2)) & ~3; - ret = ldl_phys(iopte); - DPRINTF("get flags addr " TARGET_FMT_plx " => pte %x, *ptes = %x\n", pa, - iopte, ret); + cpu_physical_memory_read(iopte, (uint8_t *)&ret, 4); + bswap32s(&ret); + DPRINTF("get flags addr " TARGET_FMT_plx " => pte " TARGET_FMT_plx + ", *pte = %x\n", pa, iopte, ret); return ret; } |