From 7c48b891fe72b5d9e586f8cac86817bd922433e7 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Tue, 26 Sep 2017 14:48:17 -0600 Subject: [PATCH] mainboard/amd: Add required callouts to Stoney BiosCallouts.c Hook the new required AGESA callout functions into the callouts tables. BUG=b:66690176 TEST=Build and boot Kahlee - see the functions get called. Change-Id: Ife9c2b20e59ede404edb1f700238e425fea35914 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/21708 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/amd/gardenia/BiosCallOuts.c | 31 ++++++++++++++----- .../amd/gardenia/bootblock/BiosCallOuts.c | 1 + src/mainboard/google/kahlee/BiosCallOuts.c | 31 ++++++++++++++----- .../google/kahlee/bootblock/BiosCallOuts.c | 1 + 4 files changed, 50 insertions(+), 14 deletions(-) diff --git a/src/mainboard/amd/gardenia/BiosCallOuts.c b/src/mainboard/amd/gardenia/BiosCallOuts.c index 1d06411790..c947b0cb51 100644 --- a/src/mainboard/amd/gardenia/BiosCallOuts.c +++ b/src/mainboard/amd/gardenia/BiosCallOuts.c @@ -84,18 +84,35 @@ static AGESA_STATUS fch_initenv(UINT32 Func, UINTN FchData, VOID *ConfigPtr) } const BIOS_CALLOUT_STRUCT BiosCallouts[] = { + /* Required callouts */ {AGESA_ALLOCATE_BUFFER, agesa_AllocateBuffer }, {AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer }, + {AGESA_DO_RESET, agesa_Reset }, {AGESA_LOCATE_BUFFER, agesa_LocateBuffer }, {AGESA_READ_SPD, agesa_ReadSpd }, - {AGESA_DO_RESET, agesa_Reset }, - {AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported }, {AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp }, - {AGESA_GET_IDS_INIT_DATA, agesa_EmptyIdsInitData }, - {AGESA_HOOKBEFORE_DQS_TRAINING, agesa_NoopSuccess }, - {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess }, - {AGESA_FCH_OEM_CALLOUT, fch_initenv }, - {AGESA_GNB_GFX_GET_VBIOS_IMAGE, agesa_GfxGetVbiosImage } + {AGESA_RUNFUNC_ON_ALL_APS, agesa_RunFcnOnAllAps }, + {AMD_LATE_RUN_AP_TASK, agesa_LateRunApTask }, + {AGESA_GNB_PCIE_SLOT_RESET, agesa_PcieSlotResetControl }, + {AGESA_WAIT_FOR_ALL_APS, agesa_WaitForAllApsFinished }, + {AGESA_IDLE_AN_AP, agesa_IdleAnAp }, + + /* Optional callouts */ + {AGESA_GET_IDS_INIT_DATA, agesa_EmptyIdsInitData }, + //AgesaHeapRebase - Hook ID? + {AGESA_HOOKBEFORE_DRAM_INIT, agesa_NoopUnsupported }, + {AGESA_HOOKBEFORE_DQS_TRAINING, agesa_NoopUnsupported }, + {AGESA_EXTERNAL_2D_TRAIN_VREF_CHANGE, agesa_NoopUnsupported }, + {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopUnsupported }, + {AGESA_GNB_GFX_GET_VBIOS_IMAGE, agesa_GfxGetVbiosImage }, + {AGESA_FCH_OEM_CALLOUT, fch_initenv }, + {AGESA_EXTERNAL_VOLTAGE_ADJUST, agesa_NoopUnsupported }, + {AGESA_GNB_PCIE_CLK_REQ, agesa_NoopUnsupported }, + + /* Deprecated */ + {AGESA_HOOKBEFORE_DRAM_INIT_RECOVERY, agesa_NoopUnsupported}, + {AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported }, + }; const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts); diff --git a/src/mainboard/amd/gardenia/bootblock/BiosCallOuts.c b/src/mainboard/amd/gardenia/bootblock/BiosCallOuts.c index b0a3e23ff8..1b7a34134c 100644 --- a/src/mainboard/amd/gardenia/bootblock/BiosCallOuts.c +++ b/src/mainboard/amd/gardenia/bootblock/BiosCallOuts.c @@ -64,6 +64,7 @@ static AGESA_STATUS fch_initreset(UINT32 Func, UINTN FchData, VOID *ConfigPtr) const BIOS_CALLOUT_STRUCT BiosCallouts[] = { {AGESA_FCH_OEM_CALLOUT, fch_initreset }, + {AGESA_GNB_PCIE_SLOT_RESET, agesa_PcieSlotResetControl } }; const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts); diff --git a/src/mainboard/google/kahlee/BiosCallOuts.c b/src/mainboard/google/kahlee/BiosCallOuts.c index f651876eeb..2e57166b69 100644 --- a/src/mainboard/google/kahlee/BiosCallOuts.c +++ b/src/mainboard/google/kahlee/BiosCallOuts.c @@ -65,18 +65,35 @@ static AGESA_STATUS fch_initenv(UINT32 Func, UINTN FchData, VOID *ConfigPtr) } const BIOS_CALLOUT_STRUCT BiosCallouts[] = { + /* Required callouts */ {AGESA_ALLOCATE_BUFFER, agesa_AllocateBuffer }, {AGESA_DEALLOCATE_BUFFER, agesa_DeallocateBuffer }, + {AGESA_DO_RESET, agesa_Reset }, {AGESA_LOCATE_BUFFER, agesa_LocateBuffer }, {AGESA_READ_SPD, agesa_ReadSpd }, - {AGESA_DO_RESET, agesa_Reset }, - {AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported }, {AGESA_RUNFUNC_ONAP, agesa_RunFuncOnAp }, - {AGESA_GET_IDS_INIT_DATA, agesa_EmptyIdsInitData }, - {AGESA_HOOKBEFORE_DQS_TRAINING, agesa_NoopSuccess }, - {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopSuccess }, - {AGESA_FCH_OEM_CALLOUT, fch_initenv }, - {AGESA_GNB_GFX_GET_VBIOS_IMAGE, agesa_GfxGetVbiosImage } + {AGESA_RUNFUNC_ON_ALL_APS, agesa_RunFcnOnAllAps }, + {AMD_LATE_RUN_AP_TASK, agesa_LateRunApTask }, + {AGESA_GNB_PCIE_SLOT_RESET, agesa_PcieSlotResetControl }, + {AGESA_WAIT_FOR_ALL_APS, agesa_WaitForAllApsFinished }, + {AGESA_IDLE_AN_AP, agesa_IdleAnAp }, + + /* Optional callouts */ + {AGESA_GET_IDS_INIT_DATA, agesa_EmptyIdsInitData }, + //AgesaHeapRebase - Hook ID? + {AGESA_HOOKBEFORE_DRAM_INIT, agesa_NoopUnsupported }, + {AGESA_HOOKBEFORE_DQS_TRAINING, agesa_NoopUnsupported }, + {AGESA_EXTERNAL_2D_TRAIN_VREF_CHANGE, agesa_NoopUnsupported }, + {AGESA_HOOKBEFORE_EXIT_SELF_REF, agesa_NoopUnsupported }, + {AGESA_GNB_GFX_GET_VBIOS_IMAGE, agesa_GfxGetVbiosImage }, + {AGESA_FCH_OEM_CALLOUT, fch_initenv }, + {AGESA_EXTERNAL_VOLTAGE_ADJUST, agesa_NoopUnsupported }, + {AGESA_GNB_PCIE_CLK_REQ, agesa_NoopUnsupported }, + + /* Deprecated */ + {AGESA_HOOKBEFORE_DRAM_INIT_RECOVERY, agesa_NoopUnsupported}, + {AGESA_READ_SPD_RECOVERY, agesa_NoopUnsupported }, + }; const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts); diff --git a/src/mainboard/google/kahlee/bootblock/BiosCallOuts.c b/src/mainboard/google/kahlee/bootblock/BiosCallOuts.c index 162fc50826..4dce04226d 100644 --- a/src/mainboard/google/kahlee/bootblock/BiosCallOuts.c +++ b/src/mainboard/google/kahlee/bootblock/BiosCallOuts.c @@ -40,6 +40,7 @@ static AGESA_STATUS fch_initreset(UINT32 Func, UINTN FchData, VOID *ConfigPtr) const BIOS_CALLOUT_STRUCT BiosCallouts[] = { {AGESA_FCH_OEM_CALLOUT, fch_initreset }, + {AGESA_GNB_PCIE_SLOT_RESET, agesa_PcieSlotResetControl } }; const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts);