mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
90803342b1
commit
6b23d767f6
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue