blob: 180f0caf8e35b8a4eedb193d91a04bc492ec5413 [file] [log] [blame]
Duncan Lauriec88c54c2014-04-30 16:36:13 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2014 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
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 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
Duncan Lauriec88c54c2014-04-30 16:36:13 -070020#include <stdlib.h>
21#include <stdint.h>
Stefan Reinauerd548e5c2015-01-05 14:27:46 -080022#include <console/streams.h>
Julius Werner4ee4bd52014-10-20 13:46:39 -070023#include <soc/iomap.h>
24#include <soc/pei_data.h>
25#include <soc/pei_wrapper.h>
26#include <soc/smm.h>
Duncan Lauriec88c54c2014-04-30 16:36:13 -070027
28static void ABI_X86 send_to_console(unsigned char b)
29{
30 console_tx_byte(b);
31}
32
33void broadwell_fill_pei_data(struct pei_data *pei_data)
34{
35 pei_data->pei_version = PEI_VERSION;
36 pei_data->board_type = BOARD_TYPE_ULT;
37 pei_data->usbdebug = CONFIG_USBDEBUG;
38 pei_data->pciexbar = MCFG_BASE_ADDRESS;
39 pei_data->smbusbar = SMBUS_BASE_ADDRESS;
40 pei_data->ehcibar = EARLY_EHCI_BAR;
41 pei_data->xhcibar = EARLY_XHCI_BAR;
42 pei_data->gttbar = EARLY_GTT_BAR;
43 pei_data->pmbase = ACPI_BASE_ADDRESS;
44 pei_data->gpiobase = GPIO_BASE_ADDRESS;
45 pei_data->tseg_size = smm_region_size();
46 pei_data->temp_mmio_base = EARLY_TEMP_MMIO;
47 pei_data->tx_byte = &send_to_console;
Duncan Lauriedaf6d412015-01-05 10:47:00 -080048 pei_data->ddr_refresh_2x = 1;
Duncan Lauriec88c54c2014-04-30 16:36:13 -070049}