From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWCSG-0000NL-Gd for qemu-devel@nongnu.org; Tue, 15 Oct 2013 17:47:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWCSA-0003Wg-T4 for qemu-devel@nongnu.org; Tue, 15 Oct 2013 17:47:04 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:50981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWCSA-0003Vm-Cw for qemu-devel@nongnu.org; Tue, 15 Oct 2013 17:46:58 -0400 Received: by mail-lb0-f173.google.com with SMTP id o14so31574lbi.18 for ; Tue, 15 Oct 2013 14:46:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1381868394-12656-2-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1381868394-12656-1-git-send-email-mark.cave-ayland@ilande.co.uk> <1381868394-12656-2-git-send-email-mark.cave-ayland@ilande.co.uk> From: Peter Maydell Date: Tue, 15 Oct 2013 22:46:36 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 1/2] sun4m: Add Sun CG3 framebuffer and corresponding OpenBIOS FCode ROM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland Cc: Blue Swirl , Bob Breuer , QEMU Developers , Artyom Tarasenko On 15 October 2013 21:19, Mark Cave-Ayland wrote: > + /* FCode ROM */ > + memory_region_init_ram(&s->rom, NULL, "cg3.prom", FCODE_MAX_ROM_SIZE); > + vmstate_register_ram_global(&s->rom); > + memory_region_set_readonly(&s->rom, true); > + sysbus_init_mmio(dev, &s->rom); > + > + fcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, CG3_ROM_FILE); > + if (fcode_filename) { > + ret = load_image_targphys(fcode_filename, s->prom_addr, > + FCODE_MAX_ROM_SIZE); > + } Ideally we would have a 'load image into RAM memory region' function, and then we wouldn't need to pass the device the address of its own memory region. Oh well... -- PMM