From patchwork Mon Sep 16 07:25:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 1985988 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=bygxdmxg; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=kB44uAxy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X6c116YSvz1y1m for ; Mon, 16 Sep 2024 17:26:45 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7L4Qe2OoNAaTf+cDt9fL219Rcumq7PBP0ielAqYmbbk=; b=bygxdmxgs9+ccK DcwaJXKKFNR3jMEwDkFBUoWcGFXhYrURCeKTrbLcwWj6vpy6J6JdIujda8OJ0aNMUurSiKRWz9j41 bATw6WiI/yzHhALaf9q2LgOC22ZaXr80OSEb0wOxmQWSM8PEmiCuCxA468QOcZfsnsjIl4HmTj3l+ V4b4R/Y82EFqsLTwGPKPv02ZW97SpdflCG0mxvunHPEj2UfJkvb0u+0yo+GhC06pcUWkTqwAU5mhN 1PX7zSh0mMe65eK6CgtEuSepZM33xp6T1LoZgp0j0jQm6QOwqywDYCPJCYIXrkV+xx74Bp3EMXlvG 99Dt3DlK8bW54mSbjjRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sq687-00000003JJc-02VZ; Mon, 16 Sep 2024 07:26:39 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sq684-00000003JJC-3OYI for opensbi@lists.infradead.org; Mon, 16 Sep 2024 07:26:37 +0000 Received: by mail-pl1-x642.google.com with SMTP id d9443c01a7336-206f9b872b2so37213715ad.3 for ; Mon, 16 Sep 2024 00:26:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726471596; x=1727076396; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ALhG8BBH3/tx+513W7WyMbVTfxdvgoJ1uml6lr7q4u0=; b=kB44uAxya0th5DylTdBlFHQUUiLUBDpFzRxQLQmb0XSiy3+ngbcTC6yU3JVzfbRtGI UEPAE62iGCadNrAV4a6cFPicLecjMSjJsyk9oSiDIyY5xIDOTG0aFJpUqwN6MYeAzx9Z Rbqw4LfMyweIxDvqdDAOoGM5g6ptwM9/VMaDnoyp4IWuSV4UzxVk5CPo+0MIPfWNe/Hf hcNmB6oYpuey6LdWSDbbgNI1nzBNszWK4s1WR8YHBqpT+BrXMzjTCu53QQCWlxH5VCv3 3zT/3lj7lgOVcii4bnp+obrbqeTVl8fOKLI/CHdYQRG10Kozmg0xKogHVlKqjyBKIUW1 j8Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726471596; x=1727076396; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ALhG8BBH3/tx+513W7WyMbVTfxdvgoJ1uml6lr7q4u0=; b=S78cxYsotVswiUEGLiV1r3o21QPIWy3o79oCYLF4+BARzVoT9ItLbeh6kqwH4wQoz9 nUjFfvhWpCm4byL2VC+hJQvmcGjVauGgZlT2OWYtFDmO0CyzAHHkhhdV2ljbn7w2FZSn wkERM+JMgfTkH8nx0VTZs6xb2VuMqtefpFPMzMv61Tu0MNTW/wSAiS+0YGMn6qiIZ85C H6+3DUdy1YZdXMOZOdpcQYmGB6IEZ+FWIF0c5e3ZYixzXaaxNXTGiWrnT5iKWUMBb8A+ EiCK0hF3HUGjxae7936FIbdVeTiVIA6hV7/caNoK6Rp713yxZwoRQn6991PFcr7VI2H7 Rscw== X-Gm-Message-State: AOJu0Yy41oZdxtWx1IBudR4U8KzRJywcMvByFnXJ2iakSQUi0e6/yGZ1 gfS0YBP0Pp2VGUcNGptzGShGFI6EM6e+qAN/c+tQM0AIFKfhge0LH3XXJvLt X-Google-Smtp-Source: AGHT+IHbMJeT8OESSn+spxSQJoK02hB5djEDyF5ERv57OsgJlWKhbw+7sG8oyinMkIJ7skyBa2Yp5w== X-Received: by 2002:a17:903:2291:b0:202:1a0b:7cfd with SMTP id d9443c01a7336-2076e3d5bdfmr207494205ad.28.1726471595760; Mon, 16 Sep 2024 00:26:35 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2079470b053sm31172235ad.218.2024.09.16.00.26.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 00:26:35 -0700 (PDT) From: Inochi Amaoto To: opensbi@lists.infradead.org Cc: Xing Xiaoguang , Xiang W , Inochi Amaoto Subject: [PATCH 1/2] platform: ensure enough heap size with debug triggers extension Date: Mon, 16 Sep 2024 15:25:14 +0800 Message-ID: <20240916072516.628461-1-inochiama@gmail.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240916072405.628158-1-inochiama@gmail.com> References: <20240916072405.628158-1-inochiama@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240916_002636_867648_26550A20 X-CRM114-Status: GOOD ( 10.22 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: DBTR introduce a big heap allocation to store hart state, this is allocated percpu and needs big space when CPU number is high. Increase the percpu part to fix this problem, and decrease the fixed part to avoid too big heap size. Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [inochiama(at)gmail.com] X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org DBTR introduce a big heap allocation to store hart state, this is allocated percpu and needs big space when CPU number is high. Increase the percpu part to fix this problem, and decrease the fixed part to avoid too big heap size. Fixes: 97f234f (lib: sbi: Introduce the SBI debug triggers extension support) Signed-off-by: Inochi Amaoto Reviewed-by: Xiang W --- include/sbi/sbi_platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h index 7b3ac4b..d1c556c 100644 --- a/include/sbi/sbi_platform.h +++ b/include/sbi/sbi_platform.h @@ -152,7 +152,7 @@ struct sbi_platform_operations { /** Platform default heap size */ #define SBI_PLATFORM_DEFAULT_HEAP_SIZE(__num_hart) \ - (0x8000 + 0x800 * (__num_hart)) + (0x4000 + 0x2000 * (__num_hart)) /** Representation of a platform */ struct sbi_platform { From patchwork Mon Sep 16 07:25:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 1985989 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=jus74hYM; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=f1RtmQxv; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X6c133n1Pz1y1m for ; Mon, 16 Sep 2024 17:26:47 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IDfgIIih6TmVRjH46ve86M5uRZPdYbEgU+6OsQ+STq8=; b=jus74hYMN5WZN8 G6wpEFXhQmhxXMN1Pe19Ym/O+9ekY6W/cs82WYQOl37AoG21/Ueke5Mt/V765dQKv4RJXnyMpIMaD j2B2BSnlcknzkr/TBQG8hJ7hIUGOxNW7qcxYh9MGrhyHux8GBY8wpYhxUgCE6XnNGUhuTNPxH3uBn HE0rVDNPwGYEMxvfQcCDF+fz77A71tOjipnl+Z7M6N7NyjfQFN+pL3WRGi9oRsBcahds+Aql5hRne vadfrqQGGIsiUICfXvvgSNFbDIW4+Xpl9iYkjLAzEfHlvdzWtltDZC3HywxrVPeVDwsOHG6OZwFe0 9aYQoFLwxGMdmXDZxS6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sq689-00000003JKf-2N18; Mon, 16 Sep 2024 07:26:41 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sq686-00000003JJb-3XMU for opensbi@lists.infradead.org; Mon, 16 Sep 2024 07:26:40 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7194cca5811so842323b3a.2 for ; Mon, 16 Sep 2024 00:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726471598; x=1727076398; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MaQ7w8qntT9g+7lugJ4zpbsV27VDRs10zqVlikc1/RQ=; b=f1RtmQxvg3HfssaY4anKH2xLr9w/lQ+OkgyggVRoAydKXcKClPnXIhbf8RDp0AvsqT b7Ol3rISSBW++4zLBeZ6GIEzUQZBEOXFk3BXnFxpX96bxT9VLfub+BfaGgCTWHOKnOme O5wyqkRjZLEB4O5/UpO3TSmxg6ndHYyT6O/9jgxsA77usANdq7mG8SM/GG7FTvfSkcJF ldVV+NAvzMyWU4xQ1UC8xHk8RAhkhocan/4pgL3tSk5NecYO7rZP+UWUE5L4gDZ11ZtK C4ReXbBAJ7+brc24CB/Ekt/O2S2f1fn9w3EYAYMeZN0c1VAD+hXp7iTshHNqXl6UXkyQ hd0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726471598; x=1727076398; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MaQ7w8qntT9g+7lugJ4zpbsV27VDRs10zqVlikc1/RQ=; b=IpveRqibQDP9fm3h+0lH5YTY7aJMUBqgtBXx6cIu0n+nC2Hbc+N4MAR5AQY7eYPk5p SRT38pOicn3EAnOo1v27LkBVk1hMH+0TYEK3Chw5YBYS3Or1zBVAyI+k+OKFpQ/aEdHH AqxOh5YMxPPmSyebfrCc137EU+KpFH2iRNopz646QAqAnqHlmldfl9vVFhNZ0ZxQUXTd zOSqADxlQF19G7qSh0a2HkMqGVz4nw86Di3T+MDRlsteH/2OopxkkZGQ1WiIhK6o5Hur gCGKxxEIfVzCdODOLbFKuTicYcvg2oiT3+IDPTKXoiQMHkoUgfoxXtimaB3Vmtjujn7m jVIg== X-Gm-Message-State: AOJu0YzNo5ydTPnvfxRBHOhh2odckkULVYZ8jG7BSAXeDz3fRHty82Qw 3qAT4XkGKKGe8+C7Yuf7BMFESRP2cPFL2TgOL3pH2Lkns3/i2iilG2cBfg== X-Google-Smtp-Source: AGHT+IHiWxf2i8X5b7ds0x037w05Y0kZVEPpdKTCY+4r0sZxMv3bBM+sf3D3jAJlDrCVnlyMgLwZ2g== X-Received: by 2002:a05:6a00:2d1d:b0:714:1fc3:7a00 with SMTP id d2e1a72fcca58-71936afb9a4mr16054788b3a.18.1726471597644; Mon, 16 Sep 2024 00:26:37 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944a980a9sm3194936b3a.3.2024.09.16.00.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 00:26:37 -0700 (PDT) From: Inochi Amaoto To: opensbi@lists.infradead.org Cc: Xing Xiaoguang , Xiang W , Inochi Amaoto Subject: [PATCH 2/2] platform: introduce DT-based configurable heap size Date: Mon, 16 Sep 2024 15:25:15 +0800 Message-ID: <20240916072516.628461-2-inochiama@gmail.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240916072405.628158-1-inochiama@gmail.com> References: <20240916072405.628158-1-inochiama@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240916_002639_037244_61F1C009 X-CRM114-Status: GOOD ( 16.06 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The default heap size will work for most platforms, but for some special platforms, the heap is too small to hold all the information or is too big so that it take too much ram. Introduce configurable [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:42e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [inochiama(at)gmail.com] X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The default heap size will work for most platforms, but for some special platforms, the heap is too small to hold all the information or is too big so that it take too much ram. Introduce configurable heap should solve this problem and make all generic platforms happy. Add DT-based heap-size for the generic platform. Signed-off-by: Inochi Amaoto Reviewed-by: Xiang W --- docs/opensbi_config.md | 4 ++++ platform/generic/platform.c | 28 +++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/docs/opensbi_config.md b/docs/opensbi_config.md index 1b710f1..c620379 100644 --- a/docs/opensbi_config.md +++ b/docs/opensbi_config.md @@ -23,6 +23,9 @@ The DT properties of a domain configuration DT node are as follows: set of harts is permitted to perform a cold boot. Otherwise, all harts are allowed to cold boot. +* **heap-size** (Optional) - When present, the SBI will initialize + the heap with the set value (This value is in byte). + * **system-suspend-test** (Optional) - When present, enable a system suspend test implementation which simply waits five seconds and issues a WFI. @@ -36,6 +39,7 @@ The OpenSBI Configuration Node will be deleted at the end of cold boot opensbi-config { compatible = "opensbi,config"; cold-boot-harts = <&cpu1 &cpu2 &cpu3 &cpu4>; + heap-size = <0x400000>; system-suspend-test; }; }; diff --git a/platform/generic/platform.c b/platform/generic/platform.c index 49d877d..c8e988e 100644 --- a/platform/generic/platform.c +++ b/platform/generic/platform.c @@ -69,6 +69,28 @@ static u32 fw_platform_calculate_heap_size(u32 hart_count) return BIT_ALIGN(heap_size, HEAP_BASE_ALIGN); } +static u32 fw_platform_get_heap_size(const void *fdt, u32 hart_count) +{ + int chosen_offset, config_offset, len; + const fdt32_t *val; + + /* Get the heap size from device tree */ + chosen_offset = fdt_path_offset(fdt, "/chosen"); + if (chosen_offset < 0) + goto default_config; + + config_offset = fdt_node_offset_by_compatible(fdt, chosen_offset, "opensbi,config"); + if (config_offset < 0) + goto default_config; + + val = (fdt32_t *)fdt_getprop(fdt, config_offset, "heap-size", &len); + if (len > 0 && val) + return fdt32_to_cpu(*val); + +default_config: + return fw_platform_calculate_heap_size(hart_count); +} + extern struct sbi_platform platform; static bool platform_has_mlevel_imsic = false; static u32 generic_hart_index2id[SBI_HARTMASK_MAX_BITS] = { 0 }; @@ -76,9 +98,9 @@ static u32 generic_hart_index2id[SBI_HARTMASK_MAX_BITS] = { 0 }; static DECLARE_BITMAP(generic_coldboot_harts, SBI_HARTMASK_MAX_BITS); /* - * The fw_platform_coldboot_harts_init() function is called by fw_platform_init() + * The fw_platform_coldboot_harts_init() function is called by fw_platform_init() * function to initialize the cold boot harts allowed by the generic platform - * according to the DT property "cold-boot-harts" in "/chosen/opensbi-config" + * according to the DT property "cold-boot-harts" in "/chosen/opensbi-config" * DT node. If there is no "cold-boot-harts" in DT, all harts will be allowed. */ static void fw_platform_coldboot_harts_init(const void *fdt) @@ -185,7 +207,7 @@ unsigned long fw_platform_init(unsigned long arg0, unsigned long arg1, } platform.hart_count = hart_count; - platform.heap_size = fw_platform_calculate_heap_size(hart_count); + platform.heap_size = fw_platform_get_heap_size(fdt, hart_count); platform_has_mlevel_imsic = fdt_check_imsic_mlevel(fdt); fw_platform_coldboot_harts_init(fdt);