1#
2# Copyright 2020, DornerWorks
3#
4# SPDX-License-Identifier: GPL-2.0-only
5#
6
7cmake_minimum_required(VERSION 3.7.2)
8
9declare_platform(polarfire KernelPlatformPolarfire PLAT_POLARFIRE KernelSel4ArchRiscV64)
10
11if(KernelPlatformPolarfire)
12    declare_seL4_arch(riscv64)
13    config_set(KernelRiscVPlatform RISCV_PLAT "polarfire")
14    config_set(KernelOpenSBIPlatform OPENSBI_PLATFORM "generic")
15    config_set(KernelPlatformFirstHartID FIRST_HART_ID 1)
16    list(APPEND KernelDTSList "tools/dts/mpfs_icicle.dts")
17    list(APPEND KernelDTSList "src/plat/polarfire/overlay-polarfire.dts")
18    declare_default_headers(
19        TIMER_FREQUENCY 10000000 PLIC_MAX_NUM_INT 186
20        INTERRUPT_CONTROLLER drivers/irq/riscv_plic0.h
21    )
22else()
23    unset(KernelPlatformFirstHartID CACHE)
24endif()
25