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 <suni...@ventanamicro.com>
> Cc: USER0FISH <libing1...@outlook.com>
> Cc: caiyuqing379 <caiyuqing...@outlook.com>
> Cc: dahogn <dah...@hotmail.com>
> Cc: meng-cz <mengcz1...@gmail.com>
> 
> Signed-off-by: Yang Wang <wangy...@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 <suni...@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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to