qemu: add devicetree support for arm64

Signed-off-by: liaoao <liaoao@xiaomi.com>
This commit is contained in:
liaoao 2023-08-07 15:48:21 +08:00 committed by Xiang Xiao
parent 6d6e1aea3b
commit dffab1e0c6
2 changed files with 11 additions and 0 deletions

View file

@ -45,6 +45,10 @@
#include "qemu_boot.h"
#include "qemu_serial.h"
#ifdef CONFIG_DEVICE_TREE
# include <nuttx/fdt.h>
#endif
/****************************************************************************
* Private Data
****************************************************************************/
@ -167,6 +171,10 @@ void arm64_chip_boot(void)
arm64_mmu_init(true);
#ifdef CONFIG_DEVICE_TREE
fdt_register((FAR const char *)0x40000000);
#endif
#if defined(CONFIG_ARCH_CHIP_QEMU_WITH_HV)
arm64_psci_init("hvc");
#elif defined(CONFIG_SMP) || defined(CONFIG_ARCH_HAVE_PSCI)

View file

@ -29,6 +29,7 @@ CONFIG_DEBUG_SCHED_WARN=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEBUG_WARN=y
CONFIG_DEFAULT_TASK_STACKSIZE=8192
CONFIG_DEVICE_TREE=y
CONFIG_DEV_ZERO=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXPERIMENTAL=y
@ -41,6 +42,7 @@ CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=8192
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
CONFIG_LIBFDT=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
@ -61,6 +63,7 @@ CONFIG_STACK_COLORATION=y
CONFIG_START_MONTH=3
CONFIG_START_YEAR=2022
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSTEM_FDTDUMP=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_SYSTEM=y
CONFIG_SYSTEM_TIME64=y