]> git.ipfire.org Git - people/ms/u-boot.git/blob - arch/blackfin/include/asm/mach-common/bits/lockbox.h
Coding Style cleanup: replace leading SPACEs by TABs
[people/ms/u-boot.git] / arch / blackfin / include / asm / mach-common / bits / lockbox.h
1 /*
2 * Lockbox/Security Masks
3 */
4
5 #ifndef __BFIN_PERIPHERAL_LOCKBOX__
6 #define __BFIN_PERIPHERAL_LOCKBOX__
7
8 #ifndef __ASSEMBLY__
9
10 #include "bootrom.h"
11
12 /* SESR argument structure. Expected to reside at 0xFF900018. */
13 typedef struct SESR_args {
14 unsigned short usFlags; /* security firmware flags */
15 unsigned short usIRQMask; /* interrupt mask */
16 unsigned long ulMessageSize; /* message length in bytes */
17 unsigned long ulSFEntryPoint; /* entry point of secure function */
18 unsigned long ulMessagePtr; /* pointer to the buffer containing
19 the digital signature and message */
20 unsigned long ulReserved1; /* reserved */
21 unsigned long ulReserved2; /* reserved */
22 } tSESR_args;
23
24 /* Secure Entry Service Routine */
25 static void (* const sesr)(void) = (void *)_BOOTROM_SESR;
26
27 #endif
28
29 /* SESR flags argument bitfields */
30 #define SESR_FLAGS_STAY_AT_NMI 0x0000
31 #define SESR_FLAGS_DROP_BELOW_NMI 0x0001
32 #define SESR_FLAGS_NO_SF_DMA 0x0000
33 #define SESR_FLAGS_DMA_SF_TO_RUN_DEST 0x0002
34 #define SESR_FLAGS_USE_ADI_PUB_KEY 0x0000
35 #define SESR_FLAGS_USE_CUST_PUB_KEY 0x0100
36
37 /* Bit masks for SECURE_SYSSWT */
38 #define EMUDABL 0x00000001 /* Emulation Disable */
39 #define RSTDABL 0x00000002 /* Reset Disable */
40 #define L1IDABL 0x0000001c /* L1 Instruction Memory Disable */
41 #define L1DADABL 0x000000e0 /* L1 Data Bank A Memory Disable */
42 #define L1DBDABL 0x00000700 /* L1 Data Bank B Memory Disable */
43 #define DMA0OVR 0x00000800 /* DMA0 Memory Access Override */
44 #define DMA1OVR 0x00001000 /* DMA1 Memory Access Override */
45 #define EMUOVR 0x00004000 /* Emulation Override */
46 #define OTPSEN 0x00008000 /* OTP Secrets Enable */
47 #define L2DABL 0x00070000 /* L2 Memory Disable */
48
49 /* Bit masks for SECURE_CONTROL */
50 #define SECURE0 0x0001 /* SECURE 0 */
51 #define SECURE1 0x0002 /* SECURE 1 */
52 #define SECURE2 0x0004 /* SECURE 2 */
53 #define SECURE3 0x0008 /* SECURE 3 */
54
55 /* Bit masks for SECURE_STATUS */
56 #define SECMODE 0x0003 /* Secured Mode Control State */
57 #define NMI 0x0004 /* Non Maskable Interrupt */
58 #define AFVALID 0x0008 /* Authentication Firmware Valid */
59 #define AFEXIT 0x0010 /* Authentication Firmware Exit */
60 #define SECSTAT 0x00e0 /* Secure Status */
61
62 #endif