Kane Chen | 33faac6 | 2014-07-27 12:54:44 -0700 | [diff] [blame] | 1 | /* |
| 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 Sarkar | c16d389 | 2017-02-23 16:56:54 +0530 | [diff] [blame] | 19 | #include <stdint.h> |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame^] | 20 | #include <compiler.h> |
Barnali Sarkar | c16d389 | 2017-02-23 16:56:54 +0530 | [diff] [blame] | 21 | |
Kane Chen | 33faac6 | 2014-07-27 12:54:44 -0700 | [diff] [blame] | 22 | /* |
| 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 | */ |
| 26 | struct 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 Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame^] | 41 | } __packed; |
Kane Chen | 33faac6 | 2014-07-27 12:54:44 -0700 | [diff] [blame] | 42 | |
| 43 | struct memory_info { |
| 44 | uint8_t dimm_cnt; |
| 45 | /* Maximum num of dimm is 8 */ |
| 46 | struct dimm_info dimm[8]; |
Stefan Reinauer | 6a00113 | 2017-07-13 02:20:27 +0200 | [diff] [blame^] | 47 | } __packed; |
Kane Chen | 33faac6 | 2014-07-27 12:54:44 -0700 | [diff] [blame] | 48 | |
| 49 | #endif |