Still TODO: -Set the timer rate properly -Fix nonzero based hart secondary cpu boot -Try to parse the device tree for some information
42 lines
1.0 KiB
Makefile
42 lines
1.0 KiB
Makefile
LOCAL_DIR := $(GET_LOCAL_DIR)
|
|
|
|
MODULE := $(LOCAL_DIR)
|
|
|
|
ARCH := riscv
|
|
SUBARCH ?= 64
|
|
RISCV_MODE ?= supervisor
|
|
WITH_SMP ?= true
|
|
SMP_MAX_CPUS ?= 4
|
|
LK_HEAP_IMPLEMENTATION ?= dlmalloc
|
|
RISCV_FPU ?= true
|
|
RISCV_MMU ?= sv39
|
|
|
|
MODULE_DEPS += lib/cbuf
|
|
MODULE_DEPS += lib/fdt
|
|
MODULE_DEPS += lib/fdtwalk
|
|
#MODULE_DEPS += dev/bus/pci
|
|
#MODULE_DEPS += dev/bus/pci/drivers
|
|
|
|
MODULE_SRCS += $(LOCAL_DIR)/platform.c
|
|
MODULE_SRCS += $(LOCAL_DIR)/plic.c
|
|
MODULE_SRCS += $(LOCAL_DIR)/uart.c
|
|
|
|
MEMBASE ?= 0x40000000
|
|
MEMSIZE ?= 0x10000000 # default to 256MB
|
|
ifeq ($(RISCV_MODE),supervisor)
|
|
# offset the kernel to account for OpenSBI using the bottom
|
|
KERNEL_LOAD_OFFSET ?= 0x00200000 # kernel load offset
|
|
endif
|
|
|
|
# set some global defines based on capability
|
|
GLOBAL_DEFINES += ARCH_RISCV_CLINT_BASE=0x0c000000
|
|
GLOBAL_DEFINES += ARCH_RISCV_MTIME_RATE=10000000
|
|
|
|
# we can revert to a poll based uart spin routine
|
|
GLOBAL_DEFINES += PLATFORM_SUPPORTS_PANIC_SHELL=1
|
|
|
|
# do not need to implement any cache ops
|
|
GLOBAL_DEFINES += RISCV_NO_CACHE_OPS=1
|
|
|
|
include make/module.mk
|