Documentation: Fix sphinx configuration
[coreboot.git] / src / include / dimm_info_util.h
blobd20e8cddfc30a9707901dbcedd3b711d9e345452
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef _DIMM_INFO_UTIL_H_
4 #define _DIMM_INFO_UTIL_H_
6 #include <smbios.h>
7 #include <stdint.h>
9 /**
10 * Convert the SMBIOS bit widths into an SPD encoded width.
12 * Use this when setting dimm_info.bus_width if the raw SPD values are not
13 * available.
15 uint8_t smbios_bus_width_to_spd_width(uint16_t total_width,
16 uint16_t data_width);
18 /**
19 * Convert the SMBIOS size values into the total number of MiB.
21 * Use this when setting dimm_info.dimm_size.
23 uint32_t smbios_memory_size_to_mib(uint16_t memory_size,
24 uint32_t extended_size);
26 /**
27 * Convert the SMBIOS form factor to the SPD module type.
29 * Use this when setting dimm_info.mod_type.
31 uint8_t
32 smbios_form_factor_to_spd_mod_type(smbios_memory_form_factor form_factor);
34 #endif