[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 22/27] ppc/pnv: extend XSCOM core support for POWER9
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH 22/27] ppc/pnv: extend XSCOM core support for POWER9 |
Date: |
Wed, 6 Mar 2019 09:50:27 +0100 |
Add a couple of XSCOM addresses controlling the power management
states of the core.
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/ppc/pnv_core.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
index 38179cdc53dc..c3d6350dc90a 100644
--- a/hw/ppc/pnv_core.c
+++ b/hw/ppc/pnv_core.c
@@ -60,6 +60,12 @@ static void pnv_cpu_reset(void *opaque)
#define PNV_XSCOM_EX_DTS_RESULT0 0x50000
#define PNV_XSCOM_EX_DTS_RESULT1 0x50001
+/*
+ * POWER9 core controls
+ */
+#define PNV9_XSCOM_EC_PPM_SPECIAL_WKUP_HYP 0xf010d
+#define PNV9_XSCOM_EC_PPM_SPECIAL_WKUP_OTR 0xf010a
+
static uint64_t pnv_core_xscom_read(void *opaque, hwaddr addr,
unsigned int width)
{
@@ -74,6 +80,10 @@ static uint64_t pnv_core_xscom_read(void *opaque, hwaddr
addr,
case PNV_XSCOM_EX_DTS_RESULT1:
val = 0x24f000000000000ull;
break;
+ case PNV9_XSCOM_EC_PPM_SPECIAL_WKUP_HYP:
+ case PNV9_XSCOM_EC_PPM_SPECIAL_WKUP_OTR:
+ val = 0x0;
+ break;
default:
qemu_log_mask(LOG_UNIMP, "Warning: reading reg=0x%" HWADDR_PRIx "\n",
addr);
@@ -85,8 +95,16 @@ static uint64_t pnv_core_xscom_read(void *opaque, hwaddr
addr,
static void pnv_core_xscom_write(void *opaque, hwaddr addr, uint64_t val,
unsigned int width)
{
- qemu_log_mask(LOG_UNIMP, "Warning: writing to reg=0x%" HWADDR_PRIx "\n",
- addr);
+ uint32_t offset = addr >> 3;
+
+ switch (offset) {
+ case PNV9_XSCOM_EC_PPM_SPECIAL_WKUP_HYP:
+ case PNV9_XSCOM_EC_PPM_SPECIAL_WKUP_OTR:
+ break;
+ default:
+ qemu_log_mask(LOG_UNIMP, "Warning: writing to reg=0x%" HWADDR_PRIx
"\n",
+ addr);
+ }
}
static const MemoryRegionOps pnv_core_xscom_ops = {
--
2.20.1
- Re: [Qemu-ppc] [PATCH 21/27] ppc/pnv: add a OCC model for POWER9, (continued)
- [Qemu-ppc] [PATCH 06/27] ppc/pnv: add a XIVE interrupt controller model for POWER9, Cédric Le Goater, 2019/03/06
- [Qemu-ppc] [PATCH 01/27] ppc/xive: hardwire the Physical CAM line of the thread context, Cédric Le Goater, 2019/03/06
- [Qemu-ppc] [PATCH 25/27] ppc/pnv: add more dummy XSCOM addresses, Cédric Le Goater, 2019/03/06
- [Qemu-ppc] [PATCH 23/27] ppc/pnv: POWER9 XSCOM quad support, Cédric Le Goater, 2019/03/06
- [Qemu-ppc] [PATCH 24/27] ppc/pnv: activate XSCOM tests for POWER9, Cédric Le Goater, 2019/03/06
- [Qemu-ppc] [PATCH 27/27] target/ppc: add HV support for POWER9, Cédric Le Goater, 2019/03/06
- [Qemu-ppc] [PATCH 22/27] ppc/pnv: extend XSCOM core support for POWER9,
Cédric Le Goater <=
- [Qemu-ppc] [PATCH 16/27] ppc/pnv: lpc: fix OPB address ranges, Cédric Le Goater, 2019/03/06
- [Qemu-ppc] [PATCH 14/27] ppc/pnv: add a PSI bridge model class, Cédric Le Goater, 2019/03/06
- [Qemu-ppc] [PATCH 13/27] ppc/pnv: psi: add a reset handler, Cédric Le Goater, 2019/03/06
- [Qemu-ppc] [PATCH 20/27] ppc/pnv: add a OCC model class, Cédric Le Goater, 2019/03/06