diff options
author | Cédric Le Goater <clg@kaod.org> | 2021-08-04 12:51:09 +0530 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2021-08-06 12:25:22 +0530 |
commit | 004f0a7a1a6cf99a95d56007e8d7428953751f31 (patch) | |
tree | 4c2e3dce0aed6cfb58b33dcffaad849064740d0c | |
parent | cc26e890ca556716349089f34d80706010901f9a (diff) | |
download | skiboot-004f0a7a1a6cf99a95d56007e8d7428953751f31.zip skiboot-004f0a7a1a6cf99a95d56007e8d7428953751f31.tar.gz skiboot-004f0a7a1a6cf99a95d56007e8d7428953751f31.tar.bz2 |
psi/p10: Activate 64K ESB pages
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r-- | hw/psi.c | 7 | ||||
-rw-r--r-- | include/psi.h | 5 |
2 files changed, 7 insertions, 5 deletions
@@ -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); diff --git a/include/psi.h b/include/psi.h index a7104ef..dbf94b4 100644 --- a/include/psi.h +++ b/include/psi.h @@ -94,9 +94,10 @@ #define PSIHB_IRQ_METHOD PPC_BIT(0) #define PSIHB_IRQ_RESET PPC_BIT(1) #define PSIHB_ESB_CI_BASE 0x60 -#define PSIHB_ESB_CI_VALID 1 +#define PSIHB10_ESB_CI_64K PPC_BIT(1) +#define PSIHB_ESB_CI_VALID PPC_BIT(63) #define PSIHB_ESB_NOTIF_ADDR 0x68 -#define PSIHB_ESB_NOTIF_VALID 1 +#define PSIHB_ESB_NOTIF_VALID PPC_BIT(63) #define PSIHB_IVT_OFFSET 0x70 #define PSIHB_IVT_OFF_SHIFT 32 /* |