My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tzhyp_global.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  * Header for Trustzone based hypervisor global implementation
25  */
26 
27 #ifndef TZHYP_GLOBAL_H
28 #define TZHYP_GLOBAL_H
29 
30 #include <sw_types.h>
31 #include <system_context.h>
32 #include <tzhyp_config.h>
33 #include <nsk_boot.h>
34 #include <sw_board.h>
35 #include <sw_mcore.h>
36 
41 
45 extern struct system_context s_world[1];
46 
50 extern struct system_context *ns_sys_current;
51 
55 extern struct system_context *s_sys_current;
56 
60 extern u32 ns_preempt_flag;
61 
65 extern u32 ns_switch_flag;
66 
68 
72 extern u32 kernel_start, kernel_end;
73 
77 extern u32 kernel_2_start, kernel_2_end;
78 
83 
89 extern int tzhyp_guest_init(void);
90 
96 extern int tzhyp_schedevent_init(void);
97 
101 extern void tzhyp_schedule_guest(void);
102 
106 extern void tzhyp_device_context_init(void);
107 
108 extern void tzhyp_device_switch(struct system_context *,
109  struct system_context *);
110 
111 
112 extern int nsk_load(struct nsk_boot_info *);
113 
114 #ifdef CONFIG_MULTI_GUESTS_SUPPORT
115 
120 int nsk_initrd_load(void);
121 #endif
122 
123 #endif
u32 tzhyp_nsadmin_start
int nsk_load(struct nsk_boot_info *)
Loads the non-secure kernel by getting the boot info.
Definition: nsk_loader.c:53
#define MAX_CORES
Definition: sw_board.h:26
u32 ns_switch_flag
NS switch flag to indicate TLB flush.
Definition: tzhyp.c:69
u32 kernel_2_start
void tzhyp_device_context_init(void)
Hypervisor device context initialization.
Definition: tzhyp_devices.c:58
#define GUESTS_NO
Definition: tzhyp_config.h:35
int tzhyp_schedevent_init(void)
Trustzone hypervisor schedule event initialization.
Definition: tzhyp_sched.c:111
u32 initrd_image_end
struct system_context * ns_sys_current
Non secure and Secure context pointers.
Definition: tzhyp.c:53
u32 tzhyp_nsadmin_end
Definition: system_context.h:133
u32 kernel_start
u32 kernel_end
int tzhyp_guest_init(void)
Initialize guests.
Definition: tzhyp_boot.c:70
u32 initrd_image_start
void tzhyp_schedule_guest(void)
Hypervisor scheduler does the job of scheduling between multiple guest OS.
Definition: tzhyp_sched.c:52
struct system_context * s_sys_current
Definition: tzhyp.c:59
struct system_context ns_world[MAX_CORES *GUESTS_NO]
Non secure task contexts.
Definition: tzhyp.c:43
struct system_context s_world[1]
Common Secure context.
Definition: tzhyp.c:48
u32 ns_preempt_flag
Non secure preempt flag.
Definition: tzhyp.c:64
void tzhyp_device_switch(struct system_context *, struct system_context *)
Hypervisor device switching between cur and next.
Definition: tzhyp_devices.c:44
Definition: nsk_boot.h:53
u32 kernel_2_end