Commit 4207117c authored by balrog's avatar balrog

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
parent 21bd785e
......@@ -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);
......
......@@ -992,14 +992,16 @@ enum spitz_model_e { spitz, akita, borzoi, terrier };
static void spitz_common_init(int ram_size, int vga_ram_size,
DisplayState *ds, const char *kernel_filename,
const char *kernel_cmdline, const char *initrd_filename,
enum spitz_model_e model, int arm_id)
const char *cpu_model, enum spitz_model_e model, int arm_id)
{
uint32_t spitz_ram = 0x04000000;
uint32_t spitz_rom = 0x00800000;
struct pxa2xx_state_s *cpu;
struct scoop_info_s *scp;
cpu = pxa270_init(ds, (model == terrier) ? "c5" : "c0");
if (!cpu_model)
cpu_model = (model == terrier) ? "pxa270-c5" : "pxa270-c0";
cpu = pxa270_init(ds, cpu_model);
/* Setup memory */
if (ram_size < spitz_ram + spitz_rom) {
......@@ -1045,7 +1047,7 @@ static void spitz_init(int ram_size, int vga_ram_size, int boot_device,
const char *initrd_filename, const char *cpu_model)
{
spitz_common_init(ram_size, vga_ram_size, ds, kernel_filename,
kernel_cmdline, initrd_filename, spitz, 0x2c9);
kernel_cmdline, initrd_filename, cpu_model, spitz, 0x2c9);
}
static void borzoi_init(int ram_size, int vga_ram_size, int boot_device,
......@@ -1054,7 +1056,7 @@ static void borzoi_init(int ram_size, int vga_ram_size, int boot_device,
const char *initrd_filename, const char *cpu_model)
{
spitz_common_init(ram_size, vga_ram_size, ds, kernel_filename,
kernel_cmdline, initrd_filename, borzoi, 0x33f);
kernel_cmdline, initrd_filename, cpu_model, borzoi, 0x33f);
}
static void akita_init(int ram_size, int vga_ram_size, int boot_device,
......@@ -1063,7 +1065,7 @@ static void akita_init(int ram_size, int vga_ram_size, int boot_device,
const char *initrd_filename, const char *cpu_model)
{
spitz_common_init(ram_size, vga_ram_size, ds, kernel_filename,
kernel_cmdline, initrd_filename, akita, 0x2e8);
kernel_cmdline, initrd_filename, cpu_model, akita, 0x2e8);
}
static void terrier_init(int ram_size, int vga_ram_size, int boot_device,
......@@ -1072,7 +1074,7 @@ static void terrier_init(int ram_size, int vga_ram_size, int boot_device,
const char *initrd_filename, const char *cpu_model)
{
spitz_common_init(ram_size, vga_ram_size, ds, kernel_filename,
kernel_cmdline, initrd_filename, terrier, 0x33f);
kernel_cmdline, initrd_filename, cpu_model, terrier, 0x33f);
}
QEMUMachine akitapda_machine = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment