4 * Copyright (C) 2014, Intel Corporation. All rights reserved.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License version
8 * 2 as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #ifndef _MEMORY_INFO_H_
17 #define _MEMORY_INFO_H_
21 #define DIMM_INFO_SERIAL_SIZE 4
22 #define DIMM_INFO_PART_NUMBER_SIZE 33
23 #define DIMM_INFO_TOTAL 8 /* Maximum num of dimm is 8 */
26 * If this table is filled and put in CBMEM,
27 * then these info in CBMEM will be used to generate smbios type 17 table
29 * Values are specified according to the JEDEC SPD Standard.
33 * Size of the module in MiB.
37 * SMBIOS (not SPD) device type.
39 * See the smbios.h smbios_memory_type enum.
42 uint16_t ddr_frequency
;
43 uint8_t rank_per_dimm
;
50 uint8_t serial
[DIMM_INFO_SERIAL_SIZE
];
52 * The last byte is '\0' for the end of string
54 * Must contain only printable ASCII.
56 uint8_t module_part_number
[DIMM_INFO_PART_NUMBER_SIZE
];
64 * See spd.h for valid values.
66 * e.g., SPD_RDIMM, SPD_SODIMM, SPD_MICRO_DIMM
72 * Bits 0 - 2 encode the primary bus width:
74 * 0b001 = 16 bit width
75 * 0b010 = 32 bit width
76 * 0b011 = 64 bit width
78 * Bits 3 - 4 encode the extension bits (ECC):
79 * 0b00 = 0 extension bits
83 * 64 bit bus with 8 bits of ECC (72 bits total): 0b1011
84 * 64 bit bus with 0 bits of ECC (64 bits total): 0b0011
86 * See the smbios.h smbios_memory_bus_width enum.
93 struct dimm_info dimm
[DIMM_INFO_TOTAL
];