On 08/04/2017 08:45, Anthony Xu wrote: > - if (!isapc_ram_fw) { > - memory_region_set_readonly(bios, true); > + if (PC_MACHINE(current_machine)->pam) { > + /* if PAM is disabled, set it as readwrite */ > + if (!isapc_ram_fw) { > + memory_region_set_readonly(bios, true); > + } > }
I think this is wrong, the high copy should remain read-only or pflash stops working when you remove PAM. The comment only explains the "what" but not the "why" and the "why" is not in the commit message. See also here: > + if (PC_MACHINE(current_machine)->pam) { > + memory_region_add_subregion_overlap(rom_memory, > + 0x100000 - isa_bios_size, > + isa_bios, > + 1); > + if (!isapc_ram_fw) { > + memory_region_set_readonly(isa_bios, true); > + } > + } else { > + /* if PAM is disabed, add isa-bios to system memory region */ > + memory_region_add_subregion_overlap(system_memory, > 0x100000 - isa_bios_size, > isa_bios, > 1); Thanks, Paolo