From owner-freebsd-current@freebsd.org Thu Sep 21 03:16:44 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 6A5AAE0E229 for ; Thu, 21 Sep 2017 03:16:44 +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 4592C65DCB for ; Thu, 21 Sep 2017 03:16:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id 44D72E0E228; Thu, 21 Sep 2017 03:16:44 +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 44641E0E227 for ; Thu, 21 Sep 2017 03:16:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (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 0D13E65DCA for ; Thu, 21 Sep 2017 03:16:44 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22b.google.com with SMTP id v36so8068592ioi.1 for ; Wed, 20 Sep 2017 20:16:44 -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=4BHC22q2E4S/16XkLqHZRe0P3KENb8bvtpVc6YHW2aY=; b=ZTDmhc+sfCNodsJvibr6f7x89uqfptU6lDk81GK2brv7oRuDSGgL92AEzApIl5eToz 2l5WkEAgymQW9Y31B0mICjPTGEDO/+AsDheRkcslnrnspz26ifliRR0XtbsmUSycCCMz YYPj9GfOi4VisQOvDTDNAZzN53wI6twxCiTaZXgn2qAifJ7T9z+5uBV+6F8nGMLzJEW6 4nEX86Dq5klXobCqWhTRmuqSPh3dQlPaH8XEQ3OjzQc3F3s/DQytgNTkIeX35lYrbQc2 wShsCuBP5XHeO71l7qQfp71upOIjHeOhwmyufQPbmvq3602SPEYrCu7+CawqO6ivibXe OiZA== 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=4BHC22q2E4S/16XkLqHZRe0P3KENb8bvtpVc6YHW2aY=; b=OmOBZ2VPvbyg+tifO2v69MHZKuSANj9hkycX4JNarxJvGyKXRQVWGp/UGzT7rtk7vq 9tIZeHOc8LyJ69nMsd0BEYiz6wkPrBcfHu3w0KY808nMy4N7QnwlLbtzRDthS6wPSGNE opl7YpoaatMwZPeWgcPCRtzze/AOJjLDIEquvLjZG0WDpQkC9Nej6chWbZ5YXlRn5seW 5RfHWkmsdZDPZsnlatqwhcibwubky9lPdXhsCWvmLexzQe8pTBlLbzF8gpxGl+TC7JHn tYS1nfAfGAuBnclJm6vEr53xWOvMIqU5Vr3E9k03wsUG6f8Z5Q03ITWa9njtizfBwdjA k4Dg== X-Gm-Message-State: AHPjjUi8xwBdyXEmZWqi5Q/fUYWY+7kZQvM19QOiH451p1L48UxSO1MI QPRzfKMxNxbJiEUwifyApZatKvcIqGO+t0Esp5akGg== X-Google-Smtp-Source: AOwi7QA8OnFPd5UBFNnlKBiFOeb6s33GOti4Ax5ZYlc8WPwKnNyQot47AzgkbAiQvKCZux8Vazpwv8vFF32aiIyqcU0= X-Received: by 10.107.7.161 with SMTP id g33mr1013114ioi.169.1505963803282; Wed, 20 Sep 2017 20:16:43 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Wed, 20 Sep 2017 20:16:42 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: From: Warner Losh Date: Wed, 20 Sep 2017 21:16:42 -0600 X-Google-Sender-Auth: U4BRVTHh97VZN4qveqAzufDsPFM 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:16:44 -0000 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 playin= g 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 as= QEMU, nor > is it just an FPGA, it=E2=80=99s something in the middle - you compile th= e 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 woul= d > typically thrash the snot out of some particular aspect of the > architecture, such as memory sharing amongst multiple processor cores. No= w, > 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 ta= lk 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 is > going to be at a fixed physical address in the memory map. That way we ca= n > 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 fi= lesystem > 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 virtua= l reset > line of the emulated processor. There=E2=80=99s some magic jiggery pokery= to get > console output from what the OS thinks is an AMBA UART, but that=E2=80=99= s about > size of it. > > So, what does FreeBSD have to offer in the way of ramdisk functionality? > Yes. See MD_ROOT and friends. Warner