From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 32CD3D80D4E for ; Mon, 25 Mar 2024 02:09:43 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=BYhi5ofZr3XJEKkAkk+X1jGU0+06jtjHW5KQg113UjU=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1711332582; v=1; b=rjvGjo7i/XkhrghGklBqzJdgWdOBeAW4AgNuy+88JmeABW7CSDou+YsgOMyQAA8QayklWKwK PqVJN9H1o92i2d+e5/ZMOt6gc1Dlnrg0VcHB6YojxFcoPSD3Qx4+x13MAlT6M3LtKdf/W0MdAJw lpQmowGFTJM/WzuAyEO1JerBRVmAPIJdxJyLGEnISL2SBMhO3xiDdWrOVz0R5EmQR48Q8IgD8J0 wJ+mJZc9bD9Yto2PKkFq1yMh1+sqbgzLGMuKQN2QSo+BDS7KrUgoos33E94quntcPwYPlEQ2NNQ vqp8tkGPmsYdDXaz3bkayAwdOrC4g9tmnE7m4dtDLta1Q== X-Received: by 127.0.0.2 with SMTP id XpKIYY7687511xrUA8md7357; Sun, 24 Mar 2024 19:09:42 -0700 X-Received: from zg8tmja2lje4os43os4xodqa.icoremail.net (zg8tmja2lje4os43os4xodqa.icoremail.net [206.189.79.184]) by mx.groups.io with SMTP id smtpd.web11.43125.1711332580685699441 for ; Sun, 24 Mar 2024 19:09:41 -0700 X-Received: from vm.localdomain (unknown [219.141.235.82]) by mail (Coremail) with SMTP id AQAAfwA3cNPd3ABmT2AZAA--.64924S2; Mon, 25 Mar 2024 10:09:34 +0800 (CST) From: "WangYang" To: sunilvl@ventanamicro.com, caiyuqing_hz@outlook.com, devel@edk2.groups.io Cc: Yang Wang , USER0FISH , dahogn , meng-cz Subject: [edk2-devel] [PATCH] SG2042Pkg/Sec:Modify Calculation LowestMemSize Date: Mon, 25 Mar 2024 10:09:28 +0800 Message-Id: <20240325020928.2737-1-wangyang@bosc.ac.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwA3cNPd3ABmT2AZAA--.64924S2 X-Coremail-Antispam: 1UD129KBjvdXoWrtFyDWF1Duw48CrW7Cr1fCrg_yoWkZFb_Kw 45C3WkGF1kZa4UGF4DZ397Zr1qvryfJw4UX3WSyFyxGFWYvw1Ik3s7XF1Yy3W5GrZrtryU CrnxCwsav3s8GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbV8FF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Jr0_ Gr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr0_Gr 1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj64x0 Y40En7xvr7AKxVWUJVW8JwAv7VC0I7IYx2IY67AKxVWUXVWUAwAv7VC2z280aVAFwI0_Gr 0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8v x2IErcIFxwCY02Avz4vE14v_Gr1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr 0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY 17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcV C0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY 6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvj DU0xZFpf9x0JU3-B_UUUUU= X-CM-SenderInfo: 5zdqw5hdqjquxrvfhtffof0/ Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Sun, 24 Mar 2024 19:09:41 -0700 Reply-To: devel@edk2.groups.io,wangyang@bosc.ac.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: M2ZIrq0mTMkdWifmcAOFxDRLx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=rjvGjo7i; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none Adapting memory addresses may not start from 0x0, for example, the starting memory address starts from 0x8000_0000. I understand: LowestMemBase is the lowest DDR address in the system. UefiMemoryBase = LowestMemBase + CodeSize(opensbi+UEFI); LowestMemSize -= CodeSize(UefiMemoryBase - LowestMemBase) Cc: Sunil V L Cc: USER0FISH Cc: caiyuqing379 Cc: dahogn Cc: meng-cz Signed-off-by: Yang Wang --- Silicon/Sophgo/SG2042Pkg/Sec/Memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/Sophgo/SG2042Pkg/Sec/Memory.c b/Silicon/Sophgo/SG2042Pkg/Sec/Memory.c index df49a17695..a160278eaa 100644 --- a/Silicon/Sophgo/SG2042Pkg/Sec/Memory.c +++ b/Silicon/Sophgo/SG2042Pkg/Sec/Memory.c @@ -301,8 +301,8 @@ MemoryPeimInitialization ( } if (UefiMemoryBase > LowestMemBase) { + LowestMemSize -= (UefiMemoryBase - LowestMemBase); LowestMemBase = UefiMemoryBase; - LowestMemSize -= UefiMemoryBase; } DEBUG (( -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117072): https://edk2.groups.io/g/devel/message/117072 Mute This Topic: https://groups.io/mt/105131337/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-