Michael Scire f41aaccaa2 exosphere: commit WIP warmboot progress
-15+ bugs fixed
-We now receive ~0x400 SMCs from user processes
 (including from psm) on wake-from-sleep
2018-08-16 18:45:38 -07:00

31 lines
643 B
C

#ifndef EXOSPHERE_SMC_API_H
#define EXOSPHERE_SMC_API_H
#include <stdint.h>
#define SMC_HANDLER_USER 0
#define SMC_HANDLER_PRIV 1
typedef struct {
uint64_t X[8];
} smc_args_t;
bool try_set_user_smc_in_progress(void);
void set_user_smc_in_progress(void);
void clear_user_smc_in_progress(void);
void set_priv_smc_in_progress(void);
void clear_priv_smc_in_progress(void);
uintptr_t get_smc_core012_stack_address(void);
uintptr_t get_exception_entry_stack_address(unsigned int core_id);
void set_version_specific_smcs(void);
void set_suspend_for_debug(void);
void call_smc_handler(unsigned int handler_id, smc_args_t *args);
#endif