]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/SMBIOS: Reuse handles supplied by underlying VM
authorGabriel Somlo <somlo@cmu.edu>
Tue, 20 May 2014 16:33:11 +0000 (16:33 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 20 May 2014 16:33:11 +0000 (16:33 +0000)
commit6b23d767f6c762178503cf26e4c6d066fd311f25
tree2fdd6098e43bb027167bdcc775649e25b5c13d7e
parent90803342b1b6060f1ddbb1aaea54fdf86a7ff9ad
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
OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c