2 * This confidential and proprietary software may be used only as
3 * authorised by a licensing agreement from ARM Limited
4 * (C) COPYRIGHT 2011 ARM Limited
6 * The entire notice above must be reproduced on all authorised
7 * copies and copies may only be made to the extent permitted
8 * by a licensing agreement from ARM Limited.
12 * @file mali_kbase_security.h
13 * Base kernel security capability APIs
16 #ifndef _KBASE_SECURITY_H_
17 #define _KBASE_SECURITY_H_
20 #define KBASE_SEC_FLAG_NOAUDIT (0u << 0) /* Silently handle privilege failure */
21 #define KBASE_SEC_FLAG_AUDIT (1u << 0) /* Write audit message on privilege failure */
22 #define KBASE_SEC_FLAG_MASK (KBASE_SEC_FLAG_AUDIT) /* Mask of all valid flag bits */
24 /* List of unique capabilities that have security access privileges */
26 /* Instrumentation Counters access privilege */
27 KBASE_SEC_INSTR_HW_COUNTERS_COLLECT = 1,
28 KBASE_SEC_MODIFY_PRIORITY
29 /* Add additional access privileges here */
30 } kbase_security_capability;
34 * kbase_security_has_capability - determine whether a task has a particular effective capability
35 * @param[in] kctx The task context.
36 * @param[in] cap The capability to check for.
37 * @param[in] flags Additional configuration information
38 * Such as whether to write an audit message or not.
39 * @return MALI_TRUE if success (capability is allowed), MALI_FALSE otherwise.
42 mali_bool kbase_security_has_capability(kbase_context *kctx, kbase_security_capability cap, u32 flags);
44 #endif /* _KBASE_SECURITY_H_ */