From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.69784.1674724137482797388 for ; Thu, 26 Jan 2023 01:08:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hBNiHlY8; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B3BCD61729 for ; Thu, 26 Jan 2023 09:08:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27DE9C433EF for ; Thu, 26 Jan 2023 09:08:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674724136; bh=9hhvvOCRx6vyghSM5uCO3ilt5bIFk/E5WScwqWWC6nY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hBNiHlY8R8t642NxBzhkim1Qdd2o1gVNxVyEFVL4DTQQzOnCSx0NOpt/wnb8QJsVB 5lHh65ljOy9l8Ow6AFi0j+fqoxAj8menZZFY9GypKoUQZQR7ZEH49ojLoz5BrbZ4dC 3zgXuotIWeVvbKaXI0dcRWZteCOydpsSBiHXDqW3KP70pWJK2Uo5BIXS0jSUt/l30r MfB4vWVuBnlQRH2ZfbRhmzL/6kRMAdyFTs5WZapuzGyMpX0KXI7lN2DbzEeZSlRQDb 3B6uSq0YFekv5b2BYizXJGPZAVwAJ8vYqmgH10IcxhzxK7g2OAXyT226XVbdRbqr87 /pj+blHUbbHEA== Received: by mail-lj1-f179.google.com with SMTP id y19so1211071ljq.7 for ; Thu, 26 Jan 2023 01:08:56 -0800 (PST) X-Gm-Message-State: AFqh2krbwwZKLSLpsddWNZXYuwZdNSW/IEt+pfq7BZyWVTW0p/C7pHl0 AyvYnuZg+2iHhkhJa7NV07UaliMCQnOOxXmRW8M= X-Google-Smtp-Source: AMrXdXvziPDAPtEQoIhc8UZ/rzjWxyK+2wY8Pwpg4PP9p7yJyQzUzn75JiqJSjhomUj5yM1/V5AVowGAOg6VwJ8hz5o= X-Received: by 2002:a2e:93ce:0:b0:27f:b76d:2950 with SMTP id p14-20020a2e93ce000000b0027fb76d2950mr1874075ljh.67.1674724134199; Thu, 26 Jan 2023 01:08:54 -0800 (PST) MIME-Version: 1.0 References: <20230125171049.1958204-1-kraxel@redhat.com> In-Reply-To: From: "Ard Biesheuvel" Date: Thu, 26 Jan 2023 10:08:42 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB() To: devel@edk2.groups.io, jiewen.yao@intel.com Cc: "kraxel@redhat.com" , Pawel Polawski , Tom Lendacky , Oliver Steffen , Ard Biesheuvel , "Justen, Jordan L" Content-Type: text/plain; charset="UTF-8" On Thu, 26 Jan 2023 at 02:48, Yao, Jiewen wrote: > > Reviewed-by: Jiewen Yao > Merged as #3947, thanks > > -----Original Message----- > > From: 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 ; Tom Lendacky > > ; Yao, Jiewen ; Oliver > > Steffen ; Gerd Hoffmann ; Ard > > Biesheuvel ; Justen, Jordan L > > > > 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 > > Signed-off-by: Gerd Hoffmann > > --- > > 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 > > > > > > > > > > > > > > > >