* [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB()
@ 2023-01-25 17:10 Gerd Hoffmann
2023-01-25 18:01 ` [edk2-devel] " Lendacky, Thomas
2023-01-26 1:48 ` Yao, Jiewen
0 siblings, 2 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2023-01-25 17:10 UTC (permalink / raw)
To: devel
Cc: Pawel Polawski, Tom Lendacky, Jiewen Yao, Oliver Steffen,
Gerd Hoffmann, Ard Biesheuvel, Jordan Justen
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB()
2023-01-25 17:10 [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB() Gerd Hoffmann
@ 2023-01-25 18:01 ` Lendacky, Thomas
2023-01-26 1:48 ` Yao, Jiewen
1 sibling, 0 replies; 4+ messages in thread
From: Lendacky, Thomas @ 2023-01-25 18:01 UTC (permalink / raw)
To: devel, kraxel
Cc: Pawel Polawski, Jiewen Yao, Oliver Steffen, Ard Biesheuvel,
Jordan Justen
On 1/25/23 11:10, Gerd Hoffmann via groups.io wrote:
> BuildResourceDescriptorHob() expects the third parameter be the Length,
> not the End address.
>
> Fixes: 328076cfdf45 ("OvmfPkg/PlatformInitLib: Add PlatformAddHobCB")
Thanks for the quick fix, Gerd!
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
> 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:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB()
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
2023-01-26 9:08 ` Ard Biesheuvel
1 sibling, 1 reply; 4+ messages in thread
From: Yao, Jiewen @ 2023-01-26 1:48 UTC (permalink / raw)
To: devel@edk2.groups.io, kraxel@redhat.com
Cc: Pawel Polawski, Tom Lendacky, Oliver Steffen, Ard Biesheuvel,
Justen, Jordan L
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
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB()
2023-01-26 1:48 ` Yao, Jiewen
@ 2023-01-26 9:08 ` Ard Biesheuvel
0 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2023-01-26 9:08 UTC (permalink / raw)
To: devel, jiewen.yao
Cc: kraxel@redhat.com, Pawel Polawski, Tom Lendacky, Oliver Steffen,
Ard Biesheuvel, Justen, Jordan L
On Thu, 26 Jan 2023 at 02:48, Yao, Jiewen <jiewen.yao@intel.com> wrote:
>
> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
>
Merged as #3947, thanks
> > -----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
> >
> >
> >
> >
> >
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-26 9:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-01-26 9:08 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox