Permalink
Browse files

add support for bootrom mapping

  • Loading branch information...
frederic committed Mar 1, 2018
1 parent b384cd9 commit 23ce5e32774a2ae834e3ed99dd2d26a1be5a2d8a
Showing with 25 additions and 0 deletions.
  1. +25 −0 hw/arm/exynos4210.c
@@ -29,6 +29,7 @@
#include "hw/cpu/a9mpcore.h"
#include "hw/boards.h"
#include "sysemu/sysemu.h"
#include "qemu/error-report.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "hw/loader.h"
@@ -172,6 +173,30 @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem)
DeviceState *dev;
int i, n;

if (bios_name) {
char *fn;
int image_size;

if (drive_get(IF_PFLASH, 0, 0)) {
error_report("The contents of the first flash device may be "
"specified with -bios or with -drive if=pflash... "
"but you cannot use both options at once");
exit(1);
}
fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
if (!fn) {
error_report("Could not find ROM image '%s'", bios_name);
exit(1);
}
image_size = load_image_targphys(fn, EXYNOS4210_IROM_BASE_ADDR,
EXYNOS4210_IROM_SIZE);
g_free(fn);
if (image_size < 0) {
error_report("Could not load ROM image '%s'", bios_name);
exit(1);
}
}

for (n = 0; n < EXYNOS4210_NCPUS; n++) {
Object *cpuobj = object_new(ARM_CPU_TYPE_NAME("cortex-a9"));

0 comments on commit 23ce5e3

Please sign in to comment.