coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
BiosCallOuts.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <AGESA.h>
5 #include <SB800.h>
6 
7 static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr);
8 
10 {
11  {AGESA_DO_RESET, agesa_Reset },
12  {AGESA_READ_SPD, agesa_ReadSpd_from_cbfs },
13  {AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
14  {AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
15  {AGESA_GNB_PCIE_SLOT_RESET, agesa_NoopSuccess },
16  {AGESA_HOOKBEFORE_DRAM_INIT, board_BeforeDramInit },
17  {AGESA_HOOKBEFORE_DRAM_INIT_RECOVERY, agesa_NoopSuccess },
18  {AGESA_HOOKBEFORE_DQS_TRAINING, agesa_NoopSuccess },
19  {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess },
20 };
22 
23 /* Call the host environment interface to provide a user hook opportunity. */
24 static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigPtr)
25 {
26  // Unlike AMD/Inagua, this board is unable to vary the RAM voltage.
27  // Make sure the right speed settings are selected.
28  ((MEM_DATA_STRUCT*)ConfigPtr)->ParameterListPtr->DDR3Voltage = VOLT1_5;
29  return AGESA_SUCCESS;
30 }
#define AGESA_SUCCESS
Definition: Amd.h:38
unsigned int AGESA_STATUS
Definition: Amd.h:36
#define ARRAY_SIZE(a)
Definition: helpers.h:12
AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr)
Definition: def_callouts.c:138
AGESA_STATUS agesa_RunFuncOnAp(UINT32 Func, UINTN Data, VOID *ConfigPtr)
Definition: def_callouts.c:102
AGESA_STATUS agesa_NoopUnsupported(UINT32 Func, UINTN Data, VOID *ConfigPtr)
Definition: def_callouts.c:48
AGESA_STATUS agesa_NoopSuccess(UINT32 Func, UINTN Data, VOID *ConfigPtr)
Definition: def_callouts.c:53
AGESA_STATUS agesa_Reset(UINT32 Func, UINTN Data, VOID *ConfigPtr)
Definition: def_callouts.c:66
const int BiosCalloutsLen
Definition: BiosCallOuts.c:25
const BIOS_CALLOUT_STRUCT BiosCallouts[]
Definition: BiosCallOuts.c:13
static AGESA_STATUS board_BeforeDramInit(UINT32 Func, UINTN Data, VOID *ConfigPtr)
Definition: BiosCallOuts.c:24