coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Data Structures | |
struct | spi_flash_ops |
struct | spi_flash_protection_ops |
struct | spi_flash |
Macros | |
#define | SPI_OPCODE_WREN 0x06 |
#define | SPI_OPCODE_FAST_READ 0x0b |
Enumerations | |
enum | spi_flash_status_reg_lockdown { SPI_WRITE_PROTECTION_PRESERVE = -1 , SPI_WRITE_PROTECTION_NONE = 0 , SPI_WRITE_PROTECTION_PIN , SPI_WRITE_PROTECTION_REBOOT , SPI_WRITE_PROTECTION_PERMANENT } |
#define SPI_OPCODE_FAST_READ 0x0b |
Definition at line 13 of file spi_flash.h.
#define SPI_OPCODE_WREN 0x06 |
Definition at line 12 of file spi_flash.h.
Enumerator | |
---|---|
SPI_WRITE_PROTECTION_PRESERVE | |
SPI_WRITE_PROTECTION_NONE | |
SPI_WRITE_PROTECTION_PIN | |
SPI_WRITE_PROTECTION_REBOOT | |
SPI_WRITE_PROTECTION_PERMANENT |
Definition at line 28 of file spi_flash.h.
Definition at line 73 of file boot_device_rw_nommap.c.
References boot_device_init(), boot_device_rw_init(), NULL, sfg, sfg_init_done, spi_flash_info, and spi_flash_init_done.
Referenced by boot_device_wp_region(), lb_spi_flash(), mainboard_config_cbi_wp(), mainboard_print_info(), nvm_is_write_protected(), nvm_protect(), pre_mem_debug_init(), protect_ro_rgn_spi_flash(), and spi_finalize_ops().
int chipset_volatile_group_begin | ( | const struct spi_flash * | flash | ) |
Definition at line 132 of file spi.c.
References CONFIG, ImcSleep(), and NULL.
Referenced by spi_flash_volatile_group_begin().
int chipset_volatile_group_end | ( | const struct spi_flash * | flash | ) |
Definition at line 141 of file spi.c.
References CONFIG, ImcWakeup(), and NULL.
Referenced by spi_flash_volatile_group_end().
void lb_spi_flash | ( | struct lb_header * | header | ) |
Definition at line 683 of file spi_flash.c.
References boot_device_spi_flash(), CMD_BLOCK_ERASE, CONFIG, lb_spi_flash::erase_cmd, spi_flash::erase_cmd, lb_spi_flash::flash_size, header, KiB, lb_new_record(), LB_TAG_SPI_FLASH, lb_spi_flash::mmap_count, lb_spi_flash::sector_size, spi_flash::sector_size, lb_spi_flash::size, spi_flash::size, spi_flash_get_mmap_windows(), and lb_spi_flash::tag.
Referenced by write_coreboot_table().
int spi_flash_ctrlr_protect_region | ( | const struct spi_flash * | flash, |
const struct region * | region, | ||
const enum ctrlr_prot_type | type | ||
) |
Definition at line 719 of file spi_flash.c.
References spi_slave::ctrlr, spi_ctrlr::flash_protect, region_is_subregion(), region::size, spi_flash::size, spi_flash::spi, and type.
Referenced by boot_device_wp_region(), and nvm_protect().
Definition at line 553 of file spi_flash.c.
References spi_flash_ops::erase, offset, spi_flash::ops, spi_flash_volatile_group_begin(), and spi_flash_volatile_group_end().
Referenced by spi_eraseat().
Definition at line 448 of file spi_flash.c.
References BIOS_INFO, BIOS_SPEW, CMD_READ_ID, CONFIG, find_match(), IDCODE_LEN, printk, spi_flash_cmd(), and stmicro_release_deep_sleep_identify().
Referenced by spi_flash_probe(), and spi_flash_programmer_probe().
uint32_t spi_flash_get_mmap_windows | ( | struct flash_mmap_window * | table | ) |
Definition at line 18 of file mmap_boot.c.
References bios_mmap_init(), count, flash_mmap_window::flash_base, flash_mmap_window::host_base, rdev, rdev_mmap_full(), real_dev_window, real_dev_windows, region_offset(), region_sz(), rom_base, shadow_dev, shadow_devs, flash_mmap_window::size, xlate_window::sub_region, and TOTAL_DECODE_WINDOWS.
Referenced by lb_spi_flash().
Definition at line 576 of file spi_flash.c.
References BIOS_WARNING, spi_flash_protection_ops::get_write, printk, spi_flash::prot_ops, region_is_subregion(), region::size, and spi_flash::size.
Referenced by boot_device_wp_region(), mainboard_print_info(), and protect_ro_rgn_spi_flash().
Definition at line 486 of file spi_flash.c.
References BIOS_ERR, BIOS_INFO, BIOS_WARNING, CMD_EXIT_4BYTE_ADDR_MODE, CONFIG, spi_slave::cs, spi_slave::ctrlr, spi_flash::dual_io, spi_flash::dual_output, ENV_INITIAL_STAGE, spi_flash::flags, spi_ctrlr::flash_probe, spi_flash::model, NULL, printk, spi_flash::sector_size, spi_flash::size, spi_flash::spi, spi_flash_cmd(), spi_flash_generic_probe(), spi_setup_slave(), spi_flash::vendor, and spi_ctrlr::xfer_dual.
Referenced by boot_device_init(), boot_device_rw_init(), and spi_init_cb().
Definition at line 531 of file spi_flash.c.
References buf, offset, spi_flash::ops, and spi_flash_ops::read.
Referenced by pre_mem_debug_init(), and spi_readat().
int spi_flash_set_write_protected | ( | const struct spi_flash * | flash, |
const struct region * | region, | ||
const enum spi_flash_status_reg_lockdown | mode | ||
) |
Definition at line 598 of file spi_flash.c.
References BIOS_INFO, BIOS_WARNING, printk, spi_flash::prot_ops, region_is_subregion(), spi_flash_protection_ops::set_write, region::size, spi_flash::size, SPI_WRITE_PROTECTION_NONE, SPI_WRITE_PROTECTION_PERMANENT, SPI_WRITE_PROTECTION_PIN, SPI_WRITE_PROTECTION_PRESERVE, and SPI_WRITE_PROTECTION_REBOOT.
Referenced by boot_device_wp_region(), and protect_ro_rgn_spi_flash().
Definition at line 568 of file spi_flash.c.
References spi_flash::ops, and spi_flash_ops::status.
Referenced by mainboard_config_cbi_wp(), nvm_is_write_protected(), and protect_ro_rgn_spi_flash().
int spi_flash_vector_helper | ( | const struct spi_slave * | slave, |
struct spi_op | vectors[], | ||
size_t | count, | ||
int(*)(const struct spi_slave *slave, const void *dout, size_t bytesout, void *din, size_t bytesin) | func | ||
) |
Definition at line 745 of file spi_flash.c.
Referenced by xfer_vectors().
int spi_flash_volatile_group_begin | ( | const struct spi_flash * | flash | ) |
Definition at line 647 of file spi_flash.c.
References chipset_volatile_group_begin(), CONFIG, count, and volatile_group_count.
Referenced by spi_flash_erase(), and spi_flash_write().
int spi_flash_volatile_group_end | ( | const struct spi_flash * | flash | ) |
Definition at line 664 of file spi_flash.c.
References assert, chipset_volatile_group_end(), CONFIG, count, and volatile_group_count.
Referenced by spi_flash_erase(), and spi_flash_write().
Definition at line 537 of file spi_flash.c.
References buf, offset, spi_flash::ops, spi_flash_volatile_group_begin(), spi_flash_volatile_group_end(), and spi_flash_ops::write.
Referenced by spi_writeat().