blob: db33966c4c1b4a085fe7fd8e0e5fd76da8d627ad [file] [log] [blame]
Angel Ponsf94ac9a2020-04-05 15:46:48 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Duncan Lauriec88c54c2014-04-30 16:36:13 -07002
Stefan Reinauerd548e5c2015-01-05 14:27:46 -08003#include <console/streams.h>
Angel Pons29e71b12021-06-23 15:50:13 +02004#include <device/device.h>
Julius Werner4ee4bd52014-10-20 13:46:39 -07005#include <soc/iomap.h>
6#include <soc/pei_data.h>
7#include <soc/pei_wrapper.h>
Angel Pons29e71b12021-06-23 15:50:13 +02008#include <soc/intel/broadwell/chip.h>
Duncan Lauriec88c54c2014-04-30 16:36:13 -07009
10static void ABI_X86 send_to_console(unsigned char b)
11{
12 console_tx_byte(b);
13}
14
15void broadwell_fill_pei_data(struct pei_data *pei_data)
16{
Angel Pons29e71b12021-06-23 15:50:13 +020017 const struct soc_intel_broadwell_config *cfg = config_of_soc();
18
Duncan Lauriec88c54c2014-04-30 16:36:13 -070019 pei_data->pei_version = PEI_VERSION;
20 pei_data->board_type = BOARD_TYPE_ULT;
Kyösti Mälkkifd159552019-03-20 18:46:30 +020021 pei_data->usbdebug = CONFIG(USBDEBUG);
Shelley Chen4e9bb332021-10-20 15:43:45 -070022 pei_data->pciexbar = CONFIG_ECAM_MMCONF_BASE_ADDRESS;
Angel Pons33beded2021-01-28 12:33:47 +010023 pei_data->smbusbar = CONFIG_FIXED_SMBUS_IO_BASE;
Angel Pons35041332021-06-23 12:54:03 +020024 pei_data->ehcibar = CONFIG_EHCI_BAR;
25 pei_data->xhcibar = 0xd7000000;
26 pei_data->gttbar = 0xe0000000;
Duncan Lauriec88c54c2014-04-30 16:36:13 -070027 pei_data->pmbase = ACPI_BASE_ADDRESS;
28 pei_data->gpiobase = GPIO_BASE_ADDRESS;
Kyösti Mälkki8f09688d2019-08-15 11:29:15 +030029 pei_data->tseg_size = CONFIG_SMM_TSEG_SIZE;
Angel Pons35041332021-06-23 12:54:03 +020030 pei_data->temp_mmio_base = 0xfed08000;
Angel Pons29e71b12021-06-23 15:50:13 +020031 pei_data->ec_present = cfg->ec_present,
32 pei_data->dq_pins_interleaved = cfg->dq_pins_interleaved,
Duncan Lauriec88c54c2014-04-30 16:36:13 -070033 pei_data->tx_byte = &send_to_console;
Duncan Lauriedaf6d412015-01-05 10:47:00 -080034 pei_data->ddr_refresh_2x = 1;
Duncan Lauriec88c54c2014-04-30 16:36:13 -070035}