My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cpu_data.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 /*
24  * declaration of .data and .bss section variables
25  *
26  */
27 
28 #ifndef __TZ_CPU_DATA_H__
29 #define __TZ_CPU_DATA_H__
30 
31 #include <page_table.h>
32 #include <cpu_asm.h>
33 #include <sw_board.h>
34 #include <sw_mcore.h>
35 
36 #define TASK_STACK_SIZE 2048
37 
38 #define SW_PRIMARY_CORE 0x1
39 #define SW_SECONDARY_CORE 0x0
40 
41 
42 
43 
47 struct swi_temp_regs {
49  u32 spsr;
51  u32 regs[13];
53  u32 lr;
54 };
55 
56 
57 extern u32 _SW_KSYMTAB;
58 extern u32 _SW_KSYMTAB_END;
59 
64 
68 extern u32 user_stack[MAX_CORES][STACK_SIZE/4];
69 
73 extern u32 service_stack[MAX_CORES][STACK_SIZE/4];
74 
78 extern u32 abort_stack[MAX_CORES][STACK_SIZE/4];
79 
83 extern u32 undefined_stack[MAX_CORES][STACK_SIZE/4];
84 
88 extern u32 irq_stack[MAX_CORES][STACK_SIZE/4];
89 
93 extern u32 fiq_stack[MAX_CORES][STACK_SIZE/4];
94 
98 extern u32 monitor_stack[MAX_CORES][STACK_SIZE/4];
99 
103 extern u32 params_stack[PARAM_STACK_SIZE];
104 
109 
113 extern u32 secure_interrupt_set;
114 
118 extern u32 temp_regs[32];
119 
124 
130 
134 extern struct swi_temp_regs *temp_swi_regs;
135 
136 
140 extern u32 valid_params_flag;
141 
146 
150 extern u32 multi_core_mode;
151 
158 va_t* get_sw_code_start(void);
159 
167 va_t* get_sw_code_end(void);
168 
175 va_t* get_sw_text_start(void);
176 
184 int get_sw_text_size(void);
185 
192 va_t* get_sw_fs_start(void);
193 u32 get_sw_fs_size(void);
194 
201 va_t* get_sw_data_start(void);
202 
210 int get_sw_data_size(void);
211 
218 va_t* get_sw_bss_start(void);
219 
227 int get_sw_bss_size(void);
228 
236 va_t* get_mod_init_start_addr(void);
237 
245 va_t* get_mod_init_end_addr(void);
246 
254 va_t* get_init_start_addr(void);
255 
263 int get_init_size(void);
264 
265 
266 
267 #endif /* __TZ_CPU_DATA_H__ */
u32 irq_stack[MAX_CORES][STACK_SIZE/4]
IRQ stack.
va_t * get_init_start_addr(void)
This function returns the start address of the region which has the initialization codes...
#define MAX_CORES
Definition: sw_board.h:26
u32 undefined_stack[MAX_CORES][STACK_SIZE/4]
Undefined stack.
u32 user_stack[MAX_CORES][STACK_SIZE/4]
User stack.
struct swi_temp_regs * temp_swi_regs
Temp registers used in SWI handler.
u32 _SW_KSYMTAB_END
u32 get_sw_fs_size(void)
u32 params_out_smp_stack[MAX_CORES][PARAM_OUT_STACK_SIZE]
Parameters out stack which is used store the return value of SMC call One Per CPU.
int get_init_size(void)
This function returns the size of the region which has the initialization codes and module initializa...
#define PARAM_STACK_SIZE
Definition: cpu_data.h:33
u32 secure_interrupt_set
Helps in emulating secure interrupts.
Structure to store register in SWI handler.
Definition: cpu_data.h:47
va_t * get_sw_data_start(void)
Function returns the starting address of the data section which is given in the Linker script...
Definition: cpu_data.c:226
u32 multi_core_mode
multi core mode
u32 valid_params_flag
Valid params flag.
int get_sw_data_size(void)
Function returns the size of data section which is given in the Linker script.
Definition: cpu_data.c:238
u32 secure_page_table[PAGE_TABLE_ENTRIES]
Secure page table.
u32 _SW_KSYMTAB
u32 abort_stack[MAX_CORES][STACK_SIZE/4]
Abort stack.
u32 spsr
Definition: cpu_data.h:49
#define PAGE_TABLE_ENTRIES
Definition: page_table.h:35
u32 fiq_stack[MAX_CORES][STACK_SIZE/4]
FIQ stack.
u32 temp_regs[32]
Temporary register storage.
u32 params_stack[PARAM_STACK_SIZE]
Parameters stack which is used to SMC call parameters.
#define STACK_SIZE
Definition: sw_board.h:32
va_t * get_sw_code_end(void)
This function returns the end address(virtual) of the secure world code with the help of the linker s...
Definition: cpu_data.c:167
u32 params_out_stack[PARAM_OUT_STACK_SIZE]
Parameters out stack which is used store the return value of SMC call.
u32 regs[13]
Definition: cpu_data.h:51
u32 monitor_stack[MAX_CORES][STACK_SIZE/4]
Monitor stack.
va_t * get_sw_code_start(void)
This function returns the start of the virtual address of the secure world from the linker script...
u32 lr
Definition: cpu_data.h:53
#define PARAM_OUT_STACK_SIZE
Definition: cpu_asm.h:94
va_t * get_sw_bss_start(void)
Function returns the starting address of the bss section which is given in the Linker script...
Definition: cpu_data.c:249
va_t * get_sw_text_start(void)
Function returns the starting address of the text section which is given in the Linker script...
Definition: cpu_data.c:178
u32 service_stack[MAX_CORES][STACK_SIZE/4]
Supervisor stack.
u32 valid_return_params_flag[MAX_CORES]
Valid return params flag.
int get_sw_text_size(void)
Function returns the size of text section which is given in the Linker script.
Definition: cpu_data.c:215
int get_sw_bss_size(void)
Function returns the size of bss section which is given in the Linker script.
Definition: cpu_data.c:261
u32 params_smp_stack[MAX_CORES][PARAM_STACK_SIZE]
va_t * get_mod_init_start_addr(void)
This function returns the start address of the region which has the module initialization codes...
va_t * get_sw_fs_start(void)
Function returns the start of the file system which is given in the Linker script.
va_t * get_mod_init_end_addr(void)
This function returns the end address of the region which has the module initialization codes...