From patchwork Thu Jul 14 00:03:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 648141 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 3rqbls6jbqz9s9W for ; Thu, 14 Jul 2016 10:14:01 +1000 (AEST) Received: from localhost ([::1]:50661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNUHv-0003C6-RY for incoming@patchwork.ozlabs.org; Wed, 13 Jul 2016 20:13:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNU8U-0007v5-LV for qemu-devel@nongnu.org; Wed, 13 Jul 2016 20:04:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNU8O-0000RM-Nh for qemu-devel@nongnu.org; Wed, 13 Jul 2016 20:04:13 -0400 Received: from mail-bl2nam02on0042.outbound.protection.outlook.com ([104.47.38.42]:45792 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNU8O-0000RE-IL for qemu-devel@nongnu.org; Wed, 13 Jul 2016 20:04:08 -0400 Received: from SN1NAM02FT013.eop-nam02.prod.protection.outlook.com (10.152.72.57) by SN1NAM02HT206.eop-nam02.prod.protection.outlook.com (10.152.73.242) with Microsoft SMTP Server (TLS) id 15.1.523.9; Thu, 14 Jul 2016 00:04:06 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; redhat.com; dkim=none (message not signed) header.d=none; redhat.com; dmarc=none action=none header.from=xilinx.com; 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 SN1NAM02FT013.mail.protection.outlook.com (10.152.72.98) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.534.7 via Frontend Transport; Thu, 14 Jul 2016 00:04:06 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:38591 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1bNU8L-0007OK-GC; Wed, 13 Jul 2016 17:04:05 -0700 Received: from [127.0.0.1] (port=43878 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1bNU8L-0001AP-D5; Wed, 13 Jul 2016 17:04:05 -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 u6DNvPb3011038; Wed, 13 Jul 2016 16:57:25 -0700 Received: from [172.19.74.182] (port=53736 helo=xsjalistai50.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1bNU8K-0001AM-Hn; Wed, 13 Jul 2016 17:04:04 -0700 From: Alistair Francis To: , Date: Wed, 13 Jul 2016 17:03:42 -0700 Message-ID: <8c6ff4236509ad618631fe71132d89e84eb63a98.1468454556.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-RCIS-Action: ALLOW X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22448.005 X-TM-AS-Result: No--11.887-7.0-31-10 X-imss-scan-details: No--11.887-7.0-31-10 X-TMASE-MatchedRID: BEHay6f264NxARVfMijQnXQEQEU5OIefu56wFPSkMVE79nmegzbgm91R Lay5R3KQBfHo/XH/e1VcBrZ3/jmPxGJZXQNDzktSyeVujmXuYYX01irNvag5a61mtSCXczSRXtx qCQQbXXi4qMQaURTY6hYC4jP1GnU/EXiXWg39uY6jrlYm3WTU7zpd9sHVoyNePv8WqsrGDLiH5L je9KlmXRs9u85pk8chigSdHW5gE9J5F2Bxez3bF7MjW/sniEQK9kKHsg3xrgDaqqH/oHw+kWn+Z klyqxAEDK7m9QMAAULqo1eQpNi/+nBUeTqf+P8EyDp+jSvEtWu8416FjQIJAQRMkp8CR9TCzG6W M9kTmvlL7i1BXLtDKNgoGn5LUqdcnVzTgrSv7smd4hCa7xSZoUPeRdiIlVJEixXcZM1pIXijxYy RBa/qJcFwgTvxipFajoczmuoPCq1rLNs43ym3n9HdYgHcV/vfnVptE6ewELDLeAhnkfpmxqwYlM 98mWQ5 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.96; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(36756003)(71366001)(19580405001)(5003600100003)(189998001)(229853001)(9786002)(106466001)(105606002)(47776003)(7696003)(305945005)(7846002)(356003)(50226002)(50466002)(2950100001)(5001770100001)(77096005)(19580395003)(8936002)(5003940100001)(11100500001)(92566002)(33646002)(118296001)(64026002)(85426001)(50986999)(586003)(86362001)(8676002)(81166006)(48376002)(81156014)(2906002)(4326007)(87936001)(76176999)(41533002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1NAM02HT206; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; PTR:unknown-60-96.xilinx.com; MX:1; A:1; CAT:NONE; LANG:en; CAT:NONE; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: fff2bbf9-8c7c-496d-7ec2-08d3ab7a5f5a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1NAM02HT206; X-Microsoft-Antispam-PRVS: <46af5e25c73042f4a9fbc19af209e9b9@SN1NAM02HT206.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13017025)(13024025)(13023025)(5005006)(13015025)(13018025)(3002001)(10201501046)(6055026); SRVR:SN1NAM02HT206; BCL:0; PCL:0; RULEID:; SRVR:SN1NAM02HT206; X-Forefront-PRVS: 00032065B2 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2016 00:04:06.0060 (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: SN1NAM02HT206 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.38.42 Subject: [Qemu-devel] [PATCH v9 8/8] docs: Add a generic loader explanation document X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cov@codeaurora.org, crosthwaitepeter@gmail.com, pbonzini@redhat.com, armbru@redhat.com, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alistair Francis --- V9: - Clarify the image loading options V8: - Improve documentation V6: - Fixup documentation V4: - Re-write to be more comprehensive docs/generic-loader.txt | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docs/generic-loader.txt diff --git a/docs/generic-loader.txt b/docs/generic-loader.txt new file mode 100644 index 0000000..16c11ee --- /dev/null +++ b/docs/generic-loader.txt @@ -0,0 +1,63 @@ +Copyright (c) 2016 Xilinx Inc. + +This work is licensed under the terms of the GNU GPL, version 2 or later. See +the COPYING file in the top-level directory. + + +The 'loader' device allows the user to load multiple images or values into +QEMU at startup. + +Loading Memory Values +--------------------- +The loader device allows memory values to be set from the command line. This +can be done by following the syntax below: + + -device loader,addr=,data=,data-len= + -device loader,addr=,cpu-num= + + - The address to store the data or the value to use as the + CPU's PC. + - The value to be written to the address. The maximum size of + the data is 8 bytes. + - The length of the data in bytes. This argument must be + included if the data argument is. + - Set to true if the data to be stored on the guest should be + written as big endian data. The default is to write little + endian data. + - This will cause the CPU to be reset and the PC to be set to + the value of addr. + +For all values both hex and decimal values are allowed. By default the values +will be parsed as decimal. To use hex values the user should prefix the number +with a '0x'. + +An example of loading value 0x8000000e to address 0xfd1a0104 is: + -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4 + +Loading Files +------------- +The loader device also allows files to be loaded into memory. This can be done +similarly to setting memory values. The syntax is shown below: + + -device loader,file=,addr=,cpu-num=,force-raw= + + - A file to be loaded into memory + - The addr in memory that the file should be loaded. This is + ignored if you are using an ELF (unless force-raw is true). + This is required if you aren't loading an ELF. + - This specifies the CPU that should be used. This is an + optional argument and will cause the CPU's PC to be set to + where the image is stored or in the case of an ELF file to + the value in the header. This option should only be used + for the boot image. + This will also cause the image to be written to the specified + CPUs address space. + - Forces the file to be treated as a raw image. This can be + used to specify the load address of ELF files. + +For all values both hex and decimal values are allowed. By default the values +will be parsed as decimal. To use hex values the user should prefix the number +with a '0x'. + +An example of loading an ELF file which CPU0 will boot is shown below: + -device loader,file=./images/boot.elf,cpu-num=0