diff options
author | Gabriel Somlo <somlo@cmu.edu> | 2014-05-20 16:33:11 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-05-20 16:33:11 +0000 |
commit | 6b23d767f6c762178503cf26e4c6d066fd311f25 (patch) | |
tree | 2fdd6098e43bb027167bdcc775649e25b5c13d7e /OvmfPkg | |
parent | 90803342b1b6060f1ddbb1aaea54fdf86a7ff9ad (diff) | |
download | edk2-6b23d767f6c762178503cf26e4c6d066fd311f25.tar.gz edk2-6b23d767f6c762178503cf26e4c6d066fd311f25.tar.bz2 edk2-6b23d767f6c762178503cf26e4c6d066fd311f25.zip |
OvmfPkg/SMBIOS: Reuse handles supplied by underlying VM
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 <somlo@cmu.edu>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Anthony PERARD <anthony.perard@citrix.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15541 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c index 42a5132e0e..ac48fb7208 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,
|