mirror of
https://xff.cz/git/u-boot/
synced 2025-10-21 01:51:11 +02:00
smbios: error handling for invalid addresses
SMBIOS tables only support 32bit addresses. If we don't have memory here handle the error gracefully: * on x86_64 fail to start U-Boot * during UEFI booting ignore the missing table Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -530,7 +530,8 @@ ulong write_smbios_table(ulong addr)
|
||||
*/
|
||||
printf("WARNING: SMBIOS table_address overflow %llx\n",
|
||||
(unsigned long long)table_addr);
|
||||
table_addr = 0;
|
||||
addr = 0;
|
||||
goto out;
|
||||
}
|
||||
se->struct_table_address = table_addr;
|
||||
|
||||
@@ -541,6 +542,7 @@ ulong write_smbios_table(ulong addr)
|
||||
isize = sizeof(struct smbios_entry) - SMBIOS_INTERMEDIATE_OFFSET;
|
||||
se->intermediate_checksum = table_compute_checksum(istart, isize);
|
||||
se->checksum = table_compute_checksum(se, sizeof(struct smbios_entry));
|
||||
out:
|
||||
unmap_sysmem(se);
|
||||
|
||||
return addr;
|
||||
|
Reference in New Issue
Block a user