From nobody Thu May 2 17:57:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523364892597919.8099111038051; Tue, 10 Apr 2018 05:54:52 -0700 (PDT) Received: from localhost ([::1]:42819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5snM-0008PR-I7 for importer@patchew.org; Tue, 10 Apr 2018 08:54:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5slV-00078S-Gx for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5slS-0002eO-Vf for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:49 -0400 Received: from ozlabs.org ([203.11.71.1]:50789) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5slS-0002cA-9B; Tue, 10 Apr 2018 08:52:46 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 40L6X83Bdtz9s3n; Tue, 10 Apr 2018 22:52:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1523364760; bh=PrSA/HMgmX+Y8iBjICE1RMDUxIvXJDgZxntqGAtXUkc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LGtpmJd7EqivKpZuuX1jvEjSPDjHoLJFAVw9vd85WoCmWWijD8iMRCrhsr4lcEU2Z mbkFAeVJ+f/mP730danfUFaVk76hZwsnjzG6gffX8GD6Eke5074qD4RW94BxrXOmYV kACoGta+b0YWY+ord2Am3/a4v047mbFrUj9O0wXs= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 10 Apr 2018 22:52:27 +1000 Message-Id: <20180410125233.31618-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180410125233.31618-1-david@gibson.dropbear.id.au> References: <20180410125233.31618-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 1/7] target/ppc: Initialize lazy_tlb_flush correctly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gibson , qemu-ppc@nongnu.org, groug@kaod.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" ppc_tr_init_disas_context() correctly sets lazy_tlb_flush to true on certain CPU models. However, it leaves it uninitialized, instead of setting it to false on all others. It wasn't caught before now because we didn't have examples in the tests that exercised this path. However it can now be caught using clang's undefined behaviour sanitizer and the sam460ex board. Suggested-by: Peter Maydell Signed-off-by: David Gibson Reviewed-by: Thomas Huth Reviewed-by: Greg Kurz --- target/ppc/translate.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 218665b408..3457d29f8e 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7237,10 +7237,9 @@ static int ppc_tr_init_disas_context(DisasContextBas= e *dcbase, ctx->sf_mode =3D msr_is_64bit(env, env->msr); ctx->has_cfar =3D !!(env->flags & POWERPC_FLAG_CFAR); #endif - if (env->mmu_model =3D=3D POWERPC_MMU_32B || - env->mmu_model =3D=3D POWERPC_MMU_601 || - (env->mmu_model & POWERPC_MMU_64B)) - ctx->lazy_tlb_flush =3D true; + ctx->lazy_tlb_flush =3D env->mmu_model =3D=3D POWERPC_MMU_32B + || env->mmu_model =3D=3D POWERPC_MMU_601 + || (env->mmu_model & POWERPC_MMU_64B); =20 ctx->fpu_enabled =3D !!msr_fp; if ((env->flags & POWERPC_FLAG_SPE) && msr_spe) --=20 2.14.3 From nobody Thu May 2 17:57:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523365042836209.9236110099023; Tue, 10 Apr 2018 05:57:22 -0700 (PDT) Received: from localhost ([::1]:42933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5spt-0002JL-VQ for importer@patchew.org; Tue, 10 Apr 2018 08:57:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5slV-00078T-HC for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5slU-0002ey-1D for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:49 -0400 Received: from ozlabs.org ([203.11.71.1]:41099) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5slT-0002cn-Kk; Tue, 10 Apr 2018 08:52:47 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 40L6X86PMrz9s3m; Tue, 10 Apr 2018 22:52:40 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1523364760; bh=OAcQAkhG0q/ePqtxWIEZ6hCgpMlXa/WORdUvDO7boT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fC1bMIMJ/yZLiUvq+qcG3qzWn7NR2bd3+2IbrYpncTYd7cBc6EIr72MXxasJSd+ma RYbw0cqcntwt9/j6mQSQIXS2nWK6ghD48BWlFzbfePv8OpA+B2oKBpvGEAV6q6OBCo J6rGk7MViVfhw6Rb6Uc9kStCqi/zgAZ7LPuAES6I= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 10 Apr 2018 22:52:28 +1000 Message-Id: <20180410125233.31618-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180410125233.31618-1-david@gibson.dropbear.id.au> References: <20180410125233.31618-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 2/7] hw/misc/macio: Fix crash when listing device properties of macio device X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , David Gibson , qemu-ppc@nongnu.org, groug@kaod.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth The macio-newworld device can currently be used to abort QEMU unexpectedly: $ ppc-softmmu/qemu-system-ppc -S -M ref405ep,accel=3Dqtest -qmp stdio {"QMP": {"version": {"qemu": {"micro": 50, "minor": 11, "major": 2}, "package": "build-all"}, "capabilities": []}} { 'execute': 'qmp_capabilities' } {"return": {}} { 'execute': 'device-list-properties', 'arguments': {'typename': 'macio-newworld'}} Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222: Device 'serial0' is in use Aborted (core dumped) qdev properties should be set during realize(), not during instance_init(), so move the related code there to fix this problem. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/macio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index 454244f59e..b74a6572b0 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -115,6 +115,13 @@ static void macio_common_realize(PCIDevice *d, Error *= *errp) memory_region_add_subregion(&s->bar, 0x16000, sysbus_mmio_get_region(sysbus_dev, 0)); =20 + qdev_prop_set_uint32(DEVICE(&s->escc), "disabled", 0); + qdev_prop_set_uint32(DEVICE(&s->escc), "frequency", ESCC_CLOCK); + qdev_prop_set_uint32(DEVICE(&s->escc), "it_shift", 4); + qdev_prop_set_chr(DEVICE(&s->escc), "chrA", serial_hds[0]); + qdev_prop_set_chr(DEVICE(&s->escc), "chrB", serial_hds[1]); + qdev_prop_set_uint32(DEVICE(&s->escc), "chnBtype", escc_serial); + qdev_prop_set_uint32(DEVICE(&s->escc), "chnAtype", escc_serial); object_property_set_bool(OBJECT(&s->escc), true, "realized", &err); if (err) { error_propagate(errp, err); @@ -341,13 +348,6 @@ static void macio_instance_init(Object *obj) object_property_add_child(obj, "dbdma", OBJECT(&s->dbdma), NULL); =20 object_initialize(&s->escc, sizeof(s->escc), TYPE_ESCC); - qdev_prop_set_uint32(DEVICE(&s->escc), "disabled", 0); - qdev_prop_set_uint32(DEVICE(&s->escc), "frequency", ESCC_CLOCK); - qdev_prop_set_uint32(DEVICE(&s->escc), "it_shift", 4); - qdev_prop_set_chr(DEVICE(&s->escc), "chrA", serial_hds[0]); - qdev_prop_set_chr(DEVICE(&s->escc), "chrB", serial_hds[1]); - qdev_prop_set_uint32(DEVICE(&s->escc), "chnBtype", escc_serial); - qdev_prop_set_uint32(DEVICE(&s->escc), "chnAtype", escc_serial); qdev_set_parent_bus(DEVICE(&s->escc), sysbus_get_default()); object_property_add_child(obj, "escc", OBJECT(&s->escc), NULL); } --=20 2.14.3 From nobody Thu May 2 17:57:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523365225528210.65332911404744; Tue, 10 Apr 2018 06:00:25 -0700 (PDT) Received: from localhost ([::1]:43085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5ssn-0005Fl-8w for importer@patchew.org; Tue, 10 Apr 2018 09:00:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5slW-00078s-AF for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5slV-0002fX-5D for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:50 -0400 Received: from ozlabs.org ([203.11.71.1]:55477) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5slU-0002du-Q8; Tue, 10 Apr 2018 08:52:49 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 40L6XB5HYMz9s4t; Tue, 10 Apr 2018 22:52:40 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1523364762; bh=LlQINsFwv71dNTp8wG2cXp8fLbQabLztO5jwxAHHyiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NRLYE9YTOkdxgt3LBRJl/BhqktZnnS3qBzcvXV+orJPac2LEir6dxi4Op1IUyRBv+ y/VmKLyx14KuWAuYzSBF7KccIh6o4Gx+XkBlmRonYiCXpXZHfUCz457ZyM/AHoOt/I VLnJnLZxvRLAkVnyex/yOlA94de+tzQunNn9jiAk= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 10 Apr 2018 22:52:29 +1000 Message-Id: <20180410125233.31618-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180410125233.31618-1-david@gibson.dropbear.id.au> References: <20180410125233.31618-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 3/7] target/ppc: Fix backwards migration of msr_mask X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gibson , qemu-ppc@nongnu.org, groug@kaod.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 21b786f "PowerPC: Add TS bits into msr_mask" added the transaction states to msr_mask for recent POWER CPUs to allow correct migration of machines that are in certain interim transactional memory states. This was correct, but unfortunately breaks backwards of pseries-2.7 and earlier machine types which (stupidly) transferred the msr_mask in the migration stream and failed if it wasn't equal on each end. This works around the problem by masking out the new MSR bits in the compatibility code to send the msr_mask on old machine types. Signed-off-by: David Gibson Reviewed-by: Greg Kurz Tested-by: Greg Kurz Tested-by: Luk=C3=A1=C5=A1 Doktor --- target/ppc/machine.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/ppc/machine.c b/target/ppc/machine.c index e475206c6a..0634cdb295 100644 --- a/target/ppc/machine.c +++ b/target/ppc/machine.c @@ -190,7 +190,15 @@ static int cpu_pre_save(void *opaque) =20 /* Hacks for migration compatibility between 2.6, 2.7 & 2.8 */ if (cpu->pre_2_8_migration) { - cpu->mig_msr_mask =3D env->msr_mask; + /* Mask out bits that got added to msr_mask since the versions + * which stupidly included it in the migration stream. */ + target_ulong metamask =3D 0 +#if defined(TARGET_PPC64) + | (1ULL << MSR_TS0) + | (1ULL << MSR_TS1) +#endif + ; + cpu->mig_msr_mask =3D env->msr_mask & ~metamask; cpu->mig_insns_flags =3D env->insns_flags & insns_compat_mask; cpu->mig_insns_flags2 =3D env->insns_flags2 & insns_compat_mask2; cpu->mig_nb_BATs =3D env->nb_BATs; --=20 2.14.3 From nobody Thu May 2 17:57:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523365163982567.0122046696794; Tue, 10 Apr 2018 05:59:23 -0700 (PDT) Received: from localhost ([::1]:42941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5srm-00045X-2Q for importer@patchew.org; Tue, 10 Apr 2018 08:59:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5slW-00078y-Fb for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5slV-0002fk-Bm for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:50 -0400 Received: from ozlabs.org ([203.11.71.1]:48277) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5slU-0002cw-Vu; Tue, 10 Apr 2018 08:52:49 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 40L6X93Bwzz9s3p; Tue, 10 Apr 2018 22:52:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1523364761; bh=MJ6tTzcq12ZglhynmzFoB3xesxqO5wGLr0YUbUrMZbk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XCMrnyVE1rhSxTUonsMIxlF71wkPj3OYzT0ERu1qb56/bKd3HerOwJZwCcBM2WQW0 HlTJFTSFRZLP1wvFWoQvU6MPf3yoLEn06oDSYSwdv6FylHW7cj22q2OI5/ZnK5/sT0 8LGMR/149smYYyx+HSg0P/o4Mas0ijA3Zeu243Ws= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 10 Apr 2018 22:52:30 +1000 Message-Id: <20180410125233.31618-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180410125233.31618-1-david@gibson.dropbear.id.au> References: <20180410125233.31618-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 4/7] spapr: Initialize reserved areas list in FDT in H_CAS handler X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , David Gibson , qemu-ppc@nongnu.org, groug@kaod.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Alexey Kardashevskiy At the moment the device tree produced by the H_CAS handler has no reserved map initialized at all which is not correct as at least one empty record is required to be present as a marker of the end. This does not cause problems now as the only consumer is SLOF which does not look at the reserved map area. However when DTC's "Improve libfdt's memory safety" changeset hits the QEMU upstream, there will be errors reported and crashes observed. This fixes the problem by adding an empty entry to the reserved map, just like create_device_tree() does already. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 2c0be8c898..a81570e7c8 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -865,6 +865,7 @@ int spapr_h_cas_compose_response(sPAPRMachineState *spa= pr, /* Create skeleton */ fdt_skel =3D g_malloc0(size); _FDT((fdt_create(fdt_skel, size))); + _FDT((fdt_finish_reservemap(fdt_skel))); _FDT((fdt_begin_node(fdt_skel, ""))); _FDT((fdt_end_node(fdt_skel))); _FDT((fdt_finish(fdt_skel))); --=20 2.14.3 From nobody Thu May 2 17:57:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523365474418552.6394019788157; Tue, 10 Apr 2018 06:04:34 -0700 (PDT) Received: from localhost ([::1]:43333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5swr-0000G9-JN for importer@patchew.org; Tue, 10 Apr 2018 09:04:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5slX-00079t-Hh for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5slW-0002h3-QJ for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:51 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:49237) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5slW-0002ek-Fb; Tue, 10 Apr 2018 08:52:50 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 40L6XD18HCz9s52; Tue, 10 Apr 2018 22:52:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1523364764; bh=DbkWalBBuFo7S07n2vhC+EUQ0XuiHGX4nuniQ+9n0R8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yz441TV/sBfEDmD4tKrGv1UhNXPoSPanTH0u+e8ePsZKgTfnJIO8JL4dpiJmIGhCu 7IVWqNJOB99quqjmv72tT/s0rkZnkFQ7WLlCKH9ejjixDiCw+poEpDOUw00lyTFQnT w0KrvCP7mPX4bB9mjxzOCTHexVZdbijFoPW9sFjk= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 10 Apr 2018 22:52:31 +1000 Message-Id: <20180410125233.31618-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180410125233.31618-1-david@gibson.dropbear.id.au> References: <20180410125233.31618-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 5/7] tests/boot-serial: Test the sam460ex board X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , David Gibson , qemu-ppc@nongnu.org, groug@kaod.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth We've got a U-Boot firmware for this board in our repository, and the firmware prints some output to the serial console, so we can check this board in the boot-serial tester, too. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- tests/boot-serial-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c index 5b24cd26c1..011525d8cf 100644 --- a/tests/boot-serial-test.c +++ b/tests/boot-serial-test.c @@ -79,12 +79,14 @@ static testdef_t tests[] =3D { { "ppc", "40p", "-boot d", "Booting from device d" }, { "ppc", "g3beige", "", "PowerPC,750" }, { "ppc", "mac99", "", "PowerPC,G4" }, + { "ppc", "sam460ex", "-m 256", "DRAM: 256 MiB" }, { "ppc64", "ppce500", "", "U-Boot" }, { "ppc64", "prep", "-boot e", "Booting from device e" }, { "ppc64", "40p", "-m 192", "Memory size: 192 MB" }, { "ppc64", "mac99", "", "PowerPC,970FX" }, { "ppc64", "pseries", "", "Open Firmware" }, { "ppc64", "powernv", "-cpu POWER8", "OPAL" }, + { "ppc64", "sam460ex", "-device e1000", "8086 100e" }, { "i386", "isapc", "-cpu qemu32 -device sga", "SGABIOS" }, { "i386", "pc", "-device sga", "SGABIOS" }, { "i386", "q35", "-device sga", "SGABIOS" }, --=20 2.14.3 From nobody Thu May 2 17:57:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523364930478501.3213459582014; Tue, 10 Apr 2018 05:55:30 -0700 (PDT) Received: from localhost ([::1]:42883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5so5-0000fk-Jw for importer@patchew.org; Tue, 10 Apr 2018 08:55:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5slY-0007Ae-IB for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5slX-0002hS-3U for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:52 -0400 Received: from ozlabs.org ([203.11.71.1]:41897) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5slW-0002ei-O0; Tue, 10 Apr 2018 08:52:51 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 40L6XC1VMXz9s4r; Tue, 10 Apr 2018 22:52:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1523364763; bh=OTzk0eIy/TTKiPakXVQYrN4CP+iIdZeDvUsqfxAz0lo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jEktsAOKk1qsY3v/00v1/5qfiNJnsHR8gO2X0I3HHQZcnTDMY3Ao7xtUFr6AWM6FN FJ3+05CuQ/O9G+U+9aYUifF7nfqfdPhos7SCOxdNxRrFmnQ49o96F40M0T72UIxfkj jW83ePxAyGt4AfcIwSjsdoo3vvvXNzpsfpsFxTHo= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 10 Apr 2018 22:52:32 +1000 Message-Id: <20180410125233.31618-7-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180410125233.31618-1-david@gibson.dropbear.id.au> References: <20180410125233.31618-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 6/7] sam460ex: Fix timer frequency and clock multipliers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, groug@kaod.org, David Gibson , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan We only emulate timer running at CPU frequency which is what most guests expect so set the frequency to match real hardware. This also allows setting clock multipliers which caused slowdown previously due to wrong timer frequency. Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/ppc/ppc440_uc.c | 3 +-- hw/ppc/sam460ex.c | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c index 976ab2b5d8..e312fdba70 100644 --- a/hw/ppc/ppc440_uc.c +++ b/hw/ppc/ppc440_uc.c @@ -392,8 +392,7 @@ static uint32_t dcr_read_sdr(void *opaque, int dcrn) case SDR0_CFGDATA: switch (sdr->addr) { case SDR0_STRP0: - /* FIXME: Is this correct? This breaks timing in U-Boot */ - ret =3D 0; /*(0xb5 << 8) | (1 << 4) | 9 */ + ret =3D (0xb5 << 8) | (1 << 4) | 9; break; case SDR0_STRP1: ret =3D (5 << 29) | (2 << 26) | (1 << 24); diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 70b8e76d9c..dfff262f96 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -67,6 +67,7 @@ IRQ12 =3D SM502_INT */ =20 +#define CPU_FREQ 1150000000 #define SDRAM_NR_BANKS 4 =20 /* FIXME: See u-boot.git 8ac41e, also fix in ppc440_uc.c */ @@ -253,8 +254,8 @@ static int sam460ex_load_device_tree(hwaddr addr, char *filename; int fdt_size; void *fdt; - uint32_t tb_freq =3D 50000000; - uint32_t clock_freq =3D 50000000; + uint32_t tb_freq =3D CPU_FREQ; + uint32_t clock_freq =3D CPU_FREQ; =20 filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FI= LE); if (!filename) { @@ -416,7 +417,7 @@ static void sam460ex_init(MachineState *machine) boot_info =3D g_malloc0(sizeof(*boot_info)); env->load_info =3D boot_info; =20 - ppc_booke_timers_init(cpu, 50000000, 0); + ppc_booke_timers_init(cpu, CPU_FREQ, 0); ppc_dcr_init(env, NULL, NULL); =20 /* PLB arbitrer */ --=20 2.14.3 From nobody Thu May 2 17:57:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1523365320453120.01298245152088; Tue, 10 Apr 2018 06:02:00 -0700 (PDT) Received: from localhost ([::1]:43121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5suN-0006XE-L9 for importer@patchew.org; Tue, 10 Apr 2018 09:01:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5slX-00079W-5o for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5slW-0002gJ-5d for qemu-devel@nongnu.org; Tue, 10 Apr 2018 08:52:51 -0400 Received: from ozlabs.org ([203.11.71.1]:51989) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5slV-0002em-Pd; Tue, 10 Apr 2018 08:52:50 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 40L6XF4R6Tz9s3B; Tue, 10 Apr 2018 22:52:43 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1523364765; bh=5g2deQKql7fAdDtzVzMU8G11oN5Ex5NP8+H/YZIDe0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ENOPQPdKgazeromdue4QIqP0LSgvUw0CGmvu01Hgkfpwi4CuIC5WnHCuOHNkv9dAG uHn1v3R/ohp/3csXvRPLQBbbPcOG6B/ehtX3bSn6R099M8uPZavd5s34Cd3iFnK+XP SvGpsYnTJnv238GlZp2u4sC4XuydkNIoLHbE+YgE= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 10 Apr 2018 22:52:33 +1000 Message-Id: <20180410125233.31618-8-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180410125233.31618-1-david@gibson.dropbear.id.au> References: <20180410125233.31618-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 7/7] roms/u-boot-sam460ex: Change to qemu git mirror and update X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, groug@kaod.org, David Gibson , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan Now that we have a mirror of this repo on git.qemu.org change the submodule to use that and update it to latest commit which fixes a dangling symlink and removes two big binaries that are not needed. Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- .gitmodules | 2 +- roms/u-boot-sam460ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index c613722e3c..49e9c2e3f4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -45,4 +45,4 @@ url =3D git://github.com/hdeller/seabios-hppa.git [submodule "roms/u-boot-sam460ex"] path =3D roms/u-boot-sam460ex - url =3D git://github.com/zbalaton/u-boot-sam460ex + url =3D git://git.qemu.org/u-boot-sam460ex.git diff --git a/roms/u-boot-sam460ex b/roms/u-boot-sam460ex index 119aa277f7..8ee007c421 160000 --- a/roms/u-boot-sam460ex +++ b/roms/u-boot-sam460ex @@ -1 +1 @@ -Subproject commit 119aa277f74a4a2d3f7ab6c9471292308eba14e4 +Subproject commit 8ee007c4216fd6a0d760589e8405ce4494497aa0 --=20 2.14.3