[Qemu-devel] [PATCH] 40p: remove pci_allow_0_address = true from 40p machine class

Mark Cave-Ayland posted 1 patch 7 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180525211523.14897-1-mark.cave-ayland@ilande.co.uk
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x passed
hw/ppc/prep.c | 1 -
1 file changed, 1 deletion(-)
[Qemu-devel] [PATCH] 40p: remove pci_allow_0_address = true from 40p machine class
Posted by Mark Cave-Ayland 7 years, 5 months ago
The Linux sandalfoot zImage has an initialisation process which resets the
VGA controller by setting all the BAR addresses to zero to access the VGA
ioports at their legacy addresses.

Unfortunately setting the framebuffer BAR to address 0 makes the framebuffer
memory overlap the internal VGA memory causing accesses to fail, and so
prevents the kernel from switching successfully to text mode.

Since OpenHackWare configures the framebuffer BAR address outside of the legacy
VGA internal memory space, remove pci_allow_0_address from the 40p machine class
which causes the BAR reprogramming to zero to fail and so the VGA internal
memory can be accessed correctly again.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/ppc/prep.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index be4db6a687..5ed0bcd862 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -884,7 +884,6 @@ static void ibm_40p_machine_init(MachineClass *mc)
     mc->desc = "IBM RS/6000 7020 (40p)",
     mc->init = ibm_40p_init;
     mc->max_cpus = 1;
-    mc->pci_allow_0_address = true;
     mc->default_ram_size = 128 * M_BYTE;
     mc->block_default_type = IF_SCSI;
     mc->default_boot_order = "c";
-- 
2.11.0


Re: [Qemu-devel] [PATCH] 40p: remove pci_allow_0_address = true from 40p machine class
Posted by David Gibson 7 years, 5 months ago
On Fri, May 25, 2018 at 10:15:23PM +0100, Mark Cave-Ayland wrote:
> The Linux sandalfoot zImage has an initialisation process which resets the
> VGA controller by setting all the BAR addresses to zero to access the VGA
> ioports at their legacy addresses.
> 
> Unfortunately setting the framebuffer BAR to address 0 makes the framebuffer
> memory overlap the internal VGA memory causing accesses to fail, and so
> prevents the kernel from switching successfully to text mode.
> 
> Since OpenHackWare configures the framebuffer BAR address outside of the legacy
> VGA internal memory space, remove pci_allow_0_address from the 40p machine class
> which causes the BAR reprogramming to zero to fail and so the VGA internal
> memory can be accessed correctly again.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Applied, thanks.

> ---
>  hw/ppc/prep.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index be4db6a687..5ed0bcd862 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -884,7 +884,6 @@ static void ibm_40p_machine_init(MachineClass *mc)
>      mc->desc = "IBM RS/6000 7020 (40p)",
>      mc->init = ibm_40p_init;
>      mc->max_cpus = 1;
> -    mc->pci_allow_0_address = true;
>      mc->default_ram_size = 128 * M_BYTE;
>      mc->block_default_type = IF_SCSI;
>      mc->default_boot_order = "c";

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson