blob: d8059ec5d2227aed17ff45a0173a32c3956dadf9 [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.
Duncan Lauriec88c54c2014-04-30 16:36:13 -070014 */
15
Duncan Lauriec88c54c2014-04-30 16:36:13 -070016#include <stdlib.h>
17#include <stdint.h>
Stefan Reinauerd548e5c2015-01-05 14:27:46 -080018#include <console/streams.h>
Julius Werner4ee4bd52014-10-20 13:46:39 -070019#include <soc/iomap.h>
20#include <soc/pei_data.h>
21#include <soc/pei_wrapper.h>
22#include <soc/smm.h>
Duncan Lauriec88c54c2014-04-30 16:36:13 -070023
24static void ABI_X86 send_to_console(unsigned char b)
25{
26 console_tx_byte(b);
27}
28
29void broadwell_fill_pei_data(struct pei_data *pei_data)
30{
31 pei_data->pei_version = PEI_VERSION;
32 pei_data->board_type = BOARD_TYPE_ULT;
Kyösti Mälkkifd159552019-03-20 18:46:30 +020033 pei_data->usbdebug = CONFIG(USBDEBUG);
Duncan Lauriec88c54c2014-04-30 16:36:13 -070034 pei_data->pciexbar = MCFG_BASE_ADDRESS;
35 pei_data->smbusbar = SMBUS_BASE_ADDRESS;
36 pei_data->ehcibar = EARLY_EHCI_BAR;
37 pei_data->xhcibar = EARLY_XHCI_BAR;
38 pei_data->gttbar = EARLY_GTT_BAR;
39 pei_data->pmbase = ACPI_BASE_ADDRESS;
40 pei_data->gpiobase = GPIO_BASE_ADDRESS;
41 pei_data->tseg_size = smm_region_size();
42 pei_data->temp_mmio_base = EARLY_TEMP_MMIO;
43 pei_data->tx_byte = &send_to_console;
Duncan Lauriedaf6d412015-01-05 10:47:00 -080044 pei_data->ddr_refresh_2x = 1;
Duncan Lauriec88c54c2014-04-30 16:36:13 -070045}