From patchwork Thu Jul 30 18:36:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 51727 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 26CCD22E7D for ; Thu, 30 Jul 2015 18:36:50 +0000 (UTC) Received: by lbcjj5 with SMTP id jj5sf16895096lbc.1 for ; Thu, 30 Jul 2015 11:36:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=KaHrCP/phKT3/6w+VrS+AD55Udcr3MPjsysrHO4ilqY=; b=UNUCU9NRPn3kSAklBFLY/ABQE0bPTf8EqoDs3rjsav5dFeX1nREgrUhWvJPq7c6gDL eM8wzNn4ab7lQxbkz9p/6+x3meO0FzxGetXIF3oU/FH+HFuLHKmMeqRMjSkkBSNCSG+R g1Bnd1KdARpH+4Kb83MFe0huiVaFeOjeflzLmrsDZAG2fZFxAFX8gZhD9kvIoU46Ghu5 elL55lKkbtNt8YoMqqW13fuGlgaJck8fuKVeTRPWeOA/ZfaIZSfrgNi4UTHni/H8bFUK tryfKcP+3NbXTZ4kh7v+4IVQJ/wEItLxTjDUkMrYV4Ca+A4S4w3SPnYFQQcmOch/RVDs /isw== X-Gm-Message-State: ALoCoQkc84qtoMND55erMnWkjP2JAlsQvnNbKJ84uEhSkRJNP5tCteQNAI+XqfQIv7mvH0JTh9Hz X-Received: by 10.152.1.105 with SMTP id 9mr18130343lal.3.1438281409055; Thu, 30 Jul 2015 11:36:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.138 with SMTP id am10ls183315lac.67.gmail; Thu, 30 Jul 2015 11:36:48 -0700 (PDT) X-Received: by 10.152.87.205 with SMTP id ba13mr44393799lab.37.1438281408918; Thu, 30 Jul 2015 11:36:48 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id jf4si1482427lbc.52.2015.07.30.11.36.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2015 11:36:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lblf12 with SMTP id f12so32769784lbl.2 for ; Thu, 30 Jul 2015 11:36:48 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr46600431lbb.35.1438281408825; Thu, 30 Jul 2015 11:36:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.7.198 with SMTP id l6csp784836lba; Thu, 30 Jul 2015 11:36:47 -0700 (PDT) X-Received: by 10.70.92.7 with SMTP id ci7mr30981175pdb.34.1438281406856; Thu, 30 Jul 2015 11:36:46 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id e2si4107585pdd.99.2015.07.30.11.36.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 Jul 2015 11:36:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZKsh4-0004sw-7z; Thu, 30 Jul 2015 19:36:38 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, "Edgar E. Iglesias" Subject: [PATCH 2/4] target-arm: Implement missing AMAIR registers Date: Thu, 30 Jul 2015 19:36:36 +0100 Message-Id: <1438281398-18746-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1438281398-18746-1-git-send-email-peter.maydell@linaro.org> References: <1438281398-18746-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The AMAIR registers are for providing auxiliary implementation defined memory attributes. We already implemented a RAZ/WI AMAIR_EL1; add the EL2 and EL3 versions for consistency. Signed-off-by: Peter Maydell --- target-arm/helper.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index d59616e..781b3a2 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2602,6 +2602,14 @@ static const ARMCPRegInfo el3_no_el2_cp_reginfo[] = { { .name = "HMAIR1", .state = ARM_CP_STATE_AA32, .opc1 = 4, .crn = 10, .crm = 2, .opc2 = 1, .access = PL2_RW, .type = ARM_CP_CONST, .resetvalue = 0 }, + { .name = "AMAIR_EL2", .state = ARM_CP_STATE_BOTH, + .opc0 = 3, .opc1 = 4, .crn = 10, .crm = 3, .opc2 = 0, + .access = PL2_RW, .type = ARM_CP_CONST, + .resetvalue = 0 }, + { .name = "HMAIR1", .state = ARM_CP_STATE_AA32, + .opc1 = 4, .crn = 10, .crm = 3, .opc2 = 1, + .access = PL2_RW, .type = ARM_CP_CONST, + .resetvalue = 0 }, { .name = "TCR_EL2", .state = ARM_CP_STATE_BOTH, .opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 2, .access = PL2_RW, .type = ARM_CP_CONST, .resetvalue = 0 }, @@ -2696,6 +2704,15 @@ static const ARMCPRegInfo el2_cp_reginfo[] = { .opc1 = 4, .crn = 10, .crm = 2, .opc2 = 1, .access = PL2_RW, .type = ARM_CP_ALIAS, .fieldoffset = offsetofhigh32(CPUARMState, cp15.mair_el[2]) }, + { .name = "AMAIR_EL2", .state = ARM_CP_STATE_BOTH, + .opc0 = 3, .opc1 = 4, .crn = 10, .crm = 3, .opc2 = 0, + .access = PL2_RW, .type = ARM_CP_CONST, + .resetvalue = 0 }, + /* HAMAIR1 is mapped to AMAIR_EL2[63:32] */ + { .name = "HMAIR1", .state = ARM_CP_STATE_AA32, + .opc1 = 4, .crn = 10, .crm = 3, .opc2 = 1, + .access = PL2_RW, .type = ARM_CP_CONST, + .resetvalue = 0 }, { .name = "TCR_EL2", .state = ARM_CP_STATE_BOTH, .opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 2, .access = PL2_RW, .writefn = vmsa_tcr_el1_write, @@ -2798,6 +2815,10 @@ static const ARMCPRegInfo el3_cp_reginfo[] = { .opc0 = 3, .opc1 = 6, .crn = 13, .crm = 0, .opc2 = 2, .access = PL3_RW, .resetvalue = 0, .fieldoffset = offsetof(CPUARMState, cp15.tpidr_el[3]) }, + { .name = "AMAIR_EL3", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 6, .crn = 10, .crm = 3, .opc2 = 0, + .access = PL3_RW, .type = ARM_CP_CONST, + .resetvalue = 0 }, REGINFO_SENTINEL };