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,
-- 
1.9.0


------------------------------------------------------------------------------
"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