diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/arch/riscv/lib/sbi_ipi.c | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/arch/riscv/lib/sbi_ipi.c')
-rw-r--r-- | roms/u-boot/arch/riscv/lib/sbi_ipi.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/roms/u-boot/arch/riscv/lib/sbi_ipi.c b/roms/u-boot/arch/riscv/lib/sbi_ipi.c new file mode 100644 index 000000000..d02e2b4c4 --- /dev/null +++ b/roms/u-boot/arch/riscv/lib/sbi_ipi.c @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Fraunhofer AISEC, + * Lukas Auer <lukas.auer@aisec.fraunhofer.de> + */ + +#include <common.h> +#include <asm/encoding.h> +#include <asm/sbi.h> + +int riscv_init_ipi(void) +{ + return 0; +} + +int riscv_send_ipi(int hart) +{ + ulong mask; + + mask = 1UL << hart; + sbi_send_ipi(&mask); + + return 0; +} + +int riscv_clear_ipi(int hart) +{ + csr_clear(CSR_SIP, SIP_SSIP); + + return 0; +} + +int riscv_get_ipi(int hart, int *pending) +{ + /* + * The SBI does not support reading the IPI status. We always return 0 + * to indicate that no IPI is pending. + */ + *pending = 0; + + return 0; +} |