coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
state_machine.c File Reference
#include <stdint.h>
#include <string.h>
#include <acpi/acpi.h>
#include <bootstate.h>
#include <cbfs.h>
#include <timestamp.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <northbridge/amd/agesa/agesa_helper.h>
#include <northbridge/amd/agesa/BiosCallOuts.h>
#include <amdlib.h>
#include <AMD.h>
Include dependency graph for state_machine.c:

Go to the source code of this file.

Functions

static void agesa_locate_image (AMD_CONFIG_PARAMS *StdHeader)
 
void agesa_set_interface (struct sysinfo *cb)
 
AGESA_STATUS module_dispatch (AGESA_STRUCT_NAME func, AMD_CONFIG_PARAMS *StdHeader)
 
static AGESA_STATUS amd_create_struct (AMD_INTERFACE_PARAMS *aip, AGESA_STRUCT_NAME func, void *buf, size_t len)
 
static AGESA_STATUS amd_release_struct (AMD_INTERFACE_PARAMS *aip)
 
static AGESA_STATUS romstage_dispatch (struct sysinfo *cb, AGESA_STRUCT_NAME func, AMD_CONFIG_PARAMS *StdHeader)
 
static AGESA_STATUS ramstage_dispatch (struct sysinfo *cb, AGESA_STRUCT_NAME func, AMD_CONFIG_PARAMS *StdHeader)
 
int agesa_execute_state (struct sysinfo *cb, AGESA_STRUCT_NAME func)
 
void __weak board_BeforeInitReset (struct sysinfo *cb, AMD_RESET_PARAMS *Reset)
 
void __weak board_BeforeInitEarly (struct sysinfo *cb, AMD_EARLY_PARAMS *Early)
 
void __weak board_BeforeInitPost (struct sysinfo *cb, AMD_POST_PARAMS *Post)
 
void __weak board_BeforeInitEnv (struct sysinfo *cb, AMD_ENV_PARAMS *Env)
 
void __weak board_BeforeInitMid (struct sysinfo *cb, AMD_MID_PARAMS *Mid)
 
void __weak board_BeforeInitLate (struct sysinfo *cb, AMD_LATE_PARAMS *Late)
 
AGESA_STATUS __weak fchs3earlyrestore (AMD_CONFIG_PARAMS *StdHeader)
 
AGESA_STATUS __weak fchs3laterestore (AMD_CONFIG_PARAMS *StdHeader)
 

Function Documentation

◆ agesa_execute_state()

◆ agesa_locate_image()

static void agesa_locate_image ( AMD_CONFIG_PARAMS StdHeader)
static

Definition at line 26 of file state_machine.c.

References cbfs_map(), _AMD_CONFIG_PARAMS::ImageBasePtr, and NULL.

Referenced by agesa_set_interface().

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

◆ agesa_set_interface()

void agesa_set_interface ( struct sysinfo cb)

Definition at line 43 of file state_machine.c.

References agesa_locate_image(), ASSERT, _AMD_CONFIG_PARAMS::CalloutPtr, CONFIG, GetBiosCallout(), _AMD_CONFIG_PARAMS::ImageBasePtr, memset(), _AMD_IMAGE_HEADER::ModuleInfoOffset, and sysinfo::StdHeader.

Referenced by fill_sysinfo().

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

◆ amd_create_struct()

static AGESA_STATUS amd_create_struct ( AMD_INTERFACE_PARAMS *  aip,
AGESA_STRUCT_NAME  func,
void buf,
size_t  len 
)
static

Definition at line 78 of file state_machine.c.

References buf, ByHost, module_dispatch(), and NULL.

Referenced by agesa_execute_state().

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

◆ amd_release_struct()

static AGESA_STATUS amd_release_struct ( AMD_INTERFACE_PARAMS *  aip)
static

Definition at line 91 of file state_machine.c.

References AGESA_SUCCESS, and module_dispatch().

Referenced by agesa_execute_state().

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

◆ board_BeforeInitEarly()

void __weak board_BeforeInitEarly ( struct sysinfo cb,
AMD_EARLY_PARAMS *  Early 
)

Definition at line 349 of file state_machine.c.

Referenced by romstage_dispatch().

Here is the caller graph for this function:

◆ board_BeforeInitEnv()

void __weak board_BeforeInitEnv ( struct sysinfo cb,
AMD_ENV_PARAMS *  Env 
)

Definition at line 353 of file state_machine.c.

Referenced by ramstage_dispatch().

Here is the caller graph for this function:

◆ board_BeforeInitLate()

void __weak board_BeforeInitLate ( struct sysinfo cb,
AMD_LATE_PARAMS *  Late 
)

Definition at line 357 of file state_machine.c.

Referenced by ramstage_dispatch().

Here is the caller graph for this function:

◆ board_BeforeInitMid()

void __weak board_BeforeInitMid ( struct sysinfo cb,
AMD_MID_PARAMS *  Mid 
)

Definition at line 355 of file state_machine.c.

Referenced by ramstage_dispatch().

Here is the caller graph for this function:

◆ board_BeforeInitPost()

void __weak board_BeforeInitPost ( struct sysinfo cb,
AMD_POST_PARAMS *  Post 
)

Definition at line 351 of file state_machine.c.

Referenced by romstage_dispatch().

Here is the caller graph for this function:

◆ board_BeforeInitReset()

void __weak board_BeforeInitReset ( struct sysinfo cb,
AMD_RESET_PARAMS *  Reset 
)

Definition at line 347 of file state_machine.c.

Referenced by romstage_dispatch().

Here is the caller graph for this function:

◆ fchs3earlyrestore()

AGESA_STATUS __weak fchs3earlyrestore ( AMD_CONFIG_PARAMS StdHeader)

Definition at line 360 of file state_machine.c.

References AGESA_SUCCESS.

◆ fchs3laterestore()

AGESA_STATUS __weak fchs3laterestore ( AMD_CONFIG_PARAMS StdHeader)

Definition at line 366 of file state_machine.c.

References AGESA_SUCCESS.

◆ module_dispatch()

AGESA_STATUS module_dispatch ( AGESA_STRUCT_NAME  func,
AMD_CONFIG_PARAMS StdHeader 
)

◆ ramstage_dispatch()

static AGESA_STATUS ramstage_dispatch ( struct sysinfo cb,
AGESA_STRUCT_NAME  func,
AMD_CONFIG_PARAMS StdHeader 
)
static

◆ romstage_dispatch()

static AGESA_STATUS romstage_dispatch ( struct sysinfo cb,
AGESA_STRUCT_NAME  func,
AMD_CONFIG_PARAMS StdHeader 
)
static