This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Personality_inlines.h
81 lines (65 loc) · 2.99 KB
/
Personality_inlines.h
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
80
81
/* begin_generated_IBM_copyright_prolog */
/* */
/* This is an automatically generated copyright prolog. */
/* After initializing, DO NOT MODIFY OR MOVE */
/* ================================================================ */
/* */
/* Licensed Materials - Property of IBM */
/* */
/* Blue Gene/Q */
/* */
/* (C) Copyright IBM Corp. 2010, 2012 */
/* */
/* US Government Users Restricted Rights - */
/* Use, duplication or disclosure restricted */
/* by GSA ADP Schedule Contract with IBM Corp. */
/* */
/* This software is available to you under the */
/* Eclipse Public License (EPL). */
/* */
/* ================================================================ */
/* */
/* end_generated_IBM_copyright_prolog */
#ifndef _PERSONALITY_INLINES_H_ // Prevent multiple inclusion.
#define _PERSONALITY_INLINES_H_
#include <hwi/include/common/compiler_support.h>
#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
#include <stdint.h>
#include <firmware/include/personality.h>
#include <cnk/include/Config.h>
extern NodeState_t NodeState;
__INLINE__ uint64_t Pers_GetTraceConfig( void )
{
// return(-1);
return(0);
}
__INLINE__ int Personality_IsMambo( void )
{
return ((GetPersonality()->Kernel_Config.NodeConfig & PERS_ENABLE_Mambo) ? 1 : 0);
}
__INLINE__ int Personality_IsFPGA( void )
{
return ((GetPersonality()->Kernel_Config.NodeConfig & PERS_ENABLE_FPGA) ? 1 : 0);
}
__INLINE__ int Personality_IsCycleSim( void )
{
return((GetPersonality()->Kernel_Config.NodeConfig & PERS_ENABLE_Simulation) ? 1 : 0);
}
__INLINE__ int Personality_IsSimulation( void )
{
return ((Personality_IsMambo() || Personality_IsFPGA() || Personality_IsCycleSim()) ? 1 : 0);
}
__INLINE__ int Personality_CiosEnabled( void )
{
return((GetPersonality()->Kernel_Config.NodeConfig & PERS_ENABLE_IOServices) ? 1 : 0);
}
__INLINE__ int Personality_ApplicationPreLoaded( void )
{
return ((GetPersonality()->Kernel_Config.NodeConfig & PERS_ENABLE_AppPreload) ? 1 : 0);
}
__INLINE__ int Personality_IsJTagConsole( void )
{
return ((GetPersonality()->Kernel_Config.NodeConfig & PERS_ENABLE_JTagConsole) ? 1 : 0);
}
#endif // __KERNEL__ and not __ASSEMBLY__
#endif // Add nothing below this line.