coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mma.c File Reference
#include <bootstate.h>
#include <cbfs.h>
#include <cbmem.h>
#include <console/console.h>
#include <soc/intel/common/mma.h>
#include <string.h>
Include dependency graph for mma.c:

Go to the source code of this file.

Data Structures

struct  mma_data_container
 

Macros

#define MMA_TEST_METADATA_FILENAME   "mma_test_metadata.bin"
 
#define MMA_TEST_NAME_TAG   "MMA_TEST_NAME"
 
#define MMA_TEST_PARAM_TAG   "MMA_TEST_PARAM"
 
#define TEST_NAME_MAX_SIZE   30
 
#define TEST_PARAM_MAX_SIZE   100
 
#define MMA_DATA_SIGNATURE
 

Functions

static int find_label (const char *haystack, size_t haystack_sz, const char *label)
 
static int label_value (const char *haystack, size_t haystack_sz, const char *label, char *dest, size_t dest_sz)
 
int mma_map_param (struct mma_config_param *mma_cfg)
 
static void save_mma_results_data (void *unused)
 
 BOOT_STATE_INIT_ENTRY (BS_WRITE_TABLES, BS_ON_ENTRY, save_mma_results_data, NULL)
 

Variables

struct mma_data_container __packed
 

Macro Definition Documentation

◆ MMA_DATA_SIGNATURE

#define MMA_DATA_SIGNATURE
Value:
(('M' << 0) | ('M' << 8) | \
('A' << 16) | ('D' << 24))

Definition at line 15 of file mma.c.

◆ MMA_TEST_METADATA_FILENAME

#define MMA_TEST_METADATA_FILENAME   "mma_test_metadata.bin"

Definition at line 10 of file mma.c.

◆ MMA_TEST_NAME_TAG

#define MMA_TEST_NAME_TAG   "MMA_TEST_NAME"

Definition at line 11 of file mma.c.

◆ MMA_TEST_PARAM_TAG

#define MMA_TEST_PARAM_TAG   "MMA_TEST_PARAM"

Definition at line 12 of file mma.c.

◆ TEST_NAME_MAX_SIZE

#define TEST_NAME_MAX_SIZE   30

Definition at line 13 of file mma.c.

◆ TEST_PARAM_MAX_SIZE

#define TEST_PARAM_MAX_SIZE   100

Definition at line 14 of file mma.c.

Function Documentation

◆ BOOT_STATE_INIT_ENTRY()

BOOT_STATE_INIT_ENTRY ( BS_WRITE_TABLES  ,
BS_ON_ENTRY  ,
save_mma_results_data  ,
NULL   
)

◆ find_label()

static int find_label ( const char *  haystack,
size_t  haystack_sz,
const char *  label 
)
static

Definition at line 31 of file mma.c.

References strlen(), and strncmp().

Referenced by label_value().

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

◆ label_value()

static int label_value ( const char *  haystack,
size_t  haystack_sz,
const char *  label,
char *  dest,
size_t  dest_sz 
)
static

Definition at line 63 of file mma.c.

References find_label(), memcpy(), and memset().

Referenced by mma_map_param().

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

◆ mma_map_param()

int mma_map_param ( struct mma_config_param mma_cfg)

◆ save_mma_results_data()

static void save_mma_results_data ( void unused)
static

Definition at line 161 of file mma.c.

References ALIGN, BIOS_DEBUG, cbmem_add(), CBMEM_ID_MMA_DATA, fsp_locate_mma_results(), memcpy(), memset(), mma_data_container::mma_data, MMA_DATA_SIGNATURE, NULL, and printk.

Here is the call graph for this function:

Variable Documentation

◆ __packed