
Hi Heinrich,
On Mon, Jan 1, 2024 at 10:34 AM Heinrich Schuchardt xypron.glpk@gmx.de wrote:
On 12/31/23 16:25, Simon Glass wrote:
When the SMBIOS table is written to an address above 4GB a 32-bit table address is not large enough.
Use an SMBIOS3 table in that case.
Note that we cannot use efi_allocate_pages() since this function has nothing to do with EFI. There is no equivalent function to allocate memory below 4GB in U-Boot. One solution would be to create a separate malloc() pool, or just always put the malloc() pool below 4GB.
- Use log_debug() for warning
- Rebase on Heinrich's smbios.h patch
- Set the checksum for SMBIOS3
Signed-off-by: Simon Glass sjg@chromium.org
(no changes since v4)
Changes in v4:
- Check the start of the table rather than the end
Changes in v2:
Check the end of the table rather than the start.
include/smbios.h | 6 +++++- lib/smbios.c | 30 +++++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/include/smbios.h b/include/smbios.h index e601283d293..77be58887a2 100644 --- a/include/smbios.h +++ b/include/smbios.h @@ -12,7 +12,7 @@
/* SMBIOS spec version implemented */ #define SMBIOS_MAJOR_VER 3 -#define SMBIOS_MINOR_VER 0 +#define SMBIOS_MINOR_VER 7
enum { SMBIOS_STR_MAX = 64, /* Maximum length allowed for a string */ @@ -80,6 +80,10 @@ struct __packed smbios3_entry { u64 struct_table_address; };
+/* These two structures should use the same amount of 16-byte-aligned space */
I cannot see from where you take such a requirement. By chance it is fulfilled by the current definitions. If this a leftover from debugging we should remove it.
Oh, I just assumed it was a requirement, perhaps. Yes we can remove this, if you like. In fact perhaps we should remove all SMBIOS2 stuff as a follow-up?
Regards, Simon