blob: ab68259b7652de80884b71d0f7fa439f9a1132fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* Copyright (c) 2012, ARM Limited. All rights reserved.
*
* Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that the
* following conditions are met:
*
* Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
*
* Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and
* the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of ARM nor the names of its
* contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
*/
#ifndef __MEM_TRAP_H__
#define __MEM_TRAP_H__
/*
* Data structure that holds info about all traps populated
* in the 2nd stage translation tables. It does not need to
* interpret the traps but simple save and restore them.
* This should prevent the usage of trap specific save/restore
* routines.
*/
typedef struct trap_data {
/* Does this structure contain valid data */
unsigned valid;
/* Which cluster to save/restore this trap on */
unsigned cluster_id;
/* Translation table address */
unsigned long long table;
/* Index corresponding to mapping */
unsigned index;
/* TODO: Revisit why we need two variables here */
/* Original Descriptor */
unsigned long long prev_desc;
/* Current Descriptor */
unsigned long long cur_desc;
} mem_trap_data;
extern unsigned mem_trap_setup(unsigned, mem_trap_data *);
extern mem_trap_data s2_trap_section$$Base;
extern unsigned s2_trap_section$$Length;
#endif /* __MEM_TRAP_H__ */
|