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"