1#
2# Copyright 2020, DornerWorks
3# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
4#
5# SPDX-License-Identifier: GPL-2.0-only
6#
7
8cmake_minimum_required(VERSION 3.7.2)
9
10declare_platform(hifive KernelPlatformHifive PLAT_HIFIVE KernelSel4ArchRiscV64)
11
12if(KernelPlatformHifive)
13    declare_seL4_arch(riscv64)
14    config_set(KernelRiscVPlatform RISCV_PLAT "hifive")
15    config_set(KernelPlatformFirstHartID FIRST_HART_ID 1)
16    config_set(KernelOpenSBIPlatform OPENSBI_PLATFORM "sifive/fu540")
17    list(APPEND KernelDTSList "tools/dts/hifive.dts")
18    list(APPEND KernelDTSList "src/plat/hifive/overlay-hifive.dts")
19    declare_default_headers(
20        TIMER_FREQUENCY 1000000 PLIC_MAX_NUM_INT 53
21        INTERRUPT_CONTROLLER drivers/irq/riscv_plic0.h
22    )
23else()
24    unset(KernelPlatformFirstHartID CACHE)
25endif()
26