diff options
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/loader.c | 8 | ||||
-rw-r--r-- | hw/core/ptimer.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c index d4c441fd18..7ee675c1df 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -835,12 +835,12 @@ err: return -1; } -ram_addr_t rom_add_blob(const char *name, const void *blob, size_t len, +MemoryRegion *rom_add_blob(const char *name, const void *blob, size_t len, size_t max_len, hwaddr addr, const char *fw_file_name, FWCfgReadCallback fw_callback, void *callback_opaque) { Rom *rom; - ram_addr_t ret = RAM_ADDR_MAX; + MemoryRegion *mr = NULL; rom = g_malloc0(sizeof(*rom)); rom->name = g_strdup(name); @@ -858,7 +858,7 @@ ram_addr_t rom_add_blob(const char *name, const void *blob, size_t len, if (rom_file_has_mr) { data = rom_set_mr(rom, OBJECT(fw_cfg), devpath); - ret = memory_region_get_ram_addr(rom->mr); + mr = rom->mr; } else { data = rom->data; } @@ -867,7 +867,7 @@ ram_addr_t rom_add_blob(const char *name, const void *blob, size_t len, fw_callback, callback_opaque, data, rom->datasize); } - return ret; + return mr; } /* This function is specific for elf program because we don't need to allocate diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index 2abad1fa3d..8437bd6e8b 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -189,7 +189,7 @@ void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload) * on the current generation of host machines. */ - if (limit * s->period < 10000 && s->period) { + if (!use_icount && limit * s->period < 10000 && s->period) { limit = 10000 / s->period; } |