[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] PC BIOS Flash emulation
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] PC BIOS Flash emulation |
Date: |
Wed, 07 Mar 2012 18:32:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 |
On 03/07/2012 03:59 PM, Dmitry Zamaruev wrote:
> Hi,
>
> I'm trying to emulate BIOS Flash chip (something Intel FWH compatible)
> on PC target (i386-softmmu) and to verify possibility of such
> emulation I first tried to use pflash_cfi02 example from PPC platform.
So is Jordan (copied).
> Trying to use if following way:
> in hw/pc.c in pc_memory_init() after bios.bin is loaded and mapped to ISA
> space:
>
> cpu_register_physical_memory(0x100000 - isa_bios_size,
> isa_bios_size,
> (bios_offset + bios_size -
> isa_bios_size) | IO_MEM_ROM);
>
> option_rom_offset = qemu_ram_alloc(NULL, "pc.rom", PC_ROM_SIZE);
> cpu_register_physical_memory(PC_ROM_MIN_VGA, PC_ROM_SIZE,
> option_rom_offset);
>
> /* map all the bios at the top of memory */
> // cpu_register_physical_memory((uint32_t)(-bios_size),
> // bios_size, bios_offset | IO_MEM_ROM);
>
> Instead of mapping all the bios at the top of memory I'm using
> following piece of code to init pflash device and load bios into it:
>
> dinfo = drive_get(IF_PFLASH, 0, 0);
> if (dinfo) {
> bios_size = bdrv_getlength(dinfo->bdrv);
> bios_offset = qemu_ram_alloc(NULL, "fwh.bios", bios_size);
You're using a really old version of qemu. Please use qemu.git instead,
the APIs have changed.
--
error compiling committee.c: too many arguments to function