jetway/nf81-t56n-lf: Revert change on function prototypes
These function prototypes to remain identical across all AGESA families. Change-Id: If2a0a08fa7122e6becded37d032d3c40bde2d149 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5656 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
parent
f15e53a730
commit
6711dce552
|
@ -77,7 +77,7 @@ STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] =
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
AGESA_STATUS GetBiosCallout (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
AGESA_STATUS CalloutStatus;
|
AGESA_STATUS CalloutStatus;
|
||||||
|
@ -99,10 +99,10 @@ AGESA_STATUS GetBiosCallout (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
||||||
return CalloutStatus;
|
return CalloutStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS BiosAllocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
uint32_t AvailableHeapSize;
|
uint32_t AvailableHeapSize;
|
||||||
uint8_t *BiosHeapBaseAddr;
|
UINT8 *BiosHeapBaseAddr;
|
||||||
uint32_t CurrNodeOffset;
|
uint32_t CurrNodeOffset;
|
||||||
uint32_t PrevNodeOffset;
|
uint32_t PrevNodeOffset;
|
||||||
uint32_t FreedNodeOffset;
|
uint32_t FreedNodeOffset;
|
||||||
|
@ -121,7 +121,7 @@ AGESA_STATUS BiosAllocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
||||||
AllocParams->BufferPointer = NULL;
|
AllocParams->BufferPointer = NULL;
|
||||||
|
|
||||||
AvailableHeapSize = BIOS_HEAP_SIZE - sizeof (BIOS_HEAP_MANAGER);
|
AvailableHeapSize = BIOS_HEAP_SIZE - sizeof (BIOS_HEAP_MANAGER);
|
||||||
BiosHeapBaseAddr = (uint8_t *) GetHeapBase(&(AllocParams->StdHeader));
|
BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader));
|
||||||
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
|
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
|
||||||
|
|
||||||
printk(BIOS_SPEW, "%s BiosHeapBaseAddr: %x\n", __func__, (u32) BiosHeapBaseAddr);
|
printk(BIOS_SPEW, "%s BiosHeapBaseAddr: %x\n", __func__, (u32) BiosHeapBaseAddr);
|
||||||
|
@ -230,10 +230,10 @@ AGESA_STATUS BiosAllocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
||||||
return AGESA_SUCCESS;
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS BiosDeallocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
|
|
||||||
uint8_t *BiosHeapBaseAddr;
|
UINT8 *BiosHeapBaseAddr;
|
||||||
uint32_t AllocNodeOffset;
|
uint32_t AllocNodeOffset;
|
||||||
uint32_t PrevNodeOffset;
|
uint32_t PrevNodeOffset;
|
||||||
uint32_t NextNodeOffset;
|
uint32_t NextNodeOffset;
|
||||||
|
@ -248,7 +248,7 @@ AGESA_STATUS BiosDeallocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr
|
||||||
|
|
||||||
AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
|
AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
|
||||||
|
|
||||||
BiosHeapBaseAddr = (uint8_t *) GetHeapBase(&(AllocParams->StdHeader));
|
BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader));
|
||||||
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
|
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
|
||||||
|
|
||||||
/* Find target node to deallocate in list of allocated nodes.
|
/* Find target node to deallocate in list of allocated nodes.
|
||||||
|
@ -349,17 +349,17 @@ AGESA_STATUS BiosDeallocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr
|
||||||
return AGESA_SUCCESS;
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS BiosLocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosLocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
uint32_t AllocNodeOffset;
|
uint32_t AllocNodeOffset;
|
||||||
uint8_t *BiosHeapBaseAddr;
|
UINT8 *BiosHeapBaseAddr;
|
||||||
BIOS_BUFFER_NODE *AllocNodePtr;
|
BIOS_BUFFER_NODE *AllocNodePtr;
|
||||||
BIOS_HEAP_MANAGER *BiosHeapBasePtr;
|
BIOS_HEAP_MANAGER *BiosHeapBasePtr;
|
||||||
AGESA_BUFFER_PARAMS *AllocParams;
|
AGESA_BUFFER_PARAMS *AllocParams;
|
||||||
|
|
||||||
AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
|
AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
|
||||||
|
|
||||||
BiosHeapBaseAddr = (uint8_t *) GetHeapBase(&(AllocParams->StdHeader));
|
BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader));
|
||||||
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
|
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
|
||||||
|
|
||||||
AllocNodeOffset = BiosHeapBasePtr->StartOfAllocatedNodes;
|
AllocNodeOffset = BiosHeapBasePtr->StartOfAllocatedNodes;
|
||||||
|
@ -383,7 +383,7 @@ AGESA_STATUS BiosLocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS BiosRunFuncOnAp (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosRunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ AGESA_STATUS BiosRunFuncOnAp (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS BiosReset (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
uint8_t Value;
|
uint8_t Value;
|
||||||
|
@ -427,7 +427,7 @@ AGESA_STATUS BiosReset (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS BiosReadSpd (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
#ifdef __PRE_RAM__
|
#ifdef __PRE_RAM__
|
||||||
|
@ -439,19 +439,19 @@ AGESA_STATUS BiosReadSpd (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
AGESA_STATUS BiosDefaultRet (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosDefaultRet (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
return AGESA_UNSUPPORTED;
|
return AGESA_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the host environment interface to provide a user hook opportunity. */
|
/* Call the host environment interface to provide a user hook opportunity. */
|
||||||
AGESA_STATUS BiosHookBeforeDQSTraining (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosHookBeforeDQSTraining (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
return AGESA_SUCCESS;
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the host environment interface to provide a user hook opportunity. */
|
/* Call the host environment interface to provide a user hook opportunity. */
|
||||||
AGESA_STATUS BiosHookBeforeDramInit (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
/* Unlike e.g. AMD Inagua, Persimmon is unable to vary the RAM voltage.
|
/* Unlike e.g. AMD Inagua, Persimmon is unable to vary the RAM voltage.
|
||||||
* Make sure the right speed settings are selected.
|
* Make sure the right speed settings are selected.
|
||||||
|
@ -461,19 +461,19 @@ AGESA_STATUS BiosHookBeforeDramInit (uint32_t Func, uint32_t Data, void *ConfigP
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the host environment interface to provide a user hook opportunity. */
|
/* Call the host environment interface to provide a user hook opportunity. */
|
||||||
AGESA_STATUS BiosHookBeforeDramInitRecovery (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosHookBeforeDramInitRecovery (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
return AGESA_SUCCESS;
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the host environment interface to provide a user hook opportunity. */
|
/* Call the host environment interface to provide a user hook opportunity. */
|
||||||
AGESA_STATUS BiosHookBeforeExitSelfRefresh (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosHookBeforeExitSelfRefresh (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
return AGESA_SUCCESS;
|
return AGESA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PCIE slot reset control */
|
/* PCIE slot reset control */
|
||||||
AGESA_STATUS BiosGnbPcieSlotReset (uint32_t Func, uint32_t Data, void *ConfigPtr)
|
AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
{
|
{
|
||||||
AGESA_STATUS Status;
|
AGESA_STATUS Status;
|
||||||
uint32_t FcnData;
|
uint32_t FcnData;
|
||||||
|
|
|
@ -23,52 +23,51 @@
|
||||||
#include "Porting.h"
|
#include "Porting.h"
|
||||||
#include "AGESA.h"
|
#include "AGESA.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#define BIOS_HEAP_START_ADDRESS 0x10000 /* HEAP during cold boot */
|
#define BIOS_HEAP_START_ADDRESS 0x10000 /* HEAP during cold boot */
|
||||||
#define BIOS_HEAP_SIZE 0x20000
|
#define BIOS_HEAP_SIZE 0x20000
|
||||||
#define BSP_STACK_BASE_ADDR 0x30000
|
#define BSP_STACK_BASE_ADDR 0x30000
|
||||||
|
|
||||||
typedef struct _BIOS_HEAP_MANAGER {
|
typedef struct _BIOS_HEAP_MANAGER {
|
||||||
//uint32_t AvailableSize;
|
//UINT32 AvailableSize;
|
||||||
uint32_t StartOfAllocatedNodes;
|
UINT32 StartOfAllocatedNodes;
|
||||||
uint32_t StartOfFreedNodes;
|
UINT32 StartOfFreedNodes;
|
||||||
} BIOS_HEAP_MANAGER;
|
} BIOS_HEAP_MANAGER;
|
||||||
|
|
||||||
typedef struct _BIOS_BUFFER_NODE {
|
typedef struct _BIOS_BUFFER_NODE {
|
||||||
uint32_t BufferHandle;
|
UINT32 BufferHandle;
|
||||||
uint32_t BufferSize;
|
UINT32 BufferSize;
|
||||||
uint32_t NextNodeOffset;
|
UINT32 NextNodeOffset;
|
||||||
} BIOS_BUFFER_NODE;
|
} BIOS_BUFFER_NODE;
|
||||||
|
/*
|
||||||
/* Callouts */
|
* CALLOUTS
|
||||||
AGESA_STATUS GetBiosCallout (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
|
||||||
|
|
||||||
/* Required Callouts
|
|
||||||
* AGESA Advanced Callouts - CPU
|
|
||||||
*/
|
*/
|
||||||
AGESA_STATUS BiosAllocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
AGESA_STATUS BiosDeallocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
|
||||||
AGESA_STATUS BiosLocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
|
||||||
AGESA_STATUS BiosRunFuncOnAp (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
|
||||||
AGESA_STATUS BiosReset (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
|
||||||
AGESA_STATUS BiosGetIdsInitData (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
|
||||||
|
|
||||||
/* AGESA Advanced Callouts - Memory */
|
/* REQUIRED CALLOUTS
|
||||||
AGESA_STATUS BiosReadSpd (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
* AGESA ADVANCED CALLOUTS - CPU
|
||||||
|
*/
|
||||||
|
AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
|
AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
|
AGESA_STATUS BiosLocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
|
AGESA_STATUS BiosRunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
|
AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
|
AGESA_STATUS BiosGetIdsInitData (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
|
|
||||||
/* BIOS default RET */
|
/* AGESA ADVANCED CALLOUTS - MEMORY */
|
||||||
AGESA_STATUS BiosDefaultRet (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
AGESA_STATUS BiosReadSpd (UINT32 Func,UINT32 Data,VOID *ConfigPtr);
|
||||||
|
|
||||||
/* Call the host environment interface to provide a user hook opportunity. */
|
/* BIOS DEFAULT RET */
|
||||||
AGESA_STATUS BiosHookBeforeDQSTraining (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
AGESA_STATUS BiosDefaultRet (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
/* Call the host environment interface to provide a user hook opportunity. */
|
|
||||||
AGESA_STATUS BiosHookBeforeDramInit (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
/* Call the host environment interface to provide a user hook opportunity. */
|
||||||
/* Call the host environment interface to provide a user hook opportunity. */
|
AGESA_STATUS BiosHookBeforeDQSTraining (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
AGESA_STATUS BiosHookBeforeDramInitRecovery (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
/* Call the host environment interface to provide a user hook opportunity. */
|
||||||
/* Call the host environment interface to provide a user hook opportunity. */
|
AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
AGESA_STATUS BiosHookBeforeExitSelfRefresh (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
/* Call the host environment interface to provide a user hook opportunity. */
|
||||||
|
AGESA_STATUS BiosHookBeforeDramInitRecovery (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
|
/* Call the host environment interface to provide a user hook opportunity. */
|
||||||
|
AGESA_STATUS BiosHookBeforeExitSelfRefresh (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
/* PCIE slot reset control */
|
/* PCIE slot reset control */
|
||||||
AGESA_STATUS BiosGnbPcieSlotReset (uint32_t Func, uint32_t Data, void *ConfigPtr);
|
AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
|
||||||
|
|
||||||
#endif /* _BIOS_CALLOUT_H_ */
|
#endif //_BIOS_CALLOUT_H_
|
||||||
|
|
|
@ -181,16 +181,16 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t GetHeapBase(
|
UINT32 GetHeapBase(
|
||||||
AMD_CONFIG_PARAMS *StdHeader
|
AMD_CONFIG_PARAMS *StdHeader
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
uint32_t heap;
|
UINT32 heap;
|
||||||
|
|
||||||
#if CONFIG_HAVE_ACPI_RESUME
|
#if CONFIG_HAVE_ACPI_RESUME
|
||||||
/* Both romstage and ramstage has this S3 detect. */
|
/* Both romstage and ramstage has this S3 detect. */
|
||||||
if (acpi_get_sleep_type() == 3)
|
if (acpi_get_sleep_type() == 3)
|
||||||
heap = (uint32_t)cbmem_find(CBMEM_ID_RESUME_SCRATCH) + (CONFIG_HIGH_SCRATCH_MEMORY_SIZE - BIOS_HEAP_SIZE); /* himem_heap_base + high_stack_size */
|
heap = (UINT32)cbmem_find(CBMEM_ID_RESUME_SCRATCH) + (CONFIG_HIGH_SCRATCH_MEMORY_SIZE - BIOS_HEAP_SIZE); /* himem_heap_base + high_stack_size */
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
heap = BIOS_HEAP_START_ADDRESS; /* low mem */
|
heap = BIOS_HEAP_START_ADDRESS; /* low mem */
|
||||||
|
|
|
@ -42,8 +42,8 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t CalloutName;
|
UINT32 CalloutName;
|
||||||
AGESA_STATUS (*CalloutPtr) (uint32_t Func, uint32_t Data, void* ConfigPtr);
|
AGESA_STATUS (*CalloutPtr) (UINT32 Func, UINT32 Data, VOID* ConfigPtr);
|
||||||
} BIOS_CALLOUT_STRUCT;
|
} BIOS_CALLOUT_STRUCT;
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,6 +64,6 @@ AGESA_STATUS agesawrapper_amds3laterestore(void);
|
||||||
AGESA_STATUS agesawrapper_amdlaterunaptask(uint32_t, uint32_t, void *);
|
AGESA_STATUS agesawrapper_amdlaterunaptask(uint32_t, uint32_t, void *);
|
||||||
void * agesawrapper_getlateinitptr(int);
|
void * agesawrapper_getlateinitptr(int);
|
||||||
|
|
||||||
uint32_t GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
|
UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
|
||||||
|
|
||||||
#endif /* _AGESAWRAPPER_H_ */
|
#endif /* _AGESAWRAPPER_H_ */
|
||||||
|
|
Loading…
Reference in New Issue