From patchwork Fri May 13 20:37:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 622123 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 3r61x43nqNz9t6D for ; Sat, 14 May 2016 06:41:44 +1000 (AEST) Received: from localhost ([::1]:35854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1Ju1-0005sc-S5 for incoming@patchwork.ozlabs.org; Fri, 13 May 2016 16:41:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1JtO-0004RY-RE for qemu-devel@nongnu.org; Fri, 13 May 2016 16:41:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1JtK-0006aC-IU for qemu-devel@nongnu.org; Fri, 13 May 2016 16:41:01 -0400 Received: from mail-cys01nam02on0059.outbound.protection.outlook.com ([104.47.37.59]:15928 helo=NAM02-CY1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1JtK-0006Zk-8g for qemu-devel@nongnu.org; Fri, 13 May 2016 16:40:58 -0400 Received: from BL2NAM02FT050.eop-nam02.prod.protection.outlook.com (10.152.76.52) by BL2NAM02HT015.eop-nam02.prod.protection.outlook.com (10.152.77.89) with Microsoft SMTP Server (TLS) id 15.1.492.8; Fri, 13 May 2016 20:40:56 +0000 Authentication-Results: spf=fail (sender IP is 149.199.60.96) smtp.mailfrom=xilinx.com; suse.de; dkim=none (message not signed) header.d=none; suse.de; 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 BL2NAM02FT050.mail.protection.outlook.com (10.152.77.101) with Microsoft SMTP Server (TLS) id 15.1.492.8 via Frontend Transport; Fri, 13 May 2016 20:40:54 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:53488 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1b1JtG-00009j-75; Fri, 13 May 2016 13:40:54 -0700 Received: from [127.0.0.1] (port=34096 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1b1JtG-0006hX-3M; Fri, 13 May 2016 13:40:54 -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 u4DKYcv9028239; Fri, 13 May 2016 13:34:38 -0700 Received: from [172.19.74.182] (port=57322 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1b1JtF-0006hU-9s; Fri, 13 May 2016 13:40:53 -0700 From: Alistair Francis To: Date: Fri, 13 May 2016 13:37:26 -0700 Message-ID: <3cf84c0fee6b74443ef1eb1cb1bcf3605e7493e0.1463077144.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-22318.005 X-TM-AS-Result: No--13.128-7.0-31-10 X-imss-scan-details: No--13.128-7.0-31-10 X-TMASE-MatchedRID: ZRL/e0rWEO6wUUn+V9wZLd35+5/2RxqmLeYR8ZNMrXvAsr1WBnqxF8fc 5pKTMK1bLSHDQi/tZU9GZriJw3SdwTlcyhHfhEXKW7gz/Gbgpl6fWMucVYsOKGL2dfjbFyVXJst K1NXQZJdoLxJqLVJUxLlR9oIyPWKEeQUwdSI3LwJ/Rg79nViAdrDdtIEs4IqylQwQKaQE/6V3Uo 1OB3WVq+UKxMc1qIvzhDScEaenqAPCnmsJV55PCxNEPNwNrw/r9kKHsg3xrgDaqqH/oHw+kWn+Z klyqxAEDK7m9QMAAULqo1eQpNi/+vyfYffk8dWk5CghTisABMybKpAlY2y6SRAfwLHOKGmB8iAR W0/sh1d8PzbCA5cseoAy6p60ZV62fJ5/bZ6npdg7AFczfjr/7D7DmdN6a1xx+OsgmzZ3MOAVnv/ tt5245R0ab4Nl9oNtLYYHpJGG39E= X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.96; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(1220700001)(586003)(110136002)(5008740100001)(6806005)(76176999)(64026002)(9786002)(50986999)(92566002)(48376002)(50466002)(87936001)(4326007)(71366001)(81166006)(2906002)(11100500001)(189998001)(50226002)(2351001)(19580395003)(19580405001)(36756003)(118296001)(5003600100002)(105606002)(8676002)(8936002)(106466001)(47776003)(2950100001)(86362001)(229853001)(5003940100001)(33646002)(77096005)(85426001)(41533002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2NAM02HT015; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 935b66c0-7b3d-4d06-e437-08d37b6ee16a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2NAM02HT015; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(13015025)(13023025)(8121501046)(5005006)(13024025)(13018025)(3002001)(10201501046)(6055026); SRVR:BL2NAM02HT015; BCL:0; PCL:0; RULEID:; SRVR:BL2NAM02HT015; X-Forefront-PRVS: 0941B96580 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2016 20:40:54.5213 (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: BL2NAM02HT015 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.37.59 Subject: [Qemu-devel] [PATCH v6 3/3] 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: peter.maydell@linaro.org, armbru@redhat.com, alistair.francis@xilinx.com, crosthwaitepeter@gmail.com, cov@codeaurora.org, pbonzini@redhat.com, afaerber@suse.de Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alistair Francis --- V6: - Fixup documentation V4: - Re-write to be more comprehensive docs/generic-loader.txt | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 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..effb244 --- /dev/null +++ b/docs/generic-loader.txt @@ -0,0 +1,54 @@ +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= + +NOTE: It is also possible to mix the commands above, e.g. include the cpu-num + argument with the data argument. + + - The address to store the data or the value to set the CPUs PC + - The value to be written to the addr. 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. + +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. This option should only be used + for the boot image. + - Forces the file to be treated as a raw image. This can be + used to specify the load address of ELF files. + +An example of loading an ELF file which CPU0 will boot is shown below: + -device loader,file=./images/boot.elf,cpu-num=0