coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
storage_test.c File Reference
#include <device/pci_ops.h>
#include <assert.h>
#include <cbmem.h>
#include <commonlib/sdhci.h>
#include <commonlib/storage.h>
#include <console/console.h>
#include <lib.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include <soc/storage_test.h>
#include <timer.h>
#include <string.h>
Include dependency graph for storage_test.c:

Go to the source code of this file.

Macros

#define STORAGE_DEBUG   BIOS_DEBUG
 
#define LOG_DEBUG   (CONFIG(STORAGE_LOG) ? STORAGE_DEBUG : BIOS_NEVER)
 

Functions

uint32_t storage_test_init (struct device *dev, uint32_t *previous_bar, uint16_t *previous_command)
 
void storage_test_complete (struct device *dev, uint32_t previous_bar, uint16_t previous_command)
 
static void display_log (void)
 
void sdhc_log_command (struct mmc_command *cmd)
 
void sdhc_log_command_issued (void)
 
void sdhc_log_response (uint32_t entries, uint32_t *response)
 
void sdhc_log_ret (int ret)
 
void storage_test (uint32_t bar, int full_initialization)
 

Variables

static uint8_t drivers_storage [256]
 

Macro Definition Documentation

◆ LOG_DEBUG

#define LOG_DEBUG   (CONFIG(STORAGE_LOG) ? STORAGE_DEBUG : BIOS_NEVER)

Definition at line 26 of file storage_test.c.

◆ STORAGE_DEBUG

#define STORAGE_DEBUG   BIOS_DEBUG

Definition at line 25 of file storage_test.c.

Function Documentation

◆ display_log()

static void display_log ( void  )
static

Definition at line 74 of file storage_test.c.

References BIOS_DEBUG, log_entry::cmd, mmc_command::cmdidx, CONFIG, printk, log_entry::response, log_entry::response_entries, and log_entry::ret.

Referenced by storage_test().

Here is the caller graph for this function:

◆ sdhc_log_command()

void sdhc_log_command ( struct mmc_command cmd)

Definition at line 108 of file storage_test.c.

References log_entry::cmd, CONFIG, log_entry::time, and timer_monotonic_get().

Here is the call graph for this function:

◆ sdhc_log_command_issued()

void sdhc_log_command_issued ( void  )

Definition at line 120 of file storage_test.c.

References CONFIG.

◆ sdhc_log_response()

void sdhc_log_response ( uint32_t  entries,
uint32_t response 
)

Definition at line 127 of file storage_test.c.

References CONFIG, and log_entry::response.

◆ sdhc_log_ret()

void sdhc_log_ret ( int  ret)

Definition at line 138 of file storage_test.c.

References CONFIG, and log_entry::ret.

◆ storage_test()

◆ storage_test_complete()

void storage_test_complete ( struct device dev,
uint32_t  previous_bar,
uint16_t  previous_command 
)

Definition at line 65 of file storage_test.c.

References PCI_BASE_ADDRESS_0, PCI_COMMAND, pci_write_config16(), and pci_write_config32().

Referenced by mainboard_romstage_entry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ storage_test_init()

uint32_t storage_test_init ( struct device dev,
uint32_t previous_bar,
uint16_t previous_command 
)

Definition at line 32 of file storage_test.c.

References LOG_DEBUG, PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_MEM_ATTR_MASK, PCI_COMMAND, PCI_COMMAND_MEMORY, PCI_DEVICE_ID, pci_read_config16(), pci_read_config32(), PCI_VENDOR_ID, pci_write_config16(), pci_write_config32(), printk, and SD_BASE_ADDRESS.

Referenced by mainboard_romstage_entry().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ drivers_storage

uint8_t drivers_storage[256]
static

Definition at line 23 of file storage_test.c.

Referenced by storage_test().