My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sw_cpu_helper.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 __SW_CPU_HELPER_H__
24 #define __SW_CPU_HELPER_H__
25 
26 #include <sw_types.h>
27 
28 #define SECURE 0x0
29 #define NONSECURE 0x1
30 
31 #define FIQ_ROUTED_FROM_MON 0x10
32 #define SKIP_SAVE_CXT 0x20
33 
34 
35 #ifdef __CCODE__
36 
41 u32 get_cpu_id(void);
42 
48 u32 get_clidr_el1(void);
49 
53 void set_csselr_el1();
54 
60 u32 get_ccsidr_el1(void);
61 
67 u32 get_esr(void);
68 
74 u32 get_elr(void);
75 
81 u64 get_far(void);
82 
88 u32 get_scr_el3(void);
89 
93 void set_scr_el3();
94 
98 void set_esr_el1();
99 
105 u64 get_idaa64pfr0_el1(void);
106 
110 void cpu_idle(void);
111 
112 /* start, end, value */
120 void arch_memset(void *, void *, u64 val);
121 
122 /* src, destination */
130 void arch_memcpy(void *, void *, u64 count);
131 
135 void secure_monitor_call();
136 
140 void hypervisor_call();
141 
147 u32 cpu_irq_save(void);
148 
154 void cpu_irq_restore(u32 cpsr);
155 #endif
156 
157 #endif
void cpu_irq_restore(irq_flags_t flags)
restores the interrupt request
Definition: cpu.c:139
s32int count
Definition: virtual_keyboard.c:40
irq_flags_t cpu_irq_save(void)
saves interrupt request
Definition: cpu.c:120
u32 get_cpu_id(void)