mirror of https://github.com/xqemu/xqemu.git
loader: remove calls to cpu_get_physical_page_desc()
cpu_get_physical_page_desc() is tied into the memory core's innards, replace it with uses of the API. Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
75c9d6c2f8
commit
dcc5cd33d2
|
@ -49,6 +49,8 @@
|
||||||
#include "uboot_image.h"
|
#include "uboot_image.h"
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
#include "fw_cfg.h"
|
#include "fw_cfg.h"
|
||||||
|
#include "memory.h"
|
||||||
|
#include "exec-memory.h"
|
||||||
|
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
||||||
|
@ -674,7 +676,7 @@ static void rom_reset(void *unused)
|
||||||
int rom_load_all(void)
|
int rom_load_all(void)
|
||||||
{
|
{
|
||||||
target_phys_addr_t addr = 0;
|
target_phys_addr_t addr = 0;
|
||||||
int memtype;
|
MemoryRegionSection section;
|
||||||
Rom *rom;
|
Rom *rom;
|
||||||
|
|
||||||
QTAILQ_FOREACH(rom, &roms, next) {
|
QTAILQ_FOREACH(rom, &roms, next) {
|
||||||
|
@ -690,9 +692,8 @@ int rom_load_all(void)
|
||||||
}
|
}
|
||||||
addr = rom->addr;
|
addr = rom->addr;
|
||||||
addr += rom->romsize;
|
addr += rom->romsize;
|
||||||
memtype = cpu_get_physical_page_desc(rom->addr) & (3 << IO_MEM_SHIFT);
|
section = memory_region_find(get_system_memory(), rom->addr, 1);
|
||||||
if (memtype == IO_MEM_ROM)
|
rom->isrom = section.size && memory_region_is_rom(section.mr);
|
||||||
rom->isrom = 1;
|
|
||||||
}
|
}
|
||||||
qemu_register_reset(rom_reset, NULL);
|
qemu_register_reset(rom_reset, NULL);
|
||||||
roms_loaded = 1;
|
roms_loaded = 1;
|
||||||
|
|
Loading…
Reference in New Issue