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  * MSI MS-7721 board ALC887-VD Verb Table
24  *
25  * Copied from `/sys/class/sound/hwC1D3/init_pin_configs` when running
26  * the vendor BIOS.
27  */
28 const CODEC_ENTRY ms7721_alc887_VerbTbl[] = {
29 {0x11, 0x411111f0},
30 {0x12, 0x411111f0},
31 {0x14, 0x01014410},
32 {0x15, 0x01011412},
33 {0x16, 0x01016411},
34 {0x17, 0x01012414},
35 {0x18, 0x01a19c30},
36 {0x19, 0x02a19c40},
37 {0x1a, 0x0181343f},
38 {0x1b, 0x02214c20},
39 {0x1c, 0x411111f0},
40 {0x1d, 0x4007f603},
41 {0x1e, 0x411111f0},
42 {0x1f, 0x411111f0}
43 };
44 
45 static const CODEC_TBL_LIST CodecTableList[] =
46 {
47  {0x10ec0887, (CODEC_ENTRY*)&ms7721_alc887_VerbTbl[0]},
48  {(UINT32)0x0FFFFFFFF, (CODEC_ENTRY*)0x0FFFFFFFFUL}
49 };
50 
51 void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
52 {
53  FchParams_reset->LegacyFree = CONFIG(HUDSON_LEGACY_FREE);
54 }
55 
56 void board_FCH_InitEnv(struct sysinfo *cb_NA, FCH_DATA_BLOCK *FchParams_env)
57 {
58  /* Azalia Controller OEM Codec Table Pointer */
59  FchParams_env->Azalia.AzaliaOemCodecTablePtr = (CODEC_TBL_LIST *)(&CodecTableList[0]);
60 
61  /* Fan Control */
62  FchParams_env->Imc.ImcEnable = FALSE;
63  FchParams_env->Hwm.HwMonitorEnable = FALSE;
64  FchParams_env->Hwm.HwmFchtsiAutoPoll = FALSE;/* 1 enable, 0 disable TSI Auto Polling */
65 }
#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
const CODEC_ENTRY ms7721_alc887_VerbTbl[]
MSI MS-7721 board ALC887-VD Verb Table.
Definition: BiosCallOuts.c:28
static const CODEC_TBL_LIST CodecTableList[]
Definition: BiosCallOuts.c:45
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