On 03/24/11 03:07, jordan.l.jus...@intel.com wrote: > +static void pc_isa_bios_init(ram_addr_t ram_offset, int ram_size) > +{ > + int isa_bios_size; > + > + /* map the last 128KB of the BIOS in ISA space */ > + isa_bios_size = ram_size; > + if (isa_bios_size > (128 * 1024)) > + isa_bios_size = 128 * 1024;
You're missing braces here to comply with coding style. I realize some of the cosmetics comes from old code you are moving, but please fix it up in the move. > + cpu_register_physical_memory(0x100000 - isa_bios_size, > + isa_bios_size, > + (ram_offset + ram_size - isa_bios_size) | > IO_MEM_ROM); A line is 80 characters, please wrap it or calculate the number before the function call. > + bdrv = pflash_drv->bdrv; > + size = bdrv_getlength(pflash_drv->bdrv); > + sector_bits = 12; > + sector_size = 1 << sector_bits; > + > + if ((size % sector_size) != 0) { > + fprintf(stderr, > + "qemu: -pflash size must be a multiple of 0x%x\n", > + sector_size); > + exit(1); > + } > + > + phys_addr = 0x100000000ULL - rom_size - size; > + addr = qemu_ram_alloc(NULL, "system.flash", size); > + DPRINTF("flash addr: 0x%lx\n", (int64_t)phys_addr); > +#if 1 > + pflash_cfi01_register(phys_addr, addr, bdrv, > + sector_size, size >> sector_bits, > + 4, 0x0000, 0x0000, 0x0000, 0x0000, 0); > +#else > + pflash_cfi02_register(phys_addr, addr, bdrv, > + sector_size, size >> sector_bits, > + 1, 4, 0x0000, 0x0000, 0x0000, 0x0000, 0x55, 0xaa, > 0); > +#endif Please get rid of the #ifdef here. Cheers, Jes