qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ppc/pnv: Set P10 core xscom region size to match hardware


From: Joel Stanley
Subject: Re: [PATCH] ppc/pnv: Set P10 core xscom region size to match hardware
Date: Wed, 5 Jul 2023 02:05:31 +0000

On Wed, 5 Jul 2023 at 01:27, Nicholas Piggin <npiggin@gmail.com> wrote:
>
> The P10 core xscom memory regions overlap because the size is wrong.
> The P10 core+L2 xscom region size is allocated as 0x1000 (with some
> unused ranges). "EC" is used as a closer match, as "EX" includes L3
> which has a disjoint xscom range that would require a different
> region if it were implemented.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

Nice, that looks better:

0000000100000000-00000001000fffff (prio 0, i/o): xscom-quad.0: 0x100000
0000000100108000-000000010010ffff (prio 0, i/o): xscom-core.3: 0x8000
0000000100110000-0000000100117fff (prio 0, i/o): xscom-core.2: 0x8000
0000000100120000-0000000100127fff (prio 0, i/o): xscom-core.1: 0x8000
0000000100140000-0000000100147fff (prio 0, i/o): xscom-core.0: 0x8000
0000000108000000-00000001080fffff (prio 0, i/o): xscom-quad.4: 0x100000
0000000108108000-000000010810ffff (prio 0, i/o): xscom-core.7: 0x8000
0000000108110000-0000000108117fff (prio 0, i/o): xscom-core.6: 0x8000
0000000108120000-0000000108127fff (prio 0, i/o): xscom-core.5: 0x8000
0000000108140000-0000000108147fff (prio 0, i/o): xscom-core.4: 0x8000

Reviewed-by: Joel Stanley <joel@jms.id.au>


> ---
>  hw/ppc/pnv_core.c          | 3 +--
>  include/hw/ppc/pnv_xscom.h | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
> index b7223bb445..ffbc29cbf4 100644
> --- a/hw/ppc/pnv_core.c
> +++ b/hw/ppc/pnv_core.c
> @@ -299,9 +299,8 @@ static void pnv_core_realize(DeviceState *dev, Error 
> **errp)
>      }
>
>      snprintf(name, sizeof(name), "xscom-core.%d", cc->core_id);
> -    /* TODO: check PNV_XSCOM_EX_SIZE for p10 */
>      pnv_xscom_region_init(&pc->xscom_regs, OBJECT(dev), pcc->xscom_ops,
> -                          pc, name, PNV_XSCOM_EX_SIZE);
> +                          pc, name, PNV10_XSCOM_EC_SIZE);
>
>      qemu_register_reset(pnv_core_reset, pc);
>      return;
> diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
> index f7da9a1dc6..a4c9d95dc5 100644
> --- a/include/hw/ppc/pnv_xscom.h
> +++ b/include/hw/ppc/pnv_xscom.h
> @@ -133,7 +133,7 @@ struct PnvXScomInterfaceClass {
>
>  #define PNV10_XSCOM_EC_BASE(core) \
>      ((uint64_t) PNV10_XSCOM_EQ_BASE(core) | PNV10_XSCOM_EC(core & 0x3))
> -#define PNV10_XSCOM_EC_SIZE        0x100000
> +#define PNV10_XSCOM_EC_SIZE        0x1000
>
>  #define PNV10_XSCOM_PSIHB_BASE     0x3011D00
>  #define PNV10_XSCOM_PSIHB_SIZE     0x100
> --
> 2.40.1
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]