summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-04-12 04:12:14 +1000
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-04-13 05:32:09 +0200
commitc21bd8839b68dbc46b11e50697b041ba2b20d59c (patch)
tree4222369611a68d64954242d4b6929c04263e9952 /src/mainboard
parente2f3bfc5b372227223c3ce869e2c82e1dffd469a (diff)
jetway/nf81-t56n-lf: Replace AGESA types with stdint types
Try to use void and uint*_t type specifiers in place of VOID and UINT* respectively. Use const in place of CONST type modifier. Remove some useless type casts. A few unneeded comments containing the AGESA redefenied types are also removed. Change-Id: I4bff96a222507fc35333488331c3f35ef1158132 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/5486 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c105
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h54
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c16
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h5
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c4
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c188
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h34
-rw-r--r--src/mainboard/jetway/nf81-t56n-lf/buildOpts.c22
8 files changed, 186 insertions, 242 deletions
diff --git a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
index 1d2aef02a1..0502e5a573 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.c
@@ -24,6 +24,7 @@
#include <northbridge/amd/agesa/family14/dimmSpd.h>
#include <vendorcode/amd/agesa/f14/Proc/CPU/heapManager.h>
#include <vendorcode/amd/cimx/sb800/SB800.h>
+#include <stdint.h>
STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
@@ -76,11 +77,11 @@ STATIC BIOS_CALLOUT_STRUCT BiosCallouts[] =
},
};
-AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS GetBiosCallout (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
- UINTN i;
+ size_t i;
AGESA_STATUS CalloutStatus;
- UINTN CallOutCount = sizeof (BiosCallouts) / sizeof (BiosCallouts [0]);
+ size_t CallOutCount = sizeof (BiosCallouts) / sizeof (BiosCallouts [0]);
/*
* printk(BIOS_SPEW,"%s function: %x\n", __func__, (u32) Func);
@@ -98,16 +99,16 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
return CalloutStatus;
}
-AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS BiosAllocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
- UINT32 AvailableHeapSize;
- UINT8 *BiosHeapBaseAddr;
- UINT32 CurrNodeOffset;
- UINT32 PrevNodeOffset;
- UINT32 FreedNodeOffset;
- UINT32 BestFitNodeOffset;
- UINT32 BestFitPrevNodeOffset;
- UINT32 NextFreeOffset;
+ uint32_t AvailableHeapSize;
+ uint8_t *BiosHeapBaseAddr;
+ uint32_t CurrNodeOffset;
+ uint32_t PrevNodeOffset;
+ uint32_t FreedNodeOffset;
+ uint32_t BestFitNodeOffset;
+ uint32_t BestFitPrevNodeOffset;
+ uint32_t NextFreeOffset;
BIOS_BUFFER_NODE *CurrNodePtr;
BIOS_BUFFER_NODE *FreedNodePtr;
BIOS_BUFFER_NODE *BestFitNodePtr;
@@ -120,7 +121,7 @@ AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
AllocParams->BufferPointer = NULL;
AvailableHeapSize = BIOS_HEAP_SIZE - sizeof (BIOS_HEAP_MANAGER);
- BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader));
+ BiosHeapBaseAddr = (uint8_t *) GetHeapBase(&(AllocParams->StdHeader));
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
printk(BIOS_SPEW, "%s BiosHeapBaseAddr: %x\n", __func__, (u32) BiosHeapBaseAddr);
@@ -132,7 +133,7 @@ AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
CurrNodePtr->BufferHandle = AllocParams->BufferHandle;
CurrNodePtr->BufferSize = AllocParams->BufferLength;
CurrNodePtr->NextNodeOffset = 0;
- AllocParams->BufferPointer = (UINT8 *) CurrNodePtr + sizeof (BIOS_BUFFER_NODE);
+ AllocParams->BufferPointer = (uint8_t *) CurrNodePtr + sizeof (BIOS_BUFFER_NODE);
/* Update the remaining free space */
FreedNodeOffset = CurrNodeOffset + CurrNodePtr->BufferSize + sizeof (BIOS_BUFFER_NODE);
@@ -222,22 +223,22 @@ AGESA_STATUS BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
BestFitNodePtr->NextNodeOffset = 0;
/* Remove BestFitNode from list of Freed nodes */
- AllocParams->BufferPointer = (UINT8 *) BestFitNodePtr + sizeof (BIOS_BUFFER_NODE);
+ AllocParams->BufferPointer = (uint8_t *) BestFitNodePtr + sizeof (BIOS_BUFFER_NODE);
}
}
return AGESA_SUCCESS;
}
-AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS BiosDeallocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
- UINT8 *BiosHeapBaseAddr;
- UINT32 AllocNodeOffset;
- UINT32 PrevNodeOffset;
- UINT32 NextNodeOffset;
- UINT32 FreedNodeOffset;
- UINT32 EndNodeOffset;
+ uint8_t *BiosHeapBaseAddr;
+ uint32_t AllocNodeOffset;
+ uint32_t PrevNodeOffset;
+ uint32_t NextNodeOffset;
+ uint32_t FreedNodeOffset;
+ uint32_t EndNodeOffset;
BIOS_BUFFER_NODE *AllocNodePtr;
BIOS_BUFFER_NODE *PrevNodePtr;
BIOS_BUFFER_NODE *FreedNodePtr;
@@ -247,7 +248,7 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
- BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader));
+ BiosHeapBaseAddr = (uint8_t *) GetHeapBase(&(AllocParams->StdHeader));
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
/* Find target node to deallocate in list of allocated nodes.
@@ -271,7 +272,7 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
PrevNodePtr->NextNodeOffset = AllocNodePtr->NextNodeOffset;
/* Zero out the buffer, and clear the BufferHandle */
- LibAmdMemFill ((UINT8 *)AllocNodePtr + sizeof (BIOS_BUFFER_NODE), 0, AllocNodePtr->BufferSize, &(AllocParams->StdHeader));
+ LibAmdMemFill ((uint8_t *)AllocNodePtr + sizeof (BIOS_BUFFER_NODE), 0, AllocNodePtr->BufferSize, &(AllocParams->StdHeader));
AllocNodePtr->BufferHandle = 0;
AllocNodePtr->BufferSize += sizeof (BIOS_BUFFER_NODE);
@@ -348,17 +349,17 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
-AGESA_STATUS BiosLocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS BiosLocateBuffer (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
- UINT32 AllocNodeOffset;
- UINT8 *BiosHeapBaseAddr;
+ uint32_t AllocNodeOffset;
+ uint8_t *BiosHeapBaseAddr;
BIOS_BUFFER_NODE *AllocNodePtr;
BIOS_HEAP_MANAGER *BiosHeapBasePtr;
AGESA_BUFFER_PARAMS *AllocParams;
AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
- BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader));
+ BiosHeapBaseAddr = (uint8_t *) GetHeapBase(&(AllocParams->StdHeader));
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
AllocNodeOffset = BiosHeapBasePtr->StartOfAllocatedNodes;
@@ -375,14 +376,14 @@ AGESA_STATUS BiosLocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
}
}
- AllocParams->BufferPointer = (UINT8 *) ((UINT8 *) AllocNodePtr + sizeof (BIOS_BUFFER_NODE));
+ AllocParams->BufferPointer = (uint8_t *) ((uint8_t *) AllocNodePtr + sizeof (BIOS_BUFFER_NODE));
AllocParams->BufferLength = AllocNodePtr->BufferSize;
return AGESA_SUCCESS;
}
-AGESA_STATUS BiosRunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS BiosRunFuncOnAp (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
AGESA_STATUS Status;
@@ -390,11 +391,11 @@ AGESA_STATUS BiosRunFuncOnAp (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
return Status;
}
-AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS BiosReset (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
AGESA_STATUS Status;
- UINT8 Value;
- UINTN ResetType;
+ uint8_t Value;
+ uint32_t ResetType;
AMD_CONFIG_PARAMS *StdHeader;
ResetType = Data;
@@ -426,7 +427,7 @@ AGESA_STATUS BiosReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
return Status;
}
-AGESA_STATUS BiosReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS BiosReadSpd (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
AGESA_STATUS Status;
#ifdef __PRE_RAM__
@@ -438,17 +439,19 @@ AGESA_STATUS BiosReadSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
return Status;
}
-AGESA_STATUS BiosDefaultRet (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS BiosDefaultRet (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
return AGESA_UNSUPPORTED;
}
-/* Call the host environment interface to provide a user hook opportunity. */
-AGESA_STATUS BiosHookBeforeDQSTraining (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+
+/* Call the host environment interface to provide a user hook opportunity. */
+AGESA_STATUS BiosHookBeforeDQSTraining (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
return AGESA_SUCCESS;
}
-/* Call the host environment interface to provide a user hook opportunity. */
-AGESA_STATUS BiosHookBeforeDramInit (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)
{
// Unlike e.g. AMD Inagua, Persimmon is unable to vary the RAM voltage.
// Make sure the right speed settings are selected.
@@ -456,28 +459,28 @@ AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
-/* 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 BiosHookBeforeDramInitRecovery (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
return AGESA_SUCCESS;
}
-/* Call the host environment interface to provide a user hook opportunity. */
-AGESA_STATUS BiosHookBeforeExitSelfRefresh (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+/* Call the host environment interface to provide a user hook opportunity. */
+AGESA_STATUS BiosHookBeforeExitSelfRefresh (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
return AGESA_SUCCESS;
}
/* PCIE slot reset control */
-AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
+AGESA_STATUS BiosGnbPcieSlotReset (uint32_t Func, uint32_t Data, void *ConfigPtr)
{
AGESA_STATUS Status;
- UINTN FcnData;
+ uint32_t FcnData;
PCIe_SLOT_RESET_INFO *ResetInfo;
- UINT32 GpioMmioAddr;
- UINT32 AcpiMmioAddr;
- UINT8 Data8;
- UINT16 Data16;
+ uint32_t GpioMmioAddr;
+ uint32_t AcpiMmioAddr;
+ uint8_t Data8;
+ uint16_t Data16;
FcnData = Data;
ResetInfo = ConfigPtr;
@@ -488,7 +491,7 @@ AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
WriteIo8(0xCD6, 0x26);
Data8 = ReadIo8(0xCD7);
Data16|=Data8;
- AcpiMmioAddr = (UINT32)Data16 << 16;
+ AcpiMmioAddr = (uint32_t)Data16 << 16;
Status = AGESA_UNSUPPORTED;
GpioMmioAddr = AcpiMmioAddr + GPIO_BASE;
switch (ResetInfo->ResetId)
@@ -497,7 +500,7 @@ AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
switch (ResetInfo->ResetControl) {
case AssertSlotReset:
Data8 = Read64Mem8(GpioMmioAddr+SB_GPIO_REG50);
- Data8 &= ~(UINT8)BIT6 ;
+ Data8 &= ~(uint8_t)BIT6 ;
Write64Mem8(GpioMmioAddr+SB_GPIO_REG50, Data8);
Status = AGESA_SUCCESS;
break;
diff --git a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h
index c4f4f709d4..1d63f9b926 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h
+++ b/src/mainboard/jetway/nf81-t56n-lf/BiosCallOuts.h
@@ -23,51 +23,53 @@
#include "Porting.h"
#include "AGESA.h"
+#include <stdint.h>
+
#define BIOS_HEAP_START_ADDRESS 0x10000 /* HEAP during cold boot */
#define BIOS_HEAP_SIZE 0x20000
#define BSP_STACK_BASE_ADDR 0x30000
typedef struct _BIOS_HEAP_MANAGER {
- //UINT32 AvailableSize;
- UINT32 StartOfAllocatedNodes;
- UINT32 StartOfFreedNodes;
+ //uint32_t AvailableSize;
+ uint32_t StartOfAllocatedNodes;
+ uint32_t StartOfFreedNodes;
} BIOS_HEAP_MANAGER;
typedef struct _BIOS_BUFFER_NODE {
- UINT32 BufferHandle;
- UINT32 BufferSize;
- UINT32 NextNodeOffset;
+ uint32_t BufferHandle;
+ uint32_t BufferSize;
+ uint32_t NextNodeOffset;
} BIOS_BUFFER_NODE;
/*
* CALLOUTS
*/
-AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
+AGESA_STATUS GetBiosCallout (uint32_t Func, uint32_t Data, void *ConfigPtr);
/* REQUIRED CALLOUTS
* 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);
+AGESA_STATUS BiosAllocateBuffer (uint32_t Func, uint32_t 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 */
-AGESA_STATUS BiosReadSpd (UINT32 Func,UINT32 Data,VOID *ConfigPtr);
+/* AGESA Advanced Callouts - Memory */
+AGESA_STATUS BiosReadSpd (uint32_t Func,uint32_t Data,void *ConfigPtr);
-/* BIOS DEFAULT RET */
-AGESA_STATUS BiosDefaultRet (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
+/* BIOS default RET */
+AGESA_STATUS BiosDefaultRet (uint32_t Func, uint32_t Data, void *ConfigPtr);
-/* Call the host environment interface to provide a user hook opportunity. */
-AGESA_STATUS BiosHookBeforeDQSTraining (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
-/* Call the host environment interface to provide a user hook opportunity. */
-AGESA_STATUS BiosHookBeforeDramInit (UINT32 Func, UINT32 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);
+/* Call the host environment interface to provide a user hook opportunity. */
+AGESA_STATUS BiosHookBeforeDQSTraining (uint32_t Func, uint32_t 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. */
+AGESA_STATUS BiosHookBeforeDramInitRecovery (uint32_t Func, uint32_t Data, void *ConfigPtr);
+/* Call the host environment interface to provide a user hook opportunity. */
+AGESA_STATUS BiosHookBeforeExitSelfRefresh (uint32_t Func, uint32_t Data, void *ConfigPtr);
/* PCIE slot reset control */
-AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
+AGESA_STATUS BiosGnbPcieSlotReset (uint32_t Func, uint32_t Data, void *ConfigPtr);
#endif //_BIOS_CALLOUT_H_
diff --git a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c
index ccd3589c81..3cc9c898cf 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcie.c
@@ -38,19 +38,13 @@
* @param[in] **PeiServices
* @param[in] *InitEarly
*
- * @retval VOID
- *
**/
-/*---------------------------------------------------------------------------------------*/
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- )
+void OemCustomizeInitEarly (IN OUT AMD_EARLY_PARAMS *InitEarly)
{
- AGESA_STATUS Status;
- VOID *BrazosPcieComplexListPtr;
- VOID *BrazosPciePortPtr;
- VOID *BrazosPcieDdiPtr;
+ AGESA_STATUS Status;
+ void *BrazosPcieComplexListPtr;
+ void *BrazosPciePortPtr;
+ void *BrazosPcieDdiPtr;
ALLOCATE_HEAP_PARAMS AllocHeapParams;
diff --git a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h
index 47ed1a509d..20877f10e2 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h
+++ b/src/mainboard/jetway/nf81-t56n-lf/PlatformGnbPcieComplex.h
@@ -63,9 +63,6 @@
//3:Half-swing(-3.5db) 4:extended length (-6db) 5:extended length(-8db)
#define GNB_GPP_PORT8_HOTPLUG_SUPPORT 0 //0:Disable 1:Basic 3:Enhanced
-VOID
-OemCustomizeInitEarly (
- IN OUT AMD_EARLY_PARAMS *InitEarly
- );
+void OemCustomizeInitEarly (IN OUT AMD_EARLY_PARAMS *InitEarly);
#endif //_PLATFORM_GNB_PCIE_COMPLEX_H
diff --git a/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c b/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c
index e7772aadcc..90f556b062 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/acpi_tables.c
@@ -113,11 +113,11 @@ unsigned long acpi_fill_hest(acpi_hest_t *hest)
addr = agesawrapper_getlateinitptr(PICK_WHEA_MCE);
if (addr != NULL)
- current += acpi_create_hest_error_source(hest, current, 0, (void *)((u32)addr + 2), *(UINT16 *)addr - 2);
+ current += acpi_create_hest_error_source(hest, current, 0, (void *)((u32)addr + 2), *(uint16_t *)addr - 2);
addr = agesawrapper_getlateinitptr(PICK_WHEA_CMC);
if (addr != NULL)
- current += acpi_create_hest_error_source(hest, current, 1, (void *)((u32)addr + 2), *(UINT16 *)addr - 2);
+ current += acpi_create_hest_error_source(hest, current, 1, (void *)((u32)addr + 2), *(uint16_t *)addr - 2);
return (unsigned long)current;
}
diff --git a/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c
index 3315eab04c..c9824f1de3 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.c
@@ -49,14 +49,14 @@
#define MMCONF_ENABLE 1
/* ACPI table pointers returned by AmdInitLate */
-VOID *DmiTable = NULL;
-VOID *AcpiPstate = NULL;
-VOID *AcpiSrat = NULL;
-VOID *AcpiSlit = NULL;
+void *DmiTable = NULL;
+void *AcpiPstate = NULL;
+void *AcpiSrat = NULL;
+void *AcpiSlit = NULL;
-VOID *AcpiWheaMce = NULL;
-VOID *AcpiWheaCmc = NULL;
-VOID *AcpiAlib = NULL;
+void *AcpiWheaMce = NULL;
+void *AcpiWheaCmc = NULL;
+void *AcpiAlib = NULL;
/*------------------------------------------------------------------------------
* T Y P E D E F S A N D S T R U C T U R E S
@@ -77,7 +77,7 @@ VOID *AcpiAlib = NULL;
* L O C A L F U N C T I O N S
*------------------------------------------------------------------------------
*/
-uint32_t agesawrapper_amdinitcpuio(void)
+AGESA_STATUS agesawrapper_amdinitcpuio(void)
{
pci_devfn_t dev;
msr_t msr;
@@ -112,25 +112,21 @@ uint32_t agesawrapper_amdinitcpuio(void)
return AGESA_SUCCESS;
}
-UINT32
-agesawrapper_amdinitmmio (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitmmio(void)
{
- AGESA_STATUS Status;
- UINT64 MsrReg;
- UINT32 PciData;
+ uint64_t MsrReg;
+ uint32_t PciData;
PCI_ADDR PciAddress;
AMD_CONFIG_PARAMS StdHeader;
- UINT8 BusRangeVal = 0;
- UINT8 BusNum;
- UINT8 Index;
+ uint8_t BusRangeVal = 0;
+ uint8_t BusNum;
+ uint8_t Index;
/*
- Set the MMIO Configuration Base Address and Bus Range onto MMIO configuration base
- Address MSR register.
- */
+ * Set the MMIO Configuration Base Address and Bus Range onto MMIO
+ * configuration base Address MSR register.
+ */
for (Index = 0; Index < 8; Index++) {
BusNum = CONFIG_MMCONF_BUS_NUMBER >> Index;
@@ -140,7 +136,7 @@ agesawrapper_amdinitmmio (
}
}
- MsrReg = (CONFIG_MMCONF_BASE_ADDRESS | (UINT64)(BusRangeVal << 2) | MMCONF_ENABLE);
+ MsrReg = (CONFIG_MMCONF_BASE_ADDRESS | (uint64_t)(BusRangeVal << 2) | MMCONF_ENABLE);
LibAmdMsrWrite (0xC0010058, &MsrReg, &StdHeader);
/*
@@ -158,14 +154,10 @@ agesawrapper_amdinitmmio (
PciData = (AMD_APU_SSID<<0x10)|AMD_APU_SVID;
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
- Status = AGESA_SUCCESS;
- return (UINT32)Status;
+ return AGESA_SUCCESS;
}
-UINT32
-agesawrapper_amdinitreset (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitreset(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -188,17 +180,15 @@ agesawrapper_amdinitreset (
status = AmdInitReset ((AMD_RESET_PARAMS *)AmdParamStruct.NewStructPtr);
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+
+ return status;
}
-UINT32
-agesawrapper_amdinitearly (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitearly(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
- AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
+ AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
@@ -217,19 +207,19 @@ agesawrapper_amdinitearly (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32 GetHeapBase(
+uint32_t GetHeapBase(
AMD_CONFIG_PARAMS *StdHeader
)
{
- UINT32 heap;
+ uint32_t heap;
#if CONFIG_HAVE_ACPI_RESUME
/* Both romstage and ramstage has this S3 detect. */
if (acpi_get_sleep_type() == 3)
- heap = (UINT32)cbmem_find(CBMEM_ID_RESUME_SCRATCH) + (CONFIG_HIGH_SCRATCH_MEMORY_SIZE - BIOS_HEAP_SIZE); /* himem_heap_base + high_stack_size */
+ heap = (uint32_t)cbmem_find(CBMEM_ID_RESUME_SCRATCH) + (CONFIG_HIGH_SCRATCH_MEMORY_SIZE - BIOS_HEAP_SIZE); /* himem_heap_base + high_stack_size */
else
#endif
heap = BIOS_HEAP_START_ADDRESS; /* low mem */
@@ -237,14 +227,11 @@ UINT32 GetHeapBase(
return heap;
}
-UINT32
-agesawrapper_amdinitpost (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitpost(void)
{
AGESA_STATUS status;
- UINT16 i;
- UINT32 *HeadPtr;
+ uint16_t i;
+ uint32_t *HeadPtr;
AMD_INTERFACE_PARAMS AmdParamStruct;
BIOS_HEAP_MANAGER *BiosManagerPtr;
@@ -265,7 +252,7 @@ agesawrapper_amdinitpost (
/* Initialize heap space */
BiosManagerPtr = (BIOS_HEAP_MANAGER *)GetHeapBase(&AmdParamStruct.StdHeader);
- HeadPtr = (UINT32 *) ((UINT8 *) BiosManagerPtr + sizeof (BIOS_HEAP_MANAGER));
+ HeadPtr = (uint32_t *) ((uint8_t *) BiosManagerPtr + sizeof (BIOS_HEAP_MANAGER));
for (i = 0; i < ((BIOS_HEAP_SIZE/4) - (sizeof (BIOS_HEAP_MANAGER)/4)); i++) {
*HeadPtr = 0x00000000;
HeadPtr++;
@@ -273,18 +260,15 @@ agesawrapper_amdinitpost (
BiosManagerPtr->StartOfAllocatedNodes = 0;
BiosManagerPtr->StartOfFreedNodes = 0;
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitenv (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitenv(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
PCI_ADDR PciAddress;
- UINT32 PciValue;
+ uint32_t PciValue;
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
@@ -371,13 +355,10 @@ agesawrapper_amdinitenv (
LibAmdPciWrite (AccessWidth32, PciAddress, &PciValue, &AmdParamStruct.StdHeader);
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-VOID *
-agesawrapper_getlateinitptr (
- int pick
- )
+void * agesawrapper_getlateinitptr(int pick)
{
switch (pick) {
case PICK_DMI:
@@ -399,10 +380,7 @@ agesawrapper_getlateinitptr (
}
}
-UINT32
-agesawrapper_amdinitmid (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitmid(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -425,15 +403,12 @@ agesawrapper_amdinitmid (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amdinitlate (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitlate(void)
{
- AGESA_STATUS Status;
+ AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
AMD_LATE_PARAMS * AmdLateParamsPtr;
@@ -451,10 +426,10 @@ agesawrapper_amdinitlate (
printk (BIOS_DEBUG, "agesawrapper_amdinitlate: AmdLateParamsPtr = %X\n", (u32)AmdLateParamsPtr);
- Status = AmdInitLate (AmdLateParamsPtr);
- if (Status != AGESA_SUCCESS) {
+ status = AmdInitLate (AmdLateParamsPtr);
+ if (status != AGESA_SUCCESS) {
agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
+ ASSERT(status == AGESA_SUCCESS);
}
DmiTable = AmdLateParamsPtr->DmiTable;
@@ -475,14 +450,11 @@ agesawrapper_amdinitlate (
* AmdReleaseStruct (&AmdLateParams);
*/
- return (UINT32)Status;
+ return status;
}
#if CONFIG_HAVE_ACPI_RESUME
-UINT32
-agesawrapper_amdinitresume (
- VOID
- )
+AGESA_STATUS agesawrapper_amdinitresume(void)
{
AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdParamStruct;
@@ -514,15 +486,12 @@ agesawrapper_amdinitresume (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog();
AmdReleaseStruct (&AmdParamStruct);
- return (UINT32)status;
+ return status;
}
-UINT32
-agesawrapper_amds3laterestore (
- VOID
- )
+AGESA_STATUS agesawrapper_amds3laterestore(void)
{
- AGESA_STATUS Status;
+ AGESA_STATUS status;
AMD_INTERFACE_PARAMS AmdInterfaceParams;
AMD_S3LATE_PARAMS AmdS3LateParams;
AMD_S3LATE_PARAMS *AmdS3LateParamsPtr;
@@ -547,22 +516,19 @@ agesawrapper_amds3laterestore (
(u32 *) &AmdS3LateParamsPtr->S3DataBlock.VolatileStorageSize,
(void **) &AmdS3LateParamsPtr->S3DataBlock.VolatileStorage);
- Status = AmdS3LateRestore (AmdS3LateParamsPtr);
- if (Status != AGESA_SUCCESS) {
+ status = AmdS3LateRestore (AmdS3LateParamsPtr);
+ if (status != AGESA_SUCCESS) {
agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
+ ASSERT(status == AGESA_SUCCESS);
}
- return (UINT32)Status;
+ return status;
}
#ifndef __PRE_RAM__
-UINT32
-agesawrapper_amdS3Save (
- VOID
- )
+AGESA_STATUS agesawrapper_amdS3Save(void)
{
- AGESA_STATUS Status;
+ AGESA_STATUS status;
AMD_S3SAVE_PARAMS *AmdS3SaveParamsPtr;
AMD_INTERFACE_PARAMS AmdInterfaceParams;
S3_DATA_TYPE S3DataType;
@@ -581,15 +547,15 @@ agesawrapper_amdS3Save (
AmdS3SaveParamsPtr = (AMD_S3SAVE_PARAMS *)AmdInterfaceParams.NewStructPtr;
AmdS3SaveParamsPtr->StdHeader = AmdInterfaceParams.StdHeader;
- Status = AmdS3Save (AmdS3SaveParamsPtr);
- if (Status != AGESA_SUCCESS) {
+ status = AmdS3Save (AmdS3SaveParamsPtr);
+ if (status != AGESA_SUCCESS) {
agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
+ ASSERT(status == AGESA_SUCCESS);
}
S3DataType = S3DataTypeNonVolatile;
- Status = OemAgesaSaveS3Info (
+ status = OemAgesaSaveS3Info (
S3DataType,
AmdS3SaveParamsPtr->S3DataBlock.NvStorageSize,
AmdS3SaveParamsPtr->S3DataBlock.NvStorage);
@@ -597,7 +563,7 @@ agesawrapper_amdS3Save (
if (AmdS3SaveParamsPtr->S3DataBlock.VolatileStorageSize != 0) {
S3DataType = S3DataTypeVolatile;
- Status = OemAgesaSaveS3Info (
+ status = OemAgesaSaveS3Info (
S3DataType,
AmdS3SaveParamsPtr->S3DataBlock.VolatileStorageSize,
AmdS3SaveParamsPtr->S3DataBlock.VolatileStorage
@@ -607,19 +573,18 @@ agesawrapper_amdS3Save (
OemAgesaSaveMtrr();
AmdReleaseStruct (&AmdInterfaceParams);
- return (UINT32)Status;
+ return status;
}
#endif /* #ifndef __PRE_RAM__ */
#endif /* CONFIG_HAVE_ACPI_RESUME */
-UINT32
-agesawrapper_amdlaterunaptask (
- UINT32 Func,
- UINT32 Data,
- VOID *ConfigPtr
+AGESA_STATUS agesawrapper_amdlaterunaptask (
+ uint32_t Func,
+ uint32_t Data,
+ void *ConfigPtr
)
{
- AGESA_STATUS Status;
+ AGESA_STATUS status;
AP_EXE_PARAMS ApExeParams;
memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
@@ -631,21 +596,18 @@ agesawrapper_amdlaterunaptask (
ApExeParams.FunctionNumber = Func;
ApExeParams.RelatedDataBlock = ConfigPtr;
- Status = AmdLateRunApTask (&ApExeParams);
- if (Status != AGESA_SUCCESS) {
+ status = AmdLateRunApTask (&ApExeParams);
+ if (status != AGESA_SUCCESS) {
agesawrapper_amdreadeventlog();
- ASSERT(Status == AGESA_SUCCESS);
+ ASSERT(status == AGESA_SUCCESS);
}
- return (UINT32)Status;
+ return status;
}
-UINT32
-agesawrapper_amdreadeventlog (
- VOID
- )
+AGESA_STATUS agesawrapper_amdreadeventlog(void)
{
- AGESA_STATUS Status;
+ AGESA_STATUS status;
EVENT_PARAMS AmdEventParams;
memset(&AmdEventParams, 0, sizeof(EVENT_PARAMS));
@@ -654,13 +616,13 @@ agesawrapper_amdreadeventlog (
AmdEventParams.StdHeader.CalloutPtr = NULL;
AmdEventParams.StdHeader.Func = 0;
AmdEventParams.StdHeader.ImageBasePtr = 0;
- Status = AmdReadEventLog (&AmdEventParams);
+ status = AmdReadEventLog (&AmdEventParams);
while (AmdEventParams.EventClass != 0) {
printk(BIOS_DEBUG,"\nEventLog: EventClass = %lx, EventInfo = %lx.\n",AmdEventParams.EventClass,AmdEventParams.EventInfo);
printk(BIOS_DEBUG," Param1 = %lx, Param2 = %lx.\n",AmdEventParams.DataParam1,AmdEventParams.DataParam2);
printk(BIOS_DEBUG," Param3 = %lx, Param4 = %lx.\n",AmdEventParams.DataParam3,AmdEventParams.DataParam4);
- Status = AmdReadEventLog (&AmdEventParams);
+ status = AmdReadEventLog (&AmdEventParams);
}
- return (UINT32)Status;
+ return status;
}
diff --git a/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h
index 6af5e5f7f3..bad9b8083d 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h
+++ b/src/mainboard/jetway/nf81-t56n-lf/agesawrapper.h
@@ -54,8 +54,8 @@ enum {
*/
typedef struct {
- UINT32 CalloutName;
- AGESA_STATUS (*CalloutPtr) (UINT32 Func, UINT32 Data, VOID* ConfigPtr);
+ uint32_t CalloutName;
+ AGESA_STATUS (*CalloutPtr) (uint32_t Func, uint32_t Data, void* ConfigPtr);
} BIOS_CALLOUT_STRUCT;
/*----------------------------------------------------------------------------------------
@@ -73,23 +73,23 @@ typedef struct {
*---------------------------------------------------------------------------------------
*/
-UINT32 agesawrapper_amdinitreset (void);
-UINT32 agesawrapper_amdinitearly (void);
-UINT32 agesawrapper_amdinitenv (void);
-UINT32 agesawrapper_amdinitlate (void);
-UINT32 agesawrapper_amdinitpost (void);
-UINT32 agesawrapper_amdinitmid (void);
+AGESA_STATUS agesawrapper_amdinitreset(void);
+AGESA_STATUS agesawrapper_amdinitearly(void);
+AGESA_STATUS agesawrapper_amdinitenv(void);
+AGESA_STATUS agesawrapper_amdinitlate(void);
+AGESA_STATUS agesawrapper_amdinitpost(void);
+AGESA_STATUS agesawrapper_amdinitmid(void);
-UINT32 agesawrapper_amdreadeventlog (void);
+AGESA_STATUS agesawrapper_amdreadeventlog(void);
-uint32_t agesawrapper_amdinitcpuio (void);
-UINT32 agesawrapper_amdinitmmio (void);
-UINT32 agesawrapper_amdinitresume (void);
-UINT32 agesawrapper_amdS3Save (void);
-UINT32 agesawrapper_amds3laterestore (void);
-UINT32 agesawrapper_amdlaterunaptask (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
-void *agesawrapper_getlateinitptr (int pick);
+AGESA_STATUS agesawrapper_amdinitcpuio(void);
+AGESA_STATUS agesawrapper_amdinitmmio(void);
+AGESA_STATUS agesawrapper_amdinitresume(void);
+AGESA_STATUS agesawrapper_amdS3Save(void);
+AGESA_STATUS agesawrapper_amds3laterestore(void);
+AGESA_STATUS agesawrapper_amdlaterunaptask(uint32_t, uint32_t, void *);
+void * agesawrapper_getlateinitptr(int);
-UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
+uint32_t GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
#endif
diff --git a/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c b/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c
index c6594d314f..aa985a52e1 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/buildOpts.c
@@ -240,7 +240,7 @@
*/
/* The fixed MTRR values to be set after memory initialization. */
-CONST AP_MTRR_SETTINGS ROMDATA OntarioApMtrrSettingsList[] =
+const AP_MTRR_SETTINGS ROMDATA OntarioApMtrrSettingsList[] =
{
{ AMD_AP_MTRR_FIX64k_00000, 0x1E1E1E1E1E1E1E1Eull },
{ AMD_AP_MTRR_FIX16k_80000, 0x1E1E1E1E1E1E1E1Eull },
@@ -327,7 +327,7 @@ CONST AP_MTRR_SETTINGS ROMDATA OntarioApMtrrSettingsList[] =
* is populated, AGESA will base its settings on the data from the table. Otherwise, it will
* use its default conservative settings.
*/
-CONST PSO_ENTRY ROMDATA DefaultPlatformMemoryConfiguration[] = {
+const PSO_ENTRY ROMDATA DefaultPlatformMemoryConfiguration[] = {
//
// The following macros are supported (use comma to separate macros):
//
@@ -391,7 +391,7 @@ CONST PSO_ENTRY ROMDATA DefaultPlatformMemoryConfiguration[] = {
//DA Customer table
-CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] =
+const uint8_t AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] =
{
// Hardcoded Memory Training Values
@@ -433,18 +433,4 @@ CONST UINT8 AGESA_MEM_TABLE_ON[][sizeof (MEM_TABLE_ALIAS)] =
// TABLE END
NBACCESS (MTEnd, 0, 0, 0, 0, 0), // End of Table
};
-CONST UINT8 SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]);
-
-/* ***************************************************************************
- * Optional User code to be included into the AGESA build
- * These may be 32-bit call-out routines...
- */
-//AGESA_STATUS
-//AgesaReadSpd (
-// IN UINTN FcnData,
-// IN OUT AGESA_READ_SPD_PARAMS *ReadSpd
-// )
-//{
-// /* platform code to read an SPD... */
-// return Status;
-//}
+const uint8_t SizeOfTableON = sizeof (AGESA_MEM_TABLE_ON) / sizeof (AGESA_MEM_TABLE_ON[0]);