diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2021-05-15 18:07:47 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2021-07-24 10:49:51 +0200 |
commit | c193d9bd284565df4ddcdd1e9190d2ce718e9eb7 (patch) | |
tree | aad6c530d29fcb91f35e632e8237c43fb4f73b16 /include | |
parent | 11275e4f72d6d2170db444df95e8f6b6ab627e8e (diff) | |
download | u-boot-c193d9bd284565df4ddcdd1e9190d2ce718e9eb7.zip u-boot-c193d9bd284565df4ddcdd1e9190d2ce718e9eb7.tar.gz u-boot-c193d9bd284565df4ddcdd1e9190d2ce718e9eb7.tar.bz2 |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/smbios.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/smbios.h b/include/smbios.h index fc49fc1..aa6b6f3 100644 --- a/include/smbios.h +++ b/include/smbios.h @@ -229,8 +229,11 @@ static inline void fill_smbios_header(void *table, int type, * This writes SMBIOS table at a given address. * * @addr: start address to write SMBIOS table. If this is not - * 16-byte-aligned then it will be aligned before the table is written - * @return: end address of SMBIOS table (and start address for next entry) + * 16-byte-aligned then it will be aligned before the table is + * written. + * Return: end address of SMBIOS table (and start address for next entry) + * or NULL in case of an error + * */ ulong write_smbios_table(ulong addr); |