From patchwork Thu Mar 3 19:42:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 8495871 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EC6AEC0553 for ; Thu, 3 Mar 2016 19:45:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46A8C20386 for ; Thu, 3 Mar 2016 19:45:31 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 66D3C2037C for ; Thu, 3 Mar 2016 19:45:30 +0000 (UTC) Received: from localhost ([::1]:37031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abZBh-0008J2-Jm for patchwork-qemu-devel@patchwork.kernel.org; Thu, 03 Mar 2016 14:45:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abZBQ-00089N-NA for qemu-devel@nongnu.org; Thu, 03 Mar 2016 14:45:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abZBK-0001aR-KT for qemu-devel@nongnu.org; Thu, 03 Mar 2016 14:45:12 -0500 Received: from mail-cys01nam02on0082.outbound.protection.outlook.com ([104.47.37.82]:6704 helo=NAM02-CY1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abZBK-0001ZA-Cz for qemu-devel@nongnu.org; Thu, 03 Mar 2016 14:45:06 -0500 Received: from BL2NAM02FT019.eop-nam02.prod.protection.outlook.com (10.152.76.59) by BL2NAM02HT049.eop-nam02.prod.protection.outlook.com (10.152.76.208) with Microsoft SMTP Server (TLS) id 15.1.427.7; Thu, 3 Mar 2016 19:45:04 +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 BL2NAM02FT019.mail.protection.outlook.com (10.152.77.166) with Microsoft SMTP Server (TLS) id 15.1.427.7 via Frontend Transport; Thu, 3 Mar 2016 19:45:03 +0000 Received: from 172-16-1-203.xilinx.com ([172.16.1.203]:39836 helo=xsj-tvapsmtp02.xilinx.com) by xsj-tvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1abZBH-0002OW-3w; Thu, 03 Mar 2016 11:45:03 -0800 Received: from [127.0.0.1] (port=40780 helo=tsj-smtp-dlp1.xlnx.xilinx.com) by xsj-tvapsmtp02.xilinx.com with esmtp (Exim 4.63) (envelope-from ) id 1abZBG-0003EC-VS; Thu, 03 Mar 2016 11:45:03 -0800 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 u23JdEG9015272; Thu, 3 Mar 2016 11:39:14 -0800 Received: from [172.19.74.182] (port=36992 helo=xsjalistai50.xlnx.xilinx.com) by xsj-tvapsmtp02 with esmtp (Exim 4.63) (envelope-from ) id 1abZBG-0003DU-5t; Thu, 03 Mar 2016 11:45:02 -0800 From: Alistair Francis To: Date: Thu, 3 Mar 2016 11:42:11 -0800 Message-ID: <01f3651dfb794a886510df12882f8a26d6c75eb0.1456968047.git.alistair.francis@xilinx.com> X-Mailer: git-send-email 2.5.0 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-22168.006 X-TM-AS-Result: No--12.751-7.0-31-10 X-imss-scan-details: No--12.751-7.0-31-10 X-TMASE-MatchedRID: OHah78fJxrMT6uw2YrKcE9qey+9jac52WOr7yj0LesXHkH7uosEn7Ed0 Rzx07LDVu1YWrIMJBFIUZ7mqlsLL7wcSBA/LYDihQ16yrdVRtxx9/z2DYqHY7cSiwizsgluQQxt 1j3x9x3g96WZQh47ZuI4D80Hl551aBLyEMF1afqjqsFlQXzLr6PHo9NwPFKnlTgrQgyTabcbIZx x+ioX3TXR4MLhRWS37hZcoChWGKIdwBC2N1YC28QwfhKwa9GwDoprEeoZHCQIcXmBZ3mI5Sfm6Y BuSxOzzci6AUyYpyt8iALzX6dQtnaYFcZuboHd5k3ewifG2MNO94JvJnfFrHosV3GTNaSF4o8WM kQWv6iXBcIE78YqRWo6HM5rqDwqtXzNozqbJZ+BaqS7ytMU8pVSIDwfrFhvO5NokY6VzhbICvWX K/iJWUw== 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)(36756003)(5003600100002)(106466001)(2351001)(50986999)(87936001)(47776003)(118296001)(76176999)(229853001)(81166005)(85426001)(50226001)(5008740100001)(105606002)(64026002)(92566002)(189998001)(6806005)(77096005)(1096002)(1220700001)(2950100001)(86362001)(586003)(33646002)(71366001)(110136002)(4326007)(2906002)(11100500001)(5003940100001)(19580395003)(50466002)(19580405001)(48376002)(41533002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2NAM02HT049; H:xsj-tvapsmtpgw01; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 6bd1190e-72e7-4999-1805-08d3439c50ef X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2NAM02HT049; X-Microsoft-Antispam-PRVS: <418e94758d0646adb02c7866922d9318@BL2NAM02HT049.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(13018025)(13017025)(8121501046)(13015025)(13023025)(13024025)(3002001)(10201501046); SRVR:BL2NAM02HT049; BCL:0; PCL:0; RULEID:; SRVR:BL2NAM02HT049; X-Forefront-PRVS: 0870212862 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2016 19:45:03.8365 (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: BL2NAM02HT049 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.37.82 Cc: peter.maydell@linaro.org, armbru@redhat.com, alistair.francis@xilinx.com, crosthwaitepeter@gmail.com, cov@codeaurora.org, pbonzini@redhat.com, afaerber@suse.de Subject: [Qemu-devel] [PATCH v4 3/3] docs: Add a generic loader explanation document 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alistair Francis --- V4: - Re-write to be more comprehensive docs/generic-loader.txt | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 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..b748f2a --- /dev/null +++ b/docs/generic-loader.txt @@ -0,0 +1,56 @@ +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: The loader device supports other options (see the next section) but they + do not apply to setting memory values and will be ignored. + 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 requried if you aren't loading an ELF. + - This specifices 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 specificy 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