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. |
Duncan Laurie | 09170f1 | 2015-10-09 09:25:32 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #include <stdint.h> |
| 18 | #include <string.h> |
| 19 | #include <soc/pei_data.h> |
| 20 | #include <soc/pei_wrapper.h> |
| 21 | |
| 22 | void mainboard_fill_pei_data(struct pei_data *pei_data) |
| 23 | { |
| 24 | /* DQ byte map */ |
| 25 | const u8 dq_map[2][12] = { |
| 26 | { 0x0F, 0xF0, 0x00, 0xF0, 0x0F, 0xF0, |
| 27 | 0x0F, 0x00, 0xFF, 0x00, 0xFF, 0x00 }, |
| 28 | { 0x33, 0xCC, 0x00, 0xCC, 0x33, 0xCC, |
| 29 | 0x33, 0x00, 0xFF, 0x00, 0xFF, 0x00 } }; |
| 30 | /* DQS CPU<>DRAM map */ |
| 31 | const u8 dqs_map[2][8] = { |
| 32 | { 0, 1, 3, 2, 4, 5, 6, 7 }, |
| 33 | { 1, 0, 4, 5, 2, 3, 6, 7 } }; |
| 34 | |
| 35 | /* Rcomp resistor */ |
| 36 | const u16 RcompResistor[3] = { 200, 81, 162 }; |
| 37 | |
| 38 | /* Rcomp target */ |
| 39 | const u16 RcompTarget[5] = { 100, 40, 40, 23, 40 }; |
| 40 | |
| 41 | memcpy(pei_data->dq_map, dq_map, sizeof(dq_map)); |
| 42 | memcpy(pei_data->dqs_map, dqs_map, sizeof(dqs_map)); |
| 43 | memcpy(pei_data->RcompResistor, RcompResistor, |
| 44 | sizeof(RcompResistor)); |
| 45 | memcpy(pei_data->RcompTarget, RcompTarget, |
| 46 | sizeof(RcompTarget)); |
| 47 | } |