From: "Ard Biesheuvel" <ardb@kernel.org>
To: Girish Mahadevan <gmahadevan@nvidia.com>
Cc: devel@edk2.groups.io, sami.mujawar@arm.com,
ardb+tianocore@kernel.org, jiewen.yao@intel.com,
supreeth.venkatesh@arm.com, damian.milosek@intel.com,
jbrasen@nvidia.com, ashishsingha@nvidia.com,
nramirez@nvidia.com
Subject: Re: [PATCH v2 1/1] StandaloneMmPkg: StandaloneMmMemLib: Change max address computation
Date: Thu, 9 Feb 2023 18:35:28 +0100 [thread overview]
Message-ID: <CAMj1kXF+a99vktRUC1sc-QwUjrfZfcODSMp7P8dJQwpJScHixQ@mail.gmail.com> (raw)
In-Reply-To: <20230130162858.1300761-1-gmahadevan@nvidia.com>
On Mon, 30 Jan 2023 at 17:29, Girish Mahadevan <gmahadevan@nvidia.com> wrote:
>
> Currently the standalonemmlibinternal assumes the max physical bits
> to be 36 which is causing issues on v8 architectures.
> Instead use the MAX_ALLOC_ADDRESS macro to determine the maximum
> allowed address rather than recomputing it locally.
>
> Signed-off-by: Girish Mahadevan <gmahadevan@nvidia.com>
Merged as #4024
Thanks,
> ---
> .../ArmStandaloneMmMemLibInternal.c | 15 +--------------
> 1 file changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/ArmStandaloneMmMemLibInternal.c b/StandaloneMmPkg/Library/StandaloneMmMemLib/ArmStandaloneMmMemLibInternal.c
> index 297cfae916..fddcecf6da 100644
> --- a/StandaloneMmPkg/Library/StandaloneMmMemLib/ArmStandaloneMmMemLibInternal.c
> +++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/ArmStandaloneMmMemLibInternal.c
> @@ -20,13 +20,6 @@
> //
> extern EFI_PHYSICAL_ADDRESS mMmMemLibInternalMaximumSupportAddress;
>
> -#ifdef MDE_CPU_AARCH64
> -#define ARM_PHYSICAL_ADDRESS_BITS 36
> -#endif
> -#ifdef MDE_CPU_ARM
> -#define ARM_PHYSICAL_ADDRESS_BITS 32
> -#endif
> -
> /**
> Calculate and save the maximum support address.
>
> @@ -36,14 +29,8 @@ MmMemLibInternalCalculateMaximumSupportAddress (
> VOID
> )
> {
> - UINT8 PhysicalAddressBits;
> -
> - PhysicalAddressBits = ARM_PHYSICAL_ADDRESS_BITS;
> + mMmMemLibInternalMaximumSupportAddress = MAX_ALLOC_ADDRESS;
>
> - //
> - // Save the maximum support address in one global variable
> - //
> - mMmMemLibInternalMaximumSupportAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)(LShiftU64 (1, PhysicalAddressBits) - 1);
> DEBUG ((DEBUG_INFO, "mMmMemLibInternalMaximumSupportAddress = 0x%lx\n", mMmMemLibInternalMaximumSupportAddress));
> }
>
> --
> 2.17.1
>
prev parent reply other threads:[~2023-02-09 17:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 16:28 [PATCH v2 1/1] StandaloneMmPkg: StandaloneMmMemLib: Change max address computation Girish Mahadevan
2023-02-09 17:35 ` Ard Biesheuvel [this message]
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=CAMj1kXF+a99vktRUC1sc-QwUjrfZfcODSMp7P8dJQwpJScHixQ@mail.gmail.com \
--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