Message ID | 20181221160307.14819-13-palmer@sifive.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96C8314DE for <patchwork-qemu-devel@patchwork.kernel.org>; Fri, 21 Dec 2018 16:08:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87206284B9 for <patchwork-qemu-devel@patchwork.kernel.org>; Fri, 21 Dec 2018 16:08:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B96E284D4; Fri, 21 Dec 2018 16:08:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 73300284B9 for <patchwork-qemu-devel@patchwork.kernel.org>; Fri, 21 Dec 2018 16:08:01 +0000 (UTC) Received: from localhost ([::1]:46417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1gaNLE-0003su-Lj for patchwork-qemu-devel@patchwork.kernel.org; Fri, 21 Dec 2018 11:08:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <palmer@sifive.com>) id 1gaNHO-0001fY-Vq for qemu-devel@nongnu.org; Fri, 21 Dec 2018 11:04:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <palmer@sifive.com>) id 1gaNHO-0004Fc-2B for qemu-devel@nongnu.org; Fri, 21 Dec 2018 11:04:02 -0500 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]:44348) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <palmer@sifive.com>) id 1gaNHN-0004BA-LV for qemu-devel@nongnu.org; Fri, 21 Dec 2018 11:04:01 -0500 Received: by mail-qt1-x841.google.com with SMTP id n32so6162105qte.11 for <qemu-devel@nongnu.org>; Fri, 21 Dec 2018 08:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:date:message-id:in-reply-to:references:cc:from:to; bh=pGdFvWxsyK+082c4RANqehx4XfGix5v1XjwMetfsyZg=; b=BFLxT6q9KDFCMRBUTi6o8oPwvKDwh+WJDvy1PvXZOXrgmkn4lqivhU6vuZOuHVPFrb LmHjWBJSBPmDmwU6FC9tAcwzXxstYH2KT0tGfIuYNQfJmp2A4sdgr9TRVGrY/z9pM1AN YnnLeXxJjo7XlIyHOrEwgUvt37uDJ5YDJIm9jF1UN80vE5SWHW/0BZH0EMVxHPbrcDEk TUvEzQrdhDl1NoXj+uhIUvvcAXQ7INx/WtKXFxlO0tuGs4o4EgYrXYa5QwOqCmzMOGum +0Hb0a7njE3gwdhAcFFjlS92xTuNkrYaRHfYXecTWK4vkoaZXAzRrZA40er5tRxGJVan dcoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :cc:from:to; bh=pGdFvWxsyK+082c4RANqehx4XfGix5v1XjwMetfsyZg=; b=tkROPMT8E94V9AGfiOTHLOQjFxsgoOZvtMhveFtbH5vo3Emr6Asi8UW0J0GAiJfT/k NhH9QnUmLerIVIW3Gk6VSRRXvRFn4oMEKbYcjMeJ+wXqDuBtNPXGDGexxmhZ5HdwoCOU EkGrOnPDRymLiL0xUIEoBboRnRRZP7O0i0q5NrQ31tvs4Cijis4tQOPHONqqfs5x1KPE eECieA9fkuGXdBJ41duXfmJMgOCynvUj4OTx5+L/6johXXTQu9XG4Aob4Y5GLlCLUPfn KPXxzyOl1VYDFFIlOuBhMO1O/USpcCw+UZOq/P92VMQQbqhF6+GYXS/J4Wg2Sd+RTmxI tS9g== X-Gm-Message-State: AJcUukcmVBEfRT1fNKqSH3jJV3ThFwmtfI4D8+HhRHcV7W2HDiL/rTpb gkmFqNY8GxzYShwDqM08LAuRspiU5ME= X-Google-Smtp-Source: ALg8bN7HDkHstcrzBb2D1EL2iZd9wYwALtAwVk5F7dj5Zd+ikIVsdvekOmaJkaezjpTpGeLN2J6RwA== X-Received: by 2002:a0c:b093:: with SMTP id o19mr2997013qvc.49.1545408234814; Fri, 21 Dec 2018 08:03:54 -0800 (PST) Received: from localhost ([2601:182:c980:96c:8dd:4488:90b1:59d1]) by smtp.gmail.com with ESMTPSA id 24sm6307676qkx.77.2018.12.21.08.03.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 08:03:54 -0800 (PST) Date: Fri, 21 Dec 2018 08:03:05 -0800 Message-Id: <20181221160307.14819-13-palmer@sifive.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181221160307.14819-1-palmer@sifive.com> References: <20181221160307.14819-1-palmer@sifive.com> From: Palmer Dabbelt <palmer@sifive.com> To: qemu-riscv@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::841 Subject: [Qemu-devel] [PULL 12/14] target/riscv/pmp.c: Fix pmp_decode_napot() 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>, <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>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Anup Patel <anup@brainfault.org>, Anup Patel <anup.patel@wdc.com>, Alistair Francis <alistair.francis@wdc.com>, qemu-devel@nongnu.org, Palmer Dabbelt <palmer@sifive.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
[PR,RFC] RISC-V Changes for 3.2, Part 1
|
expand
|
diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index 03abd8fe5eb7..15a5366616bd 100644 --- a/target/riscv/pmp.c +++ b/target/riscv/pmp.c @@ -138,7 +138,7 @@ static void pmp_decode_napot(target_ulong a, target_ulong *sa, target_ulong *ea) return; } else { target_ulong t1 = ctz64(~a); - target_ulong base = (a & ~(((target_ulong)1 << t1) - 1)) << 3; + target_ulong base = (a & ~(((target_ulong)1 << t1) - 1)) << 2; target_ulong range = ((target_ulong)1 << (t1 + 3)) - 1; *sa = base; *ea = base + range;