mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
12 lines
268 B
C
12 lines
268 B
C
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-exception-levels */
|
|
|
|
#include <stdio.h>
|
|
#include <inttypes.h>
|
|
|
|
int main(void) {
|
|
uint64_t el;
|
|
__asm__ ("mrs %0, CurrentEL;" : "=r" (el) : :);
|
|
printf("%" PRIu64 "\n", el >> 2);
|
|
return 0;
|
|
}
|