1LOCAL_DIR := $(GET_LOCAL_DIR)
2
3MODULE := $(LOCAL_DIR)
4
5PLATFORM := sifive
6VARIANT := sifive_u
7
8GLOBAL_DEFINES += SIFIVE_FREQ=5000000 # 5 MHz
9
10RISCV_MODE ?= supervisor
11
12ifeq ($(RISCV_MODE),supervisor)
13MEMBASE ?= 0x080300000
14else
15MEMBASE ?= 0x080000000
16endif
17MEMSIZE ?= 0x200000000 # 8 GiB
18
19WITH_SMP := 1
20SMP_MAX_CPUS := 4
21
22MODULE_SRCS := $(LOCAL_DIR)/target.c
23# set some global defines based on capability
24GLOBAL_DEFINES += PLATFORM_HAS_DYNAMIC_TIMER=1
25GLOBAL_DEFINES += ARCH_RISCV_CLINT_BASE=0x02000000
26GLOBAL_DEFINES += ARCH_RISCV_MTIME_RATE=10000000   # 10 MHz
27
28include make/module.mk
29
30