![]() |
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 | capacity |
Macros | |
#define | DECIMAL_CAPACITY_MULTIPLIER 1000ULL |
#define | HEX_CAPACITY_MULTIPLIER 1024ULL |
Functions | |
static void | display_capacity (struct storage_media *media, int partition_number) |
void | storage_display_setup (struct storage_media *media) |
int | storage_startup (struct storage_media *media) |
int | storage_setup_media (struct storage_media *media, struct sd_mmc_ctrlr *ctrlr) |
static int | storage_read (struct storage_media *media, void *dest, uint32_t start, uint32_t block_count) |
int | storage_block_setup (struct storage_media *media, uint64_t start, uint64_t count, int is_read) |
uint64_t | storage_block_read (struct storage_media *media, uint64_t start, uint64_t count, void *buffer) |
int | storage_set_partition (struct storage_media *media, unsigned int partition_number) |
const char * | storage_partition_name (struct storage_media *media, unsigned int partition_number) |
unsigned int | storage_get_current_partition (struct storage_media *media) |
|
static |
Definition at line 22 of file storage.c.
References ARRAY_SIZE, capacity::bytes, storage_media::capacity, CONFIG, DECIMAL_CAPACITY_MULTIPLIER, HEX_CAPACITY_MULTIPLIER, IS_SD, media, name, sdhc_debug, storage_partition_name(), and capacity::units.
Referenced by storage_display_setup().
uint64_t storage_block_read | ( | struct storage_media * | media, |
uint64_t | start, | ||
uint64_t | count, | ||
void * | buffer | ||
) |
Definition at line 286 of file storage.c.
References sd_mmc_ctrlr::b_max, buffer, count, storage_media::ctrlr, media, MIN, storage_media::read_bl_len, sd_mmc_trace, storage_block_setup(), and storage_read().
Referenced by partial_block_read(), and storage_test().
int storage_block_setup | ( | struct storage_media * | media, |
uint64_t | start, | ||
uint64_t | count, | ||
int | is_read | ||
) |
Definition at line 250 of file storage.c.
References BUS_TIMING_MMC_DDR52, BUS_TIMING_MMC_HS400, BUS_TIMING_MMC_HS400ES, BUS_TIMING_UHS_DDR50, storage_media::capacity, count, storage_media::ctrlr, EXT_CSD_PART_ACCESS_MASK, media, storage_media::partition_config, storage_media::read_bl_len, sd_mmc_error, sd_mmc_set_blocklen(), sd_mmc_ctrlr::timing, and storage_media::write_bl_len.
Referenced by storage_block_erase(), storage_block_fill_write(), storage_block_read(), and storage_block_write().
void storage_display_setup | ( | struct storage_media * | media | ) |
Definition at line 88 of file storage.c.
References ARRAY_SIZE, storage_media::capacity, storage_media::cid, CONFIG, display_capacity(), storage_media::erase_blocks, IS_SD, media, sd_mmc_debug, sdhc_debug, and storage_media::write_bl_len.
Referenced by boot_device_init(), storage_startup(), and storage_test().
unsigned int storage_get_current_partition | ( | struct storage_media * | media | ) |
Definition at line 339 of file storage.c.
References EXT_CSD_PART_ACCESS_MASK, media, and storage_media::partition_config.
Referenced by storage_test().
const char* storage_partition_name | ( | struct storage_media * | media, |
unsigned int | partition_number | ||
) |
Definition at line 325 of file storage.c.
References CONFIG, IS_SD, media, mmc_partition_name(), name, NULL, and sd_partition_name().
Referenced by display_capacity(), and storage_test().
|
static |
Definition at line 201 of file storage.c.
References mmc_data::blocks, mmc_data::blocksize, sd_mmc_ctrlr::caps, CARD_RSP_R1, CARD_RSP_R1b, CMD_FLAG_IGNORE_INHIBIT, mmc_command::cmdarg, mmc_command::cmdidx, storage_media::ctrlr, DATA_FLAG_READ, mmc_data::dest, DRVR_CAP_AUTO_CMD12, mmc_command::flags, mmc_data::flags, storage_media::high_capacity, media, MMC_CMD_READ_MULTIPLE_BLOCK, MMC_CMD_READ_SINGLE_BLOCK, MMC_CMD_STOP_TRANSMISSION, NULL, storage_media::read_bl_len, mmc_command::resp_type, sd_mmc_error, SD_MMC_IO_RETRIES, sd_mmc_send_status(), and sd_mmc_ctrlr::send_cmd.
Referenced by storage_block_read().
int storage_set_partition | ( | struct storage_media * | media, |
unsigned int | partition_number | ||
) |
Definition at line 309 of file storage.c.
References CONFIG, IS_SD, media, mmc_set_partition(), sd_mmc_error, and sd_set_partition().
Referenced by storage_test().
int storage_setup_media | ( | struct storage_media * | media, |
struct sd_mmc_ctrlr * | ctrlr | ||
) |
Definition at line 188 of file storage.c.
References storage_media::ctrlr, media, memset(), sd_mmc_enter_standby(), and storage_startup().
Referenced by boot_device_init(), and storage_test().
int storage_startup | ( | struct storage_media * | media | ) |
Definition at line 121 of file storage.c.
References storage_media::capacity, sd_mmc_ctrlr::caps, storage_media::caps, CARD_RSP_R1, mmc_command::cmdarg, mmc_command::cmdidx, CONFIG, storage_media::csd, storage_media::ctrlr, storage_media::erase_blocks, mmc_command::flags, storage_media::high_capacity, IS_SD, media, mmc_change_freq(), MMC_CMD_SELECT_CARD, mmc_set_bus_width(), mmc_update_capacity(), NULL, storage_media::rca, storage_media::read_bl_len, mmc_command::resp_type, sd_change_freq(), sd_mmc_extract_uint32_bits(), sd_set_bus_width(), sd_mmc_ctrlr::send_cmd, storage_display_setup(), and storage_media::write_bl_len.
Referenced by storage_setup_media().