qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [4292] Improved large memory support


From: Blue Swirl
Subject: [Qemu-devel] [4292] Improved large memory support
Date: Thu, 01 May 2008 18:21:48 +0000

Revision: 4292
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4292
Author:   blueswir1
Date:     2008-05-01 18:21:46 +0000 (Thu, 01 May 2008)

Log Message:
-----------
Improved large memory support

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

Modified: trunk/hw/sun4m.c
===================================================================
--- trunk/hw/sun4m.c    2008-05-01 12:04:35 UTC (rev 4291)
+++ trunk/hw/sun4m.c    2008-05-01 18:21:46 UTC (rev 4292)
@@ -156,7 +156,7 @@
 extern int nographic;
 
 static void nvram_init(m48t59_t *nvram, uint8_t *macaddr, const char *cmdline,
-                       const char *boot_devices, uint32_t RAM_size,
+                       const char *boot_devices, ram_addr_t RAM_size,
                        uint32_t kernel_size,
                        int width, int height, int depth,
                        int machine_id, const char *arch)
@@ -366,7 +366,7 @@
     return kernel_size;
 }
 
-static void sun4m_hw_init(const struct hwdef *hwdef, int RAM_size,
+static void sun4m_hw_init(const struct hwdef *hwdef, ram_addr_t RAM_size,
                           const char *boot_device,
                           DisplayState *ds, const char *kernel_filename,
                           const char *kernel_cmdline,
@@ -416,7 +416,7 @@
     /* allocate RAM */
     if ((uint64_t)RAM_size > hwdef->max_mem) {
         fprintf(stderr, "qemu: Too much memory for this machine: %d, maximum 
%d\n",
-                (unsigned int)RAM_size / (1024 * 1024),
+                (unsigned int)(RAM_size / (1024 * 1024)),
                 (unsigned int)(hwdef->max_mem / (1024 * 1024)));
         exit(1);
     }
@@ -545,7 +545,7 @@
                  hwdef->ecc_version);
 }
 
-static void sun4c_hw_init(const struct hwdef *hwdef, int RAM_size,
+static void sun4c_hw_init(const struct hwdef *hwdef, ram_addr_t RAM_size,
                           const char *boot_device,
                           DisplayState *ds, const char *kernel_filename,
                           const char *kernel_cmdline,
@@ -583,8 +583,8 @@
     /* allocate RAM */
     if ((uint64_t)RAM_size > hwdef->max_mem) {
         fprintf(stderr, "qemu: Too much memory for this machine: %d, maximum 
%d\n",
-                (unsigned int)RAM_size / (1024 * 1024),
-                (unsigned int)hwdef->max_mem / (1024 * 1024));
+                (unsigned int)(RAM_size / (1024 * 1024)),
+                (unsigned int)(hwdef->max_mem / (1024 * 1024)));
         exit(1);
     }
     cpu_register_physical_memory(0, RAM_size, 0);
@@ -774,7 +774,7 @@
             2, 3, 5, 7, 9, 11, 0, 14,   3, 5, 7, 9, 11, 13, 12, 12,
             6, 0, 4, 10, 8, 0, 11, 0,   0, 0, 0, 0, 15, 0, 15, 0,
         },
-        .max_mem = 0xffffffff, // XXX actually first 62GB ok
+        .max_mem = 0xf00000000ULL,
         .default_cpu_model = "TI SuperSparc II",
     },
     /* SS-600MP */
@@ -818,7 +818,7 @@
             2, 3, 5, 7, 9, 11, 0, 14,   3, 5, 7, 9, 11, 13, 12, 12,
             6, 0, 4, 10, 8, 0, 11, 0,   0, 0, 0, 0, 15, 0, 15, 0,
         },
-        .max_mem = 0xffffffff, // XXX actually first 62GB ok
+        .max_mem = 0xf00000000ULL,
         .default_cpu_model = "TI SuperSparc II",
     },
     /* SS-20 */
@@ -862,7 +862,7 @@
             2, 3, 5, 7, 9, 11, 0, 14,   3, 5, 7, 9, 11, 13, 12, 12,
             6, 0, 4, 10, 8, 0, 11, 0,   0, 0, 0, 0, 15, 0, 15, 0,
         },
-        .max_mem = 0xffffffff, // XXX actually first 62GB ok
+        .max_mem = 0xf00000000ULL,
         .default_cpu_model = "TI SuperSparc II",
     },
     /* SS-2 */
@@ -1163,7 +1163,7 @@
 }
 
 /* SPARCstation Voyager hardware initialisation */
-static void vger_init(int RAM_size, int vga_ram_size,
+static void vger_init(ram_addr_t RAM_size, int vga_ram_size,
                       const char *boot_device, DisplayState *ds,
                       const char *kernel_filename, const char *kernel_cmdline,
                       const char *initrd_filename, const char *cpu_model)
@@ -1173,7 +1173,7 @@
 }
 
 /* SPARCstation LX hardware initialisation */
-static void ss_lx_init(int RAM_size, int vga_ram_size,
+static void ss_lx_init(ram_addr_t RAM_size, int vga_ram_size,
                        const char *boot_device, DisplayState *ds,
                        const char *kernel_filename, const char *kernel_cmdline,
                        const char *initrd_filename, const char *cpu_model)
@@ -1183,7 +1183,7 @@
 }
 
 /* SPARCstation 4 hardware initialisation */
-static void ss4_init(int RAM_size, int vga_ram_size,
+static void ss4_init(ram_addr_t RAM_size, int vga_ram_size,
                      const char *boot_device, DisplayState *ds,
                      const char *kernel_filename, const char *kernel_cmdline,
                      const char *initrd_filename, const char *cpu_model)
@@ -1193,7 +1193,7 @@
 }
 
 /* SPARCClassic hardware initialisation */
-static void scls_init(int RAM_size, int vga_ram_size,
+static void scls_init(ram_addr_t RAM_size, int vga_ram_size,
                       const char *boot_device, DisplayState *ds,
                       const char *kernel_filename, const char *kernel_cmdline,
                       const char *initrd_filename, const char *cpu_model)
@@ -1203,7 +1203,7 @@
 }
 
 /* SPARCbook hardware initialisation */
-static void sbook_init(int RAM_size, int vga_ram_size,
+static void sbook_init(ram_addr_t RAM_size, int vga_ram_size,
                        const char *boot_device, DisplayState *ds,
                        const char *kernel_filename, const char *kernel_cmdline,
                        const char *initrd_filename, const char *cpu_model)
@@ -1313,7 +1313,7 @@
         .ser_irq = 12,
         .machine_id = 0x80,
         .iounit_version = 0x03000000,
-        .max_mem = 0xffffffff, // XXX actually first 62GB ok
+        .max_mem = 0xf00000000ULL,
         .default_cpu_model = "TI SuperSparc II",
     },
     /* SS-2000 */
@@ -1346,12 +1346,12 @@
         .ser_irq = 12,
         .machine_id = 0x80,
         .iounit_version = 0x03000000,
-        .max_mem = 0xffffffff, // XXX actually first 62GB ok
+        .max_mem = 0xf00000000ULL,
         .default_cpu_model = "TI SuperSparc II",
     },
 };
 
-static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, int RAM_size,
+static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size,
                           const char *boot_device,
                           DisplayState *ds, const char *kernel_filename,
                           const char *kernel_cmdline,
@@ -1397,7 +1397,7 @@
     /* allocate RAM */
     if ((uint64_t)RAM_size > hwdef->max_mem) {
         fprintf(stderr, "qemu: Too much memory for this machine: %d, maximum 
%d\n",
-                (unsigned int)RAM_size / (1024 * 1024),
+                (unsigned int)(RAM_size / (1024 * 1024)),
                 (unsigned int)(hwdef->max_mem / (1024 * 1024)));
         exit(1);
     }

Modified: trunk/hw/sun4u.c
===================================================================
--- trunk/hw/sun4u.c    2008-05-01 12:04:35 UTC (rev 4291)
+++ trunk/hw/sun4u.c    2008-05-01 18:21:46 UTC (rev 4292)
@@ -79,7 +79,7 @@
 
 static int sun4u_NVRAM_set_params (m48t59_t *nvram, uint16_t NVRAM_size,
                                    const unsigned char *arch,
-                                   uint32_t RAM_size, const char *boot_devices,
+                                   ram_addr_t RAM_size, const char 
*boot_devices,
                                    uint32_t kernel_image, uint32_t kernel_size,
                                    const char *cmdline,
                                    uint32_t initrd_image, uint32_t initrd_size,






reply via email to

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