Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 1 | /* |
| 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 Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 20 | #include <stdlib.h> |
| 21 | #include <stdint.h> |
Stefan Reinauer | d548e5c | 2015-01-05 14:27:46 -0800 | [diff] [blame] | 22 | #include <console/streams.h> |
Julius Werner | 4ee4bd5 | 2014-10-20 13:46:39 -0700 | [diff] [blame^] | 23 | #include <soc/iomap.h> |
| 24 | #include <soc/pei_data.h> |
| 25 | #include <soc/pei_wrapper.h> |
| 26 | #include <soc/smm.h> |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 27 | |
| 28 | static void ABI_X86 send_to_console(unsigned char b) |
| 29 | { |
| 30 | console_tx_byte(b); |
| 31 | } |
| 32 | |
| 33 | void 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; |
| 48 | } |