public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: Edward Pickup <edward.pickup@arm.com>, devel@edk2.groups.io
Cc: Alexei.Fedorov@arm.com, nd@arm.com, "nd@arm.com" <nd@arm.com>
Subject: Re: [PATCH v1] DynamicTablesPkg: Fix using RmrNodeCount unitlitialised
Date: Sat, 6 Aug 2022 07:46:29 +0100	[thread overview]
Message-ID: <f0a162b9-8351-cfa2-c79b-7dfb5f56ee47@arm.com> (raw)
In-Reply-To: <20220804092050.1004518-1-edward.pickup@arm.com>

Hi Edward,

Thank you for this patch.

This fix looks good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 04/08/2022 10:20 am, Edward Pickup wrote:
> Fix using RmrNodeCount uninitliased by initliasing it to zero. Also, add
> an additional check for ACPI version. This fixes a crash running on
> kvmtool.
>
> Signed-off-by: Edward Pickup <edward.pickup@arm.com>
> ---
>
> Change can be seen at https://github.com/edpickup/edk2/tree/2322_rmrnodecount_uninitialised_v1
>
>   DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
> index 40d99162cc610de2d0c2f0a5fff6e457c08d07fb..f28973c1a8620aa5b756e85af1b46ebfaf018839 100644
> --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
> +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
> @@ -2107,6 +2107,8 @@ BuildIortTable (
>     ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
>
>     ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature);
>
>   
>
> +  RmrNodeCount = 0;
>
> +
>
>     if ((AcpiTableInfo->AcpiTableRevision < This->MinAcpiTableRevision) ||
>
>         (AcpiTableInfo->AcpiTableRevision > This->AcpiTableRevision))
>
>     {
>
> @@ -2714,7 +2716,10 @@ BuildIortTable (
>       }
>
>     }
>
>   
>
> -  if (RmrNodeCount > 0) {
>
> +  if ((AcpiTableInfo->AcpiTableRevision >=
>
> +       EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05) &&
>
> +      (RmrNodeCount > 0))
>
> +  {
>
>       Status = AddRmrNodes (
>
>                  This,
>
>                  CfgMgrProtocol,
>

      reply	other threads:[~2022-08-06  6:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04  9:20 [PATCH v1] DynamicTablesPkg: Fix using RmrNodeCount unitlitialised Edward Pickup
2022-08-06  6:46 ` Sami Mujawar [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=f0a162b9-8351-cfa2-c79b-7dfb5f56ee47@arm.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