Add to machine structure a flag to use SCSI drives instead of IDE: fixes SS-20

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5339 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
blueswir1 2008-09-28 18:55:17 +00:00
parent f87fc09b15
commit c9b1ae2cfd
5 changed files with 27 additions and 16 deletions

View File

@ -17,6 +17,7 @@ typedef struct QEMUMachine {
#define RAMSIZE_FIXED (1 << 0)
ram_addr_t ram_require;
int nodisk_ok;
int use_scsi;
struct QEMUMachine *next;
} QEMUMachine;

View File

@ -197,8 +197,9 @@ static void realview_init(ram_addr_t ram_size, int vga_ram_size,
}
QEMUMachine realview_machine = {
"realview",
"ARM RealView Emulation Baseboard (ARM926EJ-S)",
realview_init,
0x1000
.name = "realview",
.desc = "ARM RealView Emulation Baseboard (ARM926EJ-S)",
.init = realview_init,
.ram_require = 0x1000,
.use_scsi = 1,
};

View File

@ -1292,6 +1292,7 @@ QEMUMachine ss5_machine = {
.init = ss5_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine ss10_machine = {
@ -1300,6 +1301,7 @@ QEMUMachine ss10_machine = {
.init = ss10_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine ss600mp_machine = {
@ -1308,6 +1310,7 @@ QEMUMachine ss600mp_machine = {
.init = ss600mp_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine ss20_machine = {
@ -1316,6 +1319,7 @@ QEMUMachine ss20_machine = {
.init = ss20_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine ss2_machine = {
@ -1324,6 +1328,7 @@ QEMUMachine ss2_machine = {
.init = ss2_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine voyager_machine = {
@ -1332,6 +1337,7 @@ QEMUMachine voyager_machine = {
.init = vger_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine ss_lx_machine = {
@ -1340,6 +1346,7 @@ QEMUMachine ss_lx_machine = {
.init = ss_lx_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine ss4_machine = {
@ -1348,6 +1355,7 @@ QEMUMachine ss4_machine = {
.init = ss4_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine scls_machine = {
@ -1356,6 +1364,7 @@ QEMUMachine scls_machine = {
.init = scls_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine sbook_machine = {
@ -1364,6 +1373,7 @@ QEMUMachine sbook_machine = {
.init = sbook_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
static const struct sun4d_hwdef sun4d_hwdefs[] = {
@ -1611,6 +1621,7 @@ QEMUMachine ss1000_machine = {
.init = ss1000_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};
QEMUMachine ss2000_machine = {
@ -1619,4 +1630,5 @@ QEMUMachine ss2000_machine = {
.init = ss2000_init,
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
};

View File

@ -316,13 +316,15 @@ static void vab_init(ram_addr_t ram_size, int vga_ram_size,
}
QEMUMachine versatilepb_machine = {
"versatilepb",
"ARM Versatile/PB (ARM926EJ-S)",
vpb_init,
.name = "versatilepb",
.desc = "ARM Versatile/PB (ARM926EJ-S)",
.init = vpb_init,
.use_scsi = 1,
};
QEMUMachine versatileab_machine = {
"versatileab",
"ARM Versatile/AB (ARM926EJ-S)",
vab_init,
.name = "versatileab",
.desc = "ARM Versatile/AB (ARM926EJ-S)",
.init = vab_init,
.use_scsi = 1,
};

7
vl.c
View File

@ -5461,12 +5461,7 @@ static int drive_init(struct drive_opt *arg, int snapshot,
index = -1;
cache = 1;
if (!strcmp(machine->name, "realview") ||
!strcmp(machine->name, "SS-5") ||
!strcmp(machine->name, "SS-10") ||
!strcmp(machine->name, "SS-600MP") ||
!strcmp(machine->name, "versatilepb") ||
!strcmp(machine->name, "versatileab")) {
if (machine->use_scsi) {
type = IF_SCSI;
max_devs = MAX_SCSI_DEVS;
pstrcpy(devname, sizeof(devname), "scsi");