From b897221403c1bd0edd7c820c5d3f31c4397dd3ed Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Fri, 10 Apr 2009 18:00:25 -0400 Subject: [PATCH] -mtdblock loads an image into the ROM section. --- qemu/hw/mc1322x.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/qemu/hw/mc1322x.c b/qemu/hw/mc1322x.c index 39bf026d5..b1e0ca2a4 100644 --- a/qemu/hw/mc1322x.c +++ b/qemu/hw/mc1322x.c @@ -11,6 +11,7 @@ #include "sysemu.h" #include "boards.h" #include "flash.h" +#include "block.h" static const int sector_len = 128 * 1024; @@ -36,9 +37,17 @@ struct mc1322x_state_s *mc1322x_init(void) cpu_register_physical_memory(MC1322X_RAMBASE, MC1322X_RAMSIZE, qemu_ram_alloc(MC1322X_RAMSIZE) | IO_MEM_RAM); + index = drive_get_index(IF_MTD, 0, 0); + fprintf(stderr, "rom device index %d\n",index); + cpu_register_physical_memory(MC1322X_ROMBASE, MC1322X_ROMSIZE,0); + if(0