aboutsummaryrefslogtreecommitdiff
path: root/hw/milkymist.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-04 19:05:02 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:41 +0200
commitf6932a867d862a5d39506701e9b9d8abcdf1f4ff (patch)
tree50f74148965723d37fd074eeec6b09fc6e3773ec /hw/milkymist.c
parent1328cc01f18b416666cdc65c72efec33a6dce396 (diff)
downloadqemu-f6932a867d862a5d39506701e9b9d8abcdf1f4ff.zip
qemu-f6932a867d862a5d39506701e9b9d8abcdf1f4ff.tar.gz
qemu-f6932a867d862a5d39506701e9b9d8abcdf1f4ff.tar.bz2
milkymist: Store LM32 in ResetInfo
Allows us to use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
Diffstat (limited to 'hw/milkymist.c')
-rw-r--r--hw/milkymist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/milkymist.c b/hw/milkymist.c
index 59f37b4..2e7235b 100644
--- a/hw/milkymist.c
+++ b/hw/milkymist.c
@@ -37,7 +37,7 @@
#define KERNEL_LOAD_ADDR 0x40000000
typedef struct {
- CPULM32State *env;
+ LM32CPU *cpu;
target_phys_addr_t bootstrap_pc;
target_phys_addr_t flash_base;
target_phys_addr_t initrd_base;
@@ -59,9 +59,9 @@ static void cpu_irq_handler(void *opaque, int irq, int level)
static void main_cpu_reset(void *opaque)
{
ResetInfo *reset_info = opaque;
- CPULM32State *env = reset_info->env;
+ CPULM32State *env = &reset_info->cpu->env;
- cpu_state_reset(env);
+ cpu_reset(CPU(reset_info->cpu));
/* init defaults */
env->pc = reset_info->bootstrap_pc;
@@ -108,7 +108,7 @@ milkymist_init(ram_addr_t ram_size_not_used,
}
cpu = cpu_lm32_init(cpu_model);
env = &cpu->env;
- reset_info->env = env;
+ reset_info->cpu = cpu;
cpu_lm32_set_phys_msb_ignore(env, 1);