From owner-freebsd-current@freebsd.org Thu Sep 21 03:23:02 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9565AE0E9BB for ; Thu, 21 Sep 2017 03:23:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6F207664D7 for ; Thu, 21 Sep 2017 03:23:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id 6E2DAE0E9BA; Thu, 21 Sep 2017 03:23:02 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DB63E0E9B9 for ; Thu, 21 Sep 2017 03:23:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 300E9664D6 for ; Thu, 21 Sep 2017 03:23:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x230.google.com with SMTP id y126so4151743itb.5 for ; Wed, 20 Sep 2017 20:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=rcOWy7oEW6bODkDcc1a02QEfLEXTWL9dOtQFSEnVduA=; b=Aey1WqgK+Tp36IDL40BRsKBwOwJ3vH8V2jCVN0Qiur6H+x5do3PNdyRrZYerx/Kbs3 ZklNU3yXByMhcd3xKF7s+5xNfoxkyCwpFwAgQ2ANqVf8IkMtyUPhAOQl+nMEwbxWwcc7 fG68UU6xqyADo/Lm8P7lAbyO/5PkPPvnaDnJQndvJF3dkVjEIlV0IFmK8jK+1ALvCeko yt5mkNtgeiZqIqOWDq/JsoNJJu9JjSQoPn6kQmydr2r0QToJ+ygyhRJ09tqlPEhh/701 7RwhufNIr8eqk/2t0cXtxO201rVviZjBk97URAihe1Abh/cJIWH0cV80Dq4htTmvv34d eejQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=rcOWy7oEW6bODkDcc1a02QEfLEXTWL9dOtQFSEnVduA=; b=tTngYLRXnURqsmrx7y1SqQwreW+gx/MsFeEpVxOxKfiKk5uRy28hfoYEi8ecUjqO9T rxo8pdIdULSIhdSjJgbm/ig6sqx/xWWj2yrZ3xGMz7gO1vVVhkJjhlEtBnIX4brYkjdf KXZkgVhDfhk0IqEXdmMBttappDAsNocSXI44d5Rnu7LshgDha4qNPfFFoabD2Sr4JdAK KAy4wTgoW6ZhYpTj5HYlboyIRFM+a1f+DPwMlpgwRE7rnlKdhpX/MxIEZhrUodlS6Odt I/83Mpt//aPQB5fWjDbb2XSPKUo5o9PPuqoCix0RjRAtVggGsiOD7J/GrbXKPhd/Wqx9 b6cg== X-Gm-Message-State: AHPjjUiunPmYeoXMSP8EzPIe10I71TAtQejIChkOkMsdXClWkxLQO+nK eLNDOMdkZkeiydMDutWxWjyuKUJgPR7hXZjHp2n43A== X-Google-Smtp-Source: AOwi7QDxgzFRg5buRC/4VlAjmJ3kpwRjx6AkCkd5Sw+nYYHSqllCvMDV9c/LYa4SYVId87uCWcTT9uT/mO4NSTl0xfU= X-Received: by 10.36.6.18 with SMTP id 18mr3101141itv.15.1505964181562; Wed, 20 Sep 2017 20:23:01 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Wed, 20 Sep 2017 20:23:00 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: From: Warner Losh Date: Wed, 20 Sep 2017 21:23:00 -0600 X-Google-Sender-Auth: e9fvYwoe1PbR4-uVg7scaHuXedg Message-ID: Subject: Re: Pre-filled RAM disk. To: Jon Brawn Cc: FreeBSD Current Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 03:23:02 -0000 On Wed, Sep 20, 2017 at 9:16 PM, Warner Losh wrote: > > > On Wed, Sep 20, 2017 at 8:50 PM, Jon Brawn wrote: > >> Wotcha! >> >> I work for Arm for my sins, and in my spare time I=E2=80=99ve been playi= ng with >> FreeBSD. In my day job I work with the CPU core validation team, and one= of >> the things we do is take the hardware design of a new core and run it on= a >> machine called an emulator. This emulator isn=E2=80=99t the same thing a= s QEMU, nor >> is it just an FPGA, it=E2=80=99s something in the middle - you compile t= he hardware >> design and download it to the emulator, and it can then run programs on >> your design at about 1MHz. Which is lovely. Our main bread and butter is= to >> take such a design and get it to boot Arm Linux, a very cut down version= , >> and then run some tests hosted in the Linux environment. These tests wou= ld >> typically thrash the snot out of some particular aspect of the >> architecture, such as memory sharing amongst multiple processor cores. N= ow, >> we would like to use other operating systems that behave differently to >> Linux, there are some obvious candidates that I=E2=80=99m not going to t= alk about >> for legal reasons, but one that was suggested was using FreeBSD under >> emulation. >> >> So, what is needed is someway of telling the operating system that it is >> going to use a ram disk for its root filesystem, and that the ram disk i= s >> going to be at a fixed physical address in the memory map. That way we c= an >> pre-load root from a file in the emulation environment. In the Linux >> environment we would package the kernel, it=E2=80=99s DRB and the root f= ilesystem >> memory image inside a light-weight bootloader wrapper, load that at the >> right offset into the emulator=E2=80=99s memory map, and twang the virtu= al reset >> line of the emulated processor. There=E2=80=99s some magic jiggery poker= y to get >> console output from what the OS thinks is an AMBA UART, but that=E2=80= =99s about >> size of it. >> >> So, what does FreeBSD have to offer in the way of ramdisk functionality? >> > > Yes. > > See MD_ROOT and friends. > The MFS_IMAGE kernel option has replaced this. Warner