Files
seL4/include/api/failures.h
Saer Debel a221ee1ca8 Enabled IPC debug features under new config
Introduced a new config flag to enable
userError format strings to be written to the IPC buffer.
Another config bool has been introduced to toggle
printing the error out and this can also be set at runtime.

Signed-off-by: Saer Debel <saer.debel@data61.csiro.au>
2020-04-06 14:21:46 +10:00

51 lines
1.1 KiB
C

/*
* Copyright 2014, General Dynamics C4 Systems
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include <types.h>
#include <sel4/errors.h>
#include <sel4/constants.h>
/* These datatypes differ markedly from haskell, due to the
* different implementation of the various fault monads */
enum exception {
EXCEPTION_NONE,
EXCEPTION_FAULT,
EXCEPTION_LOOKUP_FAULT,
EXCEPTION_SYSCALL_ERROR,
EXCEPTION_PREEMPTED
};
typedef word_t exception_t;
typedef word_t syscall_error_type_t;
struct syscall_error {
word_t invalidArgumentNumber;
word_t invalidCapNumber;
word_t rangeErrorMin;
word_t rangeErrorMax;
word_t memoryLeft;
bool_t failedLookupWasSource;
syscall_error_type_t type;
};
typedef struct syscall_error syscall_error_t;
#ifdef CONFIG_KERNEL_INVOCATION_REPORT_ERROR_IPC
struct debug_syscall_error {
word_t errorMessage[DEBUG_MESSAGE_MAXLEN];
};
typedef struct debug_syscall_error debug_syscall_error_t;
extern debug_syscall_error_t current_debug_error;
#endif
extern lookup_fault_t current_lookup_fault;
extern seL4_Fault_t current_fault;
extern syscall_error_t current_syscall_error;