summaryrefslogtreecommitdiffstats
path: root/src/include/memory_info.h
diff options
context:
space:
mode:
authorKane Chen <kane.chen@intel.com>2014-07-27 12:54:44 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-03-27 09:55:21 +0100
commit33faac643d8cbd521668f163df0a83865435e8c9 (patch)
tree23675b242eeaa063d608573515ef2cd071c6ae89 /src/include/memory_info.h
parentdc27ca9fcb64481b4557968ab3582e0db7831cf8 (diff)
downloadcoreboot-33faac643d8cbd521668f163df0a83865435e8c9.tar.gz
coreboot-33faac643d8cbd521668f163df0a83865435e8c9.tar.bz2
coreboot-33faac643d8cbd521668f163df0a83865435e8c9.zip
smbios: add funtion for smbios type17
Add smbios type 17 which can optionally be implemented at the platform or mainboard level In order to create SMBIOS type17, you will need to fill memory_info data BUG=None BRANCH=None TEST=Compile successfully on rambi and samus Boot to chromeOS on samus and rambi Original-Change-Id: Ie4da89135c879d7a687305d423103fcfcbb96e3f Original-Signed-off-by: Kane Chen <kane.chen@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/210005 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org> (cherry picked from commit 634b899ba41242caa800d7b570f3a339c738db77) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I61d1e8b1d32d43f0011b0f93966d57646ea0eb63 Reviewed-on: http://review.coreboot.org/8955 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/include/memory_info.h')
-rw-r--r--src/include/memory_info.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/include/memory_info.h b/src/include/memory_info.h
new file mode 100644
index 000000000000..4613628dabbf
--- /dev/null
+++ b/src/include/memory_info.h
@@ -0,0 +1,46 @@
+/*
+ * Memory information
+ *
+ * Copyright (C) 2014, Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version
+ * 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _MEMORY_INFO_H_
+#define _MEMORY_INFO_H_
+
+/*
+ * If this table is filled and put in CBMEM,
+ * then these info in CBMEM will be used to generate smbios type 17 table
+ */
+struct dimm_info {
+ uint32_t dimm_size;
+ uint16_t ddr_type;
+ uint16_t ddr_frequency;
+ uint8_t rank_per_dimm;
+ uint8_t channel_num;
+ uint8_t dimm_num;
+ uint8_t bank_locator;
+ /* The 5th byte is '\0' for the end of string */
+ uint8_t serial[5];
+ /* The 19th byte is '\0' for the end of string */
+ uint8_t module_part_number[19];
+ uint16_t mod_id;
+ uint8_t mod_type;
+ uint8_t bus_width;
+} __attribute__((packed));
+
+struct memory_info {
+ uint8_t dimm_cnt;
+ /* Maximum num of dimm is 8 */
+ struct dimm_info dimm[8];
+} __attribute__((packed));
+
+#endif