From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JrdPl-0007ma-I4 for qemu-devel@nongnu.org; Thu, 01 May 2008 14:21:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JrdPk-0007mO-LL for qemu-devel@nongnu.org; Thu, 01 May 2008 14:21:52 -0400 Received: from [199.232.76.173] (port=52182 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JrdPk-0007mE-CY for qemu-devel@nongnu.org; Thu, 01 May 2008 14:21:52 -0400 Received: from savannah.gnu.org ([199.232.41.3] helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JrdPj-0003JF-Cw for qemu-devel@nongnu.org; Thu, 01 May 2008 14:21:51 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JrdPh-0003qj-15 for qemu-devel@nongnu.org; Thu, 01 May 2008 18:21:49 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JrdPg-0003qA-6P for qemu-devel@nongnu.org; Thu, 01 May 2008 18:21:48 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Thu, 01 May 2008 18:21:48 +0000 Subject: [Qemu-devel] [4292] Improved large memory support Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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,