diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-01 01:03:32 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-01 01:03:32 +0000 |
commit | 4207117c93357347500235952ce7891688089cb1 (patch) | |
tree | 0533c0a98608a0a01a3e953e43c2c060f32bbf90 /hw/pxa2xx.c | |
parent | 21bd785e84742aa8370d0084ca1bc84aa4752b8a (diff) |
Honour limited subset of --cpu values instead of ignoring.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2761 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pxa2xx.c')
-rw-r--r-- | hw/pxa2xx.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/pxa2xx.c b/hw/pxa2xx.c index ad5f2672d4..2f5dc96062 100644 --- a/hw/pxa2xx.c +++ b/hw/pxa2xx.c @@ -1518,13 +1518,16 @@ struct pxa2xx_state_s *pxa270_init(DisplayState *ds, const char *revision) { struct pxa2xx_state_s *s; struct pxa2xx_ssp_s *ssp; - char cpu_model[16]; int iomemtype, i; s = (struct pxa2xx_state_s *) qemu_mallocz(sizeof(struct pxa2xx_state_s)); + if (revision && strncmp(revision, "pxa27", 5)) { + fprintf(stderr, "Machine requires a PXA27x processor.\n"); + exit(1); + } + s->env = cpu_init(); - snprintf(cpu_model, sizeof(cpu_model), "pxa270-%s", revision); - cpu_arm_set_model(s->env, cpu_model); + cpu_arm_set_model(s->env, revision ?: "pxa270"); s->pic = pxa2xx_pic_init(0x40d00000, s->env); |