From 577daaebf096f5858361749f4ac272fa7d8fdee6 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Wed, 7 Aug 2019 23:51:25 +0200 Subject: [PATCH] thermosphere: remove breakpoint/watchpoint reg dump functions --- thermosphere/src/breakpoints.c | 2 +- ...store.h => breakpoints_watchpoints_load.h} | 3 -- ...store.s => breakpoints_watchpoints_load.s} | 54 ------------------- thermosphere/src/watchpoints.c | 2 +- 4 files changed, 2 insertions(+), 59 deletions(-) rename thermosphere/src/{breakpoints_watchpoints_save_restore.h => breakpoints_watchpoints_load.h} (87%) rename thermosphere/src/{breakpoints_watchpoints_save_restore.s => breakpoints_watchpoints_load.s} (60%) diff --git a/thermosphere/src/breakpoints.c b/thermosphere/src/breakpoints.c index b7b7a2cf1..e02797119 100644 --- a/thermosphere/src/breakpoints.c +++ b/thermosphere/src/breakpoints.c @@ -16,7 +16,7 @@ #include #include "breakpoints.h" -#include "breakpoints_watchpoints_save_restore.h" +#include "breakpoints_watchpoints_load.h" #include "utils.h" #include "sysreg.h" #include "arm.h" diff --git a/thermosphere/src/breakpoints_watchpoints_save_restore.h b/thermosphere/src/breakpoints_watchpoints_load.h similarity index 87% rename from thermosphere/src/breakpoints_watchpoints_save_restore.h rename to thermosphere/src/breakpoints_watchpoints_load.h index 8ca0b12f7..325e30d70 100644 --- a/thermosphere/src/breakpoints_watchpoints_save_restore.h +++ b/thermosphere/src/breakpoints_watchpoints_load.h @@ -18,7 +18,4 @@ #include "breakpoints_watchpoints_common.h" void loadBreakpointRegs(const DebugRegisterPair *regs, size_t num); -void saveBreakpointRegs(DebugRegisterPair *regs, size_t num); - void loadWatchpointRegs(const DebugRegisterPair *regs, size_t num); -void saveWatchpointRegs(DebugRegisterPair *regs, size_t num); \ No newline at end of file diff --git a/thermosphere/src/breakpoints_watchpoints_save_restore.s b/thermosphere/src/breakpoints_watchpoints_load.s similarity index 60% rename from thermosphere/src/breakpoints_watchpoints_save_restore.s rename to thermosphere/src/breakpoints_watchpoints_load.s index e938d5948..5a4aaf489 100644 --- a/thermosphere/src/breakpoints_watchpoints_save_restore.s +++ b/thermosphere/src/breakpoints_watchpoints_load.s @@ -39,33 +39,6 @@ loadBreakpointRegs: isb ret -// Precondition: x1 <= 16 -.section .text.storeBreakpointRegs, "ax", %progbits -.type storeBreakpointRegs, %function -.global storBreakpointRegs -storeBreakpointRegs: - // x1 = number - dsb sy - isb - - adr x16, 1f - add x0, x0, #(16 * 8) - mov x4, #(16 * 12) - sub x4, x4, x1,lsl #3 - sub x4, x4, x1,lsl #2 - add x16, x16, x4 - br x16 - - 1: - .irp count, 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 - mrs x2, dbgbcr\count\()_el1 - mrs x3, dbgbvr\count\()_el1 - stp x2, x3, [x0, #-0x10]! - - .endr - ret - - // Precondition: x1 <= 16 .section .text.loadWatchpointRegs, "ax", %progbits .type loadWatchpointRegs, %function @@ -89,30 +62,3 @@ loadWatchpointRegs: dsb sy isb ret - -// Precondition: x1 <= 16 -.section .text.storeWatchpointRegs, "ax", %progbits -.type storeWatchpointRegs, %function -.global storWatchpointRegs -storeWatchpointRegs: - // x1 = number - - dsb sy - isb - - adr x16, 1f - add x0, x0, #(16 * 8) - mov x4, #(16 * 12) - sub x4, x4, x1,lsl #3 - sub x4, x4, x1,lsl #2 - add x16, x16, x4 - br x16 - - 1: - .irp count, 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 - mrs x2, dbgwcr\count\()_el1 - mrs x3, dbgwvr\count\()_el1 - stp x2, x3, [x0, #-0x10]! - - .endr - ret diff --git a/thermosphere/src/watchpoints.c b/thermosphere/src/watchpoints.c index 8e973d696..116202755 100644 --- a/thermosphere/src/watchpoints.c +++ b/thermosphere/src/watchpoints.c @@ -16,7 +16,7 @@ #include #include "watchpoints.h" -#include "breakpoints_watchpoints_save_restore.h" +#include "breakpoints_watchpoints_load.h" #include "utils.h" #include "sysreg.h" #include "arm.h"