From patchwork Wed May 6 22:50:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 469156 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 3004A14027F for ; Thu, 7 May 2015 08:51:38 +1000 (AEST) Received: from localhost ([::1]:47362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq8AC-0003pB-EZ for incoming@patchwork.ozlabs.org; Wed, 06 May 2015 18:51:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq89Q-0002Vu-BU for qemu-devel@nongnu.org; Wed, 06 May 2015 18:50:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq89K-00067P-W5 for qemu-devel@nongnu.org; Wed, 06 May 2015 18:50:48 -0400 Received: from mail-bn1bon0098.outbound.protection.outlook.com ([157.56.111.98]:3774 helo=na01-bn1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq89K-00066k-ES for qemu-devel@nongnu.org; Wed, 06 May 2015 18:50:42 -0400 Received: from BN1BFFO11FD049.protection.gbl (10.58.144.32) by BN1BFFO11HUB031.protection.gbl (10.58.144.178) with Microsoft SMTP Server (TLS) id 15.1.160.8; Wed, 6 May 2015 22:50:41 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BN1BFFO11FD049.mail.protection.outlook.com (10.58.145.4) with Microsoft SMTP Server (TLS) id 15.1.160.8 via Frontend Transport; Wed, 6 May 2015 22:50:41 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1Yq84M-00018d-QS; Wed, 06 May 2015 15:45:34 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1Yq89H-00029R-FA; Wed, 06 May 2015 15:50:39 -0700 Received: from xsj-pvapsmtp01 (xsj-mail.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id t46Mo7jW029188; Wed, 6 May 2015 15:50:07 -0700 Received: from [172.19.74.49] (helo=xsjsorenbubuntu.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1Yq897-00027v-Js; Wed, 06 May 2015 15:50:29 -0700 From: Peter Crosthwaite To: Date: Wed, 6 May 2015 15:50:29 -0700 Message-ID: <9525df7f9c9a79a18a4549b6accd7b6a3f1bee93.1430952182.git.peter.crosthwaite@xilinx.com> X-Mailer: git-send-email 2.4.0.3.ge0ccc3b.dirty In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-7.5.0.1018-21524.005 X-TM-AS-User-Approved-Sender: Yes;Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(189002)(199003)(63266004)(5001960100002)(107886002)(110136002)(62966003)(77156002)(575784001)(86362001)(50986999)(92566002)(189998001)(36756003)(36386004)(2950100001)(77096005)(229853001)(6806004)(19580395003)(19580405001)(33646002)(46102003)(50466002)(5001920100001)(48376002)(2351001)(76176999)(118296001)(47776003)(106466001)(50226001)(87936001)(107986001)(4001430100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1BFFO11HUB031; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1BFFO11HUB031; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BN1BFFO11HUB031; BCL:0; PCL:0; RULEID:; SRVR:BN1BFFO11HUB031; X-Forefront-PRVS: 0568F32D91 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2015 22:50:41.0816 (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.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1BFFO11HUB031 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 157.56.111.98 Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, zach.pfeffer@xilinx.com, jues@xilinx.com, ozaki.ryota@gmail.com, alistair.francis@xilinx.com, michals@xilinx.com Subject: [Qemu-devel] [PATCH target-arm v7 15/15] arm: xlnx-ep108: Add bootloading 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 bootloader support using standard ARM bootloader. Reviewed-by: Alistair Francis Tested-by: Alistair Francis Signed-off-by: Peter Crosthwaite --- changed since v4: Add loader_start field Make commit message body standalone. hw/arm/xlnx-ep108.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/arm/xlnx-ep108.c b/hw/arm/xlnx-ep108.c index 46f145b..b924f5e 100644 --- a/hw/arm/xlnx-ep108.c +++ b/hw/arm/xlnx-ep108.c @@ -28,6 +28,8 @@ typedef struct XlnxEP108 { /* Max 2GB RAM */ #define EP108_MAX_RAM_SIZE 0x80000000ull +static struct arm_boot_info xlnx_ep108_binfo; + static void xlnx_ep108_init(MachineState *machine) { XlnxEP108 *s = g_new0(XlnxEP108, 1); @@ -57,6 +59,13 @@ static void xlnx_ep108_init(MachineState *machine) memory_region_allocate_system_memory(&s->ddr_ram, NULL, "ddr-ram", machine->ram_size); memory_region_add_subregion(get_system_memory(), 0, &s->ddr_ram); + + xlnx_ep108_binfo.ram_size = machine->ram_size; + xlnx_ep108_binfo.kernel_filename = machine->kernel_filename; + xlnx_ep108_binfo.kernel_cmdline = machine->kernel_cmdline; + xlnx_ep108_binfo.initrd_filename = machine->initrd_filename; + xlnx_ep108_binfo.loader_start = 0; + arm_load_kernel(&s->soc.cpu[0], &xlnx_ep108_binfo); } static QEMUMachine xlnx_ep108_machine = {