smbios: Require the caller to align the SMBIOS table

All callers handle this alignment, so drop the unnecessary code. This
simplifies things a little.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Simon Glass 2023-12-31 08:25:50 -07:00
parent 138e69149b
commit 31f950a963
2 changed files with 5 additions and 6 deletions

View file

@ -258,12 +258,13 @@ static inline void fill_smbios_header(void *table, int type,
* *
* This writes SMBIOS table at a given address. * This writes SMBIOS table at a given address.
* *
* @addr: start address to write SMBIOS table. If this is not * @addr: start address to write SMBIOS table, 16-byte-alignment
* 16-byte-aligned then it will be aligned before the table is * recommended. Note that while the SMBIOS tables themself have no alignment
* written. * requirement, some systems may requires alignment. For example x86 systems
* which put tables at f0000 require 16-byte alignment
*
* Return: end address of SMBIOS table (and start address for next entry) * Return: end address of SMBIOS table (and start address for next entry)
* or NULL in case of an error * or NULL in case of an error
*
*/ */
ulong write_smbios_table(ulong addr); ulong write_smbios_table(ulong addr);

View file

@ -563,8 +563,6 @@ ulong write_smbios_table(ulong addr)
ctx.dev = NULL; ctx.dev = NULL;
} }
/* 16 byte align the table address */
addr = ALIGN(addr, 16);
start_addr = addr; start_addr = addr;
/* /*