Commit ba86345802fcede0b0f50393c97c128aa7a3f40c
1 parent
d4afc623
added cpu_get_physical_page_desc()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2168 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
11 additions
and
0 deletions
exec.c
... | ... | @@ -1801,6 +1801,17 @@ void cpu_register_physical_memory(target_phys_addr_t start_addr, |
1801 | 1801 | } |
1802 | 1802 | } |
1803 | 1803 | |
1804 | +/* XXX: temporary until new memory mapping API */ | |
1805 | +uint32_t cpu_get_physical_page_desc(target_phys_addr_t addr) | |
1806 | +{ | |
1807 | + PhysPageDesc *p; | |
1808 | + | |
1809 | + p = phys_page_find(addr >> TARGET_PAGE_BITS); | |
1810 | + if (!p) | |
1811 | + return IO_MEM_UNASSIGNED; | |
1812 | + return p->phys_offset; | |
1813 | +} | |
1814 | + | |
1804 | 1815 | static uint32_t unassigned_mem_readb(void *opaque, target_phys_addr_t addr) |
1805 | 1816 | { |
1806 | 1817 | return 0; | ... | ... |