qemu-system-riscv64 -M virt -m 256M -nographic \
-bios ../opensbi/build/platform/generic/firmware/fw_jump.elf \
-kernel <path/to/my/binary>
pub fn dump(fdt: &*const u8) {
use dtb_walker::{Dtb, DtbObj, WalkOperation};
let dtb = unsafe { Dtb::from_raw_parts(*fdt) }.unwrap();
...
pub fn dump(fdt: &*const u8) {
use dtb_walker::{Dtb, DtbObj, WalkOperation};
let dtb = unsafe { Dtb::from_raw_parts_unchecked(*fdt) };
...
It seems to work, since I get a dump of the FDT. Is it possible that this library is compatible with FDT versions older than 16? Maybe you can reduce the number?
If this library is compatible only with 16 or later, what parts don't work with older versions?
Thanks.