![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <assert.h>
#include <string.h>
#include <smbios.h>
#include <console/console.h>
#include <version.h>
#include <device/device.h>
#include <device/dram/spd.h>
#include <arch/cpu.h>
#include <cpu/x86/name.h>
#include <elog.h>
#include <endian.h>
#include <memory_info.h>
#include <spd.h>
#include <cbmem.h>
#include <commonlib/helpers.h>
#include <device/pci_ids.h>
#include <device/pci_def.h>
#include <device/pci.h>
#include <drivers/vpd/vpd.h>
#include <stdlib.h>
Go to the source code of this file.
Macros | |
#define | update_max(len, max_len, stmt) |
#define | VERSION_VPD "firmware_version" |
#define | SPACES " " |
Functions | |
static u8 | smbios_checksum (u8 *p, u32 length) |
int | smbios_add_string (u8 *start, const char *str) |
int | smbios_string_table_len (u8 *start) |
int | smbios_full_table_len (struct smbios_header *header, u8 *str_table_start) |
void * | smbios_carve_table (unsigned long start, u8 type, u8 length, u16 handle) |
static int | smbios_cpu_vendor (u8 *start) |
static int | smbios_processor_name (u8 *start) |
void | smbios_fill_dimm_manufacturer_from_id (uint16_t mod_id, struct smbios_type17 *t) |
static void | trim_trailing_whitespace (char *buffer, size_t buffer_size) |
static void | smbios_fill_dimm_part_number (const char *part_number, struct smbios_type17 *t) |
This function will fill the corresponding part number. More... | |
static void | smbios_fill_dimm_serial_number (const struct dimm_info *dimm, struct smbios_type17 *t) |
static int | create_smbios_type17_for_dimm (struct dimm_info *dimm, unsigned long *current, int *handle, int type16_handle) |
static const char * | vpd_get_bios_version (void) |
static const char * | get_bios_version (void) |
static int | smbios_write_type0 (unsigned long *current, int handle) |
static int | get_socket_type (void) |
unsigned int __weak | smbios_processor_external_clock (void) |
unsigned int __weak | smbios_processor_characteristics (void) |
unsigned int __weak | smbios_processor_family (struct cpuid_result res) |
unsigned int __weak | smbios_cache_error_correction_type (u8 level) |
unsigned int __weak | smbios_cache_sram_type (void) |
unsigned int __weak | smbios_cache_conf_operation_mode (u8 level) |
unsigned int __weak | smbios_cpu_get_voltage (void) |
static size_t | get_number_of_caches (size_t max_logical_cpus_sharing_cache) |
static int | smbios_write_type1 (unsigned long *current, int handle) |
static int | smbios_write_type2 (unsigned long *current, int handle, const int chassis_handle) |
static int | smbios_write_type3 (unsigned long *current, int handle) |
static int | smbios_write_type4 (unsigned long *current, int handle) |
static int | smbios_write_type7 (unsigned long *current, const int handle, const u8 level, const u8 sram_type, const enum smbios_cache_associativity associativity, const enum smbios_cache_type type, const size_t max_cache_size, const size_t cache_size) |
static enum smbios_cache_associativity | smbios_cache_associativity (const u8 num) |
static int | smbios_write_type7_cache_parameters (unsigned long *current, int *handle, int *max_struct_size, struct smbios_type4 *type4) |
int | smbios_write_type8 (unsigned long *current, int *handle, const struct port_information *port, size_t num_ports) |
int | smbios_write_type9 (unsigned long *current, int *handle, const char *name, const enum misc_slot_type type, const enum slot_data_bus_bandwidth bandwidth, const enum misc_slot_usage usage, const enum misc_slot_length length, const u16 id, u8 slot_char1, u8 slot_char2, u8 bus, u8 dev_func) |
static int | smbios_write_type11 (unsigned long *current, int *handle) |
static int | smbios_write_type16 (unsigned long *current, int *handle) |
static int | smbios_write_type17 (unsigned long *current, int *handle, int type16) |
static int | smbios_write_type19 (unsigned long *current, int *handle, int type16) |
static int | smbios_write_type20_table (unsigned long *current, int *handle, u32 addr_start, u32 addr_end, int type17_handle, int type19_handle) |
static int | smbios_write_type20 (unsigned long *current, int *handle, int type17_handle, int type19_handle) |
static int | smbios_write_type32 (unsigned long *current, int handle) |
int | smbios_write_type38 (unsigned long *current, int *handle, const enum smbios_bmc_interface_type interface_type, const u8 ipmi_rev, const u8 i2c_addr, const u8 nv_addr, const u64 base_addr, const u8 base_modifier, const u8 irq) |
int | smbios_write_type41 (unsigned long *current, int *handle, const char *name, u8 instance, u16 segment, u8 bus, u8 device, u8 function, u8 device_type) |
static int | smbios_write_type127 (unsigned long *current, int handle) |
static u8 | smbios_get_device_type_from_dev (struct device *dev) |
static bool | smbios_get_type41_instance_id (struct device *dev, u8 device_type, u8 *instance_id) |
static const char * | smbios_get_type41_refdes (struct device *dev) |
static int | smbios_generate_type41_from_devtree (struct device *dev, int *handle, unsigned long *current) |
static int | smbios_generate_type9_from_devtree (struct device *dev, int *handle, unsigned long *current) |
int | get_smbios_data (struct device *dev, int *handle, unsigned long *current) |
static int | smbios_walk_device_tree (struct device *tree, int *handle, unsigned long *current) |
unsigned long | smbios_write_tables (unsigned long current) |
#define SPACES " " |
#define update_max | ( | len, | |
max_len, | |||
stmt | |||
) |
|
static |
Definition at line 223 of file smbios.c.
References smbios_type17::attributes, dimm_info::bus_width, smbios_type17::clock_speed, dimm_info::configured_speed_mts, smbios_type17::configured_voltage, smbios_type17::data_width, dimm_info::ddr_frequency, dimm_info::ddr_type, DIMM_INFO_PART_NUMBER_SIZE, dimm_info::dimm_size, smbios_type17::eos, smbios_type17::extended_size, smbios_type17::form_factor, get_spd_info(), smbios_type17::header, info, dimm_info::max_speed_mts, smbios_type17::maximum_voltage, smbios_type17::memory_error_information_handle, smbios_type17::memory_type, MEMORY_TYPE_DETAIL_SYNCHRONOUS, smbios_type17::minimum_voltage, dimm_info::mod_id, dimm_info::mod_type, dimm_info::module_part_number, smbios_type17::phys_memory_array_handle, dimm_info::rank_per_dimm, smbios_type17::size, smbios_carve_table(), smbios_fill_dimm_asset_tag(), smbios_fill_dimm_locator(), smbios_fill_dimm_manufacturer_from_id(), smbios_fill_dimm_part_number(), smbios_fill_dimm_serial_number(), smbios_full_table_len(), SMBIOS_MEMORY_DEVICE, smbios_type17::speed, smbios_type17::total_width, smbios_type17::type_detail, and dimm_info::vdd_voltage.
Referenced by smbios_write_type17().
|
static |
Definition at line 304 of file smbios.c.
References BIOS_DEBUG, CONFIG, coreboot_version, NULL, printk, s, smbios_mainboard_bios_version(), SPACES, strlen(), and vpd_get_bios_version().
Referenced by smbios_write_type0().
Definition at line 432 of file smbios.c.
References cpu_have_cpuid(), cpuid, cpuid_ext(), cpuid_get_max_func(), and cpuid_result::ebx.
Referenced by smbios_write_type7_cache_parameters().
Definition at line 1261 of file smbios.c.
References smbios_generate_type41_from_devtree(), and smbios_generate_type9_from_devtree().
Referenced by smbios_walk_device_tree(), and smbios_write_wifi_pcie().
|
static |
Definition at line 382 of file smbios.c.
References CONFIG.
Referenced by smbios_write_type4().
int smbios_add_string | ( | u8 * | start, |
const char * | str | ||
) |
Definition at line 40 of file smbios.c.
References strcmp(), strcpy(), and strlen().
Referenced by add_fw_config_oem_string(), lumpy_smbios_type41_irq(), mainboard_smbios_strings(), smbios_cache_associativity(), smbios_cpu_vendor(), smbios_fill_dimm_asset_tag(), smbios_fill_dimm_locator(), smbios_fill_dimm_manufacturer_from_id(), smbios_fill_dimm_part_number(), smbios_fill_dimm_serial_number(), smbios_processor_name(), smbios_write_intel_wifi(), smbios_write_type0(), smbios_write_type1(), smbios_write_type2(), smbios_write_type3(), smbios_write_type4(), smbios_write_type41(), smbios_write_type8(), and smbios_write_type9().
|
static |
Definition at line 623 of file smbios.c.
References smbios_type7::associativity, buf, smbios_type7::cache_configuration, smbios_type7::cache_speed, smbios_type7::current_sram_type, smbios_type7::eos, smbios_type7::error_correction_type, smbios_type7::header, smbios_type7::installed_size, smbios_type7::installed_size2, KiB, smbios_type7::max_cache_size, smbios_type7::max_cache_size2, smbios_add_string(), SMBIOS_CACHE_CONF_ENABLED, SMBIOS_CACHE_CONF_LEVEL, SMBIOS_CACHE_CONF_LOCATION, smbios_cache_conf_operation_mode(), SMBIOS_CACHE_CONF_OPERATION_MODE, smbios_cache_error_correction_type(), SMBIOS_CACHE_INFORMATION, SMBIOS_CACHE_SIZE2_UNIT_1KB, SMBIOS_CACHE_SIZE2_UNIT_64KB, SMBIOS_CACHE_SIZE_MASK, SMBIOS_CACHE_SIZE_OVERFLOW, SMBIOS_CACHE_SIZE_UNIT_1KB, SMBIOS_CACHE_SIZE_UNIT_64KB, smbios_carve_table(), smbios_full_table_len(), snprintf(), smbios_type7::socket_designation, smbios_type7::supported_sram_type, smbios_type7::system_cache_type, and type.
Referenced by smbios_write_type7_cache_parameters().
Definition at line 421 of file smbios.c.
References SMBIOS_CACHE_OP_MODE_UNKNOWN.
Referenced by smbios_cache_associativity().
Definition at line 411 of file smbios.c.
References SMBIOS_CACHE_ERROR_CORRECTION_UNKNOWN.
Referenced by smbios_cache_associativity().
Definition at line 416 of file smbios.c.
References SMBIOS_CACHE_SRAM_TYPE_UNKNOWN.
Referenced by smbios_write_type7_cache_parameters().
Definition at line 91 of file smbios.c.
References assert, smbios_header::handle, smbios_header::length, length, memset(), smbios_header::type, and type.
Referenced by create_smbios_type17_for_dimm(), elog_smbios_write_type15(), lumpy_smbios_type41_irq(), smbios_cache_associativity(), smbios_write_intel_wifi(), smbios_write_type0(), smbios_write_type1(), smbios_write_type11(), smbios_write_type127(), smbios_write_type16(), smbios_write_type19(), smbios_write_type2(), smbios_write_type20_table(), smbios_write_type3(), smbios_write_type32(), smbios_write_type38(), smbios_write_type4(), smbios_write_type41(), smbios_write_type8(), and smbios_write_type9().
Definition at line 32 of file smbios.c.
References length.
Referenced by smbios_write_tables().
Definition at line 427 of file smbios.c.
Referenced by smbios_write_type4().
|
static |
Definition at line 103 of file smbios.c.
References cpu_have_cpuid(), cpuid, cpuid_result::ebx, cpuid_result::ecx, cpuid_result::edx, and smbios_add_string().
Referenced by smbios_write_type4().
void smbios_fill_dimm_manufacturer_from_id | ( | uint16_t | mod_id, |
struct smbios_type17 * | t | ||
) |
Definition at line 142 of file smbios.c.
References smbios_type17::eos, smbios_type17::manufacturer, smbios_add_string(), snprintf(), and spd_manufacturer_name().
Referenced by create_smbios_type17_for_dimm().
|
static |
This function will fill the corresponding part number.
Definition at line 172 of file smbios.c.
References DIMM_INFO_PART_NUMBER_SIZE, smbios_type17::eos, smbios_type17::part_number, smbios_add_string(), snprintf(), strlen(), strncpy(), and trim_trailing_whitespace().
Referenced by create_smbios_type17_for_dimm().
|
static |
Definition at line 212 of file smbios.c.
References smbios_type17::eos, dimm_info::serial, serial, smbios_type17::serial_number, smbios_add_string(), and snprintf().
Referenced by create_smbios_type17_for_dimm().
int smbios_full_table_len | ( | struct smbios_header * | header, |
u8 * | str_table_start | ||
) |
Definition at line 86 of file smbios.c.
References header, and smbios_string_table_len().
Referenced by create_smbios_type17_for_dimm(), elog_smbios_write_type15(), lumpy_smbios_type41_irq(), smbios_cache_associativity(), smbios_write_intel_wifi(), smbios_write_type0(), smbios_write_type1(), smbios_write_type11(), smbios_write_type127(), smbios_write_type16(), smbios_write_type19(), smbios_write_type2(), smbios_write_type20_table(), smbios_write_type3(), smbios_write_type32(), smbios_write_type38(), smbios_write_type4(), smbios_write_type41(), smbios_write_type8(), and smbios_write_type9().
|
static |
Definition at line 1184 of file smbios.c.
References device::bus, pci_path::devfn, DEVICE_PATH_PCI, name, device::on_mainboard, device::path, device_path::pci, PCI_FUNC, PCI_SLOT, bus::secondary, smbios_get_device_type_from_dev(), smbios_get_type41_instance_id(), smbios_get_type41_refdes(), smbios_write_type41(), and device_path::type.
Referenced by get_smbios_data().
|
static |
Definition at line 1211 of file smbios.c.
References device::bus, dev_is_active_bridge(), pci_path::devfn, DEVICE_PATH_PCI, device::enabled, length, device::path, device_path::pci, bus::secondary, SlotDataBusWidthUnknown, SlotLengthUnknown, SlotTypeUnknown, SlotUsageAvailable, SlotUsageInUse, SlotUsageUnknown, smbios_write_type9(), device_path::type, and type.
Referenced by get_smbios_data().
Definition at line 1121 of file smbios.c.
References device::class, PCI_CLASS_DISPLAY_3D, PCI_CLASS_DISPLAY_OTHER, PCI_CLASS_DISPLAY_VGA, PCI_CLASS_DISPLAY_XGA, PCI_CLASS_MULTIMEDIA_AUDIO, PCI_CLASS_MULTIMEDIA_OTHER, PCI_CLASS_MULTIMEDIA_PHONE, PCI_CLASS_MULTIMEDIA_VIDEO, PCI_CLASS_NETWORK_ETHERNET, PCI_CLASS_NETWORK_TOKEN_RING, PCI_CLASS_NOT_DEFINED, PCI_CLASS_STORAGE_ATA, PCI_CLASS_STORAGE_SAS, PCI_CLASS_STORAGE_SATA, PCI_CLASS_STORAGE_SCSI, SMBIOS_DEVICE_TYPE_ETHERNET, SMBIOS_DEVICE_TYPE_OTHER, SMBIOS_DEVICE_TYPE_PATA, SMBIOS_DEVICE_TYPE_SAS, SMBIOS_DEVICE_TYPE_SATA, SMBIOS_DEVICE_TYPE_SCSI, SMBIOS_DEVICE_TYPE_SOUND, SMBIOS_DEVICE_TYPE_TOKEN_RING, SMBIOS_DEVICE_TYPE_UNKNOWN, and SMBIOS_DEVICE_TYPE_VIDEO.
Referenced by smbios_generate_type41_from_devtree().
|
static |
Definition at line 1155 of file smbios.c.
References SMBIOS_DEVICE_TYPE_COUNT, SMBIOS_DEVICE_TYPE_OTHER, and SMBIOS_DEVICE_TYPE_UNKNOWN.
Referenced by smbios_generate_type41_from_devtree().
|
static |
Definition at line 1175 of file smbios.c.
References get_pci_subclass_name().
Referenced by smbios_generate_type41_from_devtree().
Definition at line 401 of file smbios.c.
Referenced by smbios_write_type4().
Definition at line 396 of file smbios.c.
Referenced by smbios_write_type4().
unsigned int __weak smbios_processor_family | ( | struct cpuid_result | res | ) |
Definition at line 406 of file smbios.c.
References cpuid_result::eax.
Referenced by smbios_write_type4().
|
static |
Definition at line 118 of file smbios.c.
References cpu_have_cpuid(), cpuid, cpuid_result::eax, cpuid_result::ebx, cpuid_result::ecx, cpuid_result::edx, and smbios_add_string().
Referenced by smbios_write_type4().
int smbios_string_table_len | ( | u8 * | start | ) |
Definition at line 69 of file smbios.c.
References strlen().
Referenced by smbios_full_table_len(), and smbios_write_type0().
|
static |
Definition at line 1271 of file smbios.c.
References BIOS_INFO, dev_name, dev_path(), device::enabled, get_smbios_data(), device::next, device::ops, and printk.
Referenced by smbios_write_tables().
Definition at line 1290 of file smbios.c.
References ALIGN_UP, all_devices, smbios_entry::anchor, smbios_entry30::anchor, BIOS_DEBUG, smbios_entry::checksum, smbios_entry30::checksum, CONFIG, elog_smbios_write_type15(), smbios_entry::intermediate_anchor_string, smbios_entry::intermediate_checksum, smbios_entry::length, smbios_entry30::length, smbios_entry::major_version, smbios_entry30::major_version, smbios_entry::max_struct_size, memcpy(), memset(), smbios_entry::minor_version, smbios_entry30::minor_version, printk, smbios_checksum(), smbios_walk_device_tree(), smbios_write_type0(), smbios_write_type1(), smbios_write_type11(), smbios_write_type127(), smbios_write_type16(), smbios_write_type17(), smbios_write_type19(), smbios_write_type2(), smbios_write_type20(), smbios_write_type3(), smbios_write_type32(), smbios_write_type4(), smbios_write_type7_cache_parameters(), smbios_entry::struct_count, smbios_entry::struct_table_address, smbios_entry30::struct_table_address, smbios_entry::struct_table_length, smbios_entry30::struct_table_length, and update_max.
Referenced by write_smbios_table().
|
static |
Definition at line 335 of file smbios.c.
References smbios_type0::bios_characteristics, smbios_type0::bios_characteristics_ext1, smbios_type0::bios_characteristics_ext2, BIOS_CHARACTERISTICS_PC_CARD, BIOS_CHARACTERISTICS_PCI_SUPPORTED, BIOS_CHARACTERISTICS_SELECTABLE_BOOT, BIOS_CHARACTERISTICS_UPGRADEABLE, BIOS_EXT1_CHARACTERISTICS_ACPI, BIOS_EXT2_CHARACTERISTICS_TARGET, smbios_type0::bios_release_date, smbios_type0::bios_rom_size, smbios_type0::bios_version, CONFIG, coreboot_dmi_date, coreboot_major_revision, coreboot_minor_revision, DIV_ROUND_UP, smbios_type0::ec_major_release, smbios_type0::ec_minor_release, smbios_type0::eos, smbios_type0::extended_bios_rom_size, get_bios_version(), GiB, smbios_type0::header, MiB, MIN, smbios_add_string(), SMBIOS_BIOS_INFORMATION, smbios_carve_table(), smbios_ec_revision(), smbios_full_table_len(), smbios_string_table_len(), smbios_type0_bios_version(), smbios_type0::system_bios_major_release, smbios_type0::system_bios_minor_release, and smbios_type0::vendor.
Referenced by smbios_write_tables().
|
static |
Definition at line 459 of file smbios.c.
References smbios_type1::eos, smbios_type1::family, smbios_type1::header, smbios_type1::manufacturer, smbios_type1::product_name, smbios_type1::serial_number, smbios_type1::sku, smbios_add_string(), smbios_carve_table(), smbios_full_table_len(), SMBIOS_SYSTEM_INFORMATION, smbios_system_manufacturer(), smbios_system_product_name(), smbios_system_serial_number(), smbios_system_set_uuid(), smbios_system_sku(), smbios_system_version(), smbios_system_wakeup_type(), smbios_type1::uuid, smbios_type1::version, and smbios_type1::wakeup_type.
Referenced by smbios_write_tables().
|
static |
Definition at line 867 of file smbios.c.
References all_devices, smbios_type11::count, smbios_type11::eos, smbios_type11::header, memset(), device::next, device::ops, smbios_carve_table(), smbios_full_table_len(), and SMBIOS_OEM_STRINGS.
Referenced by smbios_write_tables().
|
static |
Definition at line 1110 of file smbios.c.
References smbios_type127::eos, smbios_type127::header, smbios_carve_table(), SMBIOS_END_OF_TABLE, and smbios_full_table_len().
Referenced by smbios_write_tables().
|
static |
Definition at line 889 of file smbios.c.
References ARRAY_SIZE, BIOS_INFO, cbmem_find(), CBMEM_ID_MEMINFO, memory_info::dimm, memory_info::dimm_cnt, dimm_info::dimm_size, memory_info::ecc_type, smbios_type16::eos, smbios_type16::extended_maximum_capacity, smbios_type16::header, KiB, smbios_type16::location, memory_info::max_capacity_mib, smbios_type16::maximum_capacity, MEMORY_ARRAY_LOCATION_SYSTEM_BOARD, MEMORY_ARRAY_USE_SYSTEM, smbios_type16::memory_error_correction, smbios_type16::memory_error_information_handle, MiB, NULL, memory_info::number_of_devices, smbios_type16::number_of_memory_devices, printk, smbios_carve_table(), smbios_full_table_len(), SMBIOS_PHYS_MEMORY_ARRAY, SMBIOS_USE_EXTENDED_MAX_CAPACITY, and smbios_type16::use.
Referenced by smbios_write_tables().
|
static |
Definition at line 935 of file smbios.c.
References ARRAY_SIZE, BIOS_INFO, cbmem_find(), CBMEM_ID_MEMINFO, create_smbios_type17_for_dimm(), memory_info::dimm, memory_info::dimm_cnt, NULL, and printk.
Referenced by smbios_write_tables().
|
static |
Definition at line 962 of file smbios.c.
References ARRAY_SIZE, cbmem_find(), CBMEM_ID_MEMINFO, memory_info::dimm, memory_info::dimm_cnt, dimm_info::dimm_size, smbios_type19::ending_address, smbios_type19::eos, smbios_type19::extended_ending_address, smbios_type19::extended_starting_address, smbios_type19::header, KiB, smbios_type19::memory_array_handle, MiB, NULL, smbios_type19::partition_width, smbios_carve_table(), smbios_full_table_len(), SMBIOS_MEMORY_ARRAY_MAPPED_ADDRESS, and smbios_type19::starting_address.
Referenced by smbios_write_tables().
|
static |
Definition at line 479 of file smbios.c.
References smbios_type2::asset_tag, smbios_type2::board_type, smbios_type2::chassis_handle, smbios_type2::eos, smbios_type2::feature_flags, smbios_type2::header, smbios_type2::location_in_chassis, smbios_type2::manufacturer, smbios_type2::product_name, smbios_type2::serial_number, smbios_add_string(), SMBIOS_BOARD_INFORMATION, smbios_carve_table(), smbios_full_table_len(), smbios_mainboard_asset_tag(), smbios_mainboard_board_type(), smbios_mainboard_feature_flags(), smbios_mainboard_location_in_chassis(), smbios_mainboard_manufacturer(), smbios_mainboard_product_name(), smbios_mainboard_serial_number(), smbios_mainboard_version(), and smbios_type2::version.
Referenced by smbios_write_tables().
|
static |
Definition at line 1030 of file smbios.c.
References ARRAY_SIZE, BIOS_INFO, cbmem_find(), CBMEM_ID_MEMINFO, memory_info::dimm, memory_info::dimm_cnt, dimm_info::dimm_size, NULL, printk, and smbios_write_type20_table().
Referenced by smbios_write_tables().
|
static |
Definition at line 1010 of file smbios.c.
References smbios_type20::addr_end, smbios_type20::addr_start, smbios_type20::eos, smbios_type20::header, smbios_type20::interleave_depth, smbios_type20::interleave_pos, smbios_type20::memory_array_mapped_address_handle, smbios_type20::memory_device_handle, smbios_type20::partition_row_pos, smbios_carve_table(), smbios_full_table_len(), and SMBIOS_MEMORY_DEVICE_MAPPED_ADDRESS.
Referenced by smbios_write_type20().
|
static |
Definition at line 499 of file smbios.c.
References smbios_type3::_type, smbios_type3::asset_tag_number, smbios_type3::bootup_state, smbios_type3::eos, smbios_type3::header, smbios_type3::manufacturer, smbios_type3::number_of_power_cords, smbios_type3::power_supply_state, smbios_type3::security_status, smbios_type3::serial_number, smbios_add_string(), smbios_carve_table(), smbios_chassis_power_cords(), smbios_chassis_serial_number(), smbios_chassis_version(), smbios_full_table_len(), smbios_mainboard_asset_tag(), smbios_mainboard_enclosure_type(), SMBIOS_STATE_SAFE, SMBIOS_SYSTEM_ENCLOSURE, smbios_system_manufacturer(), smbios_type3::thermal_state, and smbios_type3::version.
Referenced by smbios_write_tables().
|
static |
Definition at line 1054 of file smbios.c.
References smbios_type32::eos, smbios_type32::header, smbios_carve_table(), smbios_full_table_len(), and SMBIOS_SYSTEM_BOOT_INFORMATION.
Referenced by smbios_write_tables().
int smbios_write_type38 | ( | unsigned long * | current, |
int * | handle, | ||
const enum smbios_bmc_interface_type | interface_type, | ||
const u8 | ipmi_rev, | ||
const u8 | i2c_addr, | ||
const u8 | nv_addr, | ||
const u64 | base_addr, | ||
const u8 | base_modifier, | ||
const u8 | irq | ||
) |
Definition at line 1064 of file smbios.c.
References smbios_type38::base_address, smbios_type38::base_address_modifier, smbios_type38::eos, smbios_type38::header, smbios_type38::i2c_slave_addr, smbios_type38::interface_type, smbios_type38::ipmi_rev, smbios_type38::irq, smbios_type38::nv_storage_addr, smbios_carve_table(), smbios_full_table_len(), and SMBIOS_IPMI_DEVICE_INFORMATION.
|
static |
Definition at line 519 of file smbios.c.
References BIT, buf, smbios_type4::core_count, smbios_type4::core_count2, smbios_type4::core_enabled, smbios_type4::core_enabled2, cpu_have_cpuid(), cpuid, cpuid_eax(), cpuid_ecx(), cpuid_ext(), cpuid_get_max_func(), smbios_type4::current_speed, cpuid_result::eax, cpuid_result::ebx, cpuid_result::ecx, cpuid_result::edx, smbios_type4::eos, smbios_type4::external_clock, get_socket_type(), smbios_type4::header, smbios_type4::l1_cache_handle, smbios_type4::l2_cache_handle, smbios_type4::l3_cache_handle, smbios_type4::max_speed, MIN, smbios_type4::processor_characteristics, smbios_type4::processor_family, smbios_type4::processor_id, smbios_type4::processor_manufacturer, smbios_type4::processor_type, smbios_type4::processor_upgrade, smbios_type4::processor_version, smbios_type4::serial_number, smbios_add_string(), smbios_carve_table(), smbios_cpu_get_current_speed_mhz(), smbios_cpu_get_max_speed_mhz(), smbios_cpu_get_voltage(), smbios_cpu_vendor(), smbios_full_table_len(), smbios_processor_characteristics(), smbios_processor_external_clock(), smbios_processor_family(), SMBIOS_PROCESSOR_INFORMATION, smbios_processor_name(), smbios_processor_serial_number(), SMBIOS_PROCESSOR_STATUS_CPU_ENABLED, SMBIOS_PROCESSOR_STATUS_POPULATED, snprintf(), smbios_type4::socket_designation, smbios_type4::status, smbios_type4::thread_count, smbios_type4::thread_count2, and smbios_type4::voltage.
Referenced by smbios_write_tables().
int smbios_write_type41 | ( | unsigned long * | current, |
int * | handle, | ||
const char * | name, | ||
u8 | instance, | ||
u16 | segment, | ||
u8 | bus, | ||
u8 | device, | ||
u8 | function, | ||
u8 | device_type | ||
) |
Definition at line 1087 of file smbios.c.
References smbios_type41::bus_number, device, smbios_type41::device_number, smbios_type41::device_status, smbios_type41::device_type, smbios_type41::device_type_instance, smbios_type41::eos, smbios_type41::function_number, smbios_type41::header, name, smbios_type41::reference_designation, smbios_type41::segment_group_number, smbios_add_string(), smbios_carve_table(), smbios_full_table_len(), and SMBIOS_ONBOARD_DEVICES_EXTENDED_INFORMATION.
Referenced by butterfly_onboard_smbios_data(), link_onboard_smbios_data(), mainboard_smbios_data(), parrot_onboard_smbios_data(), smbios_generate_type41_from_devtree(), and variant_smbios_data().
|
static |
Definition at line 623 of file smbios.c.
Referenced by smbios_write_type7_cache_parameters().
|
static |
Definition at line 733 of file smbios.c.
References smbios_type7::associativity, BIOS_DEBUG, CACHE_L1D, cpu_check_deterministic_cache_cpuid_supported(), cpu_have_cpuid(), CPUID_COMMAND_UNSUPPORTED, CPUID_TYPE_INVALID, fill_cpu_cache_info(), get_number_of_caches(), info, smbios_type4::l1_cache_handle, smbios_type4::l2_cache_handle, smbios_type4::l3_cache_handle, cpu_cache_info::level, printk, smbios_cache_associativity(), SMBIOS_CACHE_ASSOCIATIVITY_FULL, smbios_cache_sram_type(), SMBIOS_CACHE_TYPE_DATA, SMBIOS_CACHE_TYPE_INSTRUCTION, SMBIOS_CACHE_TYPE_UNIFIED, SMBIOS_CACHE_TYPE_UNKNOWN, smbios_write_type7(), type, and update_max.
Referenced by smbios_write_tables().
int smbios_write_type8 | ( | unsigned long * | current, |
int * | handle, | ||
const struct port_information * | port, | ||
size_t | num_ports | ||
) |
Definition at line 812 of file smbios.c.
References smbios_type8::eos, smbios_type8::external_connector_type, smbios_type8::external_reference_designator, smbios_type8::header, smbios_type8::internal_connector_type, smbios_type8::internal_reference_designator, smbios_type8::port_type, smbios_add_string(), smbios_carve_table(), smbios_full_table_len(), and SMBIOS_PORT_CONNECTOR_INFORMATION.
Referenced by mainboard_smbios_data().
int smbios_write_type9 | ( | unsigned long * | current, |
int * | handle, | ||
const char * | name, | ||
const enum misc_slot_type | type, | ||
const enum slot_data_bus_bandwidth | bandwidth, | ||
const enum misc_slot_usage | usage, | ||
const enum misc_slot_length | length, | ||
const u16 | id, | ||
u8 | slot_char1, | ||
u8 | slot_char2, | ||
u8 | bus, | ||
u8 | dev_func | ||
) |
Definition at line 837 of file smbios.c.
References smbios_type9::bus_number, smbios_type9::current_usage, smbios_type9::data_bus_width, smbios_type9::device_function_number, smbios_type9::eos, smbios_type9::header, length, name, smbios_type9::segment_group_number, smbios_type9::slot_characteristics_1, smbios_type9::slot_characteristics_2, smbios_type9::slot_data_bus_width, smbios_type9::slot_designation, smbios_type9::slot_id, smbios_type9::slot_length, smbios_type9::slot_type, SlotDataBusWidthOther, smbios_add_string(), smbios_carve_table(), smbios_full_table_len(), SMBIOS_SYSTEM_SLOTS, and type.
Referenced by create_smbios_type9(), and smbios_generate_type9_from_devtree().
Definition at line 156 of file smbios.c.
References buffer, and strnlen().
Referenced by smbios_fill_dimm_part_number().
|
static |
Definition at line 281 of file smbios.c.
References BIOS_DEBUG, BIOS_ERR, malloc(), memcpy(), NULL, printk, s, smbios_type17::size, version, VERSION_VPD, vpd_find(), and VPD_RO.
Referenced by get_bios_version().