From patchwork Tue Nov 19 17:50:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Balamuruhan S X-Patchwork-Id: 1197577 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47HYP45HFjz9sPv for ; Wed, 20 Nov 2019 04:54:32 +1100 (AEDT) Received: from localhost ([::1]:48684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7hu-0000jF-CQ for incoming@patchwork.ozlabs.org; Tue, 19 Nov 2019 12:54:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53409) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7f0-0005o1-SF for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iX7ez-0005A7-LA for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:30 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40866) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iX7ez-00059i-Da for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:29 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAJHnTUI042096 for ; Tue, 19 Nov 2019 12:51:28 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wbxncmy8j-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Nov 2019 12:51:28 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Nov 2019 17:51:26 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 19 Nov 2019 17:51:23 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAJHpMWa57999384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 17:51:22 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5A8654C040; Tue, 19 Nov 2019 17:51:22 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 006024C04E; Tue, 19 Nov 2019 17:51:21 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.85.84.11]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 19 Nov 2019 17:51:20 +0000 (GMT) From: Balamuruhan S To: qemu-devel@nongnu.org Subject: [PATCH 1/5] hw/ppc/pnv: incorrect homer and occ common area size Date: Tue, 19 Nov 2019 23:20:52 +0530 X-Mailer: git-send-email 2.14.5 In-Reply-To: <20191119175056.32518-1-bala24@linux.ibm.com> References: <20191119175056.32518-1-bala24@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19111917-0028-0000-0000-000003BBDD24 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19111917-0029-0000-0000-0000247EFBA7 Message-Id: <20191119175056.32518-2-bala24@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-11-19_06:2019-11-15, 2019-11-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 suspectscore=1 phishscore=0 mlxlogscore=846 clxscore=1015 adultscore=0 malwarescore=0 spamscore=0 mlxscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911190152 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id xAJHnTUI042096 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Balamuruhan S , david@gibson.dropbear.id.au, qemu-ppc@nongnu.org, clg@kaod.org, groug@kaod.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Homer size is 4MB and OCC common area size is 8MB, but currently it is assigned with bar mask value. Also pass on the occ sram size 3 bits right shifted to initialize the size appropriately. Signed-off-by: Cédric Le Goater Signed-off-by: Balamuruhan S --- hw/ppc/pnv_occ.c | 2 +- include/hw/ppc/pnv.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/pnv_occ.c b/hw/ppc/pnv_occ.c index 785653bb67..05c51c9de0 100644 --- a/hw/ppc/pnv_occ.c +++ b/hw/ppc/pnv_occ.c @@ -276,7 +276,7 @@ static void pnv_occ_realize(DeviceState *dev, Error **errp) /* XScom region for OCC SRAM registers */ pnv_xscom_region_init(&occ->sram_regs, OBJECT(dev), poc->sram_ops, - occ, "occ-common-area", poc->sram_size); + occ, "occ-common-area", poc->sram_size >> 3); } static void pnv_occ_class_init(ObjectClass *klass, void *data) diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h index 0b4c722e6b..e9ed8b928a 100644 --- a/include/hw/ppc/pnv.h +++ b/include/hw/ppc/pnv.h @@ -203,12 +203,12 @@ void pnv_bmc_powerdown(IPMIBmc *bmc); #define PNV_XSCOM_BASE(chip) \ (0x0003fc0000000000ull + ((uint64_t)(chip)->chip_id) * PNV_XSCOM_SIZE) -#define PNV_OCC_COMMON_AREA_SIZE 0x0000000000700000ull +#define PNV_OCC_COMMON_AREA_SIZE 0x0000000000800000ull #define PNV_OCC_COMMON_AREA(chip) \ (0x7fff800000ull + ((uint64_t)PNV_CHIP_INDEX(chip) * \ PNV_OCC_COMMON_AREA_SIZE)) -#define PNV_HOMER_SIZE 0x0000000000300000ull +#define PNV_HOMER_SIZE 0x0000000000400000ull #define PNV_HOMER_BASE(chip) \ (0x7ffd800000ull + ((uint64_t)PNV_CHIP_INDEX(chip)) * PNV_HOMER_SIZE) @@ -271,12 +271,12 @@ void pnv_bmc_powerdown(IPMIBmc *bmc); #define PNV9_XSCOM_SIZE 0x0000000400000000ull #define PNV9_XSCOM_BASE(chip) PNV9_CHIP_BASE(chip, 0x00603fc00000000ull) -#define PNV9_OCC_COMMON_AREA_SIZE 0x0000000000700000ull +#define PNV9_OCC_COMMON_AREA_SIZE 0x0000000000800000ull #define PNV9_OCC_COMMON_AREA(chip) \ (0x203fff800000ull + ((uint64_t)PNV_CHIP_INDEX(chip) * \ PNV9_OCC_COMMON_AREA_SIZE)) -#define PNV9_HOMER_SIZE 0x0000000000300000ull +#define PNV9_HOMER_SIZE 0x0000000000400000ull #define PNV9_HOMER_BASE(chip) \ (0x203ffd800000ull + ((uint64_t)PNV_CHIP_INDEX(chip)) * PNV9_HOMER_SIZE) #endif /* PPC_PNV_H */ From patchwork Tue Nov 19 17:50:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Balamuruhan S X-Patchwork-Id: 1197564 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47HYMd0z5lz9sPK for ; Wed, 20 Nov 2019 04:53:17 +1100 (AEDT) Received: from localhost ([::1]:48662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7gg-0007MJ-Cx for incoming@patchwork.ozlabs.org; Tue, 19 Nov 2019 12:53:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53434) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7f2-0005og-2X for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iX7f0-0005Az-U5 for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:31 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:17640 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iX7f0-0005AZ-P5 for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:30 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAJHnCaQ116317 for ; Tue, 19 Nov 2019 12:51:30 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2wcf7u1mb7-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Nov 2019 12:51:30 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Nov 2019 17:51:28 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 19 Nov 2019 17:51:25 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAJHolQg30933434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 17:50:47 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A91F4C050; Tue, 19 Nov 2019 17:51:25 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A46DD4C040; Tue, 19 Nov 2019 17:51:23 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.85.84.11]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 19 Nov 2019 17:51:23 +0000 (GMT) From: Balamuruhan S To: qemu-devel@nongnu.org Subject: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes Date: Tue, 19 Nov 2019 23:20:53 +0530 X-Mailer: git-send-email 2.14.5 In-Reply-To: <20191119175056.32518-1-bala24@linux.ibm.com> References: <20191119175056.32518-1-bala24@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19111917-0020-0000-0000-0000038B2B07 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19111917-0021-0000-0000-000021E158B6 Message-Id: <20191119175056.32518-3-bala24@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-11-19_06:2019-11-15, 2019-11-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 mlxscore=0 suspectscore=1 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911190152 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-001b2d01.pphosted.com id xAJHnCaQ116317 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Balamuruhan S , david@gibson.dropbear.id.au, qemu-ppc@nongnu.org, clg@kaod.org, groug@kaod.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" homer/occ sizes are calculated in skiboot with `(mask | 0xfffff) + 1`, and from xscom access should return correct mask values instead of actual sizes. Signed-off-by: Cédric Le Goater Signed-off-by: Balamuruhan S --- hw/ppc/pnv_xscom.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c index f01d788a65..cdd5fa356e 100644 --- a/hw/ppc/pnv_xscom.c +++ b/hw/ppc/pnv_xscom.c @@ -46,6 +46,10 @@ #define P9_PBA_BARMASK0 0x5012b04 #define P9_PBA_BARMASK2 0x5012b06 +/* Mask to calculate Homer/Occ size */ +#define HOMER_SIZE_MASK 0x0000000000300000ull +#define OCC_SIZE_MASK 0x0000000000700000ull + static void xscom_complete(CPUState *cs, uint64_t hmer_bits) { /* @@ -90,9 +94,8 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t pcba) return PNV_HOMER_BASE(chip); case P9_PBA_BARMASK0: /* P9 homer region size */ - return PNV9_HOMER_SIZE; case P8_PBA_BARMASK0: /* P8 homer region size */ - return PNV_HOMER_SIZE; + return HOMER_SIZE_MASK; case P9_PBA_BAR2: /* P9 occ common area */ return PNV9_OCC_COMMON_AREA(chip); @@ -100,9 +103,8 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t pcba) return PNV_OCC_COMMON_AREA(chip); case P9_PBA_BARMASK2: /* P9 occ common area size */ - return PNV9_OCC_COMMON_AREA_SIZE; case P8_PBA_BARMASK2: /* P8 occ common area size */ - return PNV_OCC_COMMON_AREA_SIZE; + return OCC_SIZE_MASK; case 0x1010c00: /* PIBAM FIR */ case 0x1010c03: /* PIBAM FIR MASK */ From patchwork Tue Nov 19 17:50:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Balamuruhan S X-Patchwork-Id: 1197579 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47HYQr45vwz9sPK for ; Wed, 20 Nov 2019 04:56:04 +1100 (AEDT) Received: from localhost ([::1]:48716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7jN-0003Ll-LR for incoming@patchwork.ozlabs.org; Tue, 19 Nov 2019 12:56:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53476) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7f7-0005xi-B5 for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iX7f6-0005D1-7W for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:37 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35344) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iX7f5-0005CZ-Vx for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:36 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAJHlTcU096158 for ; Tue, 19 Nov 2019 12:51:35 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wcencbvst-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Nov 2019 12:51:34 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Nov 2019 17:51:32 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 19 Nov 2019 17:51:28 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAJHpSu248496796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 17:51:28 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 082AF4C04A; Tue, 19 Nov 2019 17:51:28 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A0B434C052; Tue, 19 Nov 2019 17:51:26 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.85.84.11]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 19 Nov 2019 17:51:26 +0000 (GMT) From: Balamuruhan S To: qemu-devel@nongnu.org Subject: [PATCH 3/5] hw/ppc/pnv_xscom: Power8 occ common area is in PBA BAR 3 Date: Tue, 19 Nov 2019 23:20:54 +0530 X-Mailer: git-send-email 2.14.5 In-Reply-To: <20191119175056.32518-1-bala24@linux.ibm.com> References: <20191119175056.32518-1-bala24@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19111917-0020-0000-0000-0000038B2B14 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19111917-0021-0000-0000-000021E158C3 Message-Id: <20191119175056.32518-4-bala24@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-11-19_06:2019-11-15, 2019-11-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=1 malwarescore=0 phishscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911190152 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id xAJHlTcU096158 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Balamuruhan S , david@gibson.dropbear.id.au, qemu-ppc@nongnu.org, clg@kaod.org, groug@kaod.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Fix incorrect PBA BAR and BARMASK value for Power8 occ common area region where skiboot enum declaration have it in BAR 3 and BARMASK is calculated BARMASK0 + BAR, enum P8_BAR { P8_BAR_HOMER = 0, P8_BAR_CENTAUR = 1, P8_BAR_SLW = 2, P8_BAR_OCC_COMMON = 3, }; Signed-off-by: Cédric Le Goater Signed-off-by: Balamuruhan S --- hw/ppc/pnv_xscom.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c index cdd5fa356e..cb6d6bbcfc 100644 --- a/hw/ppc/pnv_xscom.c +++ b/hw/ppc/pnv_xscom.c @@ -38,9 +38,9 @@ /* PBA BARs */ #define P8_PBA_BAR0 0x2013f00 -#define P8_PBA_BAR2 0x2013f02 +#define P8_PBA_BAR3 0x2013f03 #define P8_PBA_BARMASK0 0x2013f04 -#define P8_PBA_BARMASK2 0x2013f06 +#define P8_PBA_BARMASK3 0x2013f07 #define P9_PBA_BAR0 0x5012b00 #define P9_PBA_BAR2 0x5012b02 #define P9_PBA_BARMASK0 0x5012b04 @@ -99,11 +99,11 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t pcba) case P9_PBA_BAR2: /* P9 occ common area */ return PNV9_OCC_COMMON_AREA(chip); - case P8_PBA_BAR2: /* P8 occ common area */ + case P8_PBA_BAR3: /* P8 occ common area */ return PNV_OCC_COMMON_AREA(chip); case P9_PBA_BARMASK2: /* P9 occ common area size */ - case P8_PBA_BARMASK2: /* P8 occ common area size */ + case P8_PBA_BARMASK3: /* P8 occ common area size */ return OCC_SIZE_MASK; case 0x1010c00: /* PIBAM FIR */ @@ -126,9 +126,9 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t pcba) case 0x202000f: /* ADU stuff, receive status register*/ return 0; case 0x2013f01: /* PBA stuff */ - case 0x2013f03: /* PBA stuff */ + case 0x2013f02: /* PBA stuff */ case 0x2013f05: /* PBA stuff */ - case 0x2013f07: /* PBA stuff */ + case 0x2013f06: /* PBA stuff */ return 0; case 0x2013028: /* CAPP stuff */ case 0x201302a: /* CAPP stuff */ From patchwork Tue Nov 19 17:50:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Balamuruhan S X-Patchwork-Id: 1197578 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47HYP547Fmz9sR4 for ; Wed, 20 Nov 2019 04:54:33 +1100 (AEDT) Received: from localhost ([::1]:48686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7hv-0000mx-Bs for incoming@patchwork.ozlabs.org; Tue, 19 Nov 2019 12:54:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53491) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7f8-0005z6-4t for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iX7f7-0005DU-1O for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:38 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:11796 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iX7f6-0005DG-Sz for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:36 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAJHnDcB116347 for ; Tue, 19 Nov 2019 12:51:36 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2wcf7u1mft-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Nov 2019 12:51:36 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Nov 2019 17:51:34 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 19 Nov 2019 17:51:31 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAJHpUP923593174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 17:51:30 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 713904C059; Tue, 19 Nov 2019 17:51:30 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 17CEE4C040; Tue, 19 Nov 2019 17:51:29 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.85.84.11]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 19 Nov 2019 17:51:28 +0000 (GMT) From: Balamuruhan S To: qemu-devel@nongnu.org Subject: [PATCH 4/5] hw/ppc/pnv_xscom: occ common area to be mapped only once Date: Tue, 19 Nov 2019 23:20:55 +0530 X-Mailer: git-send-email 2.14.5 In-Reply-To: <20191119175056.32518-1-bala24@linux.ibm.com> References: <20191119175056.32518-1-bala24@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19111917-0008-0000-0000-00000333FD5A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19111917-0009-0000-0000-00004A531D2C Message-Id: <20191119175056.32518-5-bala24@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-11-19_06:2019-11-15, 2019-11-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 mlxscore=0 suspectscore=1 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=935 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911190152 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-001b2d01.pphosted.com id xAJHnDcB116347 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Balamuruhan S , david@gibson.dropbear.id.au, qemu-ppc@nongnu.org, clg@kaod.org, groug@kaod.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" occ common area should be mapped once and disable it for every other chip. Signed-off-by: Cédric Le Goater Signed-off-by: Balamuruhan S --- hw/ppc/pnv_xscom.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c index cb6d6bbcfc..f797a5ec7d 100644 --- a/hw/ppc/pnv_xscom.c +++ b/hw/ppc/pnv_xscom.c @@ -98,13 +98,22 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t pcba) return HOMER_SIZE_MASK; case P9_PBA_BAR2: /* P9 occ common area */ - return PNV9_OCC_COMMON_AREA(chip); + if (!PNV_CHIP_INDEX(chip)) { + return PNV9_OCC_COMMON_AREA(chip); + } + return 0; case P8_PBA_BAR3: /* P8 occ common area */ - return PNV_OCC_COMMON_AREA(chip); + if (!PNV_CHIP_INDEX(chip)) { + return PNV_OCC_COMMON_AREA(chip); + } + return 0; case P9_PBA_BARMASK2: /* P9 occ common area size */ case P8_PBA_BARMASK3: /* P8 occ common area size */ - return OCC_SIZE_MASK; + if (!PNV_CHIP_INDEX(chip)) { + return OCC_SIZE_MASK; + } + return 0; case 0x1010c00: /* PIBAM FIR */ case 0x1010c03: /* PIBAM FIR MASK */ From patchwork Tue Nov 19 17:50:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balamuruhan S X-Patchwork-Id: 1197563 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47HYLw01TCz9sPK for ; Wed, 20 Nov 2019 04:52:39 +1100 (AEDT) Received: from localhost ([::1]:48658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7g3-0006Qk-R4 for incoming@patchwork.ozlabs.org; Tue, 19 Nov 2019 12:52:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53523) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX7fB-00063N-1k for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iX7f9-0005Ef-QD for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:40 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:28028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iX7f9-0005EP-IQ for qemu-devel@nongnu.org; Tue, 19 Nov 2019 12:51:39 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAJHmr0n004479 for ; Tue, 19 Nov 2019 12:51:38 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wcf592pkp-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Nov 2019 12:51:38 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Nov 2019 17:51:36 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 19 Nov 2019 17:51:34 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAJHpXHD54198398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 17:51:33 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F13CD4C04E; Tue, 19 Nov 2019 17:51:32 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A10414C044; Tue, 19 Nov 2019 17:51:31 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.85.84.11]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 19 Nov 2019 17:51:31 +0000 (GMT) From: Balamuruhan S To: qemu-devel@nongnu.org Subject: [PATCH 5/5] hw/ppc/pnv_xscom: add PBA BARs for Power8 slw image Date: Tue, 19 Nov 2019 23:20:56 +0530 X-Mailer: git-send-email 2.14.5 In-Reply-To: <20191119175056.32518-1-bala24@linux.ibm.com> References: <20191119175056.32518-1-bala24@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19111917-0012-0000-0000-000003689BD2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19111917-0013-0000-0000-000021A426F8 Message-Id: <20191119175056.32518-6-bala24@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-11-19_06:2019-11-15, 2019-11-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=1 mlxlogscore=907 impostorscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 clxscore=1015 bulkscore=0 spamscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911190152 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Balamuruhan S , david@gibson.dropbear.id.au, qemu-ppc@nongnu.org, clg@kaod.org, groug@kaod.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" slw base and size mask are accessed during boot in homer_init_chip(), so include BAR2 and BARMASK2 for Power8. Signed-off-by: Balamuruhan S --- hw/ppc/pnv_xscom.c | 10 ++++++++-- include/hw/ppc/pnv.h | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c index f797a5ec7d..828a2e2a5a 100644 --- a/hw/ppc/pnv_xscom.c +++ b/hw/ppc/pnv_xscom.c @@ -38,8 +38,10 @@ /* PBA BARs */ #define P8_PBA_BAR0 0x2013f00 +#define P8_PBA_BAR2 0x2013f02 #define P8_PBA_BAR3 0x2013f03 #define P8_PBA_BARMASK0 0x2013f04 +#define P8_PBA_BARMASK2 0x2013f06 #define P8_PBA_BARMASK3 0x2013f07 #define P9_PBA_BAR0 0x5012b00 #define P9_PBA_BAR2 0x5012b02 @@ -49,6 +51,7 @@ /* Mask to calculate Homer/Occ size */ #define HOMER_SIZE_MASK 0x0000000000300000ull #define OCC_SIZE_MASK 0x0000000000700000ull +#define SLW_SIZE_MASK 0x0 static void xscom_complete(CPUState *cs, uint64_t hmer_bits) { @@ -115,6 +118,11 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t pcba) } return 0; + case P8_PBA_BAR2: /* P8 slw image */ + return PNV_SLW_IMAGE_BASE(chip); + case P8_PBA_BARMASK2: /* P8 slw image size is 1MB and mask is zero*/ + return SLW_SIZE_MASK; + case 0x1010c00: /* PIBAM FIR */ case 0x1010c03: /* PIBAM FIR MASK */ @@ -135,9 +143,7 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t pcba) case 0x202000f: /* ADU stuff, receive status register*/ return 0; case 0x2013f01: /* PBA stuff */ - case 0x2013f02: /* PBA stuff */ case 0x2013f05: /* PBA stuff */ - case 0x2013f06: /* PBA stuff */ return 0; case 0x2013028: /* CAPP stuff */ case 0x201302a: /* CAPP stuff */ diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h index e9ed8b928a..bd22dbf8a9 100644 --- a/include/hw/ppc/pnv.h +++ b/include/hw/ppc/pnv.h @@ -212,6 +212,10 @@ void pnv_bmc_powerdown(IPMIBmc *bmc); #define PNV_HOMER_BASE(chip) \ (0x7ffd800000ull + ((uint64_t)PNV_CHIP_INDEX(chip)) * PNV_HOMER_SIZE) +#define PNV_SLW_SIZE 0x0000000000100000ull +#define PNV_SLW_IMAGE_BASE(chip) \ + (0x2ffda00000ull + ((uint64_t)PNV_CHIP_INDEX(chip)) * PNV_SLW_SIZE) + /* * XSCOM 0x20109CA defines the ICP BAR: