aboutsummaryrefslogtreecommitdiff
path: root/include/sbi/sbi_trap_ldst.h
blob: 8aee31643f75c8117f3e5c100906bc62b2c22777 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * 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