From patchwork Tue Jul 16 12:25:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 18379 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0FFFC2397D for ; Tue, 16 Jul 2013 12:54:19 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id t10sf805792eei.5 for ; Tue, 16 Jul 2013 05:54:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=52+sAmt4dsaU0Z5VM86XvFNAOR/5cr/ExdBAFwupsdM=; b=I3eXKMD/6BjFlbw2CQbD0xq7IZ5NWszoPOT9oUbPUYRuAOXrfuuzSfXxi6HMtgV1Eu nnf1edIzopZ7lEmLhn3ku4C97PQ6ujw6lZttxJMY0OzJqu0XYNW7TjUa8ptoUzWTHca9 0kyscVpWh6cNfID6DDh4gLFCrNOCoAL4UfJTqKfgRNPI11qJMRqnfpZU2cjnTkLbKsIN Oif9F1O47j5AJpbzickxxiCa37nCf+9aXQUbdA6C7uX7HCn5bKZViJGYfBlFElDzpBL3 fmRzMp8jg8xiJC9ROog9zHIZsJ4jCusUkIew07DSntlGl+mYk+eKsdJNTB6rH+MU85XI KaDQ== X-Received: by 10.180.88.104 with SMTP id bf8mr826516wib.3.1373979259139; Tue, 16 Jul 2013 05:54:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.75.204 with SMTP id e12ls144651wiw.22.gmail; Tue, 16 Jul 2013 05:54:18 -0700 (PDT) X-Received: by 10.180.36.107 with SMTP id p11mr1075788wij.31.1373979258947; Tue, 16 Jul 2013 05:54:18 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id lv10si533120wjb.158.2013.07.16.05.54.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Jul 2013 05:54:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id pa12so444710veb.25 for ; Tue, 16 Jul 2013 05:54:17 -0700 (PDT) X-Received: by 10.52.91.202 with SMTP id cg10mr323923vdb.85.1373979257879; Tue, 16 Jul 2013 05:54:17 -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.220.149.77 with SMTP id s13csp118520vcv; Tue, 16 Jul 2013 05:54:17 -0700 (PDT) X-Received: by 10.194.242.69 with SMTP id wo5mr979458wjc.30.1373979256528; Tue, 16 Jul 2013 05:54:16 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id n9si559134wic.10.2013.07.16.05.54.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 16 Jul 2013 05:54:16 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Uz4Jd-0007XZ-Pu; Tue, 16 Jul 2013 13:25:13 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, kvmarm@lists.cs.columbia.edu, Anthony Liguori , Alexander Graf , KONRAD Frederic , David Gibson , Peter Crosthwaite Subject: [PATCH v3 7/8] vexpress: Make VEDBoardInfo extend arm_boot_info Date: Tue, 16 Jul 2013 13:25:11 +0100 Message-Id: <1373977512-28932-8-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1373977512-28932-1-git-send-email-peter.maydell@linaro.org> References: <1373977512-28932-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQkIoEAc5FnN350n2plF3t4/W2ktmWZ2h+tKjePywnjM3VoUSzLXmd3B7NdJ92V9A6XUT8hC X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , Make the VEDBoardInfo struct extend arm_boot_info; this will allow us to get at the VEDBoardInfo information inside callbacks from arm/boot code. Signed-off-by: Peter Maydell --- hw/arm/vexpress.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 7d1b823..0f15337 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -36,8 +36,6 @@ #define VEXPRESS_FLASH_SIZE (64 * 1024 * 1024) #define VEXPRESS_FLASH_SECT_SIZE (256 * 1024) -static struct arm_boot_info vexpress_binfo; - /* Address maps for peripherals: * the Versatile Express motherboard has two possible maps, * the "legacy" one (used for A9) and the "Cortex-A Series" @@ -153,6 +151,7 @@ typedef void DBoardInitFn(const VEDBoardInfo *daughterboard, qemu_irq *pic); struct VEDBoardInfo { + struct arm_boot_info bootinfo; const hwaddr *motherboard_map; hwaddr loader_start; const hwaddr gic_cpu_if_addr; @@ -272,7 +271,7 @@ static const uint32_t a9_clocks[] = { 66670000, /* Test chip reference clock: 66.67MHz */ }; -static const VEDBoardInfo a9_daughterboard = { +static VEDBoardInfo a9_daughterboard = { .motherboard_map = motherboard_legacy_map, .loader_start = 0x60000000, .gic_cpu_if_addr = 0x1e000100, @@ -384,7 +383,7 @@ static const uint32_t a15_clocks[] = { 40000000, /* OSCCLK8: 40MHz : DDR2 PLL reference */ }; -static const VEDBoardInfo a15_daughterboard = { +static VEDBoardInfo a15_daughterboard = { .motherboard_map = motherboard_aseries_map, .loader_start = 0x80000000, .gic_cpu_if_addr = 0x2c002000, @@ -396,7 +395,7 @@ static const VEDBoardInfo a15_daughterboard = { .init = a15_daughterboard_init, }; -static void vexpress_common_init(const VEDBoardInfo *daughterboard, +static void vexpress_common_init(VEDBoardInfo *daughterboard, QEMUMachineInitArgs *args) { DeviceState *dev, *sysctl, *pl041; @@ -524,17 +523,17 @@ static void vexpress_common_init(const VEDBoardInfo *daughterboard, /* VE_DAPROM: not modelled */ - vexpress_binfo.ram_size = args->ram_size; - vexpress_binfo.kernel_filename = args->kernel_filename; - vexpress_binfo.kernel_cmdline = args->kernel_cmdline; - vexpress_binfo.initrd_filename = args->initrd_filename; - vexpress_binfo.nb_cpus = smp_cpus; - vexpress_binfo.board_id = VEXPRESS_BOARD_ID; - vexpress_binfo.loader_start = daughterboard->loader_start; - vexpress_binfo.smp_loader_start = map[VE_SRAM]; - vexpress_binfo.smp_bootreg_addr = map[VE_SYSREGS] + 0x30; - vexpress_binfo.gic_cpu_if_addr = daughterboard->gic_cpu_if_addr; - arm_load_kernel(ARM_CPU(first_cpu), &vexpress_binfo); + daughterboard->bootinfo.ram_size = args->ram_size; + daughterboard->bootinfo.kernel_filename = args->kernel_filename; + daughterboard->bootinfo.kernel_cmdline = args->kernel_cmdline; + daughterboard->bootinfo.initrd_filename = args->initrd_filename; + daughterboard->bootinfo.nb_cpus = smp_cpus; + daughterboard->bootinfo.board_id = VEXPRESS_BOARD_ID; + daughterboard->bootinfo.loader_start = daughterboard->loader_start; + daughterboard->bootinfo.smp_loader_start = map[VE_SRAM]; + daughterboard->bootinfo.smp_bootreg_addr = map[VE_SYSREGS] + 0x30; + daughterboard->bootinfo.gic_cpu_if_addr = daughterboard->gic_cpu_if_addr; + arm_load_kernel(ARM_CPU(first_cpu), &daughterboard->bootinfo); } static void vexpress_a9_init(QEMUMachineInitArgs *args)