[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes |
Date: |
Wed, 20 Nov 2019 08:18:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
On 19/11/2019 18:50, Balamuruhan S wrote:
> homer/occ sizes are calculated in skiboot with `(mask | 0xfffff) + 1`,
> and from xscom access should return correct mask values instead of actual
> sizes.
>
> Signed-off-by: Cédric Le Goater <address@hidden>
> Signed-off-by: Balamuruhan S <address@hidden>
> ---
> hw/ppc/pnv_xscom.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
> index f01d788a65..cdd5fa356e 100644
> --- a/hw/ppc/pnv_xscom.c
> +++ b/hw/ppc/pnv_xscom.c
> @@ -46,6 +46,10 @@
> #define P9_PBA_BARMASK0 0x5012b04
> #define P9_PBA_BARMASK2 0x5012b06
>
> +/* Mask to calculate Homer/Occ size */
> +#define HOMER_SIZE_MASK 0x0000000000300000ull
> +#define OCC_SIZE_MASK 0x0000000000700000ull
> +
Can't we deduce these values from the size ?
> static void xscom_complete(CPUState *cs, uint64_t hmer_bits)
> {
> /*
> @@ -90,9 +94,8 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t
> pcba)
> return PNV_HOMER_BASE(chip);
>
> case P9_PBA_BARMASK0: /* P9 homer region size */
> - return PNV9_HOMER_SIZE;
> case P8_PBA_BARMASK0: /* P8 homer region size */
> - return PNV_HOMER_SIZE;
> + return HOMER_SIZE_MASK;
I would prefer to move all the HOMER accesses in a XSCOM region
under the PnvHomer model than expanding the default handlers.
You will need a different set of handlers for P8 and P9 and a
different mapping address also.
Could you do that please ?
> case P9_PBA_BAR2: /* P9 occ common area */
> return PNV9_OCC_COMMON_AREA(chip);
> @@ -100,9 +103,8 @@ static uint64_t xscom_read_default(PnvChip *chip,
> uint32_t pcba)
> return PNV_OCC_COMMON_AREA(chip);
>
> case P9_PBA_BARMASK2: /* P9 occ common area size */
> - return PNV9_OCC_COMMON_AREA_SIZE;
> case P8_PBA_BARMASK2: /* P8 occ common area size */
Shouldn't that be PBA_*3 under P8 ?
C.
> - return PNV_OCC_COMMON_AREA_SIZE;
> + return OCC_SIZE_MASK;
>
> case 0x1010c00: /* PIBAM FIR */
> case 0x1010c03: /* PIBAM FIR MASK */
>
- Re: [PATCH 1/5] hw/ppc/pnv: incorrect homer and occ common area size, (continued)
- [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes, Balamuruhan S, 2019/11/19
- Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes, David Gibson, 2019/11/19
- Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes, David Gibson, 2019/11/19
- Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes, David Gibson, 2019/11/19
- Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes, Balamuruhan S, 2019/11/19
- Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes, Balamuruhan S, 2019/11/19
- Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes, Greg Kurz, 2019/11/20
- Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes, Balamuruhan S, 2019/11/21
Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes,
Cédric Le Goater <=
[PATCH 3/5] hw/ppc/pnv_xscom: Power8 occ common area is in PBA BAR 3, Balamuruhan S, 2019/11/19
[PATCH 4/5] hw/ppc/pnv_xscom: occ common area to be mapped only once, Balamuruhan S, 2019/11/19
[PATCH 5/5] hw/ppc/pnv_xscom: add PBA BARs for Power8 slw image, Balamuruhan S, 2019/11/19