mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00

The struct sbi_trap_context already has the information needed by misaligned load/store and access fault load/store handlers so directly pass struct sbi_trap_context pointer to these functions. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Tested-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Clément Léger <cleger@rivosinc.com>
32 lines
643 B
C
32 lines
643 B
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2019 Western Digital Corporation or its affiliates.
|
|
*
|
|
* Authors:
|
|
* Anup Patel <anup.patel@wdc.com>
|
|
*/
|
|
|
|
#ifndef __SBI_TRAP_LDST_H__
|
|
#define __SBI_TRAP_LDST_H__
|
|
|
|
#include <sbi/sbi_types.h>
|
|
#include <sbi/sbi_trap.h>
|
|
|
|
union sbi_ldst_data {
|
|
u64 data_u64;
|
|
u32 data_u32;
|
|
u8 data_bytes[8];
|
|
ulong data_ulong;
|
|
};
|
|
|
|
int sbi_misaligned_load_handler(struct sbi_trap_context *tcntx);
|
|
|
|
int sbi_misaligned_store_handler(struct sbi_trap_context *tcntx);
|
|
|
|
int sbi_load_access_handler(struct sbi_trap_context *tcntx);
|
|
|
|
int sbi_store_access_handler(struct sbi_trap_context *tcntx);
|
|
|
|
#endif
|