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 #ifndef __CPU_DATA_H__
24 #define __CPU_DATA_H__
25 
26 #include <sw_types.h>
27 
28 #define INVOKE_NON_SECURE_KERNEL 0x0ffffff1
29 #define RET_FROM_SECURE_API 0x0ffffff2
30 
31 #define TASK_STACK_SIZE 2048
32 
33 #define PARAM_STACK_SIZE 8
34 #define PARAM_STACK_SIZE_SHIFT 5 /* ( 3 + 2) */
35 
36 #ifdef __CCODE__
37 
41 struct swi_temp_regs {
43  u64 spsr;
45  u64 regs[31];
46 };
47 
51 extern pa_t params_stack[PARAM_STACK_SIZE];
52 
53 extern u32 secure_interrupt_set;
54 
55 extern u32 valid_params_flag;
56 
57 extern unsigned long _SW_CODE_START;
58 extern unsigned long _SW_CODE_END;
59 extern unsigned long _SW_TEXT_START, _SW_TEXT_END;
60 extern unsigned long _SW_DATA_START;
61 extern unsigned long _SW_BSS_ALIGNED_END;
62 extern unsigned long _SW_IMAGE_START;
63 extern unsigned long _SW_IMAGE_END;
64 extern unsigned long _end;
65 extern unsigned long _MOD_INIT_SECTION_START;
66 extern unsigned long _MOD_INIT_SECTION_END;
67 extern unsigned long _MOD_INIT_PADDING_END;
68 
75 unsigned long get_sw_code_start(void);
76 
84 unsigned long get_sw_code_end(void);
85 
93 unsigned long* get_sw_fs_start(void);
94 
95 unsigned long get_sw_fs_size(void);
96 
104 unsigned long get_mod_init_start_addr(void);
105 
113 unsigned long get_mod_init_end_addr(void);
114 
115 unsigned long get_mod_init_size(void);
116 unsigned long get_sw_text_start(void);
117 unsigned long get_sw_text_size(void);
118 unsigned long get_sw_data_start(void);
119 unsigned long get_sw_data_bss_size(void);
120 unsigned long get_sw_image_start(void);
121 unsigned long get_sw_image_size(void);
122 #endif /* __CCODE__ */
123 #endif
u32 get_sw_fs_size(void)
unsigned long get_sw_image_size(void)
Function returns the image size.
Definition: cpu_data.c:161
#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 valid_params_flag
Valid params flag.
u32 spsr
Definition: cpu_data.h:49
unsigned long get_sw_data_bss_size(void)
Function returns the size of data and bss section which is given in the Linker script.
Definition: cpu_data.c:138
u32 params_stack[PARAM_STACK_SIZE]
Parameters stack which is used to SMC call parameters.
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 regs[13]
Definition: cpu_data.h:51
unsigned long get_sw_image_start(void)
Function returns the starting address of the image section which is given in the Linker script...
Definition: cpu_data.c:151
va_t * get_sw_code_start(void)
This function returns the start of the virtual address of the secure world from the linker script...
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
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
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...