Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2017 21:23:00 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Jon Brawn <jon@brawn.org>
Cc:        FreeBSD Current <current@freebsd.org>
Subject:   Re: Pre-filled RAM disk.
Message-ID:  <CANCZdfrV5NaoOTTGUaXwaDXeoCcmjR3L1b9MnA6QF=__RUZanA@mail.gmail.com>
In-Reply-To: <CANCZdfqGk6euOtHrBjvd=L%2BC5uaEeYomcW1xEJwYDadzjW6G6A@mail.gmail.com>
References:  <AEDBF95D-5D91-41A0-AEFF-56840FAB755C@brawn.org> <CANCZdfqGk6euOtHrBjvd=L%2BC5uaEeYomcW1xEJwYDadzjW6G6A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 20, 2017 at 9:16 PM, Warner Losh <imp@bsdimp.com> wrote:

>
>
> On Wed, Sep 20, 2017 at 8:50 PM, Jon Brawn <jon@brawn.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrV5NaoOTTGUaXwaDXeoCcmjR3L1b9MnA6QF=__RUZanA>