The NOC address was accessed in the k230_unzip driver, but it is currently not in k230. This commit uses create_unimplemented_device to preset the region.
Signed-off-by: Tao Ding <[email protected]> --- Steps to decompress in uboot: 1. Prepare uboot and k230_sdk u-boot (https://github.com/zevorn/k230-boot-assets) k230_sdk (https://github.com/kendryte/k230_sdk) 2. Compress image (in sh file, modify ROOT and K230_SDK_ROOT) ROOT=k230-boot-assets K230_SDK_ROOT=k230_sdk DST=$ROOT/buildroot/uboot-boot cd $DST $K230_SDK_ROOT/tools/k230_priv_gzip -n8 -f -k Image sed -i -e "1s/\x08/\x09/" Image.gz cd - 3. Launch qemu (in sh file, modify ROOT and QEMU) ROOT=k230-boot-assets QEMU=qemu/build/qemu-system-riscv64 COMMON=$ROOT/common DST=$ROOT/buildroot/uboot-boot INITRD_END=$(printf "0x%x" $((0x0a100000 + $(stat -c %s "$DST/rootfs.cpio.gz")))) echo "Use this U-Boot initrd end: $INITRD_END" $QEMU -M k230 \ -bios "$COMMON/u-boot" \ -device loader,file="$COMMON/fw_jump.uImage",addr=0xc100000,force-raw=on \ -device loader,file="$DST/Image.gz",addr=0xd000000,force-raw=on \ -device loader,file="$DST/rootfs.cpio.gz",addr=0xa100000,force-raw=on \ -device loader,file="$DST/k230-qemu.dtb",addr=0xa000000,force-raw=on \ -nographic -no-reboot \ -d guest_errors \ -D qemu.log 4. Input in uboot k230_unzip 0xd000000 0x6c354f 0x8200000 setenv bootargs console=ttyS0,115200 earlycon=sbi cma=0 fdt addr 0xa000000 fdt resize 8192 fdt set /chosen linux,initrd-start <0x0 0xa100000> fdt set /chosen linux,initrd-end <0x0 0xba2d5fe> bootm 0xc100000 - 0xa000000 hw/riscv/k230.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/riscv/k230.c b/hw/riscv/k230.c index 7fd1ec4c25..ff834d6724 100644 --- a/hw/riscv/k230.c +++ b/hw/riscv/k230.c @@ -234,6 +234,9 @@ static void k230_soc_realize(DeviceState *dev, Error **errp) qdev_get_gpio_in(DEVICE(&s->decomp_gzip), i)); } + /* Noc stub, the k230 decomp_gzip driver in uboot will access this region */ + create_unimplemented_device("noc-stub", 0x91302000, 0x1000); + /* unimplemented devices */ create_unimplemented_device("kpu.l2-cache", memmap[K230_DEV_KPU_L2_CACHE].base, -- 2.43.0
