public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"kraxel@redhat.com" <kraxel@redhat.com>
Cc: Pawel Polawski <ppolawsk@redhat.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Oliver Steffen <osteffen@redhat.com>,
	"Ard Biesheuvel" <ardb+tianocore@kernel.org>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB()
Date: Thu, 26 Jan 2023 01:48:05 +0000	[thread overview]
Message-ID: <MW4PR11MB5872D3F114A80A02E88A23768CCF9@MW4PR11MB5872.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230125171049.1958204-1-kraxel@redhat.com>

Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
> Hoffmann
> Sent: Thursday, January 26, 2023 1:11 AM
> To: devel@edk2.groups.io
> Cc: Pawel Polawski <ppolawsk@redhat.com>; Tom Lendacky
> <thomas.lendacky@amd.com>; Yao, Jiewen <jiewen.yao@intel.com>; Oliver
> Steffen <osteffen@redhat.com>; Gerd Hoffmann <kraxel@redhat.com>; Ard
> Biesheuvel <ardb+tianocore@kernel.org>; Justen, Jordan L
> <jordan.l.justen@intel.com>
> Subject: [edk2-devel] [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call
> in PlatformAddHobCB()
> 
> BuildResourceDescriptorHob() expects the third parameter be the Length,
> not the End address.
> 
> Fixes: 328076cfdf45 ("OvmfPkg/PlatformInitLib: Add PlatformAddHobCB")
> Reported-by: Tom Lendacky <thomas.lendacky@amd.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  OvmfPkg/Library/PlatformInitLib/MemDetect.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> index 5aeeeff89f57..38cece9173e8 100644
> --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
> @@ -200,7 +200,7 @@ PlatformAddHobCB (
> 
>        break;
>      case EfiAcpiAddressRangeReserved:
> -      BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_RESERVED, 0, Base,
> End);
> +      BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_RESERVED, 0,
> Base, End - Base);
>        DEBUG ((DEBUG_INFO, "%a: Reserved [0x%Lx, 0x%Lx)\n", __FUNCTION__,
> Base, End));
>        break;
>      default:
> --
> 2.39.1
> 
> 
> 
> 
> 


  parent reply	other threads:[~2023-01-26  1:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 17:10 [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB() Gerd Hoffmann
2023-01-25 18:01 ` [edk2-devel] " Lendacky, Thomas
2023-01-26  1:48 ` Yao, Jiewen [this message]
2023-01-26  9:08   ` Ard Biesheuvel

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=MW4PR11MB5872D3F114A80A02E88A23768CCF9@MW4PR11MB5872.namprd11.prod.outlook.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