On Wed, May 14, 2014 at 03:31:48PM +0200, Laszlo Ersek wrote:
> On 05/14/14 00:13, Gabriel L. Somlo wrote:
> > The SMBIOS specification requires some structure types to
> > contain reference fields to other structures' handles. When
> > InstallAllStructures() rebuilds the SMBIOS tables by traversing
> > an existing source table, the use of SMBIOS_HANDLE_PI_RESERVED
> > causes automatically generated, arbitrary handle numbers to be
> > assigned to each cloned structure. This causes all reference
> > handle fields to become invalid.
> > 
> > This patch modifies InstallAllStructures() to reuse the original
> > handle numbers supplied by the underlying VM, preserving the
> > correctness of any included handle references.
> > 
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Gabriel Somlo <so...@cmu.edu>
> > ---
> >  OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c 
> > b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> > index 42a5132..ac48fb7 100644
> > --- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> > +++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> > @@ -106,7 +106,7 @@ InstallAllStructures (
> >      //
> >      // Log the SMBIOS data for this structure
> >      //
> > -    SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
> > +    SmbiosHandle = SmbiosTable.Hdr->Handle;
> >      Status = Smbios->Add (
> >                         Smbios,
> >                         NULL,
> > 
> 
> This patch should be tested by Xen people (I'm CC'ing Wei Liu). In
> general it seems reasonable to me; it matches the smbios spec and the
> qemu-side code.
> 
> Reviewed-by: Laszlo Ersek <ler...@redhat.com>

Thanks for the heads up. Anthony (CC'ed) is working on OVMF now and he's
also a maintainer for QEMU in Xen, so he might have a better idea than I
do. He gracefully offers help on testing this change. He shall let you
know if there's any problem.

Wei.

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to