1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef AMD_BLOCK_CALLOUTS_AGESA_H
4 #define AMD_BLOCK_CALLOUTS_AGESA_H
6 #include <amdblocks/agesawrapper.h>
9 #define BIOS_HEAP_SIZE 0x30000
10 #define BSP_STACK_BASE_ADDR 0x30000
12 typedef struct _BIOS_HEAP_MANAGER
{
13 uint32_t StartOfAllocatedNodes
;
14 uint32_t StartOfFreedNodes
;
17 typedef struct _BIOS_BUFFER_NODE
{
18 uint32_t BufferHandle
;
20 uint32_t NextNodeOffset
;
23 AGESA_STATUS
agesa_GetTempHeapBase(uint32_t Func
, uintptr_t Data
,
25 AGESA_STATUS
agesa_HeapRebase(uint32_t Func
, uintptr_t Data
, void *ConfigPtr
);
27 AGESA_STATUS
agesa_AllocateBuffer(uint32_t Func
, uintptr_t Data
,
29 AGESA_STATUS
agesa_DeallocateBuffer(uint32_t Func
, uintptr_t Data
,
31 AGESA_STATUS
agesa_LocateBuffer(uint32_t Func
, uintptr_t Data
, void *ConfigPtr
);
33 AGESA_STATUS
agesa_NoopUnsupported(uint32_t Func
, uintptr_t Data
,
35 AGESA_STATUS
agesa_NoopSuccess(uint32_t Func
, uintptr_t Data
, void *ConfigPtr
);
36 AGESA_STATUS
agesa_EmptyIdsInitData(uint32_t Func
, uintptr_t Data
,
38 AGESA_STATUS
agesa_Reset(uint32_t Func
, uintptr_t Data
, void *ConfigPtr
);
39 AGESA_STATUS
agesa_RunFuncOnAp(uint32_t Func
, uintptr_t Data
, void *ConfigPtr
);
40 AGESA_STATUS
agesa_GfxGetVbiosImage(uint32_t Func
, uintptr_t FchData
,
43 AGESA_STATUS
agesa_ReadSpd(uint32_t Func
, uintptr_t Data
, void *ConfigPtr
);
44 AGESA_STATUS
agesa_RunFcnOnAllAps(uint32_t Func
, uintptr_t Data
,
46 AGESA_STATUS
agesa_PcieSlotResetControl(uint32_t Func
, uintptr_t Data
,
48 AGESA_STATUS
agesa_WaitForAllApsFinished(uint32_t Func
, uintptr_t Data
,
50 AGESA_STATUS
agesa_IdleAnAp(uint32_t Func
, uintptr_t Data
, void *ConfigPtr
);
52 AGESA_STATUS
GetBiosCallout(uint32_t Func
, uintptr_t Data
, void *ConfigPtr
);
54 AGESA_STATUS
agesa_fch_initreset(uint32_t Func
, uintptr_t FchData
,
56 AGESA_STATUS
agesa_fch_initenv(uint32_t Func
, uintptr_t FchData
,
58 AGESA_STATUS
agesa_HaltThisAp(uint32_t Func
, uintptr_t Data
, void *ConfigPtr
);
60 void platform_FchParams_reset(FCH_RESET_DATA_BLOCK
*FchParams_reset
);
61 void platform_FchParams_env(FCH_DATA_BLOCK
*FchParams_env
);
62 AGESA_STATUS
platform_PcieSlotResetControl(uint32_t Func
, uintptr_t Data
,
66 CALLOUT_ENTRY CalloutPtr
;
67 } BIOS_CALLOUT_STRUCT
;
69 extern const BIOS_CALLOUT_STRUCT BiosCallouts
[];
70 extern const int BiosCalloutsLen
;
72 #endif /* AMD_BLOCK_CALLOUTS_AGESA_H */