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>
6 
7 #include <vendorcode/amd/agesa/f15tn/Proc/Fch/FchPlatform.h>
8 
10 {
11  {AGESA_DO_RESET, agesa_Reset },
12  {AGESA_READ_SPD, agesa_ReadSpd },
13  {AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported },
14  {AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp },
15  {AGESA_GET_IDS_INIT_DATA, agesa_EmptyIdsInitData },
16  {AGESA_HOOKBEFORE_DQS_TRAINING, agesa_NoopSuccess },
17  {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess },
18  {AGESA_GNB_GFX_GET_VBIOS_IMAGE, agesa_GfxGetVbiosImage }
19 };
21 
22 /**
23  * ASUS F2A85-M board ALC887-VD Verb Table
24  *
25  * Copied from `/sys/class/sound/hwC1D0/init_pin_configs` when running
26  * the vendor BIOS.
27  */
28 #if !CONFIG(BOARD_ASUS_F2A85_M_LE)
29 const CODEC_ENTRY f2a85_m_alc887_VerbTbl[] = {
30  {0x11, 0x99430140},
31  {0x12, 0x411111f0},
32  {0x14, 0x01014010},
33  {0x15, 0x01011012},
34  {0x16, 0x01016011},
35  {0x17, 0x01012014},
36  {0x18, 0x01a19850},
37  {0x19, 0x02a19c60},
38  {0x1a, 0x0181305f},
39  {0x1b, 0x02214c20},
40  {0x1c, 0x411111f0},
41  {0x1d, 0x4005e601},
42  {0x1e, 0x01456130},
43  {0x1f, 0x411111f0},
44  {0xff, 0xffffffff}
45 };
46 #else
47 const CODEC_ENTRY f2a85_m_alc887_VerbTbl[] = {
48  {0x11, 0x99430140},
49  {0x12, 0x411111f0},
50  {0x14, 0x01014010},
51  {0x15, 0x411111f0},
52  {0x16, 0x411111f0},
53  {0x17, 0x411111f0},
54  {0x18, 0x01a19850},
55  {0x19, 0x02a19c60},
56  {0x1a, 0x0181305f},
57  {0x1b, 0x02214c20},
58  {0x1c, 0x411111f0},
59  {0x1d, 0x4004c601},
60  {0x1e, 0x01456130},
61  {0x1f, 0x411111f0},
62  {0xff, 0xffffffff}
63 };
64 #endif
65 
66 static const CODEC_TBL_LIST CodecTableList[] =
67 {
68  {0x10ec0887, (CODEC_ENTRY*)&f2a85_m_alc887_VerbTbl[0]},
69  {(UINT32)0x0FFFFFFFF, (CODEC_ENTRY*)0x0FFFFFFFFUL}
70 };
71 
72 void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
73 {
74  FchParams_reset->LegacyFree = CONFIG(HUDSON_LEGACY_FREE);
75 }
76 
77 void board_FCH_InitEnv(struct sysinfo *cb_NA, FCH_DATA_BLOCK *FchParams_env)
78 {
79  /* Azalia Controller OEM Codec Table Pointer */
80  FchParams_env->Azalia.AzaliaOemCodecTablePtr = (CODEC_TBL_LIST *)(&CodecTableList[0]);
81 
82  /* Fan Control */
83  FchParams_env->Imc.ImcEnable = FALSE;
84  FchParams_env->Hwm.HwMonitorEnable = FALSE;
85  FchParams_env->Hwm.HwmFchtsiAutoPoll = FALSE;/* 1 enable, 0 disable TSI Auto Polling */
86 }
#define ARRAY_SIZE(a)
Definition: helpers.h:12
AGESA_STATUS agesa_RunFuncOnAp(UINT32 Func, UINTN Data, VOID *ConfigPtr)
Definition: def_callouts.c:102
AGESA_STATUS agesa_EmptyIdsInitData(UINT32 Func, UINTN Data, VOID *ConfigPtr)
Definition: def_callouts.c:58
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
@ CONFIG
Definition: dsi_common.h:201
const int BiosCalloutsLen
Definition: BiosCallOuts.c:25
const BIOS_CALLOUT_STRUCT BiosCallouts[]
Definition: BiosCallOuts.c:13
void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
Definition: BiosCallOuts.c:157
void board_FCH_InitEnv(struct sysinfo *cb_NA, FCH_DATA_BLOCK *FchParams_env)
Definition: BiosCallOuts.c:161
static const CODEC_TBL_LIST CodecTableList[]
Definition: BiosCallOuts.c:66
const CODEC_ENTRY f2a85_m_alc887_VerbTbl[]
ASUS F2A85-M board ALC887-VD Verb Table.
Definition: BiosCallOuts.c:29
AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData, VOID *ConfigPrt)
AGESA_STATUS agesa_ReadSpd(uint32_t Func, uintptr_t Data, void *ConfigPtr)
Definition: BiosCallOuts.c:81