From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlK3l-0006fR-7N for qemu-devel@nongnu.org; Thu, 12 Jan 2012 07:47:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlK3f-0001Yf-F1 for qemu-devel@nongnu.org; Thu, 12 Jan 2012 07:47:13 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:48498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlK3f-0001YX-Ao for qemu-devel@nongnu.org; Thu, 12 Jan 2012 07:47:07 -0500 Received: from euspt1 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0LXO00KYCRIF2Y@mailout1.w1.samsung.com> for qemu-devel@nongnu.org; Thu, 12 Jan 2012 12:47:03 +0000 (GMT) Received: from [106.109.8.162] by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LXO008BYRIERU@spt1.w1.samsung.com> for qemu-devel@nongnu.org; Thu, 12 Jan 2012 12:47:03 +0000 (GMT) Date: Thu, 12 Jan 2012 16:47:02 +0400 From: Mitsyanko Igor In-reply-to: <1326299490-10780-6-git-send-email-mark.langsdorf@calxeda.com> Message-id: <4F0ED646.1040206@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT References: <1326213943-878-1-git-send-email-mark.langsdorf@calxeda.com> <1326299490-10780-1-git-send-email-mark.langsdorf@calxeda.com> <1326299490-10780-6-git-send-email-mark.langsdorf@calxeda.com> Subject: Re: [Qemu-devel] [PATCH v9 5/6] arm: SoC model for Calxeda Highbank Reply-To: i.mitsyanko@samsung.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Langsdorf Cc: peter.maydell@linaro.org, afaerber@suse.de, qemu-devel@nongnu.org, Rob Herring , edgar.iglesias@gmail.com On 01/11/2012 08:31 PM, Mark Langsdorf wrote: > Removed the automatic detection and resetting of ram_size. Image MUST > be loaded with -m 4089 or it will crash I don't know what is maintainer's politics on this, but as a user of your board I don't really like that I will have to remember this strange number when I launch Highbank emulation. Have you considered adding an automatic upper limitation to user-defined ram_size? > + sysram = g_new(MemoryRegion, 1); > + memory_region_init_ram(sysram, "highbank.sysram", 0x8000); > + memory_region_add_subregion(sysmem, 0xfff88000, sysram); > + if (bios_name != NULL) { > + sysboot_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); > + if (sysboot_filename != NULL) { > + uint32_t filesize = get_image_size(sysboot_filename); > + if (load_image_targphys("sysram.bin", 0xfff88000, filesize)< 0) { > + hw_error("Unable to load %s\n", bios_name); > + } Probably should be if (load_image_targphys(sysboot_filename, 0xfff88000, 0x8000)< 0) { and then you don't need "uint32_t filesize" at all. > + dev = qdev_create(NULL, "l2x0"); > + qdev_init_nofail(dev); > + busdev = sysbus_from_qdev(dev); > + sysbus_mmio_map(busdev, 0, 0xfff12000); > + dev = qdev_create(NULL, "highbank-regs"); > + qdev_init_nofail(dev); > + busdev = sysbus_from_qdev(dev); > + sysbus_mmio_map(busdev, 0, 0xfff3c000); > + You can use sysbus_create_simple() here (of course, if you didn't avoid it intentionally for some reason). -- Mitsyanko Igor ASWG, Moscow R&D center, Samsung Electronics email: i.mitsyanko@samsung.com