From patchwork Thu Aug 21 01:36:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 381842 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 AB37614011D for ; Thu, 21 Aug 2014 11:37:41 +1000 (EST) Received: from localhost ([::1]:58111 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKHJr-0006Hs-Sy for incoming@patchwork.ozlabs.org; Wed, 20 Aug 2014 21:37:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKHJR-0005zH-S5 for qemu-devel@nongnu.org; Wed, 20 Aug 2014 21:37:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKHJI-000459-Qa for qemu-devel@nongnu.org; Wed, 20 Aug 2014 21:37:13 -0400 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]:63425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKHJI-00044Y-H6 for qemu-devel@nongnu.org; Wed, 20 Aug 2014 21:37:04 -0400 Received: by mail-pa0-f47.google.com with SMTP id kx10so13431739pab.20 for ; Wed, 20 Aug 2014 18:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=2T0BvcmzBbws1Q0Fdf11E0M7B9wPMOnh+oWHmvIPHXI=; b=DuBzwLeFQGq8n+BQXKlzXW4W+iK9gIe+x3p1J23x9zdkpWtj+nCpctR3YjhBYJfkOT 2VgbpEJDjATAxmdLlJG45CyxmkhfOQQTF4C/za3v6z2X5HdwwVcd/ht/hX81m6/GlDRZ M3ytSrrElxHNr6DjqvqB6kUHItifqO09hRbWSIUuPG71xOXls5D0CsVpBLThUFzr9hIm rQKHS0IOvY8Al7cLasik9+K3bQwvhCxxjTa46m3FasVLfwdKgZgyB9TBObrKW4U1Re3T sJM4dQhqxEN+jLPL1rUClEPpR1XHVQ4gN1clphJJyXyvyySqMktT5vNyg94CJLM0/JVv 5NwQ== X-Received: by 10.68.164.164 with SMTP id yr4mr57295753pbb.57.1408585023172; Wed, 20 Aug 2014 18:37:03 -0700 (PDT) Received: from localhost (123-243-147-200.static.tpgi.com.au. [123.243.147.200]) by mx.google.com with ESMTPSA id fq1sm23647740pbb.32.2014.08.20.18.37.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 20 Aug 2014 18:37:02 -0700 (PDT) From: Alistair Francis To: qemu-devel@nongnu.org Date: Thu, 21 Aug 2014 11:36:59 +1000 Message-Id: <7dadfa99c7a31615e6df922fb6e2084837e08033.1408584788.git.alistair23@gmail.com> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22f Cc: peter.crosthwaite@xilinx.com Subject: [Qemu-devel] [PATCH v1 1/1] target_arm: Make the reset rom_ptr a property 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 This allows the board to set the reset address, which is required for some boards (the Netduino Plus 2 for example) Signed-off-by: Alistair Francis --- At the moment nothing requires this change, but I have a machine model that I'm working on that requires this Thanks to Peter C for spotting this issue target-arm/cpu-qom.h | 1 + target-arm/cpu.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h index 07f3c9e..7e415f5 100644 --- a/target-arm/cpu-qom.h +++ b/target-arm/cpu-qom.h @@ -138,6 +138,7 @@ typedef struct ARMCPU { uint32_t id_isar3; uint32_t id_isar4; uint32_t id_isar5; + uint32_t rom_address; uint64_t id_aa64pfr0; uint64_t id_aa64pfr1; uint64_t id_aa64dfr0; diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 8199f32..29f9473 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -134,7 +134,7 @@ static void arm_cpu_reset(CPUState *s) uint32_t pc; uint8_t *rom; env->daif &= ~PSTATE_I; - rom = rom_ptr(0); + rom = rom_ptr(cpu->rom_address); if (rom) { /* We should really use ldl_phys here, in case the guest modified flash and reset itself. However images @@ -1020,6 +1020,7 @@ static const ARMCPUInfo arm_cpus[] = { static Property arm_cpu_properties[] = { DEFINE_PROP_BOOL("start-powered-off", ARMCPU, start_powered_off, false), DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0), + DEFINE_PROP_UINT32("rom-address", ARMCPU, rom_address, 0), DEFINE_PROP_END_OF_LIST() };