From patchwork Fri Jul 12 20:37:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 18349 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3EC8C25E05 for ; Fri, 12 Jul 2013 20:54:40 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l8sf10523343yen.2 for ; Fri, 12 Jul 2013 13:54:39 -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=JwM5O7ehn3+j8tkhdLJAYFRx19f2HdkZ1zleYoEqNMA=; b=KQ2Od5ITOOPSysYgISl/NV1NJeIFWu3BbS1EtMSlTVxVAz96WmF+DG9zGzrBUWVkz2 Almy2AC347Z41uqwRUXfL6pWAs9CbJn6LCtyNoLqJQXQMdG1Mk8ZricwPYhEkLDj2aKB JynWFSUi2arwwapsBA1mdIaUVRJAjT02yPq0whjziCfj2wlGyufoBEd/FaoQ4jtlZM0N HssVGVsCgCV1zlPs9Kp+XvZLykvhkOKlPH2L8+kFQ6IiEC4Wn3PczUx61wky6cfMwCEj lHwtsFhIJQTM1tJtMrfNVHNAoDPsEBzzyQ03AJr2pZdmBY+wdCWr/9HiGzHBREiQv+ns q3hQ== X-Received: by 10.224.86.200 with SMTP id t8mr49289564qal.0.1373662479624; Fri, 12 Jul 2013 13:54:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.129.69 with SMTP id nu5ls3168801qeb.77.gmail; Fri, 12 Jul 2013 13:54:39 -0700 (PDT) X-Received: by 10.220.143.140 with SMTP id v12mr25462701vcu.95.1373662479248; Fri, 12 Jul 2013 13:54:39 -0700 (PDT) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id ex7si12708551vdb.31.2013.07.12.13.54.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Jul 2013 13:54:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.45 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.45; Received: by mail-vb0-f45.google.com with SMTP id p14so1883944vbm.4 for ; Fri, 12 Jul 2013 13:54:39 -0700 (PDT) X-Received: by 10.52.91.202 with SMTP id cg10mr21452529vdb.85.1373662479099; Fri, 12 Jul 2013 13:54:39 -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 s13csp148410vcv; Fri, 12 Jul 2013 13:54:38 -0700 (PDT) X-Received: by 10.15.34.77 with SMTP id d53mr48606615eev.95.1373662477616; Fri, 12 Jul 2013 13:54:37 -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 s8si34238594ees.358.2013.07.12.13.54.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Jul 2013 13:54:37 -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 1Uxk5P-00069f-NR; Fri, 12 Jul 2013 21:37:03 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Anthony Liguori , Alexander Graf , David Gibson , kvmarm@lists.cs.columbia.edu Subject: [PATCH v2 7/8] vexpress: Make VEDBoardInfo extend arm_boot_info Date: Fri, 12 Jul 2013 21:37:01 +0100 Message-Id: <1373661422-23606-8-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1373661422-23606-1-git-send-email-peter.maydell@linaro.org> References: <1373661422-23606-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQkrx7Uqqg9m9hAOxb+eycaLOowmP6GEr+PNYGNE3KGVAEZTHF+tpCPU9VbZhLzgf9qxbZgE X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.45 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 fd18b60..d1c28aa 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" @@ -150,6 +148,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; @@ -269,7 +268,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, @@ -381,7 +380,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, @@ -393,7 +392,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; @@ -509,17 +508,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)