[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] pam: setup pc.bios
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] pam: setup pc.bios |
Date: |
Sat, 8 Apr 2017 17:49:21 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
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