Angel Pons | f94ac9a | 2020-04-05 15:46:48 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 2 | |
Stefan Reinauer | d548e5c | 2015-01-05 14:27:46 -0800 | [diff] [blame] | 3 | #include <console/streams.h> |
Angel Pons | 29e71b1 | 2021-06-23 15:50:13 +0200 | [diff] [blame] | 4 | #include <device/device.h> |
Julius Werner | 4ee4bd5 | 2014-10-20 13:46:39 -0700 | [diff] [blame] | 5 | #include <soc/iomap.h> |
| 6 | #include <soc/pei_data.h> |
| 7 | #include <soc/pei_wrapper.h> |
Angel Pons | 29e71b1 | 2021-06-23 15:50:13 +0200 | [diff] [blame] | 8 | #include <soc/intel/broadwell/chip.h> |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 9 | |
| 10 | static void ABI_X86 send_to_console(unsigned char b) |
| 11 | { |
| 12 | console_tx_byte(b); |
| 13 | } |
| 14 | |
| 15 | void broadwell_fill_pei_data(struct pei_data *pei_data) |
| 16 | { |
Angel Pons | 29e71b1 | 2021-06-23 15:50:13 +0200 | [diff] [blame] | 17 | const struct soc_intel_broadwell_config *cfg = config_of_soc(); |
| 18 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 19 | pei_data->pei_version = PEI_VERSION; |
| 20 | pei_data->board_type = BOARD_TYPE_ULT; |
Kyösti Mälkki | fd15955 | 2019-03-20 18:46:30 +0200 | [diff] [blame] | 21 | pei_data->usbdebug = CONFIG(USBDEBUG); |
Shelley Chen | 4e9bb33 | 2021-10-20 15:43:45 -0700 | [diff] [blame] | 22 | pei_data->pciexbar = CONFIG_ECAM_MMCONF_BASE_ADDRESS; |
Angel Pons | 33beded | 2021-01-28 12:33:47 +0100 | [diff] [blame] | 23 | pei_data->smbusbar = CONFIG_FIXED_SMBUS_IO_BASE; |
Angel Pons | 3504133 | 2021-06-23 12:54:03 +0200 | [diff] [blame] | 24 | pei_data->ehcibar = CONFIG_EHCI_BAR; |
| 25 | pei_data->xhcibar = 0xd7000000; |
| 26 | pei_data->gttbar = 0xe0000000; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 27 | pei_data->pmbase = ACPI_BASE_ADDRESS; |
| 28 | pei_data->gpiobase = GPIO_BASE_ADDRESS; |
Kyösti Mälkki | 8f09688d | 2019-08-15 11:29:15 +0300 | [diff] [blame] | 29 | pei_data->tseg_size = CONFIG_SMM_TSEG_SIZE; |
Angel Pons | 3504133 | 2021-06-23 12:54:03 +0200 | [diff] [blame] | 30 | pei_data->temp_mmio_base = 0xfed08000; |
Angel Pons | 29e71b1 | 2021-06-23 15:50:13 +0200 | [diff] [blame] | 31 | pei_data->ec_present = cfg->ec_present, |
| 32 | pei_data->dq_pins_interleaved = cfg->dq_pins_interleaved, |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 33 | pei_data->tx_byte = &send_to_console; |
Duncan Laurie | daf6d41 | 2015-01-05 10:47:00 -0800 | [diff] [blame] | 34 | pei_data->ddr_refresh_2x = 1; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 35 | } |