From patchwork Sat Jul 2 01:07:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 9210655 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB28360752 for ; Sat, 2 Jul 2016 01:11:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B15B6286C7 for ; Sat, 2 Jul 2016 01:11:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92425286CE; Sat, 2 Jul 2016 01:11:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DB00C286C7 for ; Sat, 2 Jul 2016 01:11:33 +0000 (UTC) Received: from localhost ([::1]:36520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ9T2-0008Bc-NP for patchwork-qemu-devel@patchwork.kernel.org; Fri, 01 Jul 2016 21:11:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ9PH-0004nL-M8 for qemu-devel@nongnu.org; Fri, 01 Jul 2016 21:07:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJ9PE-0001vy-GH for qemu-devel@nongnu.org; Fri, 01 Jul 2016 21:07:39 -0400 Received: from mail-sn1nam02on0050.outbound.protection.outlook.com ([104.47.36.50]:24858 helo=NAM02-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ9PE-0001vt-76 for qemu-devel@nongnu.org; Fri, 01 Jul 2016 21:07:36 -0400 Received: from BL2NAM02FT034.eop-nam02.prod.protection.outlook.com (10.152.76.54) by BL2NAM02HT255.eop-nam02.prod.protection.outlook.com (10.152.76.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.534.7; Sat, 2 Jul 2016 01:07:34 +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 BL2NAM02FT034.mail.protection.outlook.com (10.152.77.161) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Sat, 2 Jul 2016 01:07:33 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:39548 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1bJ9PA-0006cT-W6; Fri, 01 Jul 2016 18:07:32 -0700 Received: from [127.0.0.1] (port=48388 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1bJ9PA-0003bk-Sh; Fri, 01 Jul 2016 18:07:32 -0700 Received: from xsj-tvapsmtp02 (smtptest.xilinx.com [172.16.1.203]) by tsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u6210vDC007077; Fri, 1 Jul 2016 18:00:57 -0700 Received: from [172.19.74.182] (port=38980 helo=xsjalistai50.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1bJ9PA-0003bh-1r; Fri, 01 Jul 2016 18:07:32 -0700 From: Alistair Francis To: , Date: Fri, 1 Jul 2016 18:07:14 -0700 Message-ID: <0f99bfcbe8cf8efdeb1b0ec39fd188b1a0e72a9c.1467417982.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-22424.005 X-TM-AS-Result: No--12.457-7.0-31-10 X-imss-scan-details: No--12.457-7.0-31-10 X-TMASE-MatchedRID: pAe7z0hdhKuwUUn+V9wZLd35+5/2RxqmLeYR8ZNMrXvAsr1WBnqxF8fc 5pKTMK1bLSHDQi/tZU9GZriJw3SdwTlcyhHfhEXKW7gz/Gbgpl6fWMucVYsOKGL2dfjbFyVXJst K1NXQZJdoLxJqLVJUxLlR9oIyPWKEeQUwdSI3LwJ/Rg79nViAdrDdtIEs4IqylQwQKaQE/6V3Uo 1OB3WVq+UKxMc1qIvzhDScEaenqAPMHUInqqZ02gwfhKwa9GwDoprEeoZHCQIcXmBZ3mI5Sfm6Y BuSxOzzci6AUyYpyt8prrdpM0o/mcgNYoWONkdvSDkh6bW+bcc3blcgNAu3dsnJhTYnTng90l/N X3Dm9e5smZC6qolIzcVotXRTAFsvkfRhdidsajMURSScn+QSXt0H8LFZNFG7bkV4e2xSge4urZP NzGdGmBUBAt4wSeSW6yV6+9DpMdeXD5HwUBP5KlgpWCbva+Mm 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)(1109001)(1110001)(339900001)(199003)(189002)(50986999)(76176999)(19580395003)(11100500001)(19580405001)(6806005)(85426001)(2906002)(9786002)(48376002)(586003)(71366001)(4326007)(64026002)(86362001)(105606002)(50226002)(47776003)(50466002)(229853001)(33646002)(106466001)(77096005)(118296001)(87936001)(189998001)(2950100001)(5001770100001)(92566002)(8676002)(81166006)(7846002)(7696003)(81156014)(305945005)(8936002)(5003940100001)(356003)(36756003)(5003600100003)(41533002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2NAM02HT255; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; PTR:unknown-60-96.xilinx.com; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 7a00e7be-2bde-4d66-b1a9-08d3a2154012 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2NAM02HT255; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13018025)(8121501046)(13017025)(5005006)(13023025)(13024025)(13015025)(10201501046)(3002001)(6055026); SRVR:BL2NAM02HT255; BCL:0; PCL:0; RULEID:; SRVR:BL2NAM02HT255; X-Forefront-PRVS: 0991CAB7B3 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2016 01:07:33.9695 (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: BL2NAM02HT255 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.50 Subject: [Qemu-devel] [PATCH v8 5/5] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alistair Francis --- V8: - Improve documentation V6: - Fixup documentation V4: - Re-write to be more comprehensive docs/generic-loader.txt | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 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..34684fc --- /dev/null +++ b/docs/generic-loader.txt @@ -0,0 +1,60 @@ +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. 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. + +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