1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-09-20 05:53:24 +01:00
Atmosphere/exosphere/utils.h

17 lines
387 B
C
Raw Normal View History

2018-02-17 22:54:00 +00:00
#ifndef EXOSPHERE_UTILS_H
#define EXOSPHERE_UTILS_H
2018-02-18 02:50:39 +00:00
#include <stdint.h>
2018-02-17 22:54:00 +00:00
void panic(void);
unsigned int read32le(const unsigned char *dword, unsigned int offset);
unsigned int read32be(const unsigned char *dword, unsigned int offset);
2018-02-18 02:50:39 +00:00
static inline uint32_t get_core_id(void) {
uint32_t core_id;
asm volatile("mrs %0, MPIDR_EL1" : "=r"(core_id));
return core_id;
}
2018-02-17 22:54:00 +00:00
#endif