forked from Mirrors/opensbi
lib: sbi: move sbi_double_trap_handler() to a dedicated header
We will add new functions to sbi_double_trap.c in order to register an SSE event, split this to a header as part of preparation work. Signed-off-by: Clément Léger <cleger@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
3943ddbaab
commit
9d2c9c6ca0
20
include/sbi/sbi_double_trap.h
Normal file
20
include/sbi/sbi_double_trap.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025 Rivos Inc.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Clément Léger <cleger@rivosinc.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SBI_DOUBLE_TRAP_H__
|
||||||
|
#define __SBI_DOUBLE_TRAP_H__
|
||||||
|
|
||||||
|
#include <sbi/sbi_types.h>
|
||||||
|
#include <sbi/sbi_trap.h>
|
||||||
|
|
||||||
|
int sbi_double_trap_handler(struct sbi_trap_context *tcntx);
|
||||||
|
|
||||||
|
void sbi_double_trap_init(struct sbi_scratch *scratch);
|
||||||
|
|
||||||
|
#endif
|
@@ -28,8 +28,6 @@ int sbi_load_access_handler(struct sbi_trap_context *tcntx);
|
|||||||
|
|
||||||
int sbi_store_access_handler(struct sbi_trap_context *tcntx);
|
int sbi_store_access_handler(struct sbi_trap_context *tcntx);
|
||||||
|
|
||||||
int sbi_double_trap_handler(struct sbi_trap_context *tcntx);
|
|
||||||
|
|
||||||
ulong sbi_misaligned_tinst_fixup(ulong orig_tinst, ulong new_tinst,
|
ulong sbi_misaligned_tinst_fixup(ulong orig_tinst, ulong new_tinst,
|
||||||
ulong addr_offset);
|
ulong addr_offset);
|
||||||
|
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#include <sbi/riscv_encoding.h>
|
#include <sbi/riscv_encoding.h>
|
||||||
#include <sbi/sbi_bitops.h>
|
#include <sbi/sbi_bitops.h>
|
||||||
#include <sbi/sbi_console.h>
|
#include <sbi/sbi_console.h>
|
||||||
|
#include <sbi/sbi_double_trap.h>
|
||||||
#include <sbi/sbi_ecall.h>
|
#include <sbi/sbi_ecall.h>
|
||||||
#include <sbi/sbi_error.h>
|
#include <sbi/sbi_error.h>
|
||||||
#include <sbi/sbi_hart.h>
|
#include <sbi/sbi_hart.h>
|
||||||
|
Reference in New Issue
Block a user