From patchwork Wed Dec 10 00:07:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 867 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325335; bh=O7wg8GZtwdBriiH2Rrii1lOrNWdt8qOj1dfpahGABdY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=h8plMqJ4Oa20FHakBEFBTRs2LrxQCR4D/N6jmJe2EW5m0J49T2Wts317JbZjNF6nC yvx73k7itr3cojbG+zynMK9gBFUJCRnvlJ/J3IqHhORFMtrDNtCEp3h7J58gkxkUEn +fThzpNEe3Rvt0dQBrAk6Ppmvno0X5kHedR7NQTWdTnQxJ7GtKHuCVrrG/7weAI+3A 4Tnt9T2XUoub0YbGz0y8qy21MBYdl7Hx7QmJ19fh9tiNWwASNHXWusX/gR81c4TW/Y JXc6fcyEGw0NQyMluDnRwUKdFeQ1TWs4SUv9sTTzSi6rzyv3rm3Dl640SGQtKwSzD6 zUzWuo8v4rQ1w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D106368A48 for ; Tue, 9 Dec 2025 17:08:55 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id X88KJKO-m-op for ; Tue, 9 Dec 2025 17:08:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325333; bh=O7wg8GZtwdBriiH2Rrii1lOrNWdt8qOj1dfpahGABdY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=aLqbDCn9s9aIIXrNq8U+XP7PrylcQfCtcWDGz5YE7juJ3MP2i8OQZ2mGvk4DVyMqv LXkrBjK/tl0ytPmyAt/E3oRALD+JNG/OxgSdPXtbWW5oKoUO4+BLYjpNpjIj10k381 w7LrPK95Wj1bYdoHgOriMtNZrDzFZxWPHpnWwTwJr1wCszdHgDE/EgPaQLkwLi5+ac 7hXgSZBbxICSbJ/7OjA9/3Nja7WtK6bFjvq7gZeIJVxMi4bXWcRNYXshUS9L+Zh+5a MVtAOIJSw2CjoZMDaZ9vpaYVFqNFzrDbuDRDd7sBZgY5hZORp91MNq2BoMdXr4uK2t W6YX4oRzdsdSQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DA86B687A7 for ; Tue, 9 Dec 2025 17:08:53 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325325; bh=wUFWwzhFMV4qIP+RDR91iCUR61mnirMM+rQA57rf/1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iCjQ0aX7bnbV7P2YDHaLPO8TQPpd9nd+TvzCegc3rwDW3f2J1FXr6baJ8qkmtL8vR xCSL9PKi7NVWVs/XI6lvraj5BgJqBQDyM3pl3AHtYDYQ9ByJ6Q0Za1vfe8WkLovxiT okB7vASMWKZmCjXZ6ScPAXq7kLDWkEryyY0IwzwIo2GR/H9+3ue/Z83zPNBUmoXdDd Rx3kSfn88boBuikOQid1oZ+6r2nxqDt5jBoD+jy4RCOLu5nI6Vl6CBD8hU6qrVTFvr gzFP1QpBSe16+JCEBg3G7qYYbwbpW0Y6BUvL7hR4SMVv2lvx+y2KnSFrHxCUD43iTG 3Rc454f64TdAg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 02106689EA; Tue, 9 Dec 2025 17:08:45 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id czezRY44oKoi; Tue, 9 Dec 2025 17:08:44 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325323; bh=84ErNq1MZ6r2HGzyQKaMsLD6GkpCEa3XBDf6TPHS1MI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sTa3faxPysEAER1AXWOQrQv1ypFHjR5fUMaFgo5x8Vp1ZOdq00/HDjNhkt8xiyRuR 6F/pJab3sSYhB2ZQ5My5bBeSjLJ9CQlT0PBHYSkbaKSmLsAYD0+WkCG4iMk/LUq+fO wAF86+BypU5GGQ9tI70xDiylY7TybSFoIZ75MOwjKzE5SVsu/hvxhKcSkva1A7g9oU xbJNhJPDw+mHHO6t9Z08zwnDeG73emzoqncFqODzpL1+URAB7AuKGJ5DXUYs8AbWro ddQH95ghIcokKoS9MMznm8yx3hdy4qfx7CH8aYg1Kjor/6CBCX/C5s1+B+yrUhHJiB PAAED+vmAI35Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1BB41687A7; Tue, 9 Dec 2025 17:08:43 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 9 Dec 2025 17:07:01 -0700 Message-ID: <20251210000737.180797-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251210000737.180797-1-sjg@u-boot.org> References: <20251210000737.180797-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 3RIXQVMRDRAX3ZRR246HCHHYZ635BZ57 X-Message-ID-Hash: 3RIXQVMRDRAX3ZRR246HCHHYZ635BZ57 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 10/35] malloc: Use mcheck.h header instead of local declaration List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Include and remove the local declaration of mcheck_on_ramrelocation() to use the proper header file. Co-developed-by: Claude Signed-off-by: Simon Glass --- 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 #include #include +#include #include #include #include @@ -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