blob: 0f97fd486529819aefa667ddda5781bcc4248e17 [file] [log] [blame]
Patrick Georgi406313d2015-07-20 22:01:32 +02001/*
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.
Patrick Georgi406313d2015-07-20 22:01:32 +020015 */
16
17#include <stdint.h>
18#include <string.h>
19#include <soc/pei_data.h>
20#include <soc/pei_wrapper.h>
21
22void mainboard_fill_pei_data(struct pei_data *pei_data)
23{
24 /* DQ byte map */
25 const u8 dq_map[2][12] = {
Duncan Laurie44b01fd2015-09-03 16:19:42 -070026 { 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 } };
Patrick Georgi406313d2015-07-20 22:01:32 +020030 /* DQS CPU<>DRAM map */
31 const u8 dqs_map[2][8] = {
Duncan Laurie44b01fd2015-09-03 16:19:42 -070032 { 0, 1, 3, 2, 4, 5, 6, 7 },
33 { 1, 0, 4, 5, 2, 3, 6, 7 } };
Patrick Georgi406313d2015-07-20 22:01:32 +020034
Duncan Laurie44b01fd2015-09-03 16:19:42 -070035 /* Rcomp resistor */
36 const u16 RcompResistor[3] = { 200, 81, 162 };
Patrick Georgi406313d2015-07-20 22:01:32 +020037
Duncan Laurie44b01fd2015-09-03 16:19:42 -070038 /* Rcomp target */
39 const u16 RcompTarget[5] = { 100, 40, 40, 23, 40 };
Patrick Georgi406313d2015-07-20 22:01:32 +020040
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}