1LOCAL_DIR := $(GET_LOCAL_DIR)
2
3MODULE := $(LOCAL_DIR)
4
5ARCH := riscv
6SUBARCH := 64
7RISCV_MODE := supervisor
8WITH_SMP ?= true
9SMP_MAX_CPUS ?= 8
10LK_HEAP_IMPLEMENTATION ?= dlmalloc
11RISCV_FPU := true
12RISCV_MMU := sv39
13RISCV_EXTENSION_LIST ?= zba zbb zbc zbs
14
15MODULE_DEPS += lib/cbuf
16MODULE_DEPS += lib/fdt
17MODULE_DEPS += lib/fdtwalk
18MODULE_DEPS += dev/interrupt/riscv_plic
19
20MODULE_SRCS += $(LOCAL_DIR)/platform.c
21MODULE_SRCS += $(LOCAL_DIR)/uart.c
22
23MEMBASE ?= 0
24MEMSIZE ?= 0x80000000 # default to 2GB
25ifeq ($(RISCV_MODE),supervisor)
26# offset the kernel to account for OpenSBI using the bottom
27KERNEL_LOAD_OFFSET ?= 0x10200000 # kernel load offset
28endif
29
30# we can revert to a poll based uart spin routine
31GLOBAL_DEFINES += PLATFORM_SUPPORTS_PANIC_SHELL=1
32
33# do not need to implement any cache ops
34GLOBAL_DEFINES += RISCV_NO_CACHE_OPS=1
35
36include make/module.mk
37