blob: 8569ee493a7cd60ed897c3375e02a5b6f4eb3d06 [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>
Stefan Reinauer6a001132017-07-13 02:20:27 +020020#include <compiler.h>
Barnali Sarkarc16d3892017-02-23 16:56:54 +053021
Kane Chen33faac62014-07-27 12:54:44 -070022/*
23 * If this table is filled and put in CBMEM,
24 * then these info in CBMEM will be used to generate smbios type 17 table
25 */
26struct dimm_info {
27 uint32_t dimm_size;
28 uint16_t ddr_type;
29 uint16_t ddr_frequency;
30 uint8_t rank_per_dimm;
31 uint8_t channel_num;
32 uint8_t dimm_num;
33 uint8_t bank_locator;
34 /* The 5th byte is '\0' for the end of string */
35 uint8_t serial[5];
36 /* The 19th byte is '\0' for the end of string */
37 uint8_t module_part_number[19];
38 uint16_t mod_id;
39 uint8_t mod_type;
40 uint8_t bus_width;
Stefan Reinauer6a001132017-07-13 02:20:27 +020041} __packed;
Kane Chen33faac62014-07-27 12:54:44 -070042
43struct memory_info {
44 uint8_t dimm_cnt;
45 /* Maximum num of dimm is 8 */
46 struct dimm_info dimm[8];
Stefan Reinauer6a001132017-07-13 02:20:27 +020047} __packed;
Kane Chen33faac62014-07-27 12:54:44 -070048
49#endif