![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <amdblocks/chip.h>
#include <amdblocks/espi.h>
#include <amdblocks/lpc.h>
#include <arch/mmio.h>
#include <console/console.h>
#include <espi.h>
#include <soc/pci_devs.h>
#include <timer.h>
#include <types.h>
#include "espi_def.h"
Go to the source code of this file.
Data Structures | |
union | espi_txhdr0 |
union | espi_txhdr1 |
union | espi_txhdr2 |
union | espi_txdata |
struct | espi_cmd |
Macros | |
#define | ESPI_CMD_TIMEOUT_US 100 |
#define | ESPI_CH_READY_TIMEOUT_US 10000 |
#define | ESPI_CONFIGURATION_HDATA0(a) (((a) >> 8) & 0xff) |
#define | ESPI_CONFIGURATION_HDATA1(a) ((a) & 0xff) |
Enumerations | |
enum | espi_cmd_type { CMD_TYPE_SET_CONFIGURATION = 0 , CMD_TYPE_GET_CONFIGURATION = 1 , CMD_TYPE_IN_BAND_RESET = 2 , CMD_TYPE_PERIPHERAL = 4 , CMD_TYPE_VW = 5 , CMD_TYPE_OOB = 6 , CMD_TYPE_FLASH = 7 } |
Variables | |
static uintptr_t | espi_bar |
union espi_txhdr0 | __packed |
#define ESPI_CH_READY_TIMEOUT_US 10000 |
Definition at line 364 of file espi_util.c.
#define ESPI_CMD_TIMEOUT_US 100 |
Definition at line 363 of file espi_util.c.
#define ESPI_CONFIGURATION_HDATA0 | ( | a | ) | (((a) >> 8) & 0xff) |
Definition at line 581 of file espi_util.c.
#define ESPI_CONFIGURATION_HDATA1 | ( | a | ) | ((a) & 0xff) |
Definition at line 582 of file espi_util.c.
enum espi_cmd_type |
Enumerator | |
---|---|
CMD_TYPE_SET_CONFIGURATION | |
CMD_TYPE_GET_CONFIGURATION | |
CMD_TYPE_IN_BAND_RESET | |
CMD_TYPE_PERIPHERAL | |
CMD_TYPE_VW | |
CMD_TYPE_OOB | |
CMD_TYPE_FLASH |
Definition at line 353 of file espi_util.c.
Definition at line 1052 of file espi_util.c.
References espi_setup(), and mb_set_up_early_espi().
Referenced by fch_pre_init().
Definition at line 137 of file espi_util.c.
References CONFIG, ESPI_DECODE, ESPI_DECODE_IO_0x80_EN, ESPI_GENERIC_IO_WIN_COUNT, ESPI_GENERIC_MMIO_WIN_COUNT, espi_io_range_base_reg(), espi_io_range_size_reg(), espi_mmio_range_base_reg(), espi_mmio_range_size_reg(), espi_read16(), espi_write16(), espi_write32(), and espi_write8().
Definition at line 432 of file espi_util.c.
References espi_read32(), ESPI_SLAVE0_INT_STS, and espi_write32().
|
static |
Definition at line 326 of file espi_util.c.
References die(), soc_amd_common_config::espi_config, and soc_get_common_config().
Definition at line 63 of file espi_util.c.
References ESPI_DECODE_IO_RANGE_EN.
Referenced by espi_find_io_window(), and espi_get_unused_io_window().
Definition at line 68 of file espi_util.c.
References ESPI_DECODE_MMIO_RANGE_EN.
Referenced by espi_find_mmio_window(), and espi_get_unused_mmio_window().
Definition at line 773 of file espi_util.c.
References espi_read32(), ESPI_SLAVE0_CONFIG, and espi_write32().
Definition at line 93 of file espi_util.c.
References ESPI_DECODE, espi_read32(), espi_write32(), and val.
|
static |
Definition at line 110 of file espi_util.c.
References espi_decode_io_range_en_bit(), ESPI_GENERIC_IO_WIN_COUNT, espi_io_range_base_reg(), espi_is_decode_enabled(), and espi_read16().
|
static |
Definition at line 247 of file espi_util.c.
References espi_decode_mmio_range_en_bit(), ESPI_GENERIC_MMIO_WIN_COUNT, espi_is_decode_enabled(), espi_mmio_range_base_reg(), and espi_read32().
Definition at line 26 of file espi_util.c.
References ENV_X86, espi_bar, ESPI_OFFSET_FROM_BAR, espi_update_static_bar(), and lpc_get_spibase().
Referenced by espi_read16(), espi_read32(), espi_read8(), espi_write16(), espi_write32(), and espi_write8().
|
static |
Definition at line 326 of file espi_util.c.
Definition at line 459 of file espi_util.c.
References BIOS_ERR, espi_cmd::data, espi_cmd::hdr0, espi_cmd::hdr1, espi_cmd::hdr2, printk, espi_txhdr0::val, espi_txhdr1::val, espi_txhdr2::val, and espi_txdata::val.
Definition at line 459 of file espi_util.c.
|
static |
Definition at line 183 of file espi_util.c.
References espi_io_range_size_reg(), and espi_read8().
|
static |
Definition at line 275 of file espi_util.c.
References espi_mmio_range_size_reg(), and espi_read16().
|
static |
Definition at line 125 of file espi_util.c.
References espi_decode_io_range_en_bit(), ESPI_GENERIC_IO_WIN_COUNT, and espi_is_decode_enabled().
|
static |
Definition at line 262 of file espi_util.c.
References espi_decode_mmio_range_en_bit(), ESPI_GENERIC_MMIO_WIN_COUNT, and espi_is_decode_enabled().
Definition at line 73 of file espi_util.c.
References ESPI_IO_RANGE_BASE.
Referenced by espi_clear_decodes(), espi_find_io_window(), and espi_open_generic_io_window().
Definition at line 78 of file espi_util.c.
References ESPI_IO_RANGE_SIZE.
Referenced by espi_clear_decodes(), espi_get_io_window_size(), and espi_open_generic_io_window().
Definition at line 102 of file espi_util.c.
References ESPI_DECODE, espi_read32(), and val.
Referenced by espi_find_io_window(), espi_find_mmio_window(), espi_get_unused_io_window(), and espi_get_unused_mmio_window().
Definition at line 83 of file espi_util.c.
References ESPI_MMIO_RANGE_BASE.
Referenced by espi_clear_decodes(), espi_find_mmio_window(), and espi_open_mmio_window().
Definition at line 88 of file espi_util.c.
References ESPI_MMIO_RANGE_SIZE.
Referenced by espi_clear_decodes(), espi_get_mmio_window_size(), and espi_open_mmio_window().
Definition at line 188 of file espi_util.c.
References base, espi_io_range_base_reg(), espi_io_range_size_reg(), espi_write16(), and espi_write8().
Definition at line 188 of file espi_util.c.
Referenced by configure_child_espi_windows().
Definition at line 280 of file espi_util.c.
References base, espi_mmio_range_base_reg(), espi_mmio_range_size_reg(), espi_write16(), and espi_write32().
Referenced by configure_child_espi_windows().
Definition at line 432 of file espi_util.c.
Definition at line 43 of file espi_util.c.
References espi_get_bar(), and read16().
Referenced by espi_clear_decodes(), espi_find_io_window(), and espi_get_mmio_window_size().
Definition at line 33 of file espi_util.c.
References espi_get_bar(), and read32().
Referenced by espi_clear_status(), espi_enable_ctrlr_channel(), espi_enable_decode(), espi_find_mmio_window(), espi_is_decode_enabled(), and espi_setup().
Definition at line 53 of file espi_util.c.
References espi_get_bar(), and read8().
Referenced by espi_get_io_window_size().
Definition at line 459 of file espi_util.c.
|
static |
Definition at line 459 of file espi_util.c.
Definition at line 459 of file espi_util.c.
|
static |
Definition at line 703 of file espi_util.c.
References die(), ESPI_ALERT_MODE, ESPI_ALERT_PIN_IN_BAND, ESPI_ALERT_PIN_OPEN_DRAIN, ESPI_ALERT_PIN_PUSH_PULL, ESPI_SLAVE_ALERT_MODE_IO1, ESPI_SLAVE_ALERT_MODE_PIN, ESPI_SLAVE_OPEN_DRAIN_ALERT_SEL, ESPI_SLAVE_OPEN_DRAIN_ALERT_SUPP, and ESPI_SLAVE_PUSH_PULL_ALERT_SEL.
|
static |
Definition at line 773 of file espi_util.c.
Definition at line 459 of file espi_util.c.
|
static |
Definition at line 703 of file espi_util.c.
|
static |
Definition at line 904 of file espi_util.c.
References die(), ESPI_ALERT_MODE, ESPI_ALERT_PIN_IN_BAND, ESPI_ALERT_PIN_OPEN_DRAIN, ESPI_ALERT_PIN_PUSH_PULL, ESPI_IO_MODE_SINGLE, ESPI_OP_FREQ_16_MHZ, ESPI_SLAVE0_CONFIG, and espi_write32().
|
static |
Definition at line 635 of file espi_util.c.
References __fallthrough, BIOS_ERR, die(), ESPI_IO_MODE_DUAL, ESPI_IO_MODE_QUAD, ESPI_IO_MODE_SINGLE, ESPI_SLAVE_IO_MODE_SEL_DUAL, ESPI_SLAVE_IO_MODE_SEL_QUAD, ESPI_SLAVE_IO_MODE_SEL_SINGLE, espi_slave_supports_dual_io(), espi_slave_supports_quad_io(), and printk.
|
static |
Definition at line 665 of file espi_util.c.
References __fallthrough, BIOS_ERR, die(), ESPI_OP_FREQ_16_MHZ, ESPI_OP_FREQ_33_MHZ, ESPI_OP_FREQ_66_MHZ, espi_slave_max_speed_mhz_supported(), ESPI_SLAVE_OP_FREQ_SEL_20_MHZ, ESPI_SLAVE_OP_FREQ_SEL_33_MHZ, ESPI_SLAVE_OP_FREQ_SEL_66_MHZ, and printk.
Definition at line 922 of file espi_util.c.
References ESPI_GLOBAL_CONTROL_1, espi_read32(), ESPI_SUB_DECODE_EN, ESPI_SUB_DECODE_SLV_MASK, and espi_write32().
Referenced by configure_espi_with_mb_hook(), and verstage_soc_espi_init().
|
static |
Definition at line 773 of file espi_util.c.
|
static |
Definition at line 773 of file espi_util.c.
|
static |
Definition at line 773 of file espi_util.c.
|
static |
Definition at line 922 of file espi_util.c.
|
static |
Definition at line 773 of file espi_util.c.
|
static |
Definition at line 459 of file espi_util.c.
Definition at line 161 of file espi_util.c.
References base, ESPI_DECODE_IO_0X2E_0X2F_EN, ESPI_DECODE_IO_0X60_0X64_EN, and ESPI_DECODE_IO_0x80_EN.
Definition at line 17 of file espi_util.c.
References espi_bar.
Referenced by espi_get_bar(), and espi_set_bar().
Definition at line 703 of file espi_util.c.
Definition at line 326 of file espi_util.c.
Definition at line 48 of file espi_util.c.
References espi_get_bar(), val, and write16().
Referenced by espi_clear_decodes(), espi_open_generic_io_window(), and espi_open_mmio_window().
Definition at line 38 of file espi_util.c.
References espi_get_bar(), val, and write32().
Referenced by espi_clear_decodes(), espi_clear_status(), espi_enable_ctrlr_channel(), espi_enable_decode(), espi_open_mmio_window(), espi_set_initial_config(), and espi_setup().
Definition at line 58 of file espi_util.c.
References espi_get_bar(), val, and write8().
Referenced by espi_clear_decodes(), and espi_open_generic_io_window().
Definition at line 188 of file espi_util.c.
Definition at line 280 of file espi_util.c.
Definition at line 22 of file espi_util.c.
Referenced by configure_espi_with_mb_hook().
|
static |
Definition at line 15 of file espi_util.c.
Referenced by espi_get_bar(), and espi_update_static_bar().