int smbios_update_version(const char *version)
{
-// char *ptr = gd->smbios_version;
-// uint old_len, len;
-//
-// if (!ptr)
-// return log_ret(-ENOENT);
-//
-// /*
-// * This string is supposed to have at least enough bytes and is
-// * padded with spaces. Update it, taking care not to move the
-// * \0 terminator, so that other strings in the string table
-// * are not disturbed. See smbios_add_string()
-// */
-// old_len = strnlen(ptr, SMBIOS_STR_MAX);
-// len = strnlen(version, SMBIOS_STR_MAX);
-// if (len > old_len)
-// return log_ret(-ENOSPC);
-//
-// log_debug("Replacing SMBIOS type 0 version string '%s'\n", ptr);
-// memcpy(ptr, version, len);
-//#ifdef LOG_DEBUG
-// print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
-//#endif
-//
return 0;
}
t->bios_ver = smbios_add_prop(ctx, "version");
if (!t->bios_ver)
t->bios_ver = smbios_add_string(ctx, PLAIN_VERSION);
-// if (t->bios_ver)
-// gd->smbios_version = ctx->last_str;
-// log_debug("smbios_version = %p: '%s'\n", gd->smbios_version,
-// gd->smbios_version);
-#ifdef LOG_DEBUG
-// print_buffer((ulong)gd->smbios_version, gd->smbios_version,
-// 1, strlen(gd->smbios_version) + 1, 0);
-#endif
t->bios_release_date = smbios_add_string(ctx, U_BOOT_DMI_DATE);
#ifdef CONFIG_ROM_SIZE
t->bios_rom_size = (CONFIG_ROM_SIZE / 65536) - 1;
}
// Structure Table Address is 32-bit physical starting address of the
// read-only SMBIOS Structure Table
-// se->struct_table_address = table_addr;
-// se->struct_table_address = table_addr - 0xa0000000;
se->struct_table_address = virt_to_phys(table_addr);
se->struct_count = handle;