From 004f0a7a1a6cf99a95d56007e8d7428953751f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Wed, 4 Aug 2021 12:51:09 +0530 Subject: psi/p10: Activate 64K ESB pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédric Le Goater Signed-off-by: Vasant Hegde --- hw/psi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'hw') diff --git a/hw/psi.c b/hw/psi.c index 26677a3..991ea3b 100644 --- a/hw/psi.c +++ b/hw/psi.c @@ -753,8 +753,7 @@ static void psi_init_p10_interrupts(struct psi *psi) { struct proc_chip *chip; u64 val; - /* TODO (clg) : fix ESB page size to 64k when ready */ - uint32_t esb_shift = 12; + uint32_t esb_shift = 16; /* Grab chip */ chip = get_chip(psi->chip_id); @@ -764,10 +763,12 @@ static void psi_init_p10_interrupts(struct psi *psi) /* Configure the CI BAR */ phys_map_get(chip->id, PSIHB_ESB, 0, &val, NULL); val |= PSIHB_ESB_CI_VALID; + if (esb_shift == 16) + val |= PSIHB10_ESB_CI_64K; out_be64(psi->regs + PSIHB_ESB_CI_BASE, val); val = in_be64(psi->regs + PSIHB_ESB_CI_BASE); - psi->esb_mmio = (void *)(val & ~PSIHB_ESB_CI_VALID); + psi->esb_mmio = (void *)(val & ~(PSIHB_ESB_CI_VALID|PSIHB10_ESB_CI_64K)); prlog(PR_DEBUG, "PSI[0x%03x]: ESB MMIO at @%p\n", psi->chip_id, psi->esb_mmio); -- cgit v1.1