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