[Skiboot] [PATCH v2 31/59] psi/p10: Activate 64K ESB pages
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Wed Aug 4 17:21:09 AEST 2021
From: Cédric Le Goater <clg at kaod.org>
Signed-off-by: Cédric Le Goater <clg at kaod.org>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
hw/psi.c | 7 ++++---
include/psi.h | 5 +++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/psi.c b/hw/psi.c
index 26677a3b2..991ea3b1f 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);
diff --git a/include/psi.h b/include/psi.h
index a7104ef0b..dbf94b4b3 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
/*
--
2.31.1
More information about the Skiboot
mailing list