From owner-freebsd-current@freebsd.org Thu Sep 21 03:10:14 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 8F89AE0DA34 for ; Thu, 21 Sep 2017 03:10:14 +0000 (UTC) (envelope-from jon@brawn.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 719F86578D for ; Thu, 21 Sep 2017 03:10:14 +0000 (UTC) (envelope-from jon@brawn.org) Received: by mailman.ysv.freebsd.org (Postfix) id 70690E0DA33; Thu, 21 Sep 2017 03:10:14 +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 6D6A8E0DA32 for ; Thu, 21 Sep 2017 03:10:14 +0000 (UTC) (envelope-from jon@brawn.org) Received: from mx2.ahs1.r4l.com (mx2.ahs1.r4l.com [192.95.23.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 448EF6578C for ; Thu, 21 Sep 2017 03:10:14 +0000 (UTC) (envelope-from jon@brawn.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=brawn.org; s=default; h=To:Date:Message-Id:Subject:Mime-Version: Content-Transfer-Encoding:Content-Type:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ja5q0W8gCX+1IttNpnpKX/9LoWUfjS+5o5f9tkrIZJw=; b=r3t2UjsdIGGdrjVNTLnfGK/yN4 oo7NIeOq9+KU8rtb5BbNerktSYR28qy7frKCGu8tUSvIu/JklVW2MYkBRO9LNhNnk+s6kWy/MDu0x U0sYCUaXaLU1XYsR2AZMifcSRZQOS2RQ8QuWYbVtzjdBnPw8MmkLEixIvsoPIkLdM471bCzz9HJ2x 9GCuPVNbAuB+Ln04Yy1zfrfEEgZExR0JMhd9c5kWs3zwGtuygM9I4xcbqiuVIEE+J85n0ZbwIpS3A 2YkSoLruF1h1FWWFVrZFPu8LU6Hd6/I2AlCx/MK6MiI7uXrRG/mvwckLSLoBcCKRcCSUHahHgLl5C CCiNiVGg==; Received: from [136.62.171.86] (port=49635 helo=[192.168.1.159]) by ahs1.r4l.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1durZf-0049Bi-Uh for current@freebsd.org; Wed, 20 Sep 2017 22:50:48 -0400 From: Jon Brawn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Pre-filled RAM disk. Message-Id: Date: Wed, 20 Sep 2017 21:50:46 -0500 To: current@freebsd.org X-Mailer: Apple Mail (2.3273) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ahs1.r4l.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - brawn.org X-Get-Message-Sender-Via: ahs1.r4l.com: authenticated_id: jon@brawn.org X-Authenticated-Sender: ahs1.r4l.com: jon@brawn.org X-Source: X-Source-Args: X-Source-Dir: 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:10:14 -0000 Wotcha! I work for Arm for my sins, and in my spare time I=E2=80=99ve been = playing 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=99= t the same thing as QEMU, nor is it just an FPGA, it=E2=80=99s something = in the middle - you compile the 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 would typically = thrash the snot out of some particular aspect of the architecture, such = as memory sharing amongst multiple processor cores. Now, 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 talk 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 can 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 filesystem 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 virtual reset line of the emulated processor. There=E2=80=99= s some magic jiggery pokery 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? Jon.=