Commit c9b1ae2cfd25e3ad88c6ef61d18eaefd177a5e49

Authored by blueswir1
1 parent f87fc09b

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
hw/boards.h
... ... @@ -17,6 +17,7 @@ typedef struct QEMUMachine {
17 17 #define RAMSIZE_FIXED (1 << 0)
18 18 ram_addr_t ram_require;
19 19 int nodisk_ok;
  20 + int use_scsi;
20 21 struct QEMUMachine *next;
21 22 } QEMUMachine;
22 23  
... ...
hw/realview.c
... ... @@ -197,8 +197,9 @@ static void realview_init(ram_addr_t ram_size, int vga_ram_size,
197 197 }
198 198  
199 199 QEMUMachine realview_machine = {
200   - "realview",
201   - "ARM RealView Emulation Baseboard (ARM926EJ-S)",
202   - realview_init,
203   - 0x1000
  200 + .name = "realview",
  201 + .desc = "ARM RealView Emulation Baseboard (ARM926EJ-S)",
  202 + .init = realview_init,
  203 + .ram_require = 0x1000,
  204 + .use_scsi = 1,
204 205 };
... ...
hw/sun4m.c
... ... @@ -1292,6 +1292,7 @@ QEMUMachine ss5_machine = {
1292 1292 .init = ss5_init,
1293 1293 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1294 1294 .nodisk_ok = 1,
  1295 + .use_scsi = 1,
1295 1296 };
1296 1297  
1297 1298 QEMUMachine ss10_machine = {
... ... @@ -1300,6 +1301,7 @@ QEMUMachine ss10_machine = {
1300 1301 .init = ss10_init,
1301 1302 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1302 1303 .nodisk_ok = 1,
  1304 + .use_scsi = 1,
1303 1305 };
1304 1306  
1305 1307 QEMUMachine ss600mp_machine = {
... ... @@ -1308,6 +1310,7 @@ QEMUMachine ss600mp_machine = {
1308 1310 .init = ss600mp_init,
1309 1311 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1310 1312 .nodisk_ok = 1,
  1313 + .use_scsi = 1,
1311 1314 };
1312 1315  
1313 1316 QEMUMachine ss20_machine = {
... ... @@ -1316,6 +1319,7 @@ QEMUMachine ss20_machine = {
1316 1319 .init = ss20_init,
1317 1320 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1318 1321 .nodisk_ok = 1,
  1322 + .use_scsi = 1,
1319 1323 };
1320 1324  
1321 1325 QEMUMachine ss2_machine = {
... ... @@ -1324,6 +1328,7 @@ QEMUMachine ss2_machine = {
1324 1328 .init = ss2_init,
1325 1329 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1326 1330 .nodisk_ok = 1,
  1331 + .use_scsi = 1,
1327 1332 };
1328 1333  
1329 1334 QEMUMachine voyager_machine = {
... ... @@ -1332,6 +1337,7 @@ QEMUMachine voyager_machine = {
1332 1337 .init = vger_init,
1333 1338 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1334 1339 .nodisk_ok = 1,
  1340 + .use_scsi = 1,
1335 1341 };
1336 1342  
1337 1343 QEMUMachine ss_lx_machine = {
... ... @@ -1340,6 +1346,7 @@ QEMUMachine ss_lx_machine = {
1340 1346 .init = ss_lx_init,
1341 1347 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1342 1348 .nodisk_ok = 1,
  1349 + .use_scsi = 1,
1343 1350 };
1344 1351  
1345 1352 QEMUMachine ss4_machine = {
... ... @@ -1348,6 +1355,7 @@ QEMUMachine ss4_machine = {
1348 1355 .init = ss4_init,
1349 1356 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1350 1357 .nodisk_ok = 1,
  1358 + .use_scsi = 1,
1351 1359 };
1352 1360  
1353 1361 QEMUMachine scls_machine = {
... ... @@ -1356,6 +1364,7 @@ QEMUMachine scls_machine = {
1356 1364 .init = scls_init,
1357 1365 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1358 1366 .nodisk_ok = 1,
  1367 + .use_scsi = 1,
1359 1368 };
1360 1369  
1361 1370 QEMUMachine sbook_machine = {
... ... @@ -1364,6 +1373,7 @@ QEMUMachine sbook_machine = {
1364 1373 .init = sbook_init,
1365 1374 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1366 1375 .nodisk_ok = 1,
  1376 + .use_scsi = 1,
1367 1377 };
1368 1378  
1369 1379 static const struct sun4d_hwdef sun4d_hwdefs[] = {
... ... @@ -1611,6 +1621,7 @@ QEMUMachine ss1000_machine = {
1611 1621 .init = ss1000_init,
1612 1622 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1613 1623 .nodisk_ok = 1,
  1624 + .use_scsi = 1,
1614 1625 };
1615 1626  
1616 1627 QEMUMachine ss2000_machine = {
... ... @@ -1619,4 +1630,5 @@ QEMUMachine ss2000_machine = {
1619 1630 .init = ss2000_init,
1620 1631 .ram_require = PROM_SIZE_MAX + TCX_SIZE,
1621 1632 .nodisk_ok = 1,
  1633 + .use_scsi = 1,
1622 1634 };
... ...
hw/versatilepb.c
... ... @@ -316,13 +316,15 @@ static void vab_init(ram_addr_t ram_size, int vga_ram_size,
316 316 }
317 317  
318 318 QEMUMachine versatilepb_machine = {
319   - "versatilepb",
320   - "ARM Versatile/PB (ARM926EJ-S)",
321   - vpb_init,
  319 + .name = "versatilepb",
  320 + .desc = "ARM Versatile/PB (ARM926EJ-S)",
  321 + .init = vpb_init,
  322 + .use_scsi = 1,
322 323 };
323 324  
324 325 QEMUMachine versatileab_machine = {
325   - "versatileab",
326   - "ARM Versatile/AB (ARM926EJ-S)",
327   - vab_init,
  326 + .name = "versatileab",
  327 + .desc = "ARM Versatile/AB (ARM926EJ-S)",
  328 + .init = vab_init,
  329 + .use_scsi = 1,
328 330 };
... ...
... ... @@ -5461,12 +5461,7 @@ static int drive_init(struct drive_opt *arg, int snapshot,
5461 5461 index = -1;
5462 5462 cache = 1;
5463 5463  
5464   - if (!strcmp(machine->name, "realview") ||
5465   - !strcmp(machine->name, "SS-5") ||
5466   - !strcmp(machine->name, "SS-10") ||
5467   - !strcmp(machine->name, "SS-600MP") ||
5468   - !strcmp(machine->name, "versatilepb") ||
5469   - !strcmp(machine->name, "versatileab")) {
  5464 + if (machine->use_scsi) {
5470 5465 type = IF_SCSI;
5471 5466 max_devs = MAX_SCSI_DEVS;
5472 5467 pstrcpy(devname, sizeof(devname), "scsi");
... ...