arch/x86: Rename breakpoint removal function

Match function name "init" with "remove" by renaming all
*_breakpoint_disable() to *_breakpoint_remove().

Change-Id: Id3da25cfa6fc0594887f3112e269e57e8ecb32b3
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85540
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Rudolph 2024-12-09 14:57:31 +01:00 committed by Lean Sheng Tan
commit e9c546b153
8 changed files with 21 additions and 21 deletions

View file

@ -7,13 +7,13 @@
/* Places data and instructions breakpoints at address zero. */
void null_breakpoint_init(void);
void null_breakpoint_disable(void);
void null_breakpoint_remove(void);
#else
static inline void null_breakpoint_init(void)
{
/* Not implemented */
}
static inline void null_breakpoint_disable(void)
static inline void null_breakpoint_remove(void)
{
/* Not implemented */
}

View file

@ -7,13 +7,13 @@
/* Places a data breakpoint at stack canary. */
void stack_canary_breakpoint_init(void);
void stack_canary_breakpoint_disable(void);
void stack_canary_breakpoint_remove(void);
#else
static inline void stack_canary_breakpoint_init(void)
{
/* Not implemented */
}
static inline void stack_canary_breakpoint_disable(void)
static inline void stack_canary_breakpoint_remove(void)
{
/* Not implemented */
}

View file

@ -58,16 +58,16 @@ void null_breakpoint_init(void)
create_instruction_breakpoint();
}
void null_breakpoint_disable(void)
void null_breakpoint_remove(void)
{
breakpoint_remove(null_fetch_bp);
breakpoint_remove(null_deref_bp);
}
static void null_breakpoint_disable_hook(void *unused)
static void null_breakpoint_remove_hook(void *unused)
{
null_breakpoint_disable();
null_breakpoint_remove();
}
BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, null_breakpoint_disable_hook, NULL);
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, null_breakpoint_disable_hook, NULL);
BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, null_breakpoint_remove_hook, NULL);
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, null_breakpoint_remove_hook, NULL);

View file

@ -49,15 +49,15 @@ void stack_canary_breakpoint_init(void)
create_stack_canary_breakpoint(addr);
}
void stack_canary_breakpoint_disable(void)
void stack_canary_breakpoint_remove(void)
{
breakpoint_remove(stack_canary_bp);
}
static void stack_canary_breakpoint_disable_hook(void *unused)
static void stack_canary_breakpoint_remove_hook(void *unused)
{
stack_canary_breakpoint_disable();
stack_canary_breakpoint_remove();
}
BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, stack_canary_breakpoint_disable_hook, NULL);
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, stack_canary_breakpoint_disable_hook, NULL);
BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, stack_canary_breakpoint_remove_hook, NULL);
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, stack_canary_breakpoint_remove_hook, NULL);

View file

@ -181,7 +181,7 @@ static void setup_realmode_idt(void)
/* It's expected that we write to the NULL page in the first two iterations of the
following loop, so temporarily disable the NULL breakpoint. */
null_breakpoint_disable();
null_breakpoint_remove();
/* Copy IDT stub code for each interrupt. This might seem wasteful
* but it is really simple

View file

@ -412,8 +412,8 @@ static void do_fsp_memory_init(const struct fspm_context *context, bool s3wake)
fsp_debug_before_memory_init(fsp_raminit, upd, &fspm_upd);
/* FSP disables the interrupt handler so remove debug exceptions temporarily */
null_breakpoint_disable();
stack_canary_breakpoint_disable();
null_breakpoint_remove();
stack_canary_breakpoint_remove();
post_code(POSTCODE_FSP_MEMORY_INIT);
timestamp_add_now(TS_FSP_MEMORY_INIT_START);
if (ENV_X86_64 && CONFIG(PLATFORM_USES_FSP2_X86_32))

View file

@ -78,8 +78,8 @@ static void fsp_notify(enum fsp_notify_phase phase)
post_code(data->post_code_before);
/* FSP disables the interrupt handler so remove debug exceptions temporarily */
null_breakpoint_disable();
stack_canary_breakpoint_disable();
null_breakpoint_remove();
stack_canary_breakpoint_remove();
if (ENV_X86_64 && CONFIG(PLATFORM_USES_FSP2_X86_32))
ret = protected_mode_call_1arg(fspnotify, (uintptr_t)&notify_params);
else

View file

@ -132,8 +132,8 @@ static void do_silicon_init(struct fsp_header *hdr)
post_code(POSTCODE_FSP_SILICON_INIT);
/* FSP disables the interrupt handler so remove debug exceptions temporarily */
null_breakpoint_disable();
stack_canary_breakpoint_disable();
null_breakpoint_remove();
stack_canary_breakpoint_remove();
if (ENV_X86_64 && CONFIG(PLATFORM_USES_FSP2_X86_32))
status = protected_mode_call_1arg(silicon_init, (uintptr_t)upd);
else