From 9fea200a3b3344f0aea6e1e9fdd640586ce02293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Fri, 7 Jun 2019 00:00:00 +0000 Subject: [PATCH] aarch64: remove mistakenly copied dump_regs.c which does not work in userland --- userland/arch/aarch64/dump_regs.c | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 userland/arch/aarch64/dump_regs.c diff --git a/userland/arch/aarch64/dump_regs.c b/userland/arch/aarch64/dump_regs.c deleted file mode 100644 index 44cd36f..0000000 --- a/userland/arch/aarch64/dump_regs.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Dump non-EL0 readable registers. We need a separate program from EL0 - * because we cannot determine the current EL from EL0, since CurrentEL - * cannot be read from it. - */ - -#include -#include - -int main(void) { - uint32_t sctlr_el1; - __asm__ ("mrs %0, sctlr_el1" : "=r" (sctlr_el1) : :); - printf("SCTLR_EL1 0x%" PRIX32 "\n", sctlr_el1); - printf("SCTLR_EL1.A 0x%" PRIX32 "\n", (sctlr_el1 >> 1) & 1); - - uint64_t CurrentEL; - __asm__ ("mrs %0, CurrentEL;" : "=r" (CurrentEL) : :); - printf("CurrentEL 0x%" PRIX64 "\n", CurrentEL); - /* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-exception-levels */ - printf("CurrentEL.EL 0x%" PRIX64 "\n", CurrentEL >> 2); - return 0; -}