aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/include/mach/omap-secure.h
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2011-06-06 08:26:49 -0400
committerKevin Hilman <khilman@ti.com>2011-12-08 14:29:00 -0500
commitba9456ac9c72a7a5d4d59340aba4259351832521 (patch)
tree557647722688c75caef4de8d9fdf30665118cd0d /arch/arm/mach-omap2/include/mach/omap-secure.h
parent3c50729b3fa1cd8ca1f347e6caf1081204cf1a7c (diff)
ARM: OMAP: Add Secure HAL and monitor mode API infrastructure.
On OMAP secure/emulation devices, certain APIs are exported by secure code. Add an infrastructure so that relevant operations on secure devices can be implemented using it. While at this, rename omap44xx-smc.S to omap-smc.S since the common APIs can be used on other OMAP's too. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Vishwanath BS <vishwanath.bs@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/include/mach/omap-secure.h')
-rw-r--r--arch/arm/mach-omap2/include/mach/omap-secure.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/include/mach/omap-secure.h b/arch/arm/mach-omap2/include/mach/omap-secure.h
new file mode 100644
index 000000000000..26e7bcc49adc
--- /dev/null
+++ b/arch/arm/mach-omap2/include/mach/omap-secure.h
@@ -0,0 +1,40 @@
1/*
2 * omap-secure.h: OMAP Secure infrastructure header.
3 *
4 * Copyright (C) 2011 Texas Instruments, Inc.
5 * Santosh Shilimkar <santosh.shilimkar@ti.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef OMAP_ARCH_OMAP_SECURE_H
12#define OMAP_ARCH_OMAP_SECURE_H
13
14/* Monitor error code */
15#define API_HAL_RET_VALUE_NS2S_CONVERSION_ERROR 0xFFFFFFFE
16#define API_HAL_RET_VALUE_SERVICE_UNKNWON 0xFFFFFFFF
17
18/* HAL API error codes */
19#define API_HAL_RET_VALUE_OK 0x00
20#define API_HAL_RET_VALUE_FAIL 0x01
21
22/* Secure HAL API flags */
23#define FLAG_START_CRITICAL 0x4
24#define FLAG_IRQFIQ_MASK 0x3
25#define FLAG_IRQ_ENABLE 0x2
26#define FLAG_FIQ_ENABLE 0x1
27#define NO_FLAG 0x0
28
29
30/* Secure low power HAL API index */
31#define OMAP4_HAL_SAVESECURERAM_INDEX 0x1a
32#define OMAP4_HAL_SAVEHW_INDEX 0x1b
33#define OMAP4_HAL_SAVEALL_INDEX 0x1c
34#define OMAP4_HAL_SAVEGIC_INDEX 0x1d
35
36extern u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs,
37 u32 arg1, u32 arg2, u32 arg3, u32 arg4);
38extern u32 omap_smc2(u32 id, u32 falg, u32 pargs);
39
40#endif /* OMAP_ARCH_OMAP_SECURE_H */