Elyes HAOUAS has uploaded this change for review. ( https://review.coreboot.org/29641
Change subject: SMBIOS: [test] Upgrade to 3.20 ......................................................................
SMBIOS: [test] Upgrade to 3.20
Change-Id: I8bccedd277beb755b643a663f3278af25f8fbf96 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/arch/x86/smbios.c M src/include/smbios.h M src/mainboard/samsung/lumpy/mainboard.c 3 files changed, 54 insertions(+), 38 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/29641/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index babe61b..154991a 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -670,11 +670,10 @@ t->length = len - 2; t->reference_designation = smbios_add_string(t->eos, name); t->device_type = SMBIOS_DEVICE_TYPE_OTHER; - t->device_status = 1; t->device_type_instance = instance; t->segment_group_number = segment; t->bus_number = bus; - t->device_number = device; + t->device_function_number = (device << 3) | (function << 0); t->function_number = function;
len = t->length + smbios_string_table_len(t->eos); @@ -764,20 +763,16 @@ handle++));
memset(se, 0, sizeof(struct smbios_entry)); - memcpy(se->anchor, "_SM_", 4); + memcpy(se->anchor, "_SM3_", 5); se->length = sizeof(struct smbios_entry); - se->major_version = 2; - se->minor_version = 7; + se->major_version = 3; + se->minor_version = 2; + se->docrev = 0; se->max_struct_size = max_struct_size; - se->struct_count = handle; - memcpy(se->intermediate_anchor_string, "_DMI_", 5);
- se->struct_table_address = (u32)tables; + se->struct_table_address = (u64)tables; se->struct_table_length = len;
- se->intermediate_checksum = smbios_checksum((u8 *)se + 0x10, - sizeof(struct smbios_entry) - - 0x10); se->checksum = smbios_checksum((u8 *)se, sizeof(struct smbios_entry)); return current; } diff --git a/src/include/smbios.h b/src/include/smbios.h index 91777e3..eaabb99 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -52,18 +52,25 @@ const char *smbios_mainboard_family(void); #endif
-#define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7) -#define BIOS_CHARACTERISTICS_PC_CARD (1 << 8) -#define BIOS_CHARACTERISTICS_PNP (1 << 9) -#define BIOS_CHARACTERISTICS_APM (1 << 10) -#define BIOS_CHARACTERISTICS_UPGRADEABLE (1 << 11) -#define BIOS_CHARACTERISTICS_SHADOW (1 << 12) -#define BIOS_CHARACTERISTICS_BOOT_FROM_CD (1 << 15) -#define BIOS_CHARACTERISTICS_SELECTABLE_BOOT (1 << 16) -#define BIOS_CHARACTERISTICS_BIOS_SOCKETED (1 << 17) +#define BIOS_CHARACTERISTICS_ISA_SUPPORTED (1 << 4) +#define BIOS_CHARACTERISTICS_MCA_SUPPORTED (1 << 5) +#define BIOS_CHARACTERISTICS_EISA_SUPPORTED (1 << 6) +#define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7) +#define BIOS_CHARACTERISTICS_PC_CARD (1 << 8) +#define BIOS_CHARACTERISTICS_PNP (1 << 9) +#define BIOS_CHARACTERISTICS_APM (1 << 10) +#define BIOS_CHARACTERISTICS_UPGRADEABLE (1 << 11) +#define BIOS_CHARACTERISTICS_SHADOW (1 << 12) +#define BIOS_CHARACTERISTICS_VL_VESA_SUPPORTED (1 << 13) +#define BIOS_CHARACTERISTICS_ESCD_SUPPORT_AVAILABLE (1 << 14) +#define BIOS_CHARACTERISTICS_BOOT_FROM_CD (1 << 15) +#define BIOS_CHARACTERISTICS_SELECTABLE_BOOT (1 << 16) +#define BIOS_CHARACTERISTICS_BIOS_SOCKETED (1 << 17) +#define BIOS_CHARACTERISTICS_BOOT_FROM_PCMCIA (1 << 18) +#define BIOS_CHARACTERISTICS_EDD_SPEC_SUPPORTED (1 << 19)
-#define BIOS_EXT1_CHARACTERISTICS_ACPI (1 << 0) -#define BIOS_EXT2_CHARACTERISTICS_TARGET (1 << 2) +#define BIOS_EXT1_CHARACTERISTICS_ACPI (1 << 0) +#define BIOS_EXT2_CHARACTERISTICS_TARGET (1 << 2)
#define BIOS_MEMORY_ECC_SINGLE_BIT_CORRECTING (1 << 3) #define BIOS_MEMORY_ECC_DOUBLE_BIT_CORRECTING (1 << 4) @@ -83,7 +90,7 @@ #define MEMORY_TYPE_DETAIL_NON_VOLATILE (1 << 12) #define MEMORY_TYPE_DETAIL_REGISTERED (1 << 13) #define MEMORY_TYPE_DETAIL_UNBUFFERED (1 << 14) - +#define MEMORY_TYPE_DETAIL_LRDIMM (1 << 16) typedef enum { MEMORY_BUS_WIDTH_8 = 0, MEMORY_BUS_WIDTH_16 = 1, @@ -203,20 +210,18 @@ } smbios_struct_type_t;
struct smbios_entry { - u8 anchor[4]; + u8 anchor[5]; u8 checksum; u8 length; u8 major_version; u8 minor_version; - u16 max_struct_size; + u8 docrev; u8 entry_point_rev; - u8 formwatted_area[5]; - u8 intermediate_anchor_string[5]; - u8 intermediate_checksum; + u8 reserved[1]; + u16 max_struct_size; u16 struct_table_length; - u32 struct_table_address; - u16 struct_count; - u8 smbios_bcd_revision; + u64 struct_table_address; + u8 eos[2]; } __packed;
struct smbios_type0 { @@ -235,6 +240,7 @@ u8 system_bios_minor_release; u8 ec_major_release; u8 ec_minor_release; + u16 extended_bios_rom_size; u8 eos[2]; } __packed;
@@ -282,6 +288,8 @@ u8 location_in_chassis; u16 chassis_handle; u8 board_type; + u8 count_contained_object_handles; + u16 contained_object_handles; u8 eos[2]; } __packed;
@@ -342,6 +350,7 @@ u8 number_of_power_cords; u8 element_count; u8 element_record_length; + u8 contained_elements; u8 sku_number; u8 eos[2]; } __packed; @@ -373,6 +382,9 @@ u8 thread_count; u16 processor_characteristics; u16 processor_family2; + u16 core_count2; + u16 core_enabled2; + u16 thread_count2; u8 eos[2]; } __packed;
@@ -398,6 +410,7 @@ u8 header_format; u8 log_type_descriptors; u8 log_type_descriptor_length; + u8 list_supported_event_log_type_descriptors; u8 eos[2]; } __packed;
@@ -454,6 +467,17 @@ u16 minimum_voltage; u16 maximum_voltage; u16 configured_voltage; + u8 memory_technology; + u16 memory_operating_mode_capability; + u8 firmware_version; + 16 module_manufacturer_id; + u16 module_product_id; + u16 memory_sub_controller_manufacturer_id; + u16 memory_sub_controller_product_id; + u64 non-volatile_size; + u64 volatile_size; + u64 cache_size; + u64 logical_size; u8 eos[2]; } __packed;
@@ -477,6 +501,7 @@ u64 base_address; u8 base_address_modifier; u8 irq; + u8 eos[2]; } __packed;
enum smbios_bmc_interface_type { @@ -504,13 +529,11 @@ u8 length; u16 handle; u8 reference_designation; - u8 device_type: 7; - u8 device_status: 1; + u8 device_type; u8 device_type_instance; u16 segment_group_number; u8 bus_number; - u8 function_number: 3; - u8 device_number: 5; + u8 device_function_number; u8 eos[2]; } __packed;
diff --git a/src/mainboard/samsung/lumpy/mainboard.c b/src/mainboard/samsung/lumpy/mainboard.c index 8664217..76ddc49 100644 --- a/src/mainboard/samsung/lumpy/mainboard.c +++ b/src/mainboard/samsung/lumpy/mainboard.c @@ -57,12 +57,10 @@ t->length = len - 2; t->reference_designation = smbios_add_string(t->eos, name); t->device_type = SMBIOS_DEVICE_TYPE_OTHER; - t->device_status = 1; t->device_type_instance = irq; t->segment_group_number = 0; t->bus_number = addr; - t->function_number = 0; - t->device_number = 0; + t->device_function_number = 0;
len = t->length + smbios_string_table_len(t->eos); *current += len;