Duncan Laurie | 09170f1 | 2015-10-09 09:25:32 -0700 | [diff] [blame] | 1 | ## |
| 2 | ## This file is part of the coreboot project. |
| 3 | ## |
| 4 | ## Copyright (C) 2015 Google Inc. |
| 5 | ## Copyright (C) 2015 Intel Corporation |
| 6 | ## |
| 7 | ## This program is free software; you can redistribute it and/or modify |
| 8 | ## it under the terms of the GNU General Public License as published by |
| 9 | ## the Free Software Foundation; version 2 of the License. |
| 10 | ## |
| 11 | ## This program is distributed in the hope that it will be useful, |
| 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | ## GNU General Public License for more details. |
| 15 | ## |
Duncan Laurie | 09170f1 | 2015-10-09 09:25:32 -0700 | [diff] [blame] | 16 | |
Matt DeVillier | 39f3c7e | 2018-07-07 18:45:23 -0500 | [diff] [blame] | 17 | romstage-y += variant.c |
| 18 | ramstage-y += variant.c |
Kyösti Mälkki | 9265f89 | 2019-07-07 23:58:34 +0300 | [diff] [blame^] | 19 | smm-y += variant.c |
Duncan Laurie | 09170f1 | 2015-10-09 09:25:32 -0700 | [diff] [blame] | 20 | |
| 21 | SPD_BIN = $(obj)/spd.bin |
| 22 | |
| 23 | # SPD data by index. No method for board identification yet |
Duncan Laurie | f16bb7c | 2015-10-09 09:25:32 -0700 | [diff] [blame] | 24 | SPD_SOURCES = samsung_dimm_K4E8E304EE-EGCF # 0b0000 |
Duncan Laurie | 09170f1 | 2015-10-09 09:25:32 -0700 | [diff] [blame] | 25 | SPD_SOURCES += samsung_dimm_K4E6E304EE-EGCF # 0b0001 |
Aaron Durbin | f969d4a | 2015-10-16 09:37:19 -0500 | [diff] [blame] | 26 | SPD_SOURCES += hynix_dimm_H9CCNNN8GTMLAR # 0b0010 |
| 27 | SPD_SOURCES += hynix_dimm_H9CCNNNBJTMLAR # 0b0011 |
Duncan Laurie | a85f3ae | 2015-11-05 17:08:25 -0800 | [diff] [blame] | 28 | SPD_SOURCES += hynix_dimm_H9CCNNNCLTMLAR # 0b0100 |
Duncan Laurie | 31fa749 | 2016-01-14 10:20:17 -0800 | [diff] [blame] | 29 | SPD_SOURCES += samsung_dimm_K4E6E304EB-EGCF # 0b0101 |
Matt DeVillier | c4f9f4b | 2017-11-09 09:45:51 -0600 | [diff] [blame] | 30 | SPD_SOURCES += samsung_dimm_K4EBE304EB-EGCF # 0b0110 |
| 31 | SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF # 0b0111 |
| 32 | SPD_SOURCES += hynix_dimm_H9CCNNNBJTALAR # 0b1000 |
| 33 | SPD_SOURCES += hynix_dimm_H9CCNNNCLGALAR # 0b1001 |
| 34 | SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR # 0b1010 |
Duncan Laurie | 09170f1 | 2015-10-09 09:25:32 -0700 | [diff] [blame] | 35 | |
| 36 | SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex) |
| 37 | |
Elyes HAOUAS | 8ab989e | 2016-07-30 17:46:17 +0200 | [diff] [blame] | 38 | # Include spd ROM data |
Duncan Laurie | 09170f1 | 2015-10-09 09:25:32 -0700 | [diff] [blame] | 39 | $(SPD_BIN): $(SPD_DEPS) |
| 40 | for f in $+; \ |
| 41 | do for c in $$(cat $$f | grep -v ^#); \ |
| 42 | do printf $$(printf '\%o' 0x$$c); \ |
| 43 | done; \ |
| 44 | done > $@ |
| 45 | |
| 46 | cbfs-files-y += spd.bin |
| 47 | spd.bin-file := $(SPD_BIN) |
| 48 | spd.bin-type := spd |