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 <device/azalia.h>
4 #include <AGESA.h>
7 #include <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  * CODEC Initialization Table for Azalia HD Audio using Realtek ALC662 chip
24  */
25 static const CODEC_ENTRY Alc662_VerbTbl[] =
26 {
27  { 0x14, /*01014010*/ /* Port D - green headphone jack */
33  | (1 << 4)
34  | (0 << 0)
35  },
36  { 0x15, /*0x90170120*/ /* Port A - white speaker header */
43  | (2 << 4)
44  | (0 << 0)
45  },
46  { 0x16, 0x411111F0 }, /* Port G - not connected */
47  { 0x18, /*0x01A19040*/ /* Port B - pink headphone jack */
52  | (AZALIA_PINCFG_COLOR_PINK << 12)
53  | (4 << 4)
54  | (0 << 0)
55  },
56  { 0x19, /*0x02A19050*/ /* Port F - front panel header mic */
57  (AZALIA_PINCFG_PORT_NC << 30)
61  | (AZALIA_PINCFG_COLOR_PINK << 12)
62  | (5 << 4)
63  | (0 << 0)
64  },
65  { 0x1A, /*0x0181304F*/ /* Port C - NL blue headphone jack */
66  (AZALIA_PINCFG_PORT_NC << 30)
70  | (AZALIA_PINCFG_COLOR_BLUE << 12)
71  | (4 << 4)
72  | (0xF << 0)
73  },
74  { 0x1B, /*0x02214030*/ /* Port E - front panel line-out */
75  (AZALIA_PINCFG_PORT_NC << 30)
80  | (3 << 4)
81  | (0 << 0)
82  },
83  { 0x1C, 0x411111F0 }, /* CD-in - Not Connected */
84  { 0x1D, 0x411111F0 }, /* PC Beep - Not Connected */
85  { 0x1E, 0x411111F0 }, /* S/PDIF - Not connected */
86  { 0xFF, 0xFFFFFFFF },
87 };
88 
89 static const CODEC_TBL_LIST CodecTableList[] =
90 {
91  {0x10ec0662, (CODEC_ENTRY*)Alc662_VerbTbl},
92  {(UINT32)0x0FFFFFFFF, (CODEC_ENTRY*)0x0FFFFFFFFUL}
93 };
94 
95 void board_FCH_InitReset(struct sysinfo *cb_NA, FCH_RESET_DATA_BLOCK *FchParams_reset)
96 {
97 }
98 
99 void board_FCH_InitEnv(struct sysinfo *cb_NA, FCH_DATA_BLOCK *FchParams_env)
100 {
101  /* Azalia Controller OEM Codec Table Pointer */
102  FchParams_env->Azalia.AzaliaOemCodecTablePtr = (CODEC_TBL_LIST*)CodecTableList;
103 }
@ AZALIA_PINCFG_COLOR_BLUE
Definition: azalia.h:86
@ AZALIA_PINCFG_COLOR_PINK
Definition: azalia.h:92
@ AZALIA_PINCFG_COLOR_GREEN
Definition: azalia.h:87
@ AZALIA_PINCFG_COLOR_WHITE
Definition: azalia.h:93
@ AZALIA_PINCFG_MISC_IGNORE_PRESENCE
Definition: azalia.h:98
@ AZALIA_PINCFG_LOCATION_REAR
Definition: azalia.h:30
@ AZALIA_PINCFG_LOCATION_FRONT
Definition: azalia.h:31
@ AZALIA_PINCFG_PORT_JACK
Definition: azalia.h:15
@ AZALIA_PINCFG_PORT_NC
Definition: azalia.h:16
@ AZALIA_PINCFG_PORT_FIXED
Definition: azalia.h:17
@ AZALIA_PINCFG_LOCATION_EXTERNAL
Definition: azalia.h:22
@ AZALIA_PINCFG_LOCATION_INTERNAL
Definition: azalia.h:23
@ AZALIA_PINCFG_DEVICE_SPEAKER
Definition: azalia.h:50
@ AZALIA_PINCFG_DEVICE_LINEIN
Definition: azalia.h:57
@ AZALIA_PINCFG_DEVICE_HP_OUT
Definition: azalia.h:51
@ AZALIA_PINCFG_DEVICE_MICROPHONE
Definition: azalia.h:59
@ AZALIA_PINCFG_DEVICE_LINEOUT
Definition: azalia.h:49
@ AZALIA_PINCFG_CONN_MINI_HEADPHONE_JACK
Definition: azalia.h:68
@ AZALIA_PINCFG_CONN_OTHER_ANALOG
Definition: azalia.h:74
#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
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_ENTRY Alc662_VerbTbl[]
CODEC Initialization Table for Azalia HD Audio using Realtek ALC662 chip.
Definition: BiosCallOuts.c:25
static const CODEC_TBL_LIST CodecTableList[]
Definition: BiosCallOuts.c:89
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