qemu-riscv.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
  4. */
  5. #ifndef __CONFIG_H
  6. #define __CONFIG_H
  7. #include <linux/sizes.h>
  8. #define CONFIG_SYS_SDRAM_BASE 0x80000000
  9. #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_2M)
  10. #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_2M)
  11. #define CONFIG_SYS_MALLOC_LEN SZ_8M
  12. #define CONFIG_SYS_BOOTM_LEN SZ_16M
  13. /* Environment options */
  14. #define CONFIG_ENV_SIZE SZ_4K
  15. #define BOOT_TARGET_DEVICES(func) \
  16. func(QEMU, qemu, na) \
  17. func(VIRTIO, virtio, 0) \
  18. func(DHCP, dhcp, na)
  19. #include <config_distro_bootcmd.h>
  20. #define BOOTENV_DEV_QEMU(devtypeu, devtypel, instance) \
  21. "bootcmd_qemu=" \
  22. "if env exists kernel_start; then " \
  23. "bootm ${kernel_start} - ${fdtcontroladdr};" \
  24. "fi;\0"
  25. #define BOOTENV_DEV_NAME_QEMU(devtypeu, devtypel, instance) \
  26. "qemu "
  27. #define CONFIG_EXTRA_ENV_SETTINGS \
  28. "fdt_high=0xffffffffffffffff\0" \
  29. "initrd_high=0xffffffffffffffff\0" \
  30. "kernel_addr_r=0x81000000\0" \
  31. "fdt_addr_r=0x82000000\0" \
  32. "scriptaddr=0x82100000\0" \
  33. "pxefile_addr_r=0x82200000\0" \
  34. "ramdisk_addr_r=0x82300000\0" \
  35. BOOTENV
  36. #endif /* __CONFIG_H */