2018-12-24 19:19:01 +08:00
|
|
|
/*
|
2019-01-24 14:11:10 +08:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*
|
|
|
|
* Copyright (c) 2019 Western Digital Corporation or its affiliates.
|
2018-12-24 19:19:01 +08:00
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Anup Patel <anup.patel@wdc.com>
|
|
|
|
*/
|
|
|
|
|
2024-03-06 10:35:35 +08:00
|
|
|
#ifndef __SBI_TRAP_LDST_H__
|
|
|
|
#define __SBI_TRAP_LDST_H__
|
2018-12-24 19:19:01 +08:00
|
|
|
|
|
|
|
#include <sbi/sbi_types.h>
|
2024-03-06 10:35:37 +08:00
|
|
|
#include <sbi/sbi_trap.h>
|
2018-12-24 19:19:01 +08:00
|
|
|
|
2024-03-06 10:35:38 +08:00
|
|
|
union sbi_ldst_data {
|
|
|
|
u64 data_u64;
|
|
|
|
u32 data_u32;
|
|
|
|
u8 data_bytes[8];
|
|
|
|
ulong data_ulong;
|
|
|
|
};
|
2018-12-24 19:19:01 +08:00
|
|
|
|
2024-03-11 17:51:53 +08:00
|
|
|
int sbi_misaligned_load_handler(struct sbi_trap_context *tcntx);
|
2018-12-24 19:19:01 +08:00
|
|
|
|
2024-03-11 17:51:53 +08:00
|
|
|
int sbi_misaligned_store_handler(struct sbi_trap_context *tcntx);
|
2018-12-24 19:19:01 +08:00
|
|
|
|
2024-03-11 17:51:53 +08:00
|
|
|
int sbi_load_access_handler(struct sbi_trap_context *tcntx);
|
2024-03-06 10:35:38 +08:00
|
|
|
|
2024-03-11 17:51:53 +08:00
|
|
|
int sbi_store_access_handler(struct sbi_trap_context *tcntx);
|
2024-03-06 10:35:38 +08:00
|
|
|
|
2018-12-24 19:19:01 +08:00
|
|
|
#endif
|