blob: abebaa9657128033ff4af2424b54b781e2274f0c (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
/*
* 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 __EVENTS_H__
#define __EVENTS_H__
#include "context.h"
#include "virt_helpers.h"
#include "misc.h"
/*
* Events for inter/intra-cluster sync
*/
#define MAX_EVENTS 12
/* Inter cluster events */
#define IB_CONTEXT_DONE 0
#define OB_CONTEXT_DONE 1
/* Intra cluster events */
#define L2_READY 2
#define L1_DONE 3
#define CCI_READY 4
#define GIC_READY 5
/* Cores have finished performing inbound headstart specific initialisation */
#define HS_DONE 6
/*
* Holding pen to ensure that all other context is restored only after all
* cpus have finished initialised local and global HYP mode context.
*/
#define HYP_CONTEXT_DONE 7
/*
* Holding pen to ensure that all cores have setup the local and global
* virtualisor context before any one of them uses it
*/
#define VIRT_SETUP_DONE 8
/*
* Event to synchronise creation of HYP mode pagetables
*/
#define VIRT_PGT_DONE 9
#define CACHE_GEOM_DONE 10
#define VID_REGS_DONE 11
/* Defines for Secure events */
#define MAX_SEC_EVENTS 4
#define SEC_L1_DONE 0
#define OB_SHUTDOWN 1
#define FLUSH_L2 2
#define SETUP_RST 3
extern void set_event(unsigned, unsigned);
extern void set_events(unsigned, unsigned);
extern unsigned get_event(unsigned, unsigned);
extern void reset_event(unsigned, unsigned);
extern void wait_for_event(unsigned, unsigned);
extern void wait_for_events(unsigned, unsigned);
#endif /* __EVENTS_H__ */
|