From: "Sunil V L" <sunilvl@ventanamicro.com>
To: Yang Wang <wangyang@bosc.ac.cn>
Cc: caiyuqing_hz@outlook.com, devel@edk2.groups.io,
USER0FISH <libing1202@outlook.com>, dahogn <dahogn@hotmail.com>,
meng-cz <mengcz1126@gmail.com>
Subject: Re: [edk2-devel] [PATCH] SG2042Pkg/Sec:Modify Calculation LowestMemSize
Date: Wed, 3 Apr 2024 09:18:59 +0530 [thread overview]
Message-ID: <ZgzRqwQvKZmUGKs8@sunil-laptop> (raw)
In-Reply-To: <20240325020928.2737-1-wangyang@bosc.ac.cn>
On Mon, Mar 25, 2024 at 10:09:28AM +0800, Yang Wang wrote:
> 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 <sunilvl@ventanamicro.com>
> Cc: USER0FISH <libing1202@outlook.com>
> Cc: caiyuqing379 <caiyuqing_hz@outlook.com>
> Cc: dahogn <dahogn@hotmail.com>
> Cc: meng-cz <mengcz1126@gmail.com>
>
> Signed-off-by: Yang Wang <wangyang@bosc.ac.cn>
> ---
> 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;
> }
>
LGTM.
Jingyu, Do you mind adding RB tag?
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Thanks!
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117341): https://edk2.groups.io/g/devel/message/117341
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]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-04-03 3:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 2:09 [edk2-devel] [PATCH] SG2042Pkg/Sec:Modify Calculation LowestMemSize WangYang
2024-03-28 13:46 ` Jingyu Li via groups.io
2024-04-02 10:30 ` WangYang
2024-04-03 3:48 ` Sunil V L [this message]
2024-04-03 6:21 ` Jingyu Li via groups.io
2024-04-08 3:00 ` WangYang
2024-04-08 4:28 ` Sunil V L
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZgzRqwQvKZmUGKs8@sunil-laptop \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox