mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-07 05:29:10 +00:00
platform: generic: Add Sifive FU540 TLB flush range limit override
We need to override the remote TLB flush range limit for SiFive FU540 so we add platform override to achieve this. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
parent
2ba7087b09
commit
4f18c6e550
3 changed files with 39 additions and 1 deletions
|
@ -8,3 +8,4 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
platform-objs-y += platform.o
|
platform-objs-y += platform.o
|
||||||
|
platform-objs-y += sifive_fu540.o
|
||||||
|
|
|
@ -21,7 +21,11 @@
|
||||||
#include <sbi_utils/ipi/fdt_ipi.h>
|
#include <sbi_utils/ipi/fdt_ipi.h>
|
||||||
#include <sbi_utils/reset/fdt_reset.h>
|
#include <sbi_utils/reset/fdt_reset.h>
|
||||||
|
|
||||||
static const struct platform_override *special_platforms[] = { };
|
extern const struct platform_override sifive_fu540;
|
||||||
|
|
||||||
|
static const struct platform_override *special_platforms[] = {
|
||||||
|
&sifive_fu540,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct platform_override *generic_plat = NULL;
|
static const struct platform_override *generic_plat = NULL;
|
||||||
static const struct fdt_match *generic_plat_match = NULL;
|
static const struct fdt_match *generic_plat_match = NULL;
|
||||||
|
|
33
platform/generic/sifive_fu540.c
Normal file
33
platform/generic/sifive_fu540.c
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*
|
||||||
|
* Copyright (c) 2020 Western Digital Corporation or its affiliates.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Anup Patel <anup.patel@wdc.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <platform_override.h>
|
||||||
|
#include <sbi_utils/fdt/fdt_helper.h>
|
||||||
|
|
||||||
|
static u64 sifive_fu540_tlbr_flush_limit(const struct fdt_match *match)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* The sfence.vma by virtual address does not work on
|
||||||
|
* SiFive FU540 so we return remote TLB flush limit as zero.
|
||||||
|
*/
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct fdt_match sifive_fu540_match[] = {
|
||||||
|
{ .compatible = "sifive,fu540" },
|
||||||
|
{ .compatible = "sifive,fu540g" },
|
||||||
|
{ .compatible = "sifive,fu540-c000" },
|
||||||
|
{ .compatible = "sifive,hifive-unleashed-a00" },
|
||||||
|
{ },
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct platform_override sifive_fu540 = {
|
||||||
|
.match_table = sifive_fu540_match,
|
||||||
|
.tlbr_flush_limit = sifive_fu540_tlbr_flush_limit,
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue