From patchwork Fri Sep 20 07:37:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 1987725 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=x8pT5i1Q; 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=CE6+jTPd; 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 4X94653lWdz1y2j for ; Fri, 20 Sep 2024 17:39:41 +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=RvnQk3ScgNMd7stNUPVRkz9DBNYL6mNWj+IWasNe8kM=; b=x8pT5i1QuY/8s9 ebjIU3Ju7PzqoSmXRNCf+ltxoob6yUk/O7ij2j8QU9BBBOtebuHWPsb2L3Vyr2wefn40QYzdWtddk 4KOEeg4eYGL3akVAtdDBkR6lwLFSqF8+KTmLWyGXv+ZtM/x7faDOPDmAAYEM6k2PC4DG9wCiwCKjv 8Wwks9fPZTLxVpUtHzPXUrAeZs/QlEVOuEvWKdxLuCsQ1FSQeaFhYn6btAP95VBPAT6b6T9HUCcr+ HkuSzX7AeIFdtBX7e8BaI5Vvth1TCx5oHOTm+TWpxPJqWHiLvuNbyt20PSqj5S3c7rxo3Y55TmOD7 KLTpVMw3C1oitIERIrtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srYEn-0000000Bdg3-0DrF; Fri, 20 Sep 2024 07:39:33 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srYEh-0000000Bdab-26l9 for opensbi@lists.infradead.org; Fri, 20 Sep 2024 07:39:28 +0000 Received: by mail-pg1-x543.google.com with SMTP id 41be03b00d2f7-7163489149eso1361796a12.1 for ; Fri, 20 Sep 2024 00:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726817966; x=1727422766; 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=6WIZGgDDRkLULB2j4MdD1wL0XmzgRTr7v8RlhDtqXFg=; b=CE6+jTPd9Gb+zc3jIKJUTwJOoY0HqIeImeOBcXAS/kSaDy8bTTB52aSNYCJJt6jGPf L7oydkPtEl72OgPcwD+X0CKThHFWM1ac4LZqi/UJJo75y7b3mCZ1hMnDUW8zSsu6Z0lz LrnwfJBYRT3hF/cWDRK68APVCCFwF4b4/9/F9IQ8UO5339dHH6HEAr8amqGNH0HUhiiq qPfmN5TGUdx6xxWIWSQpZJdtY6gLtexsEEMOhhS2vcc54QIt+EhpfDhHbU/LYwgY58Qp xBhIGLJ4d/O/xTe7mJ0BZeb9Nv8NmfheUWOXAmZ8QPurq5T8X5t8C+Zm4VoxbDkRDJW8 c0Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726817966; x=1727422766; 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=6WIZGgDDRkLULB2j4MdD1wL0XmzgRTr7v8RlhDtqXFg=; b=wz/Koj/B9pBFFoMNfAQ+gF2J3hE0Y/xIkQbq25eAAErKlpmQvyt8/uXaW03fWSodqh lDo6u1YiLooDJK5hDfPqJQLEIoEWMfR+7jWNF6Ag7F+4F9GwUToR7q05Ph70lxmXrqzR f9E4hR3kDqCWn+lfkkBwWWpWbDB6fo4ye4JbSBo34DHkQBnMfJ3wRjH3GA3jyM3P79J7 RXpqT2ZxtOpuynlzAQcINhJEkgxDsOff1fhh6NwqA01dx5ycSF6GSxwqsbl2S6dsOpX6 qMf8sPdzyeTJ40TdrX4DmHN6pAntLjjp2PVNyt+ra2USgcUELImRmO5+QiUPrM41TMLh pXBA== X-Gm-Message-State: AOJu0Yynh6/PwkJlaYpNBbazVMyB+S51dpv8js+qfz3uOLZ8+r+5TLI6 qXB9T34xAej6UMrVT3ZxS+elsY2E2rcR+SwaOoXay/yDuk/Dew7V8v0LM4bT X-Google-Smtp-Source: AGHT+IH3vPXSZc/Tu8C9hGqyp0zsriyRuBAPw1StwmAjZpHTitTmry3vcx0cIxlyg6Bx9aJTsDuWeA== X-Received: by 2002:a05:6a20:65af:b0:1d3:eb6:c79b with SMTP id adf61e73a8af0-1d30eb6c99fmr1521190637.9.1726817966210; Fri, 20 Sep 2024 00:39:26 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944ab4b36sm9307395b3a.47.2024.09.20.00.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 00:39:25 -0700 (PDT) From: Inochi Amaoto To: opensbi@lists.infradead.org Cc: Xing Xiaoguang , Xiang W , Inochi Amaoto Subject: [PATCH v2 1/2] platform: ensure enough heap size with debug triggers extension Date: Fri, 20 Sep 2024 15:37:35 +0800 Message-ID: <20240920073738.597300-2-inochiama@gmail.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240920073738.597300-1-inochiama@gmail.com> References: <20240920073738.597300-1-inochiama@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240920_003927_575557_E1D5C5D7 X-CRM114-Status: GOOD ( 10.18 ) 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:543 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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 Fri Sep 20 07:37:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 1987723 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=cYLBomdg; 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=gTA5IWEr; 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 4X94674kWrz1y33 for ; Fri, 20 Sep 2024 17:39:43 +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=EwoZRUzUY0Xi3Exm2mBRV4EwMrBedXU3TtMkhdZRaYM=; b=cYLBomdgRjMssl JlPGqYa+q24lAi+k8BOD7SID58uwOPdHRVVGavCdhZFuTTcDqmGvUaHmSTuC7mGz/1StrSpF3BRZf PTWpHPrC4hbirzkWbWLQ32tVuSYMYrg5DYn3w0kM/qGZ2KcK+vkBbZoxV3iNHIMF5FhQN8Oz1YYEB VUTOp8ay6dmUlcP2TjO2zOQEv93u4u4mf8uKuEqfTSnvRbgrfy4SeAp4yuOXixwSJ1osdcnTHDg7w nkA0YMmXbLQJbF8bHth9Fwu2adY+yqqwhniffSuGFTCBOjxc9nG0p8s6Zo0kdptmzW654YrOTe4Qo KuUwwTKo5Y9sCAyU5Ojg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srYEq-0000000BdkB-407P; Fri, 20 Sep 2024 07:39:36 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srYEk-0000000Bdd7-1UAn for opensbi@lists.infradead.org; Fri, 20 Sep 2024 07:39:32 +0000 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-7c6b4222fe3so1101994a12.3 for ; Fri, 20 Sep 2024 00:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726817969; x=1727422769; 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=NxL71LQQHr0ySFp+m712p6F1c3Ov0msCrDThsQmqefM=; b=gTA5IWEriDNXSWCCQS9VwyGKw29b/NLCUxmnju11Ynuiz/zbUn0YwsEaknAGlhdLrQ MkdbTsV9oYKYkWsyQ7yIJ4rQEEhJ3LlqWZWO3jmOLHUsNX6MAF9sLks4ZeHH39dehlVd 4SO/DbyREaXyJvnFKDjvIQsLlb2aSldCbhc3mC6CmPMIIfnJ1GDoM/UghipU+jlpmerG Sg4Po/08umZTSmy9PMn+kOwYJVeN/figBS81oZltBgJDSiNZXYoKe0DSDq55Tcmc5eTj 3/yH9B8THlBIPuMPtfjzxPySbHFfu3Z8JWLABCA8szADabMYxkdvime8N8E2SHMcGjrI OERQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726817969; x=1727422769; 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=NxL71LQQHr0ySFp+m712p6F1c3Ov0msCrDThsQmqefM=; b=gKuDawW8MCbOhc5Hkc4A/LCPBZGJqf9eQ3G5X5JLbqgMT5WbArxRsJMHDs1MHX0HJF 5wSLthro9S1OIFKO11SInYNVf+FydaBn73t/KAtS3Pk7NnoYgrl1dAKUfPchVlIaHsvi ZUNZQstFvetXyVwWsWsTOw4zHwKaucVVvUq05sgUsm38+SoPeXxEdegbYBNPTpfScEhJ 77Nqba+po5ei4a9qAmEFal+fOANe1e5vPiKyPYzOdhov6mv1rHxagee//uGzGOVxJ9yV 43UpdWG6iFRbVcPh+Ed+1jpD7tv77ClMM19TqkNzq5axhtocAiZQXCstQpaB6LzVZm1C DWDw== X-Gm-Message-State: AOJu0YwmE9z16P9KKdeYIAyqCfsp7iKKzLPcSE26jj4iN2kqeHWWhIex DciG+evmZIoZENs3iEAKNJ18iD3VZcPSv5D6uUyq/M+w6QgM7+AF/1VcLg== X-Google-Smtp-Source: AGHT+IGLGkYNaifKQW+UucrkPBm9FCbJHmnaf8Y/ybySIDt4o0ojsh8WTv3BPruWZNbkJIYvUiTScg== X-Received: by 2002:a17:90b:4c06:b0:2cb:4c25:f941 with SMTP id 98e67ed59e1d1-2dd80c4c942mr1904345a91.17.1726817968738; Fri, 20 Sep 2024 00:39:28 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dd7f8fba0bsm1159650a91.41.2024.09.20.00.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 00:39:28 -0700 (PDT) From: Inochi Amaoto To: opensbi@lists.infradead.org Cc: Xing Xiaoguang , Xiang W , Inochi Amaoto Subject: [PATCH v2 2/2] platform: introduce DT-based configurable heap size Date: Fri, 20 Sep 2024 15:37:36 +0800 Message-ID: <20240920073738.597300-3-inochiama@gmail.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240920073738.597300-1-inochiama@gmail.com> References: <20240920073738.597300-1-inochiama@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240920_003930_623645_5E35D8E5 X-CRM114-Status: GOOD ( 16.03 ) 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:52a listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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..5ddf425 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 BIT_ALIGN(fdt32_to_cpu(*val), HEAP_BASE_ALIGN); + +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);