[lowrisc-dev] boot linux directly from DDR, (no sdcard)

Dr Jonathan Kimmitt jrrk2 at cam.ac.uk
Mon Mar 19 10:39:52 GMT 2018

It's possible to change the base address of RAM in Linux from 0x80000000 
but this

has an impact on page tables, Berkeley boot loader, spike simulator and 
chisel etc.

You might find it easier to modify your custom AXI interface address if 
that is possible.

Alternatively if you have dynamic memory on board your card, you could 
adapt the Xilinx MIG config

to use this memory and save the overhead of the custom AXI interface. 
Most cards come

with an example MIG config to reduce the burden of setting all the 
parameters correctly.

If you want to have a go at changing the kernel address, you need to be 
aware that it is BBL that loads
at 0x80000000 and not the kernel itself. Typically the kernel address 
will be loaded at the next megapage
which is typically 0x80200000. And the kernel never accesses this 
address because it runs in supervisor mode
which sets the kernel address to 0xffffffff80000000 using the MMU. If 
you change the base address you need
to make sure any calculations involving BBL address or MMU page tables 
are corrected. All very simple NOT!

On 19/03/18 06:57, Anup Kini wrote:
> Hi All,
> I am trying to boot linux on lowRISC using a custom Virtex-7 board.
> Unfortunately, the SD card interface has some issues and I am unable to use
> it.
> I was able to bring up the lowRISC design and run hello world and dram test
> successfully.
> Since, I do not have the SD Card, I tried to load the BBL directly on to
> DDR using the custom AXI interface provided by the board vendor.
> It loads successfully and a few debug prints from the BBL also show up on
> the UART terminal. I had to modify the boot.c code inorder to get this
> working.
> Going forward, I was curious to know if I can load the vmlinux and root.bin
> also to DDR and boot linux.
> I understand that the base address for vmlinux is fixed to
> 0x80000000+OFFSET.
> Will it be possible for me to change this and boot linux directly from DDR ?
> Thanks & Regards,
> Anup Kini.

More information about the lowrisc-dev mailing list