qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [6127] Sun4m use 0 for nonexistent devices (Robert Reif)


From: Blue Swirl
Subject: [Qemu-devel] [6127] Sun4m use 0 for nonexistent devices (Robert Reif)
Date: Wed, 24 Dec 2008 20:21:18 +0000

Revision: 6127
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6127
Author:   blueswir1
Date:     2008-12-24 20:21:18 +0000 (Wed, 24 Dec 2008)

Log Message:
-----------
Sun4m use 0 for nonexistent devices (Robert Reif)

Modified Paths:
--------------
    trunk/hw/sun4m.c

Modified: trunk/hw/sun4m.c
===================================================================
--- trunk/hw/sun4m.c    2008-12-24 09:38:16 UTC (rev 6126)
+++ trunk/hw/sun4m.c    2008-12-24 20:21:18 UTC (rev 6127)
@@ -505,7 +505,7 @@
                                        cpu_irqs,
                                        hwdef->clock_irq);
 
-    if (hwdef->idreg_base != (target_phys_addr_t)-1) {
+    if (hwdef->idreg_base) {
         static const uint8_t idreg_data[] = { 0xfe, 0x81, 0x01, 0x03 };
 
         idreg_offset = qemu_ram_alloc(sizeof(idreg_data));
@@ -563,7 +563,7 @@
                                    slavio_irq[hwdef->me_irq], cpu_halt[0],
                                    &fdc_tc);
 
-    if (hwdef->fd_base != (target_phys_addr_t)-1) {
+    if (hwdef->fd_base) {
         /* there is zero or one floppy drive */
         memset(fd, 0, sizeof(fd));
         drive_index = drive_get_index(IF_FLOPPY, 0, 0);
@@ -590,7 +590,7 @@
         esp_scsi_attach(main_esp, drives_table[drive_index].bdrv, i);
     }
 
-    if (hwdef->cs_base != (target_phys_addr_t)-1)
+    if (hwdef->cs_base)
         cs_init(hwdef->cs_base, hwdef->cs_irq, slavio_intctl);
 
     kernel_size = sun4m_load_kernel(kernel_filename, initrd_filename,
@@ -601,7 +601,7 @@
                graphic_height, graphic_depth, hwdef->nvram_machine_id,
                "Sun4m");
 
-    if (hwdef->ecc_base != (target_phys_addr_t)-1)
+    if (hwdef->ecc_base)
         ecc_init(hwdef->ecc_base, slavio_irq[hwdef->ecc_irq],
                  hwdef->ecc_version);
 
@@ -647,7 +647,6 @@
         .apc_base     = 0x6a000000,
         .aux1_base    = 0x71900000,
         .aux2_base    = 0x71910000,
-        .ecc_base     = -1,
         .vram_size    = 0x00100000,
         .nvram_size   = 0x2000,
         .esp_irq = 18,
@@ -673,7 +672,6 @@
     {
         .iommu_base   = 0xfe0000000ULL,
         .tcx_base     = 0xe20000000ULL,
-        .cs_base      = -1,
         .slavio_base  = 0xff0000000ULL,
         .ms_kb_base   = 0xff1000000ULL,
         .serial_base  = 0xff1100000ULL,
@@ -700,7 +698,6 @@
         .ser_irq = 15,
         .fd_irq = 22,
         .me_irq = 30,
-        .cs_irq = -1,
         .ecc_irq = 28,
         .nvram_machine_id = 0x72,
         .machine_id = ss10_id,
@@ -716,15 +713,12 @@
     {
         .iommu_base   = 0xfe0000000ULL,
         .tcx_base     = 0xe20000000ULL,
-        .cs_base      = -1,
         .slavio_base  = 0xff0000000ULL,
         .ms_kb_base   = 0xff1000000ULL,
         .serial_base  = 0xff1100000ULL,
         .nvram_base   = 0xff1200000ULL,
-        .fd_base      = -1,
         .counter_base = 0xff1300000ULL,
         .intctl_base  = 0xff1400000ULL,
-        .idreg_base   = -1,
         .dma_base     = 0xef0081000ULL,
         .esp_base     = 0xef0080000ULL,
         .le_base      = 0xef0060000ULL,
@@ -743,7 +737,6 @@
         .ser_irq = 15,
         .fd_irq = 22,
         .me_irq = 30,
-        .cs_irq = -1,
         .ecc_irq = 28,
         .nvram_machine_id = 0x71,
         .machine_id = ss600mp_id,
@@ -759,7 +752,6 @@
     {
         .iommu_base   = 0xfe0000000ULL,
         .tcx_base     = 0xe20000000ULL,
-        .cs_base      = -1,
         .slavio_base  = 0xff0000000ULL,
         .ms_kb_base   = 0xff1000000ULL,
         .serial_base  = 0xff1100000ULL,
@@ -786,7 +778,6 @@
         .ser_irq = 15,
         .fd_irq = 22,
         .me_irq = 30,
-        .cs_irq = -1,
         .ecc_irq = 28,
         .nvram_machine_id = 0x72,
         .machine_id = ss20_id,
@@ -802,7 +793,6 @@
     {
         .iommu_base   = 0x10000000,
         .tcx_base     = 0x50000000,
-        .cs_base      = -1,
         .slavio_base  = 0x70000000,
         .ms_kb_base   = 0x71000000,
         .serial_base  = 0x71100000,
@@ -817,7 +807,6 @@
         .apc_base     = 0x71300000, // pmc
         .aux1_base    = 0x71900000,
         .aux2_base    = 0x71910000,
-        .ecc_base     = -1,
         .vram_size    = 0x00100000,
         .nvram_size   = 0x2000,
         .esp_irq = 18,
@@ -828,7 +817,6 @@
         .ser_irq = 15,
         .fd_irq = 22,
         .me_irq = 30,
-        .cs_irq = -1,
         .nvram_machine_id = 0x80,
         .machine_id = vger_id,
         .iommu_version = 0x05000000,
@@ -843,7 +831,6 @@
     {
         .iommu_base   = 0x10000000,
         .tcx_base     = 0x50000000,
-        .cs_base      = -1,
         .slavio_base  = 0x70000000,
         .ms_kb_base   = 0x71000000,
         .serial_base  = 0x71100000,
@@ -855,10 +842,8 @@
         .dma_base     = 0x78400000,
         .esp_base     = 0x78800000,
         .le_base      = 0x78c00000,
-        .apc_base     = -1,
         .aux1_base    = 0x71900000,
         .aux2_base    = 0x71910000,
-        .ecc_base     = -1,
         .vram_size    = 0x00100000,
         .nvram_size   = 0x2000,
         .esp_irq = 18,
@@ -869,7 +854,6 @@
         .ser_irq = 15,
         .fd_irq = 22,
         .me_irq = 30,
-        .cs_irq = -1,
         .nvram_machine_id = 0x80,
         .machine_id = lx_id,
         .iommu_version = 0x04000000,
@@ -899,7 +883,6 @@
         .apc_base     = 0x6a000000,
         .aux1_base    = 0x71900000,
         .aux2_base    = 0x71910000,
-        .ecc_base     = -1,
         .vram_size    = 0x00100000,
         .nvram_size   = 0x2000,
         .esp_irq = 18,
@@ -925,7 +908,6 @@
     {
         .iommu_base   = 0x10000000,
         .tcx_base     = 0x50000000,
-        .cs_base      = -1,
         .slavio_base  = 0x70000000,
         .ms_kb_base   = 0x71000000,
         .serial_base  = 0x71100000,
@@ -940,7 +922,6 @@
         .apc_base     = 0x6a000000,
         .aux1_base    = 0x71900000,
         .aux2_base    = 0x71910000,
-        .ecc_base     = -1,
         .vram_size    = 0x00100000,
         .nvram_size   = 0x2000,
         .esp_irq = 18,
@@ -951,7 +932,6 @@
         .ser_irq = 15,
         .fd_irq = 22,
         .me_irq = 30,
-        .cs_irq = -1,
         .nvram_machine_id = 0x80,
         .machine_id = scls_id,
         .iommu_version = 0x05000000,
@@ -966,7 +946,6 @@
     {
         .iommu_base   = 0x10000000,
         .tcx_base     = 0x50000000, // XXX
-        .cs_base      = -1,
         .slavio_base  = 0x70000000,
         .ms_kb_base   = 0x71000000,
         .serial_base  = 0x71100000,
@@ -981,7 +960,6 @@
         .apc_base     = 0x6a000000,
         .aux1_base    = 0x71900000,
         .aux2_base    = 0x71910000,
-        .ecc_base     = -1,
         .vram_size    = 0x00100000,
         .nvram_size   = 0x2000,
         .esp_irq = 18,
@@ -992,7 +970,6 @@
         .ser_irq = 15,
         .fd_irq = 22,
         .me_irq = 30,
-        .cs_irq = -1,
         .nvram_machine_id = 0x80,
         .machine_id = sbook_id,
         .iommu_version = 0x05000000,
@@ -1584,7 +1561,7 @@
     slavio_serial_init(hwdef->serial_base, slavio_irq[hwdef->ser_irq],
                        serial_hds[1], serial_hds[0]);
 
-    slavio_misc = slavio_misc_init(0, -1, hwdef->aux1_base, -1,
+    slavio_misc = slavio_misc_init(0, 0, hwdef->aux1_base, 0,
                                    slavio_irq[hwdef->me_irq], NULL, &fdc_tc);
 
     if (hwdef->fd_base != (target_phys_addr_t)-1) {






reply via email to

[Prev in Thread] Current Thread [Next in Thread]