Re: Pre-filled RAM disk.
On Wed, 2017-09-20 at 22:47 -0500, Jon Brawn wrote: > On Sep 20, 2017, at 10:35 PM, Ian Lepore wrote: > > > > > > On Wed, 2017-09-20 at 21:23 -0600, Warner Losh wrote: > > > > > > 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! > > > > > > > > > > > > > > > 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 > > And the documentation (such as it is) for MFS_IMAGE is in the md(4) > > manpage. In a nutshell, it's a mechanism that lets you compile an > > existing filesystem image directly into the kernel and it is > > mounted as > > a memory filesystem at boot time. Hopefully being contained within > > the > > kernel will make the problem of loading it at a fixed physical > > address > > go away for you. > > > > -- Ian > > > I really need to bring more of my work problems to this list, > obviously. Thanks folks! > > Jon. > ___ Another good place for help with freebsd on arm is the #bsdmips channel on efnet, if you're an irc-using kind of person. Don't let the 'mips' in the name throw you, it's the channel where the arm, powerpc, and mips developers hang out. Oh, and of course, there is also the freebsd-arm@ mailing list. -- Ian ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Pre-filled RAM disk.
On Wed, 2017-09-20 at 21:23 -0600, Warner Losh wrote: > 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’ve 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’t the same thing as > > > QEMU, nor > > > is it just an FPGA, it’s 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’m 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’s DRB and the root > > > filesystem > > > memory image inside a light-weight bootloader wrapper, load that > > > at the > > > right offset into the emulator’s memory map, and twang the > > > virtual reset > > > line of the emulated processor. There’s some magic jiggery pokery > > > to get > > > console output from what the OS thinks is an AMBA UART, but > > > that’s 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 And the documentation (such as it is) for MFS_IMAGE is in the md(4) manpage. In a nutshell, it's a mechanism that lets you compile an existing filesystem image directly into the kernel and it is mounted as a memory filesystem at boot time. Hopefully being contained within the kernel will make the problem of loading it at a fixed physical address go away for you. -- Ian ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Pre-filled RAM disk.
On Sep 20, 2017, at 10:35 PM, Ian Lepore wrote: > > On Wed, 2017-09-20 at 21:23 -0600, Warner Losh wrote: >> 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! 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 > > And the documentation (such as it is) for MFS_IMAGE is in the md(4) > manpage. In a nutshell, it's a mechanism that lets you compile an > existing filesystem image directly into the kernel and it is mounted as > a memory filesystem at boot time. Hopefully being contained within the > kernel will make the problem of loading it at a fixed physical address > go away for you. > > -- Ian > I really need to bring more of my work problems to this list, obviously. Thanks folks! Jon. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Pre-filled RAM disk.
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’ve 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’t the same thing as QEMU, nor >> is it just an FPGA, it’s 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’m 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’s DRB and the root filesystem >> memory image inside a light-weight bootloader wrapper, load that at the >> right offset into the emulator’s memory map, and twang the virtual reset >> line of the emulated processor. There’s some magic jiggery pokery to get >> console output from what the OS thinks is an AMBA UART, but that’s 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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Pre-filled RAM disk.
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’ve 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’t the same thing as QEMU, nor > is it just an FPGA, it’s 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’m 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’s DRB and the root filesystem > memory image inside a light-weight bootloader wrapper, load that at the > right offset into the emulator’s memory map, and twang the virtual reset > line of the emulated processor. There’s some magic jiggery pokery to get > console output from what the OS thinks is an AMBA UART, but that’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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Pre-filled RAM disk.
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’ve 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’t the same thing as QEMU, nor > is it just an FPGA, it’s 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’m 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’s DRB and the root filesystem > memory image inside a light-weight bootloader wrapper, load that at the right > offset into the emulator’s memory map, and twang the virtual reset line of > the emulated processor. There’s some magic jiggery pokery to get console > output from what the OS thinks is an AMBA UART, but that’s about size of it. > > So, what does FreeBSD have to offer in the way of ramdisk functionality? > > Jon. Cool project! There is something called MFSBSD which is basically exactly what you want. It creates a small ramdisk and boots from that. It's often used for stuff like booting from PXE, CD, or USB. I don't know if you can force it to be located at a specific memory address, though. It's normally used in combination with a bootloader. http://mfsbsd.vx.sk/ -Alan ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Pre-filled RAM disk.
Wotcha! I work for Arm for my sins, and in my spare time I’ve 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’t the same thing as QEMU, nor is it just an FPGA, it’s 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’m 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’s DRB and the root filesystem memory image inside a light-weight bootloader wrapper, load that at the right offset into the emulator’s memory map, and twang the virtual reset line of the emulated processor. There’s some magic jiggery pokery to get console output from what the OS thinks is an AMBA UART, but that’s about size of it. So, what does FreeBSD have to offer in the way of ramdisk functionality? Jon. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"