mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-25 11:57:23 +00:00
Allows Python to handle hypervisor exceptions, and implements exception info display and basic debug commands. Signed-off-by: Hector Martin <marcan@marcan.st>
30 lines
618 B
C
30 lines
618 B
C
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef __EXCEPTION_H__
|
|
#define __EXCEPTION_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "types.h"
|
|
|
|
enum exc_guard_t {
|
|
GUARD_OFF = 0,
|
|
GUARD_SKIP,
|
|
GUARD_MARK,
|
|
GUARD_RETURN,
|
|
GUARD_TYPE_MASK = 0xff,
|
|
GUARD_SILENT = 0x100,
|
|
};
|
|
|
|
extern volatile enum exc_guard_t exc_guard;
|
|
extern volatile int exc_count;
|
|
|
|
void exception_initialize(void);
|
|
void exception_shutdown(void);
|
|
|
|
void print_regs(u64 *regs, int el12);
|
|
|
|
uint64_t el0_call(void *func, uint64_t a, uint64_t b, uint64_t c, uint64_t d);
|
|
uint64_t el1_call(void *func, uint64_t a, uint64_t b, uint64_t c, uint64_t d);
|
|
|
|
#endif
|