1 /*
2  * Copyright (c) 2022 Synopsys
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief common definitions for the DSP sharing test application
10  */
11 
12 #ifndef _DSPCONTEXT_H
13 #define _DSPCONTEXT_H
14 
15 struct dsp_volatile_register_set {
16 #ifdef CONFIG_ARC_DSP_BFLY_SHARING
17 	uintptr_t dsp_bfly0;
18 #endif
19 #ifdef CONFIG_ARC_AGU_SHARING
20 	uintptr_t agu_ap0;
21 	uintptr_t agu_os0;
22 #endif
23 };
24 
25 struct dsp_non_volatile_register_set {
26 	/* No non-volatile dsp registers */
27 };
28 
29 #define SIZEOF_DSP_VOLATILE_REGISTER_SET sizeof(struct dsp_volatile_register_set)
30 #define SIZEOF_DSP_NON_VOLATILE_REGISTER_SET 0
31 
32 /* the set of ALL dsp registers */
33 
34 struct dsp_register_set {
35 	struct dsp_volatile_register_set dsp_volatile;
36 	struct dsp_non_volatile_register_set dsp_non_volatile;
37 };
38 
39 #define SIZEOF_DSP_REGISTER_SET \
40 	(SIZEOF_DSP_VOLATILE_REGISTER_SET + SIZEOF_DSP_NON_VOLATILE_REGISTER_SET)
41 
42 /*
43  * The following constants define the initial byte value used by the background
44  * task, and the thread when loading up the dsp registers.
45  */
46 
47 #define MAIN_DSP_REG_CHECK_BYTE ((unsigned char)0xe5)
48 #define FIBER_DSP_REG_CHECK_BYTE ((unsigned char)0xf9)
49 
50 #endif /* _DSPCONTEXT_H */
51