AGESA f15tn f16kb: Implement common FCH callout
This FCH_OEM_CALLOUT bypasses API and uses structures that are private to AGESA. Attempt to clean it up by first clarifying when it is used. Change-Id: I63aa0f586f73e97d615b8596d73728edbaeb0a2d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/19179 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
e95b6b291e
commit
bf201d58eb
2 changed files with 37 additions and 0 deletions
|
@ -42,6 +42,13 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINTN Data, VOID *ConfigPtr)
|
|||
if (status != AGESA_UNSUPPORTED)
|
||||
return status;
|
||||
|
||||
#if HAS_AGESA_FCH_OEM_CALLOUT
|
||||
if (!HAS_LEGACY_WRAPPER && Func == AGESA_FCH_OEM_CALLOUT) {
|
||||
agesa_fch_oem_config(Data, ConfigPtr);
|
||||
return AGESA_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i < BiosCalloutsLen; i++) {
|
||||
if (BiosCallouts[i].CalloutName == Func)
|
||||
break;
|
||||
|
@ -177,3 +184,19 @@ AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr)
|
|||
#endif
|
||||
return Status;
|
||||
}
|
||||
|
||||
#if HAS_AGESA_FCH_OEM_CALLOUT
|
||||
void agesa_fch_oem_config(uintptr_t Data, AMD_CONFIG_PARAMS *StdHeader)
|
||||
{
|
||||
/* FIXME: CAR_GLOBAL needed here to pass sysinfo. */
|
||||
struct sysinfo *cb_NA = NULL;
|
||||
|
||||
if (StdHeader->Func == AMD_INIT_RESET) {
|
||||
printk(BIOS_DEBUG, "Fch OEM config in INIT RESET\n");
|
||||
board_FCH_InitReset(cb_NA, (FCH_RESET_DATA_BLOCK *)Data);
|
||||
} else if (StdHeader->Func == AMD_INIT_ENV) {
|
||||
printk(BIOS_DEBUG, "Fch OEM config in INIT ENV\n");
|
||||
board_FCH_InitEnv(cb_NA, (FCH_DATA_BLOCK *)Data);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -95,4 +95,18 @@ typedef void AMD_S3SAVE_PARAMS;
|
|||
#endif
|
||||
void platform_AfterS3Save(struct sysinfo *cb, AMD_S3SAVE_PARAMS *S3Save);
|
||||
|
||||
/* FCH callouts, not used with CIMx. */
|
||||
#define HAS_AGESA_FCH_OEM_CALLOUT \
|
||||
IS_ENABLED(CONFIG_SOUTHBRIDGE_AMD_AGESA_HUDSON) || \
|
||||
IS_ENABLED(CONFIG_SOUTHBRIDGE_AMD_AGESA_YANGTZE) || \
|
||||
IS_ENABLED(CONFIG_SOUTHBRIDGE_AMD_AGESA_BOLTON)
|
||||
|
||||
#if HAS_AGESA_FCH_OEM_CALLOUT
|
||||
/* FIXME: Structures included here were supposed to be private to AGESA. */
|
||||
#include <FchCommonCfg.h>
|
||||
void agesa_fch_oem_config(uintptr_t Data, AMD_CONFIG_PARAMS *StdHeader);
|
||||
void board_FCH_InitReset(struct sysinfo *cb, FCH_RESET_DATA_BLOCK *FchReset);
|
||||
void board_FCH_InitEnv(struct sysinfo *cb, FCH_DATA_BLOCK *FchEnv);
|
||||
#endif
|
||||
|
||||
#endif /* _STATE_MACHINE_H_ */
|
||||
|
|
Loading…
Reference in a new issue