arch: return the correct size for SMBIOS occupied space

The original value didn't include the size of the entry point structure.

The caused the last entry to be corrupted by other code.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2022-08-05 12:46:14 +00:00 committed by Rob Bradford
parent 05e0daa411
commit cb18edb535

View File

@ -250,7 +250,7 @@ pub fn setup_smbios(
.map_err(|_| Error::WriteSmbiosEp)?;
}
Ok(curptr.unchecked_offset_from(physptr))
Ok(curptr.unchecked_offset_from(physptr) + std::mem::size_of::<Smbios30Entrypoint>() as u64)
}
#[cfg(test)]