1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 01:02:19 +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:
Heinrich Schuchardt
2021-05-15 18:07:47 +02:00
parent 11275e4f72
commit c193d9bd28
4 changed files with 27 additions and 12 deletions

View File

@@ -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);