qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ppc/pnv: fix LPC HC firmware address space
@ 2018-06-11 17:12 Cédric Le Goater
  2018-06-11 23:36 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Cédric Le Goater @ 2018-06-11 17:12 UTC (permalink / raw)
  To: qemu-ppc; +Cc: qemu-devel, David Gibson, Cédric Le Goater

A specific MemoryRegion is required for the LPC HC Firmware address
space.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 include/hw/ppc/pnv_lpc.h | 1 +
 hw/ppc/pnv_lpc.c         | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/hw/ppc/pnv_lpc.h b/include/hw/ppc/pnv_lpc.h
index 023b4f0fec86..53fdd5bb6450 100644
--- a/include/hw/ppc/pnv_lpc.h
+++ b/include/hw/ppc/pnv_lpc.h
@@ -38,6 +38,7 @@ typedef struct PnvLpcController {
     /* ISA IO and Memory space */
     MemoryRegion isa_io;
     MemoryRegion isa_mem;
+    MemoryRegion isa_fw;
 
     /* Windows from OPB to ISA (aliases) */
     MemoryRegion opb_isa_io;
diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c
index c42b4a8f6c0f..a0dba657ee60 100644
--- a/hw/ppc/pnv_lpc.c
+++ b/hw/ppc/pnv_lpc.c
@@ -79,6 +79,7 @@ enum {
 
 #define ISA_IO_SIZE             0x00010000
 #define ISA_MEM_SIZE            0x10000000
+#define ISA_FW_SIZE             0x10000000
 #define LPC_IO_OPB_ADDR         0xd0010000
 #define LPC_IO_OPB_SIZE         0x00010000
 #define LPC_MEM_OPB_ADDR        0xe0010000
@@ -437,6 +438,7 @@ static void pnv_lpc_realize(DeviceState *dev, Error **errp)
      */
     memory_region_init(&lpc->isa_io, OBJECT(dev), "isa-io", ISA_IO_SIZE);
     memory_region_init(&lpc->isa_mem, OBJECT(dev), "isa-mem", ISA_MEM_SIZE);
+    memory_region_init(&lpc->isa_fw, OBJECT(dev),  "isa-fw", ISA_FW_SIZE);
 
     /* Create windows from the OPB space to the ISA space */
     memory_region_init_alias(&lpc->opb_isa_io, OBJECT(dev), "lpc-isa-io",
@@ -448,7 +450,7 @@ static void pnv_lpc_realize(DeviceState *dev, Error **errp)
     memory_region_add_subregion(&lpc->opb_mr, LPC_MEM_OPB_ADDR,
                                 &lpc->opb_isa_mem);
     memory_region_init_alias(&lpc->opb_isa_fw, OBJECT(dev), "lpc-isa-fw",
-                             &lpc->isa_mem, 0, LPC_FW_OPB_SIZE);
+                             &lpc->isa_fw, 0, LPC_FW_OPB_SIZE);
     memory_region_add_subregion(&lpc->opb_mr, LPC_FW_OPB_ADDR,
                                 &lpc->opb_isa_fw);
 
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] ppc/pnv: fix LPC HC firmware address space
  2018-06-11 17:12 [Qemu-devel] [PATCH] ppc/pnv: fix LPC HC firmware address space Cédric Le Goater
@ 2018-06-11 23:36 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2018-06-11 23:36 UTC (permalink / raw)
  To: Cédric Le Goater; +Cc: qemu-ppc, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]

On Mon, Jun 11, 2018 at 07:12:10PM +0200, Cédric Le Goater wrote:
> A specific MemoryRegion is required for the LPC HC Firmware address
> space.
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>

Applied to ppc-for-3.0, thanks.

> ---
>  include/hw/ppc/pnv_lpc.h | 1 +
>  hw/ppc/pnv_lpc.c         | 4 +++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/include/hw/ppc/pnv_lpc.h b/include/hw/ppc/pnv_lpc.h
> index 023b4f0fec86..53fdd5bb6450 100644
> --- a/include/hw/ppc/pnv_lpc.h
> +++ b/include/hw/ppc/pnv_lpc.h
> @@ -38,6 +38,7 @@ typedef struct PnvLpcController {
>      /* ISA IO and Memory space */
>      MemoryRegion isa_io;
>      MemoryRegion isa_mem;
> +    MemoryRegion isa_fw;
>  
>      /* Windows from OPB to ISA (aliases) */
>      MemoryRegion opb_isa_io;
> diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c
> index c42b4a8f6c0f..a0dba657ee60 100644
> --- a/hw/ppc/pnv_lpc.c
> +++ b/hw/ppc/pnv_lpc.c
> @@ -79,6 +79,7 @@ enum {
>  
>  #define ISA_IO_SIZE             0x00010000
>  #define ISA_MEM_SIZE            0x10000000
> +#define ISA_FW_SIZE             0x10000000
>  #define LPC_IO_OPB_ADDR         0xd0010000
>  #define LPC_IO_OPB_SIZE         0x00010000
>  #define LPC_MEM_OPB_ADDR        0xe0010000
> @@ -437,6 +438,7 @@ static void pnv_lpc_realize(DeviceState *dev, Error **errp)
>       */
>      memory_region_init(&lpc->isa_io, OBJECT(dev), "isa-io", ISA_IO_SIZE);
>      memory_region_init(&lpc->isa_mem, OBJECT(dev), "isa-mem", ISA_MEM_SIZE);
> +    memory_region_init(&lpc->isa_fw, OBJECT(dev),  "isa-fw", ISA_FW_SIZE);
>  
>      /* Create windows from the OPB space to the ISA space */
>      memory_region_init_alias(&lpc->opb_isa_io, OBJECT(dev), "lpc-isa-io",
> @@ -448,7 +450,7 @@ static void pnv_lpc_realize(DeviceState *dev, Error **errp)
>      memory_region_add_subregion(&lpc->opb_mr, LPC_MEM_OPB_ADDR,
>                                  &lpc->opb_isa_mem);
>      memory_region_init_alias(&lpc->opb_isa_fw, OBJECT(dev), "lpc-isa-fw",
> -                             &lpc->isa_mem, 0, LPC_FW_OPB_SIZE);
> +                             &lpc->isa_fw, 0, LPC_FW_OPB_SIZE);
>      memory_region_add_subregion(&lpc->opb_mr, LPC_FW_OPB_ADDR,
>                                  &lpc->opb_isa_fw);
>  

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-12  0:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-11 17:12 [Qemu-devel] [PATCH] ppc/pnv: fix LPC HC firmware address space Cédric Le Goater
2018-06-11 23:36 ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).