From patchwork Fri Apr 24 19:31:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 464382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8852D140079 for ; Sat, 25 Apr 2015 05:32:14 +1000 (AEST) Received: from localhost ([::1]:46176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YljKe-0003Mi-Nr for incoming@patchwork.ozlabs.org; Fri, 24 Apr 2015 15:32:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YljJy-0002DK-RA for qemu-devel@nongnu.org; Fri, 24 Apr 2015 15:31:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YljJv-0007h6-J4 for qemu-devel@nongnu.org; Fri, 24 Apr 2015 15:31:30 -0400 Received: from mail-bn1on0095.outbound.protection.outlook.com ([157.56.110.95]:63469 helo=na01-bn1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YljJv-0007gy-EI for qemu-devel@nongnu.org; Fri, 24 Apr 2015 15:31:27 -0400 Received: from BN1AFFO11FD031.protection.gbl (10.58.52.34) by BN1AFFO11HUB050.protection.gbl (10.58.52.180) with Microsoft SMTP Server (TLS) id 15.1.148.11; Fri, 24 Apr 2015 19:31:25 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; gmail.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of xilinx.com does not designate 149.199.60.96 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.96; helo=xsj-tvapsmtpgw01; Received: from xsj-tvapsmtpgw01 (149.199.60.96) by BN1AFFO11FD031.mail.protection.outlook.com (10.58.52.185) with Microsoft SMTP Server (TLS) id 15.1.154.14 via Frontend Transport; Fri, 24 Apr 2015 19:31:25 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:51821 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1YljF9-0001mT-G1; Fri, 24 Apr 2015 12:26:31 -0700 Received: from [127.0.0.1] (port=33444 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1YljJs-0001FF-EV; Fri, 24 Apr 2015 12:31:24 -0700 Received: from xsj-tvapsmtp02 (xsj-tvapsmtp02.xilinx.com [172.16.1.203]) by tsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id t3OJRKY2005339; Fri, 24 Apr 2015 12:27:21 -0700 Received: from [172.19.74.49] (port=38245 helo=xsjsorenbubuntu.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1YljJr-0001Ez-A6; Fri, 24 Apr 2015 12:31:23 -0700 From: Peter Crosthwaite To: Date: Fri, 24 Apr 2015 12:31:23 -0700 Message-ID: <988e4d7b6a0de14779dbc1e43c403453ac764ca2.1429903602.git.peter.crosthwaite@xilinx.com> X-Mailer: git-send-email 2.3.6.3.g2cc70ee In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-7.5.0.1018-21500.005 X-TM-AS-Result: No--9.763-7.0-31-10 X-imss-scan-details: No--9.763-7.0-31-10 X-TMASE-MatchedRID: uvmf2XsR/xldleeOihB1yLMjW/sniEQK7h2RrsKOiu3xxaAXDrCns/Go cFkwoSa3fQFkOfrNmj8OOhIccKNZY4X1GrR5BFjUYwaJXrf2IXRMkOX0UoduuQqiCYa6w8tveAZ CFfmrKZf8FboAKc+GIyllOEsEXOtSAVmI7g+zuEmeAiCmPx4NwBnUJ0Ek6yhjxEHRux+uk8jHUU +U0ACZwNX8FypSG2AetjFz3l+/3W2dVPU/7oLQvES0WzvjPmggnqg/VrSZEiM= X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.96; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(339900001)(199003)(189002)(6806004)(86362001)(50226001)(77096005)(19580405001)(19580395003)(575784001)(77156002)(46102003)(48376002)(64026002)(87936001)(50986999)(85426001)(62966003)(36756003)(76176999)(105606002)(106466001)(2351001)(229853001)(50466002)(118296001)(92566002)(33646002)(47776003)(71366001)(110136001)(2950100001)(107986001)(4001430100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1AFFO11HUB050; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1AFFO11HUB050; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006)(3002001); SRVR:BN1AFFO11HUB050; BCL:0; PCL:0; RULEID:; SRVR:BN1AFFO11HUB050; X-Forefront-PRVS: 05568D1FF7 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2015 19:31:25.4493 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.96]; Helo=[xsj-tvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1AFFO11HUB050 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 157.56.110.95 Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, zach.pfeffer@xilinx.com, jues@xilinx.com, ozaki.ryota@gmail.com, michals@xilinx.com Subject: [Qemu-devel] [PATCH target-arm v5 02/14] target-arm: cpu64: Add support for cortex-a53 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add the ARM cortex A53 processor definition. Similar to A57, but with different L1 I cache policy, phys addr size and different cache geometries. The cache sizes is implementation configurable, but use these values (from Xilinx Zynq MPSoC) as a default until cache size configurability is added. Signed-off-by: Peter Crosthwaite --- Changed since v4: Fix a53/a57 typo in commit message (Ozaki) Use standalone init fn rather than a57-shared one (PMM). Changed since v2: Added dtb compatible string target-arm/cpu64.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/target-arm/cpu64.c b/target-arm/cpu64.c index 13e042e..bf7dd68 100644 --- a/target-arm/cpu64.c +++ b/target-arm/cpu64.c @@ -143,6 +143,56 @@ static void aarch64_a57_initfn(Object *obj) define_arm_cp_regs(cpu, cortex_a57_a53_cp_reginfo); } +static void aarch64_a53_initfn(Object *obj) +{ + ARMCPU *cpu = ARM_CPU(obj); + + cpu->dtb_compatible = "arm,cortex-a53"; + set_feature(&cpu->env, ARM_FEATURE_V8); + set_feature(&cpu->env, ARM_FEATURE_VFP4); + set_feature(&cpu->env, ARM_FEATURE_NEON); + set_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER); + set_feature(&cpu->env, ARM_FEATURE_AARCH64); + set_feature(&cpu->env, ARM_FEATURE_CBAR_RO); + set_feature(&cpu->env, ARM_FEATURE_V8_AES); + set_feature(&cpu->env, ARM_FEATURE_V8_SHA1); + set_feature(&cpu->env, ARM_FEATURE_V8_SHA256); + set_feature(&cpu->env, ARM_FEATURE_V8_PMULL); + set_feature(&cpu->env, ARM_FEATURE_CRC); + cpu->midr = 0x410fd034; + cpu->reset_fpsid = 0x41034070; + cpu->mvfr0 = 0x10110222; + cpu->mvfr1 = 0x12111111; + cpu->mvfr2 = 0x00000043; + cpu->ctr = 0x84448004; /* L1Ip = VIPT */ + cpu->reset_sctlr = 0x00c50838; + cpu->id_pfr0 = 0x00000131; + cpu->id_pfr1 = 0x00011011; + cpu->id_dfr0 = 0x03010066; + cpu->id_afr0 = 0x00000000; + cpu->id_mmfr0 = 0x10101105; + cpu->id_mmfr1 = 0x40000000; + cpu->id_mmfr2 = 0x01260000; + cpu->id_mmfr3 = 0x02102211; + cpu->id_isar0 = 0x02101110; + cpu->id_isar1 = 0x13112111; + cpu->id_isar2 = 0x21232042; + cpu->id_isar3 = 0x01112131; + cpu->id_isar4 = 0x00011142; + cpu->id_isar5 = 0x00011121; + cpu->id_aa64pfr0 = 0x00002222; + cpu->id_aa64dfr0 = 0x10305106; + cpu->id_aa64isar0 = 0x00011120; + cpu->id_aa64mmfr0 = 0x00001122; /* 40 bit physical addr */ + cpu->dbgdidr = 0x3516d000; + cpu->clidr = 0x0a200023; + cpu->ccsidr[0] = 0x700fe01a; /* 32KB L1 dcache */ + cpu->ccsidr[1] = 0x201fe00a; /* 32KB L1 icache */ + cpu->ccsidr[2] = 0x707fe07a; /* 1024KB L2 cache */ + cpu->dcz_blocksize = 4; /* 64 bytes */ + define_arm_cp_regs(cpu, cortex_a57_a53_cp_reginfo); +} + #ifdef CONFIG_USER_ONLY static void aarch64_any_initfn(Object *obj) { @@ -170,6 +220,7 @@ typedef struct ARMCPUInfo { static const ARMCPUInfo aarch64_cpus[] = { { .name = "cortex-a57", .initfn = aarch64_a57_initfn }, + { .name = "cortex-a53", .initfn = aarch64_a53_initfn }, #ifdef CONFIG_USER_ONLY { .name = "any", .initfn = aarch64_any_initfn }, #endif