Age | Commit message (Collapse) | Author | Files | Lines |
|
* add device tree in elf, using --with-dts to add the absolute path of device tree
* Disable device tree filter
* Remove *.dtb dependence, when the --with-dts option is not used
|
|
This reverts commit a161e6f3ef31004e47a5b94b85c2e84b764f8637.
Resolves #218
|
|
* add device tree in elf, using --with-dts to add the absolute path of device tree
* Disable device tree filter
|
|
We expect the firmware to load the external payload at the second
megapage, and that there is space to put the filtered FDT at 0x2200000
past the start of memory. With a default MEM_START of 0x80000000, this
matches the standard OpenSBI values for FW_JUMP_ADDR and
FW_JUMP_FDT_ADDR of 0x80400000/0x80200000 (RV32/RV64) and 0x82200000
respectively, so payloads linked for one should work with the other.
|
|
h/t @michaeljclark
|
|
|
|
|
|
|
|
Support for separate firmware and kernel payload is added
by updating BBL to read optional preloaded kernel address
attributes from device-tree using a similar mechanism to
that used to pass init ramdisk addresses to linux kernel.
chosen {
riscv,kernel-start = <0x00000000 0x80200000>;
riscv,kernel-end = <0x00000000 0x80590634>;
};
These attributes are added by QEMU and read by BBL when combining
-bios <firmware-image> and -kernel <kernel-image> options. e.g.
$ qemu-system-riscv64 -machine virt -bios bbl -kernel vmlinux
With this change, bbl can be compiled without --with-payload
and the dummy payload alignment is altered to make the memory
footprint of the firmware-only bbl smaller. The dummy payload
message is updated to indicate the alternative load method.
This load method could also be supported by a first stage boot
loader that reads seperate firmware and kernel from SPI flash.
The main advantage of this new mechanism is that it eases kernel
development by avoiding the riscv-pk packaging step after kernel
builds, makes building per repository artefacts for CI simpler,
and mimics bootloaders on other platforms that can load a kernel
image file directly. Ultimately BBL should use an SPI driver to
load the kernel image however this mechanism supports use cases
such such as QEMU's -bios, -kernel and -initrd options following
examples from other platforms that pass kernel entry to firmware
via device-tree.
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
|
|
We now automatically detect everything that the platform interface used
to be used for, so it's now obsolete!
|
|
This checks to see if a hart can't boot Linux by looking for a
compatible "mmu-type" field. If the hart can't boot Linux, then bbl
masks it off.
|
|
I screwed up refactoring bbl.
|
|
I'm trying to debug some device tree problems while booting Linux and
figured it would be really nice to have access to the device tree while
trying to debug these problems. I think this might be useful for lots
of people, so I went ahead and cleaned up the code enough that it should
actaully work in most cases.
|
|
Some platforms can't boot Linux on all the harts. This commit allows
platforms to define the set of harts that should be prevented from
booting past BBL. This is essentially just a new mechanism for defining
the DISABLED_HART_MASK.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Yuck.
|