This is a *breaking API change* This commit: * makes seL4_Fault_tag_t common between the kernel and libsel4 * deprecates the existing functions from sel4/messages.h includes * introduces a new fault API in sel4/faults.h and * sel4/sel4_arch/faults.h * deprecates seL4_GetTag(), as the function did not work without the user calling seL4_SetTag() first (seL4_MessageInfo is passed in registers and not set in the IPC buffer) * removes previously deprecated functions (deprecated prior to 3.0.0) * updates the seL4 manual to reflect the changes
77 lines
1.8 KiB
C
77 lines
1.8 KiB
C
/*
|
|
* Copyright 2014, NICTA
|
|
*
|
|
* This software may be distributed and modified according to the terms of
|
|
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
|
|
* See "LICENSE_BSD2.txt" for details.
|
|
*
|
|
* @TAG(NICTA_BSD)
|
|
*/
|
|
|
|
#ifndef __API_CONSTANTS_H
|
|
#define __API_CONSTANTS_H
|
|
|
|
#ifdef HAVE_AUTOCONF
|
|
#include <autoconf.h>
|
|
#endif
|
|
|
|
#define LIBSEL4_BIT(n) (1ul<<(n))
|
|
|
|
#ifdef CONFIG_HARDWARE_DEBUG_API
|
|
/* API arg values for breakpoint API, "type" arguments. */
|
|
typedef enum {
|
|
seL4_DataBreakpoint = 0,
|
|
seL4_InstructionBreakpoint,
|
|
seL4_SingleStep,
|
|
seL4_SoftwareBreakRequest,
|
|
SEL4_FORCE_LONG_ENUM(seL4_BreakpointType)
|
|
} seL4_BreakpointType;
|
|
|
|
/* API arg values for breakpoint API, "access" arguments. */
|
|
typedef enum {
|
|
seL4_BreakOnRead = 0,
|
|
seL4_BreakOnWrite,
|
|
seL4_BreakOnReadWrite,
|
|
seL4_MaxBreakpointAccess,
|
|
SEL4_FORCE_LONG_ENUM(seL4_BreakpointAccess)
|
|
} seL4_BreakpointAccess;
|
|
|
|
/* Format of a debug-exception message. */
|
|
enum {
|
|
seL4_DebugException_FaultIP,
|
|
seL4_DebugException_ExceptionReason,
|
|
seL4_DebugException_TriggerAddress,
|
|
seL4_DebugException_BreakpointNumber,
|
|
seL4_DebugException_Length,
|
|
SEL4_FORCE_LONG_ENUM(seL4_DebugException_Msg)
|
|
} seL4_DebugException_Msg;
|
|
#endif
|
|
|
|
enum priorityConstants {
|
|
seL4_InvalidPrio = -1,
|
|
seL4_MinPrio = 0,
|
|
seL4_MaxPrio = CONFIG_NUM_PRIORITIES - 1
|
|
};
|
|
|
|
/* seL4_MessageInfo_t defined in api/shared_types.bf */
|
|
|
|
enum seL4_MsgLimits {
|
|
seL4_MsgLengthBits = 7,
|
|
seL4_MsgExtraCapBits = 2
|
|
};
|
|
|
|
enum {
|
|
seL4_MsgMaxLength = 120,
|
|
};
|
|
#define seL4_MsgMaxExtraCaps (LIBSEL4_BIT(seL4_MsgExtraCapBits)-1)
|
|
|
|
typedef enum {
|
|
seL4_NoFailure = 0,
|
|
seL4_InvalidRoot,
|
|
seL4_MissingCapability,
|
|
seL4_DepthMismatch,
|
|
seL4_GuardMismatch,
|
|
SEL4_FORCE_LONG_ENUM(seL4_LookupFailureType),
|
|
} seL4_LookupFailureType;
|
|
|
|
#endif /* __API_CONSTANTS_H */
|