![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <arch/romstage.h>
#include <device/mmio.h>
#include <assert.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <console/console.h>
#include <commonlib/helpers.h>
#include <cpu/x86/mtrr.h>
#include <fast_spi_def.h>
#include <intelblocks/fast_spi.h>
#include <intelblocks/gpmr.h>
#include <lib.h>
#include <soc/pci_devs.h>
#include <spi_flash.h>
#include <spi-generic.h>
Go to the source code of this file.
Macros | |
#define | __SIMPLE_DEVICE__ |
#define __SIMPLE_DEVICE__ |
Definition at line 3 of file fast_spi.c.
Definition at line 292 of file fast_spi.c.
References ALIGN_UP, base, bios_size, fast_spi_cache_ext_bios_window(), fast_spi_enable_cache_range(), fast_spi_get_bios_region(), GiB, log2_ceil(), MiB, and MIN.
Referenced by apollolake_init_cpus(), bootblock_c_entry(), bootblock_soc_early_init(), and post_cpus_add_romcache().
void fast_spi_cache_ext_bios_postcar | ( | struct postcar_frame * | pcf | ) |
Definition at line 280 of file fast_spi.c.
References fast_spi_ext_bios_cache_range(), MTRR_TYPE_WRPROT, postcar_frame_add_mtrr(), and type.
Referenced by fill_postcar_frame().
Definition at line 269 of file fast_spi.c.
References fast_spi_enable_cache_range(), and fast_spi_ext_bios_cache_range().
Referenced by fast_spi_cache_bios_region().
Definition at line 449 of file fast_spi.c.
References fast_spi_get_bar(), spibar, SPIBAR_HSFSTS_CTL, SPIBAR_HSFSTS_W1C_BITS, and write32().
Referenced by fast_spi_lockdown_cfg().
Definition at line 407 of file fast_spi.c.
References PCH_DEV_SPI, pci_read_config32(), pci_write_config32(), SPI_BIOS_CONTROL, and SPI_BIOS_CONTROL_SYNC_SS.
Referenced by smihandler_southbridge_tco(), and southbridge_smi_store().
Definition at line 439 of file fast_spi.c.
References PCH_DEV_SPI, pci_read_config8(), pci_write_config8(), SPI_BIOS_CONTROL, and SPI_BIOS_CONTROL_WPD.
Referenced by southbridge_smi_store().
Definition at line 378 of file fast_spi.c.
References fast_spi_enable_ext_bios(), fast_spi_init(), PCH_DEV_SPI, PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_SPACE_MEMORY, PCI_COMMAND, PCI_COMMAND_MASTER, PCI_COMMAND_MEMORY, pci_or_config16(), pci_read_config16(), pci_write_config16(), and pci_write_config32().
Referenced by bootblock_pch_early_init(), and bootblock_soc_early_init().
Definition at line 217 of file fast_spi.c.
References base, BIOS_WARNING, get_free_var_mtrr(), MTRR_TYPE_WRPROT, printk, set_var_mtrr(), and type.
Referenced by fast_spi_cache_bios_region(), and fast_spi_cache_ext_bios_window().
Definition at line 325 of file fast_spi.c.
References _Static_assert(), ALIGN_UP, CB_ERR, CONFIG, enable_gpmr(), MiB, PCH_DEV_SPI, PCI_BASE_ADDRESS_SPACE_MEMORY, pci_or_config32(), pci_write_config32(), soc_get_spi_psf_destination_id(), SPI_BIOS_CONTROL, SPI_BIOS_CONTROL_EXT_BIOS_ENABLE, SPI_BIOS_CONTROL_EXT_BIOS_LIMIT, and SPI_CFG_BAR1.
Referenced by fast_spi_early_init().
Definition at line 428 of file fast_spi.c.
References PCH_DEV_SPI, pci_read_config8(), pci_write_config8(), SPI_BIOS_CONTROL, and SPI_BIOS_CONTROL_WPD.
Referenced by fast_spi_lockdown_cfg(), finalize(), smihandler_southbridge_tco(), and southbridge_smi_store().
Definition at line 249 of file fast_spi.c.
References ALIGN_DOWN, ALIGN_UP, base, CONFIG, fast_spi_get_ext_bios_window(), and log2_ceil().
Referenced by fast_spi_cache_ext_bios_postcar(), and fast_spi_cache_ext_bios_window().
Definition at line 24 of file fast_spi.c.
References assert, PCH_DEV_SPI, PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_MEM_ATTR_MASK, and pci_read_config32().
Referenced by _fast_spi_flash_get_ctx(), fast_spi_clear_outstanding_status(), fast_spi_get_bios_region(), fast_spi_lock_bar(), fast_spi_pr_dlock(), fast_spi_set_opcode_menu(), fast_spi_set_strap_msg_data(), and fast_spi_vscc0_lock().
Definition at line 232 of file fast_spi.c.
References bios_size, fast_spi_get_bar(), KiB, read32(), SPIBAR_BFPREG, SPIBAR_BFPREG_PRB_MASK, SPIBAR_BFPREG_PRL_MASK, SPIBAR_BFPREG_PRL_SHIFT, and val.
Referenced by bios_mmap_init(), and fast_spi_cache_bios_region().
Definition at line 41 of file fast_spi.c.
References PCH_DEV_SPI, pci_read_config8(), pci_write_config8(), SPI_BIOS_CONTROL, SPI_BIOS_CONTROL_CACHE_DISABLE, SPI_BIOS_CONTROL_EISS, SPI_BIOS_CONTROL_PREFETCH_ENABLE, and SPI_BIOS_CONTROL_WPD.
Referenced by fast_spi_early_init(), finalize(), and spi_flash_init_cb().
Definition at line 145 of file fast_spi.c.
References CONFIG, fast_spi_get_bar(), spibar, SPIBAR_HSFSTS_CTL, SPIBAR_HSFSTS_FLOCKDN, SPIBAR_HSFSTS_PRR34_LOCKDN, SPIBAR_HSFSTS_WRSDIS, and write16().
Referenced by fast_spi_lockdown_cfg().
Definition at line 160 of file fast_spi.c.
References fast_spi_get_bar(), read32(), spibar, SPIBAR_DLOCK, SPIBAR_DLOCK_PR0LOCKDN, SPIBAR_DLOCK_PR1LOCKDN, SPIBAR_DLOCK_PR2LOCKDN, SPIBAR_DLOCK_PR3LOCKDN, SPIBAR_DLOCK_PR4LOCKDN, and write32().
Referenced by fast_spi_lockdown_cfg().
Definition at line 75 of file fast_spi.c.
References PCH_DEV_SPI, and pci_read_config8().
Referenced by fast_spi_set_bios_interface_lock_down(), fast_spi_set_eiss(), fast_spi_set_ext_bios_lock_enable(), and fast_spi_set_lock_enable().
Definition at line 61 of file fast_spi.c.
References assert, PCH_DEV_SPI, pci_read_config32(), pci_write_config32(), and SPI_BIOS_CONTROL.
Referenced by fast_spi_set_bios_interface_lock_down(), fast_spi_set_eiss(), fast_spi_set_ext_bios_lock_enable(), and fast_spi_set_lock_enable().
Definition at line 83 of file fast_spi.c.
References fast_spi_read_post_write(), fast_spi_set_bios_control_reg(), SPI_BIOS_CONTROL, and SPI_BIOS_CONTROL_BILD.
Referenced by fast_spi_lockdown_cfg().
Definition at line 116 of file fast_spi.c.
References fast_spi_read_post_write(), fast_spi_set_bios_control_reg(), SPI_BIOS_CONTROL, and SPI_BIOS_CONTROL_EISS.
Referenced by fast_spi_lockdown_cfg().
Definition at line 103 of file fast_spi.c.
References CONFIG, fast_spi_read_post_write(), fast_spi_set_bios_control_reg(), SPI_BIOS_CONTROL, and SPI_BIOS_CONTROL_EXT_BIOS_LOCK_ENABLE.
Referenced by fast_spi_lockdown_cfg().
Definition at line 93 of file fast_spi.c.
References fast_spi_read_post_write(), fast_spi_set_bios_control_reg(), SPI_BIOS_CONTROL, and SPI_BIOS_CONTROL_LOCK_ENABLE.
Referenced by fast_spi_lockdown_cfg().
Definition at line 126 of file fast_spi.c.
References fast_spi_get_bar(), SPI_OPMENU_LOWER, SPI_OPMENU_UPPER, SPI_OPPREFIX, SPI_OPTYPE, spibar, SPIBAR_OPMENU_LOWER, SPIBAR_OPMENU_UPPER, SPIBAR_OPTYPE, SPIBAR_PREOP, write16(), and write32().
Referenced by fast_spi_lockdown_cfg(), and mainboard_final().
Definition at line 193 of file fast_spi.c.
References fast_spi_get_bar(), read32(), spibar, SPIBAR_RESET_CTRL, SPIBAR_RESET_CTRL_SSMC, SPIBAR_RESET_DATA, SPIBAR_RESET_LOCK, SPIBAR_RESET_LOCK_ENABLE, and write32().
Definition at line 176 of file fast_spi.c.
References fast_spi_get_bar(), setbits32, spibar, SPIBAR_SFDP0_VSCC0, and SPIBAR_VSCC0_VCL.
Referenced by fast_spi_lockdown_cfg().
Definition at line 421 of file fast_spi.c.
References PCH_DEV_SPI, pci_read_config16(), SPI_BIOS_CONTROL, and SPI_BIOS_CONTROL_WPD.
Referenced by smihandler_southbridge_tco(), and southbridge_smi_store().