blob: 02904af285b0e6f6c664825b4673725f9d865251 [file] [log] [blame]
Kane Chen33faac62014-07-27 12:54:44 -07001/*
2 * Memory information
3 *
4 * Copyright (C) 2014, Intel Corporation. All rights reserved.
5 *
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.
9 *
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.
14 */
15
16#ifndef _MEMORY_INFO_H_
17#define _MEMORY_INFO_H_
18
Barnali Sarkarc16d3892017-02-23 16:56:54 +053019#include <stdint.h>
20
Kane Chen33faac62014-07-27 12:54:44 -070021/*
22 * If this table is filled and put in CBMEM,
23 * then these info in CBMEM will be used to generate smbios type 17 table
24 */
25struct dimm_info {
26 uint32_t dimm_size;
27 uint16_t ddr_type;
28 uint16_t ddr_frequency;
29 uint8_t rank_per_dimm;
30 uint8_t channel_num;
31 uint8_t dimm_num;
32 uint8_t bank_locator;
33 /* The 5th byte is '\0' for the end of string */
34 uint8_t serial[5];
35 /* The 19th byte is '\0' for the end of string */
36 uint8_t module_part_number[19];
37 uint16_t mod_id;
38 uint8_t mod_type;
39 uint8_t bus_width;
40} __attribute__((packed));
41
42struct memory_info {
43 uint8_t dimm_cnt;
44 /* Maximum num of dimm is 8 */
45 struct dimm_info dimm[8];
46} __attribute__((packed));
47
48#endif