summaryrefslogtreecommitdiff
path: root/include/smbios.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-05-15 19:07:47 +0300
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-07-24 11:49:51 +0300
commitc193d9bd284565df4ddcdd1e9190d2ce718e9eb7 (patch)
treeaad6c530d29fcb91f35e632e8237c43fb4f73b16 /include/smbios.h
parent11275e4f72d6d2170db444df95e8f6b6ab627e8e (diff)
downloadu-boot-c193d9bd284565df4ddcdd1e9190d2ce718e9eb7.tar.xz
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/smbios.h')
-rw-r--r--include/smbios.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/smbios.h b/include/smbios.h
index fc49fc10b9..aa6b6f3849 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);