From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vo9Av-000172-3H for qemu-devel@nongnu.org; Wed, 04 Dec 2013 04:55:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vo9An-0006xF-J5 for qemu-devel@nongnu.org; Wed, 04 Dec 2013 04:55:21 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:26878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vo9An-0006x7-Cu for qemu-devel@nongnu.org; Wed, 04 Dec 2013 04:55:13 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MXA007ZD0VY0R20@mailout1.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 04 Dec 2013 09:55:10 +0000 (GMT) Message-id: <529EFBFC.5010903@samsung.com> Date: Wed, 04 Dec 2013 13:55:08 +0400 From: Fedorov Sergey MIME-version: 1.0 References: <1386060535-15908-1-git-send-email-s.fedorov@samsung.com> <1386060535-15908-5-git-send-email-s.fedorov@samsung.com> In-reply-to: Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 04/21] target-arm: preserve RAO/WI bits of ARMv7 SCTLR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Maydell , Svetlana Fedoseeva , a.basov@samsung.com, "qemu-devel@nongnu.org Developers" , johannes.winter@iaik.tugraz.at On 12/03/2013 04:17 PM, Peter Crosthwaite wrote: > On Tue, Dec 3, 2013 at 6:48 PM, Sergey Fedorov wrote: >> From: Svetlana Fedoseeva >> >> Signed-off-by: Svetlana Fedoseeva >> Signed-off-by: Sergey Fedorov >> --- >> target-arm/helper.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/target-arm/helper.c b/target-arm/helper.c >> index 6642e53..d7922ad 100644 >> --- a/target-arm/helper.c >> +++ b/target-arm/helper.c >> @@ -1507,6 +1507,10 @@ static const ARMCPRegInfo lpae_cp_reginfo[] = { >> >> static int sctlr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) >> { >> + if (arm_feature(env, ARM_FEATURE_V7)) { >> + value = value | 0x00c50078; /* This bits are RAO/WI */ > Magic number. "these bits ". Would be acceptable to substitute this magic number with "bitshifted constants combined with bitwise or", e.g. as in vmsa_ttbcr_raw_write()? > >> + } >> + >> env->cp15.c1_sys = value; >> /* ??? Lots of these bits are not implemented. */ >> /* This may enable/disable the MMU, so do a TLB flush. */ >> -- >> 1.7.9.5 >> >> > -- Best regards, Sergey Fedorov, Junior Software Engineer, Samsung R&D Institute Rus. E-mail: s.fedorov@samsung.com