coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
state_machine.h File Reference
#include <stdint.h>
#include <AGESA.h>
#include <AMD.h>
Include dependency graph for state_machine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sysinfo
 
struct  agesa_state
 

Macros

#define HAS_AGESA_FCH_OEM_CALLOUT
 

Functions

void agesawrapper_trace (AGESA_STATUS ret, AMD_CONFIG_PARAMS *StdHeader, const char *func)
 
AGESA_STATUS agesawrapper_amdreadeventlog (UINT8 HeapStatus)
 
AGESA_STATUS OemInitResume (AMD_S3_PARAMS *dataBlock)
 
AGESA_STATUS OemS3LateRestore (AMD_S3_PARAMS *dataBlock)
 
AGESA_STATUS OemS3Save (AMD_S3_PARAMS *dataBlock)
 
AGESA_STATUS fchs3earlyrestore (AMD_CONFIG_PARAMS *StdHeader)
 
AGESA_STATUS fchs3laterestore (AMD_CONFIG_PARAMS *StdHeader)
 
void board_BeforeAgesa (struct sysinfo *cb)
 
void agesa_set_interface (struct sysinfo *cb)
 
void agesa_state_on_entry (struct agesa_state *task, AGESA_STRUCT_NAME func)
 
void agesa_state_on_exit (struct agesa_state *task, AMD_CONFIG_PARAMS *StdHeader)
 
int agesa_execute_state (struct sysinfo *cb, AGESA_STRUCT_NAME func)
 
AGESA_STATUS module_dispatch (AGESA_STRUCT_NAME func, AMD_CONFIG_PARAMS *StdHeader)
 
void platform_BeforeInitReset (struct sysinfo *cb, AMD_RESET_PARAMS *Reset)
 
void board_BeforeInitReset (struct sysinfo *cb, AMD_RESET_PARAMS *Reset)
 
void platform_BeforeInitEarly (struct sysinfo *cb, AMD_EARLY_PARAMS *Early)
 
void board_BeforeInitEarly (struct sysinfo *cb, AMD_EARLY_PARAMS *Early)
 
void platform_BeforeInitPost (struct sysinfo *cb, AMD_POST_PARAMS *Post)
 
void board_BeforeInitPost (struct sysinfo *cb, AMD_POST_PARAMS *Post)
 
void platform_AfterInitPost (struct sysinfo *cb, AMD_POST_PARAMS *Post)
 
void platform_BeforeInitEnv (struct sysinfo *cb, AMD_ENV_PARAMS *Env)
 
void board_BeforeInitEnv (struct sysinfo *cb, AMD_ENV_PARAMS *Env)
 
void platform_AfterInitEnv (struct sysinfo *cb, AMD_ENV_PARAMS *Env)
 
void platform_BeforeInitMid (struct sysinfo *cb, AMD_MID_PARAMS *Mid)
 
void board_BeforeInitMid (struct sysinfo *cb, AMD_MID_PARAMS *Mid)
 
void platform_BeforeInitLate (struct sysinfo *cb, AMD_LATE_PARAMS *Late)
 
void board_BeforeInitLate (struct sysinfo *cb, AMD_LATE_PARAMS *Late)
 
void platform_AfterInitLate (struct sysinfo *cb, AMD_LATE_PARAMS *Late)
 
void completion_InitLate (struct sysinfo *cb, AMD_LATE_PARAMS *Late)
 
void platform_BeforeInitResume (struct sysinfo *cb, AMD_RESUME_PARAMS *Resume)
 
void platform_AfterInitResume (struct sysinfo *cb, AMD_RESUME_PARAMS *Resume)
 
void platform_BeforeS3LateRestore (struct sysinfo *cb, AMD_S3LATE_PARAMS *S3Late)
 
void platform_AfterS3LateRestore (struct sysinfo *cb, AMD_S3LATE_PARAMS *S3Late)
 
void platform_AfterS3Save (struct sysinfo *cb, AMD_S3SAVE_PARAMS *S3Save)
 

Macro Definition Documentation

◆ HAS_AGESA_FCH_OEM_CALLOUT

#define HAS_AGESA_FCH_OEM_CALLOUT
Value:
CONFIG(SOUTHBRIDGE_AMD_AGESA_HUDSON) || \
CONFIG(SOUTHBRIDGE_AMD_AGESA_YANGTZE) || \
CONFIG(SOUTHBRIDGE_AMD_PI_AVALON) || \
CONFIG(SOUTHBRIDGE_AMD_PI_KERN)
@ CONFIG
Definition: dsi_common.h:201

Definition at line 89 of file state_machine.h.

Function Documentation

◆ agesa_execute_state()

◆ 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:

◆ agesa_state_on_entry()

void agesa_state_on_entry ( struct agesa_state task,
AGESA_STRUCT_NAME  func 
)

◆ agesa_state_on_exit()

void agesa_state_on_exit ( struct agesa_state task,
AMD_CONFIG_PARAMS StdHeader 
)

Definition at line 118 of file eventlog.c.

References agesa_state::apic_id, BIOS_DEBUG, agesa_state::func, agesa_state::function_name, and printk.

Referenced by agesa_execute_state().

Here is the caller graph for this function:

◆ agesawrapper_amdreadeventlog()

AGESA_STATUS agesawrapper_amdreadeventlog ( UINT8  HeapStatus)

Definition at line 197 of file eventlog.c.

References AGESA_SUCCESS, amd_flush_eventlog(), GetBiosCallout(), and memset().

Here is the call graph for this function:

◆ agesawrapper_trace()

void agesawrapper_trace ( AGESA_STATUS  ret,
AMD_CONFIG_PARAMS StdHeader,
const char *  func 
)

Definition at line 182 of file eventlog.c.

References AGESA_SUCCESS, amd_flush_eventlog(), BIOS_DEBUG, decodeAGESA_STATUS(), agesa_mapping::func, memcpy(), memset(), and printk.

Referenced by agesa_execute_state().

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

◆ board_BeforeAgesa()

void board_BeforeAgesa ( struct sysinfo cb)

Definition at line 19 of file romstage.c.

References do_smbus_write_byte(), early_lpc_init(), PCI_DEV, pci_read_config32(), pci_write_config32(), pm_read8(), pm_write8(), post_code, smbus_setup(), and val.

Referenced by romstage_main().

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

◆ board_BeforeInitEarly()

void board_BeforeInitEarly ( struct sysinfo cb,
AMD_EARLY_PARAMS *  Early 
)

Definition at line 349 of file state_machine.c.

References PcieComplex.

Referenced by romstage_dispatch().

Here is the caller graph for this function:

◆ board_BeforeInitEnv()

void 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 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 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 board_BeforeInitPost ( struct sysinfo cb,
AMD_POST_PARAMS *  Post 
)

Definition at line 351 of file state_machine.c.

References CONFIG, get_spd_offset(), MemoryTable_M, MemoryTable_M_LE, MemoryTable_XM_E, and PlatformMemoryTable.

Referenced by romstage_dispatch().

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

◆ board_BeforeInitReset()

void board_BeforeInitReset ( struct sysinfo cb,
AMD_RESET_PARAMS *  Reset 
)

Definition at line 347 of file state_machine.c.

References CONFIG.

Referenced by romstage_dispatch().

Here is the caller graph for this function:

◆ completion_InitLate()

void completion_InitLate ( struct sysinfo cb,
AMD_LATE_PARAMS *  Late 
)

Definition at line 29 of file acpi_tables.c.

References AmdLateParams.

Referenced by ramstage_dispatch().

Here is the caller graph for this function:

◆ fchs3earlyrestore()

AGESA_STATUS fchs3earlyrestore ( AMD_CONFIG_PARAMS StdHeader)

Definition at line 360 of file state_machine.c.

References AGESA_SUCCESS, and s3_resume_init_data().

Here is the call graph for this function:

◆ fchs3laterestore()

AGESA_STATUS fchs3laterestore ( AMD_CONFIG_PARAMS StdHeader)

Definition at line 366 of file state_machine.c.

References AGESA_SUCCESS, and s3_resume_init_data().

Here is the call graph for this function:

◆ module_dispatch()

AGESA_STATUS module_dispatch ( AGESA_STRUCT_NAME  func,
AMD_CONFIG_PARAMS StdHeader 
)

◆ OemInitResume()

AGESA_STATUS OemInitResume ( AMD_S3_PARAMS *  dataBlock)

Definition at line 47 of file oem_s3.c.

References AGESA_FATAL, AGESA_SUCCESS, get_s3nv_data(), and S3DataTypeNonVolatile.

Referenced by amd_init_resume(), platform_BeforeInitPost(), and platform_BeforeInitResume().

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

◆ OemS3LateRestore()

AGESA_STATUS OemS3LateRestore ( AMD_S3_PARAMS *  dataBlock)

Definition at line 63 of file oem_s3.c.

References AGESA_FATAL, AGESA_SUCCESS, BIOS_DEBUG, cbmem_find(), CBMEM_ID_RESUME_SCRATCH, HIGH_MEMORY_SCRATCH, NULL, and printk.

Referenced by amd_s3final_restore(), amd_s3late_restore(), and platform_BeforeS3LateRestore().

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

◆ OemS3Save()

AGESA_STATUS OemS3Save ( AMD_S3_PARAMS *  dataBlock)

Referenced by amd_init_rtb(), and platform_AfterS3Save().

Here is the caller graph for this function:

◆ platform_AfterInitEnv()

void platform_AfterInitEnv ( struct sysinfo cb,
AMD_ENV_PARAMS *  Env 
)

Definition at line 73 of file state_machine.c.

References amd_initenv().

Referenced by ramstage_dispatch().

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

◆ platform_AfterInitLate()

void platform_AfterInitLate ( struct sysinfo cb,
AMD_LATE_PARAMS *  Late 
)

Definition at line 99 of file state_machine.c.

References sb_Late_Post().

Referenced by ramstage_dispatch().

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

◆ platform_AfterInitPost()

void platform_AfterInitPost ( struct sysinfo cb,
AMD_POST_PARAMS *  Post 
)

Definition at line 54 of file state_machine.c.

References backup_top_of_low_cacheable().

Referenced by romstage_dispatch().

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

◆ platform_AfterInitResume()

void platform_AfterInitResume ( struct sysinfo cb,
AMD_RESUME_PARAMS *  Resume 
)

Definition at line 64 of file state_machine.c.

Referenced by romstage_dispatch().

Here is the caller graph for this function:

◆ platform_AfterS3LateRestore()

void platform_AfterS3LateRestore ( struct sysinfo cb,
AMD_S3LATE_PARAMS *  S3Late 
)

Definition at line 83 of file state_machine.c.

References amd_initcpuio().

Referenced by ramstage_dispatch().

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

◆ platform_AfterS3Save()

void platform_AfterS3Save ( struct sysinfo cb,
AMD_S3SAVE_PARAMS *  S3Save 
)

Definition at line 104 of file state_machine.c.

References OemS3Save().

Referenced by ramstage_dispatch().

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

◆ platform_BeforeInitEarly()

void platform_BeforeInitEarly ( struct sysinfo cb,
AMD_EARLY_PARAMS *  Early 
)

Definition at line 44 of file state_machine.c.

Referenced by romstage_dispatch().

Here is the caller graph for this function:

◆ platform_BeforeInitEnv()

void platform_BeforeInitEnv ( struct sysinfo cb,
AMD_ENV_PARAMS *  Env 
)

Definition at line 68 of file state_machine.c.

References EmptyHeap().

Referenced by ramstage_dispatch().

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

◆ platform_BeforeInitLate()

void platform_BeforeInitLate ( struct sysinfo cb,
AMD_LATE_PARAMS *  Late 
)

Definition at line 95 of file state_machine.c.

References device::enabled, and pcidev_on_root().

Referenced by ramstage_dispatch().

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

◆ platform_BeforeInitMid()

void platform_BeforeInitMid ( struct sysinfo cb,
AMD_MID_PARAMS *  Mid 
)

Definition at line 87 of file state_machine.c.

References amd_initcpuio(), IO_APIC2_ADDR, sb_After_Pci_Init(), and sb_Mid_Post_Init().

Referenced by ramstage_dispatch().

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

◆ platform_BeforeInitPost()

void platform_BeforeInitPost ( struct sysinfo cb,
AMD_POST_PARAMS *  Post 
)

Definition at line 48 of file state_machine.c.

References AGESA_SUCCESS, CONFIG, MAX, MIN, and OemInitResume().

Referenced by romstage_dispatch().

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

◆ platform_BeforeInitReset()

void platform_BeforeInitReset ( struct sysinfo cb,
AMD_RESET_PARAMS *  Reset 
)

Definition at line 17 of file state_machine.c.

References BIOS_CRIT, boot_cpu(), PCI_DEV, pci_read_config32(), pcidev_on_root(), printk, sb_Poweron_Init(), and system_reset().

Referenced by romstage_dispatch().

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

◆ platform_BeforeInitResume()

void platform_BeforeInitResume ( struct sysinfo cb,
AMD_RESUME_PARAMS *  Resume 
)

Definition at line 59 of file state_machine.c.

References OemInitResume().

Referenced by romstage_dispatch().

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

◆ platform_BeforeS3LateRestore()

void platform_BeforeS3LateRestore ( struct sysinfo cb,
AMD_S3LATE_PARAMS *  S3Late 
)

Definition at line 78 of file state_machine.c.

References OemS3LateRestore().

Referenced by ramstage_dispatch().

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