diff options
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/fdt_support.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/boot/fdt_support.c b/boot/fdt_support.c index 92f2f534ee0..1c215e548db 100644 --- a/boot/fdt_support.c +++ b/boot/fdt_support.c @@ -27,6 +27,7 @@ #include <fdtdec.h> #include <version.h> #include <video.h> +#include <smbios.h> DECLARE_GLOBAL_DATA_PTR; @@ -333,6 +334,7 @@ int fdt_chosen(void *fdt) int nodeoffset; int err; const char *str; /* used to set string properties */ + ulong smbiosaddr; /* SMBIOS table address */ err = fdt_check_header(fdt); if (err < 0) { @@ -387,6 +389,23 @@ int fdt_chosen(void *fdt) return err; } + if (CONFIG_IS_ENABLED(GENERATE_SMBIOS_TABLE)) { + /* Inject SMBIOS address when we have a valid address. + * This is useful for systems using booti/bootm instead of bootefi. + * Failure to set this property is non-fatal, we only generate a + * warning. + */ + smbiosaddr = gd_smbios_start(); + if (smbiosaddr) { + err = fdt_setprop_u64(fdt, nodeoffset, "smbios3-entrypoint", + smbiosaddr); + if (err < 0) { + printf("WARNING: could not set smbios3-entrypoint %s.\n", + fdt_strerror(err)); + } + } + } + return fdt_fixup_stdout(fdt, nodeoffset); } |
