diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-10 15:15:54 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-10 15:15:54 +0000 |
commit | aaed909a495e78364abc6812df672d2e764961a8 (patch) | |
tree | 704ab4280f250fa310bee6a3d0ba94e5417daef3 /hw/pxa2xx.c | |
parent | 7d77bf200682ed8cbd0c94bdfbac64dc4b23b149 (diff) |
added cpu_model parameter to cpu_init()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3562 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pxa2xx.c')
-rw-r--r-- | hw/pxa2xx.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/hw/pxa2xx.c b/hw/pxa2xx.c index 6109fc13e9..ebaff1320a 100644 --- a/hw/pxa2xx.c +++ b/hw/pxa2xx.c @@ -2023,9 +2023,14 @@ struct pxa2xx_state_s *pxa270_init(unsigned int sdram_size, fprintf(stderr, "Machine requires a PXA27x processor.\n"); exit(1); } - - s->env = cpu_init(); - cpu_arm_set_model(s->env, revision ?: "pxa270"); + if (!revision) + revision = "pxa270"; + + s->env = cpu_init(revision); + if (!s->env) { + fprintf(stderr, "Unable to find CPU definition\n"); + exit(1); + } register_savevm("cpu", 0, 0, cpu_save, cpu_load, s->env); /* SDRAM & Internal Memory Storage */ @@ -2132,10 +2137,14 @@ struct pxa2xx_state_s *pxa255_init(unsigned int sdram_size, struct pxa2xx_state_s *s; struct pxa2xx_ssp_s *ssp; int iomemtype, i; + s = (struct pxa2xx_state_s *) qemu_mallocz(sizeof(struct pxa2xx_state_s)); - s->env = cpu_init(); - cpu_arm_set_model(s->env, "pxa255"); + s->env = cpu_init("pxa255"); + if (!s->env) { + fprintf(stderr, "Unable to find CPU definition\n"); + exit(1); + } register_savevm("cpu", 0, 0, cpu_save, cpu_load, s->env); /* SDRAM & Internal Memory Storage */ |