{"id":811508,"url":"http://patchwork.ozlabs.org/api/patches/811508/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908103558.31632-20-david@gibson.dropbear.id.au/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170908103558.31632-20-david@gibson.dropbear.id.au>","list_archive_url":null,"date":"2017-09-08T10:35:37","name":"[PULL,19/40] booke206: allow to specify an mmucfg value at the init","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"825d34fe5e51fb173dd44d04b08f7de3a566fbbd","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/?format=json","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908103558.31632-20-david@gibson.dropbear.id.au/mbox/","series":[{"id":2179,"url":"http://patchwork.ozlabs.org/api/series/2179/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2179","date":"2017-09-08T10:35:20","name":"[PULL,01/40] hw/ppc/spapr_drc.c: change spapr_drc_needed to use drc->dev","version":1,"mbox":"http://patchwork.ozlabs.org/series/2179/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/811508/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/811508/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"gI+tiFQt\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpYtd3q8Sz9s3w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 20:47:36 +1000 (AEST)","from localhost ([::1]:44500 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dqGov-0003km-LA\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 06:47:33 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:58705)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dqGe6-00029h-JP\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 06:36:31 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dqGe1-0003Fj-Ec\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 06:36:22 -0400","from ozlabs.org ([2401:3900:2:1::2]:54255)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1dqGe1-0003Cq-3f; Fri, 08 Sep 2017 06:36:17 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xpYdN00yqz9t3V; Fri,  8 Sep 2017 20:36:04 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1504866968;\n\tbh=4Hx2E54Am5bEFCHXAglGA7hUjNARcWDSHP8iFQa4v1M=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=gI+tiFQtV25IBOxdxVA0wfKc6XawHN0Rjw2hfm5BInWYs8qTtMPhwpg9+8YsCWZ6N\n\toOOCSpdTZZ/MgsgDAcKxJYMc0CIV1EXTB0/6ASl3ff+2pU745nzj7VCIt9/NEm2/q2\n\tQZQ/5tIarz7xvcLypXXSimn4zYCl+ccKRhRXXc2E=","From":"David Gibson <david@gibson.dropbear.id.au>","To":"peter.maydell@linaro.org","Date":"Fri,  8 Sep 2017 20:35:37 +1000","Message-Id":"<20170908103558.31632-20-david@gibson.dropbear.id.au>","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170908103558.31632-1-david@gibson.dropbear.id.au>","References":"<20170908103558.31632-1-david@gibson.dropbear.id.au>","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2401:3900:2:1::2","Subject":"[Qemu-devel] [PULL 19/40] booke206: allow to specify an mmucfg\n\tvalue at the init","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org, aik@ozlabs.ru, agraf@suse.de,\n\tmdroth@linux.vnet.ibm.com,\n\tKONRAD Frederic <frederic.konrad@adacore.com>, \n\tqemu-ppc@nongnu.org, imammedo@redhat.com, sam.bobroff@au1.ibm.com,\n\tDavid Gibson <david@gibson.dropbear.id.au>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"From: KONRAD Frederic <frederic.konrad@adacore.com>\n\nThis allows to init the MMUCFG SPR with a non NULL value.\n\nSigned-off-by: KONRAD Frederic <frederic.konrad@adacore.com>\nSigned-off-by: David Gibson <david@gibson.dropbear.id.au>\n---\n target/ppc/translate_init.c | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)","diff":"diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c\nindex 1586e28055..4104629df7 100644\n--- a/target/ppc/translate_init.c\n+++ b/target/ppc/translate_init.c\n@@ -1842,7 +1842,7 @@ static inline uint32_t gen_tlbncfg(uint32_t assoc, uint32_t minsize,\n \n /* BookE 2.06 storage control registers */\n static void gen_spr_BookE206(CPUPPCState *env, uint32_t mas_mask,\n-                              uint32_t *tlbncfg)\n+                             uint32_t *tlbncfg, uint32_t mmucfg)\n {\n #if !defined(CONFIG_USER_ONLY)\n     const char *mas_names[8] = {\n@@ -1886,7 +1886,7 @@ static void gen_spr_BookE206(CPUPPCState *env, uint32_t mas_mask,\n     spr_register(env, SPR_MMUCFG, \"MMUCFG\",\n                  SPR_NOACCESS, SPR_NOACCESS,\n                  &spr_read_generic, SPR_NOACCESS,\n-                 0x00000000); /* TOFIX */\n+                 mmucfg);\n     switch (env->nb_ways) {\n     case 4:\n         spr_register(env, SPR_BOOKE_TLB3CFG, \"TLB3CFG\",\n@@ -4615,7 +4615,7 @@ static void init_proc_e200(CPUPPCState *env)\n                  &spr_read_spefscr, &spr_write_spefscr,\n                  0x00000000);\n     /* Memory management */\n-    gen_spr_BookE206(env, 0x0000005D, NULL);\n+    gen_spr_BookE206(env, 0x0000005D, NULL, 0);\n     /* XXX : not implemented */\n     spr_register(env, SPR_HID0, \"HID0\",\n                  SPR_NOACCESS, SPR_NOACCESS,\n@@ -4900,6 +4900,7 @@ static void init_proc_e500(CPUPPCState *env, int version)\n                     | 0x0020; /* 32 kb */\n     uint32_t l1cfg1 = 0x3800  /* 8 ways */\n                     | 0x0020; /* 32 kb */\n+    uint32_t mmucfg = 0;\n #if !defined(CONFIG_USER_ONLY)\n     int i;\n #endif\n@@ -4974,7 +4975,7 @@ static void init_proc_e500(CPUPPCState *env, int version)\n     default:\n         cpu_abort(CPU(cpu), \"Unknown CPU: \" TARGET_FMT_lx \"\\n\", env->spr[SPR_PVR]);\n     }\n-    gen_spr_BookE206(env, 0x000000DF, tlbncfg);\n+    gen_spr_BookE206(env, 0x000000DF, tlbncfg, mmucfg);\n     /* XXX : not implemented */\n     spr_register(env, SPR_HID0, \"HID0\",\n                  SPR_NOACCESS, SPR_NOACCESS,\n","prefixes":["PULL","19/40"]}