From patchwork Wed May 1 23:30:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 10925887 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 662B31390 for ; Wed, 1 May 2019 23:31:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52CA828FD7 for ; Wed, 1 May 2019 23:31:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50EBB28FE0; Wed, 1 May 2019 23:31:52 +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=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DF9DB28E6D for ; Wed, 1 May 2019 23:31:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLyg0-0000IO-RA; Wed, 01 May 2019 23:30:12 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLyfz-0000IJ-AY for xen-devel@lists.xenproject.org; Wed, 01 May 2019 23:30:11 +0000 X-Inumbo-ID: 0ef92648-6c69-11e9-843c-bc764e045a96 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 0ef92648-6c69-11e9-843c-bc764e045a96; Wed, 01 May 2019 23:30:09 +0000 (UTC) Received: from localhost (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 861742081C; Wed, 1 May 2019 23:30:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556753408; bh=Z6M/pf7bPFGhq4qyB2zUB0aMEBOgl1UBNwJ9SHMrByQ=; h=Date:From:To:cc:Subject:From; b=vglj5FofD2nzqLpubbn1Ie4vf/ky4TW6eiEfVu6MggwytHItlTR1L1U4YfHuF2kGG 89jdv5KPXMrV4JmQ69NN6H4nPIFnJmluxDMyc+/1xc38RjKBX5DpKITYfrYVxCjPpS qKpOS68pFtnDaoA752vo+ypk6m7UWNLtfZNQ/Ht8= Date: Wed, 1 May 2019 16:30:06 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: julien.grall@arm.com Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-ID: Subject: [Xen-devel] [PATCH] xen/arm: improve dom0less documentation X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, sstabellini@kernel.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Improve Dom0-less documentation: include a complete configuration example. Signed-off-by: Stefano Stabellini Acked-by: Julien Grall diff --git a/docs/features/dom0less.pandoc b/docs/features/dom0less.pandoc index 4e342b7..e076e37 100644 --- a/docs/features/dom0less.pandoc +++ b/docs/features/dom0less.pandoc @@ -23,6 +23,70 @@ booted and the Xen tools to become available, domains created by Xen this way are started right away in parallel. Hence, their boot time is typically much shorter. + +Configuration +------------- + +### Loading binaries into memory ### + +U-Boot needs to load not just Xen, the device tree binary, the dom0 kernel and +ramdisk. It also needs to load the kernel and ramdisk of any additional domains +to boot. For example if this is the bootcmd for Xen and Dom0: + + tftpb 0x1280000 xen.dtb + tftpb 0x0x80000 xen-Image + tftpb 0x1400000 xen.ub + tftpb 0x9000000 xen-rootfs.cpio.gz.u-boot + + bootm 0x1400000 0x9000000 0x1280000 + +If we want to add one DomU with Image-DomU as the DomU kernel +and ramdisk-DomU as DomU ramdisk: + + tftpb 0x1280000 xen.dtb + tftpb 0x80000 xen-Image + tftpb 0x1400000 xen.ub + tftpb 0x9000000 xen-rootfs.cpio.gz.u-boot + + tftpb 0x2000000 Image-DomU + tftpb 0x3000000 ramdisk-DomU + + bootm 0x1400000 0x9000000 0x1280000 + + +### Device Tree configuration ### + +In addition to loading the necessary binaries, we also need to advertise +the presence of the additional VM and its configuration. It is done via +device tree adding a node under /chosen as follows: + + domU1 { +     compatible = "xen,domain"; +     memory = <0x20000>; +    cpus = 1; +     vpl011; + +     module@2000000 { +         compatible = "multiboot,kernel", "multiboot,module"; +         reg = <0x2000000 0xffffff>; +         bootargs = "console=ttyAMA0"; +     }; + +     module@30000000 { +         compatible = "multiboot,ramdisk", "multiboot,module"; +         reg = <0x3000000 0xffffff>; +     }; + }; + +Where memory is the memory of the VM in KBs, cpus is the number of +cpus. module@2000000 and module@3000000 advertise where the kernel and +ramdisk are in memory. + +See docs/misc/arm/device-tree/booting.txt for more information. + +Limitations +----------- + Domains started by Xen at boot time currently have the following limitations: