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 | |
| 19 | /* |
| 20 | * If this table is filled and put in CBMEM, |
| 21 | * then these info in CBMEM will be used to generate smbios type 17 table |
| 22 | */ |
| 23 | struct dimm_info { |
| 24 | uint32_t dimm_size; |
| 25 | uint16_t ddr_type; |
| 26 | uint16_t ddr_frequency; |
| 27 | uint8_t rank_per_dimm; |
| 28 | uint8_t channel_num; |
| 29 | uint8_t dimm_num; |
| 30 | uint8_t bank_locator; |
| 31 | /* The 5th byte is '\0' for the end of string */ |
| 32 | uint8_t serial[5]; |
| 33 | /* The 19th byte is '\0' for the end of string */ |
| 34 | uint8_t module_part_number[19]; |
| 35 | uint16_t mod_id; |
| 36 | uint8_t mod_type; |
| 37 | uint8_t bus_width; |
| 38 | } __attribute__((packed)); |
| 39 | |
| 40 | struct memory_info { |
| 41 | uint8_t dimm_cnt; |
| 42 | /* Maximum num of dimm is 8 */ |
| 43 | struct dimm_info dimm[8]; |
| 44 | } __attribute__((packed)); |
| 45 | |
| 46 | #endif |