[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/72] ppc/pnv: raise no-response errors if an LPC transaction fai
From: |
Nicholas Piggin |
Subject: |
[PULL 18/72] ppc/pnv: raise no-response errors if an LPC transaction fails |
Date: |
Tue, 11 Mar 2025 22:57:12 +1000 |
If nothing responds to an LPC access, the LPC host controller should
set an IRQSTAT error. Model this behaviour.
skiboot uses this error to "probe" LPC accesses, among other things to
determine if a SuperIO chip is present. After this change it recognizes
there is no SuperIO present and does not keep trying to access it.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
hw/ppc/pnv_lpc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c
index d0fccc165d..0e02ce6e94 100644
--- a/hw/ppc/pnv_lpc.c
+++ b/hw/ppc/pnv_lpc.c
@@ -353,6 +353,8 @@ static const MemoryRegionOps pnv_lpc_xscom_ops = {
.endianness = DEVICE_BIG_ENDIAN,
};
+static void pnv_lpc_opb_noresponse(PnvLpcController *lpc);
+
static uint64_t pnv_lpc_mmio_read(void *opaque, hwaddr addr, unsigned size)
{
PnvLpcController *lpc = PNV_LPC(opaque);
@@ -376,6 +378,7 @@ static uint64_t pnv_lpc_mmio_read(void *opaque, hwaddr
addr, unsigned size)
}
if (result != MEMTX_OK) {
+ pnv_lpc_opb_noresponse(lpc);
qemu_log_mask(LOG_GUEST_ERROR, "OPB read failed at @0x%"
HWADDR_PRIx "\n", addr);
}
@@ -406,6 +409,7 @@ static void pnv_lpc_mmio_write(void *opaque, hwaddr addr,
}
if (result != MEMTX_OK) {
+ pnv_lpc_opb_noresponse(lpc);
qemu_log_mask(LOG_GUEST_ERROR, "OPB write failed at @0x%"
HWADDR_PRIx "\n", addr);
}
@@ -511,6 +515,12 @@ static void pnv_lpc_eval_irqs(PnvLpcController *lpc)
qemu_set_irq(lpc->psi_irq_lpchc, lpc->opb_irq_stat != 0);
}
+static void pnv_lpc_opb_noresponse(PnvLpcController *lpc)
+{
+ lpc->lpc_hc_irqstat |= LPC_HC_IRQ_SYNC_NORESP_ERR;
+ pnv_lpc_eval_irqs(lpc);
+}
+
static uint64_t lpc_hc_read(void *opaque, hwaddr addr, unsigned size)
{
PnvLpcController *lpc = opaque;
--
2.47.1
- [PULL 10/72] ppc/pnv/homer: class-based base and size, (continued)
- [PULL 10/72] ppc/pnv/homer: class-based base and size, Nicholas Piggin, 2025/03/11
- [PULL 12/72] ppc/pnv: Make HOMER memory a RAM region, Nicholas Piggin, 2025/03/11
- [PULL 15/72] ppc/pnv/occ: Implement a basic dynamic OCC model, Nicholas Piggin, 2025/03/11
- [PULL 17/72] ppc/pnv: Support LPC host controller irqs other than serirqs, Nicholas Piggin, 2025/03/11
- [PULL 20/72] ppc/pnv: Move PNOR to offset 0 in the ISA FW space, Nicholas Piggin, 2025/03/11
- [PULL 16/72] target/ppc: Add Power9/10 power management SPRs, Nicholas Piggin, 2025/03/11
- [PULL 21/72] ppc/pnv: Add a PNOR address and size sanity checks, Nicholas Piggin, 2025/03/11
- [PULL 13/72] ppc/pnv/occ: Update pstate frequency tables, Nicholas Piggin, 2025/03/11
- [PULL 22/72] ppc/pnv: Add a default formatted PNOR image, Nicholas Piggin, 2025/03/11
- [PULL 14/72] ppc/pnv/occ: Add POWER10 OCC-OPAL data format, Nicholas Piggin, 2025/03/11
- [PULL 18/72] ppc/pnv: raise no-response errors if an LPC transaction fails,
Nicholas Piggin <=
- [PULL 23/72] ppc/xive2: Update NVP save/restore for group attributes, Nicholas Piggin, 2025/03/11
- [PULL 19/72] ppc/pnv: Implement LPC FW address space IDSEL, Nicholas Piggin, 2025/03/11
- [PULL 24/72] ppc/xive: Rename ipb_to_pipr() to xive_ipb_to_pipr(), Nicholas Piggin, 2025/03/11
- [PULL 25/72] ppc/xive2: Add grouping level to notification, Nicholas Piggin, 2025/03/11
- [PULL 27/72] ppc/xive2: Add undelivered group interrupt to backlog, Nicholas Piggin, 2025/03/11
- [PULL 26/72] ppc/xive2: Support group-matching when looking for target, Nicholas Piggin, 2025/03/11
- [PULL 29/72] ppc/xive2: Process group backlog when updating the CPPR, Nicholas Piggin, 2025/03/11
- [PULL 30/72] qtest/xive: Add group-interrupt test, Nicholas Piggin, 2025/03/11
- [PULL 31/72] ppc/xive2: Add support for MMIO operations on the NVPG/NVC BAR, Nicholas Piggin, 2025/03/11
- [PULL 32/72] ppc/xive2: Support crowd-matching when looking for target, Nicholas Piggin, 2025/03/11