My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tzhyp.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 implementation
25  */
26 
27 #ifndef TZHYP_H
28 #define TZHYP_H
29 
30 #include <cpu_asm.h>
31 
32 
33 #define GET_CORE_BOUNDARY(world) \
34  ((struct system_context *)GET_CORE_CONTEXT(world) + GUESTS_NO)
35 
36 #define GET_CORE_CONTEXT(context) \
37  ((char *)context + (get_cpu_id() * sizeof(struct system_context)\
38  * GUESTS_NO))
39 
40 #define GET_CORE_CONTEXT_BYID(context, id) \
41  ((char *)context + (id * sizeof(struct system_context) \
42  * GUESTS_NO))
43 
44 #define SET_CORE_CONTEXT(new, context) \
45  (context = (struct system_context *)((char *)new - (get_cpu_id() \
46  * sizeof(struct system_context) * GUESTS_NO)))
47 
48 
54 extern int tzhyp_init(void);
55 
59 extern void tzhyp_boot_ack_event(void);
60 
65 #endif
void tzhyp_boot_ack_event(void)
Hypervisor boot ack event.
Definition: tzhyp_boot.c:255
int tzhyp_init(void)
Trustzone hypervisor initialization.
Definition: tzhyp.c:103
void mon_nscpu_context_init()
Non secure cpu context initialization.
Definition: tzhyp_boot.c:218