From: Simon Glass <simon.glass@canonical.com> Include <mcheck.h> and remove the local declaration of mcheck_on_ramrelocation() to use the proper header file. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- common/board_f.c | 2 +- include/mcheck.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/board_f.c b/common/board_f.c index 879862865e1..a3e4c69d449 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -33,6 +33,7 @@ #include <log.h> #include <malloc.h> #include <mapmem.h> +#include <mcheck.h> #include <os.h> #include <post.h> #include <relocate.h> @@ -723,7 +724,6 @@ static int reloc_bloblist(void) return 0; } -void mcheck_on_ramrelocation(size_t offset); static int setup_reloc(void) { if (!(gd->flags & GD_FLG_SKIP_RELOC)) { diff --git a/include/mcheck.h b/include/mcheck.h index bd506ae6291..b170acf6281 100644 --- a/include/mcheck.h +++ b/include/mcheck.h @@ -48,4 +48,7 @@ void mcheck_check_all(void); */ enum mcheck_status mprobe(void *__ptr); +/* Called during RAM relocation to reset the heap registry */ +void mcheck_on_ramrelocation(size_t offset); + #endif -- 2.43.0