mirror of
https://gitlab.com/qemu-project/opensbi.git
synced 2025-11-10 05:37:55 +08:00
The SiFive TMC0 controls the tile power domains on SiFive platform. The CPU enters the low power state via the `CEASE` instruction after configuring the TMC0. Any devices that inside the tile power domain will be power gated, including the private cache. Therefore flushing the private cache before entering the low power state. Co-developed-by: Vincent Chen <vincent.chen@sifive.com> Signed-off-by: Vincent Chen <vincent.chen@sifive.com> Reviewed-by: Cyan Yang <cyan.yang@sifive.com> Signed-off-by: Nick Hu <nick.hu@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20251020-cache-upstream-v7-9-69a132447d8a@sifive.com Signed-off-by: Anup Patel <anup@brainfault.org>
21 lines
361 B
C
21 lines
361 B
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2025 SiFive Inc.
|
|
*/
|
|
|
|
#ifndef __FDT_HSM_SIFIVE_INST_H__
|
|
#define __FDT_HSM_SIFIVE_INST_H__
|
|
|
|
static inline void sifive_cease(void)
|
|
{
|
|
__asm__ __volatile__(".insn 0x30500073" ::: "memory");
|
|
}
|
|
|
|
static inline void sifive_cflush(void)
|
|
{
|
|
__asm__ __volatile__(".insn 0xfc000073" ::: "memory");
|
|
}
|
|
|
|
#endif
|