summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/common/block/pi/def_callouts.c
diff options
context:
space:
mode:
authorRichard Spiegel <richard.spiegel@amd.corp-partner.google.com>2018-11-06 16:32:28 -0700
committerPatrick Georgi <pgeorgi@google.com>2018-11-16 09:43:32 +0000
commit271b8a5f81b2363218eb8768754001bd4658c92b (patch)
tree86965633d1f582a45b626f6d18bfb129be4f1542 /src/soc/amd/common/block/pi/def_callouts.c
parent509d99ca6b34de7909ca944584b613b547a58e34 (diff)
downloadcoreboot-271b8a5f81b2363218eb8768754001bd4658c92b.tar.gz
coreboot-271b8a5f81b2363218eb8768754001bd4658c92b.tar.bz2
coreboot-271b8a5f81b2363218eb8768754001bd4658c92b.zip
soc/amd: Convert from AMD units to coreboot units
There are several files under soc/amd that use units defined by file porting.h. These units use upper case, and are not recognized by checkpatch, thus causing problems when defining a pointer (request to use space before and after the star symbol). These are the definitions from porting.h showing the units that this patch will change and their coreboot definitions (not all are actually used): typedef uintptr_t UINTN; typedef int64_t INT64; typedef uint64_t UINT64; typedef int32_t INT32; typedef uint32_t UINT32; typedef int16_t INT16; typedef uint16_t UINT16; typedef int8_t INT8; typedef uint8_t UINT8; typedef char CHAR8; typedef unsigned short CHAR16; typedef unsigned char BOOLEAN; typedef void VOID; BUG=b:118775313 TEST=Build and boot grunt. Change-Id: Ic1bd64d6224a030a65d23decabf0e602cee02871 Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com> Reviewed-on: https://review.coreboot.org/29520 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block/pi/def_callouts.c')
-rw-r--r--src/soc/amd/common/block/pi/def_callouts.c45
1 files changed, 24 insertions, 21 deletions
diff --git a/src/soc/amd/common/block/pi/def_callouts.c b/src/soc/amd/common/block/pi/def_callouts.c
index 60bfad1f3ad5..0fffaf345bec 100644
--- a/src/soc/amd/common/block/pi/def_callouts.c
+++ b/src/soc/amd/common/block/pi/def_callouts.c
@@ -74,9 +74,9 @@ const BIOS_CALLOUT_STRUCT BiosCallouts[] = {
const int BiosCalloutsLen = ARRAY_SIZE(BiosCallouts);
-AGESA_STATUS GetBiosCallout(UINT32 Func, UINTN Data, VOID *ConfigPtr)
+AGESA_STATUS GetBiosCallout(uint32_t Func, uintptr_t Data, void *ConfigPtr)
{
- UINTN i;
+ uintptr_t i;
for (i = 0 ; i < BiosCalloutsLen ; i++) {
if (BiosCallouts[i].CalloutName == Func)
@@ -92,17 +92,19 @@ AGESA_STATUS GetBiosCallout(UINT32 Func, UINTN Data, VOID *ConfigPtr)
return BiosCallouts[i].CalloutPtr(Func, Data, ConfigPtr);
}
-AGESA_STATUS agesa_NoopUnsupported(UINT32 Func, UINTN Data, VOID *ConfigPtr)
+AGESA_STATUS agesa_NoopUnsupported(uint32_t Func, uintptr_t Data,
+ void *ConfigPtr)
{
return AGESA_UNSUPPORTED;
}
-AGESA_STATUS agesa_NoopSuccess(UINT32 Func, UINTN Data, VOID *ConfigPtr)
+AGESA_STATUS agesa_NoopSuccess(uint32_t Func, uintptr_t Data, void *ConfigPtr)
{
return AGESA_SUCCESS;
}
-AGESA_STATUS agesa_EmptyIdsInitData(UINT32 Func, UINTN Data, VOID *ConfigPtr)
+AGESA_STATUS agesa_EmptyIdsInitData(uint32_t Func, uintptr_t Data,
+ void *ConfigPtr)
{
IDS_NV_ITEM *IdsPtr = ((IDS_CALLOUT_STRUCT *) ConfigPtr)->IdsNvPtr;
if (Data == IDS_CALLOUT_INIT)
@@ -110,10 +112,10 @@ AGESA_STATUS agesa_EmptyIdsInitData(UINT32 Func, UINTN Data, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
-AGESA_STATUS agesa_Reset(UINT32 Func, UINTN Data, VOID *ConfigPtr)
+AGESA_STATUS agesa_Reset(uint32_t Func, uintptr_t Data, void *ConfigPtr)
{
AGESA_STATUS Status;
- UINTN ResetType;
+ uintptr_t ResetType;
AMD_CONFIG_PARAMS *StdHeader;
ResetType = Data;
@@ -143,8 +145,8 @@ AGESA_STATUS agesa_Reset(UINT32 Func, UINTN Data, VOID *ConfigPtr)
return Status;
}
-AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData,
- VOID *ConfigPrt)
+AGESA_STATUS agesa_GfxGetVbiosImage(uint32_t Func, uintptr_t FchData,
+ void *ConfigPrt)
{
GFX_VBIOS_IMAGE_INFO *pVbiosImageInfo;
@@ -157,16 +159,16 @@ AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData,
return pVbiosImageInfo->ImagePtr ? AGESA_SUCCESS : AGESA_WARNING;
}
-AGESA_STATUS __weak platform_PcieSlotResetControl(UINT32 Func,
- UINTN Data, VOID *ConfigPtr)
+AGESA_STATUS __weak platform_PcieSlotResetControl(uint32_t Func,
+ uintptr_t Data, void *ConfigPtr)
{
printk(BIOS_WARNING, "Warning - AGESA callout: %s not supported\n",
__func__);
return AGESA_UNSUPPORTED;
}
-AGESA_STATUS agesa_PcieSlotResetControl(UINT32 Func, UINTN Data,
- VOID *ConfigPtr)
+AGESA_STATUS agesa_PcieSlotResetControl(uint32_t Func, uintptr_t Data,
+ void *ConfigPtr)
{
return platform_PcieSlotResetControl(Func, Data, ConfigPtr);
}
@@ -184,9 +186,9 @@ AGESA_STATUS agesa_PcieSlotResetControl(UINT32 Func, UINTN Data,
* Passed from the AGESA_Callout for the agesawrapper_amdlaterunaptask.
*/
static struct agesa_data {
- UINT32 Func;
- UINTN Data;
- VOID *ConfigPtr;
+ uint32_t Func;
+ uintptr_t Data;
+ void *ConfigPtr;
} agesadata;
/*
@@ -213,7 +215,7 @@ static void callout_ap_entry(void *unused)
lapicid(), decodeAGESA_STATUS(Status));
}
-AGESA_STATUS agesa_RunFuncOnAp(UINT32 Func, UINTN Data, VOID *ConfigPtr)
+AGESA_STATUS agesa_RunFuncOnAp(uint32_t Func, uintptr_t Data, void *ConfigPtr)
{
printk(BIOS_DEBUG, "%s\n", __func__);
@@ -226,7 +228,8 @@ AGESA_STATUS agesa_RunFuncOnAp(UINT32 Func, UINTN Data, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
-AGESA_STATUS agesa_RunFcnOnAllAps(UINT32 Func, UINTN Data, VOID *ConfigPtr)
+AGESA_STATUS agesa_RunFcnOnAllAps(uint32_t Func, uintptr_t Data,
+ void *ConfigPtr)
{
printk(BIOS_DEBUG, "%s\n", __func__);
@@ -239,8 +242,8 @@ AGESA_STATUS agesa_RunFcnOnAllAps(UINT32 Func, UINTN Data, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
-AGESA_STATUS agesa_WaitForAllApsFinished(UINT32 Func, UINTN Data,
- VOID *ConfigPtr)
+AGESA_STATUS agesa_WaitForAllApsFinished(uint32_t Func, uintptr_t Data,
+ void *ConfigPtr)
{
printk(BIOS_WARNING, "Warning - AGESA callout: %s not supported\n",
__func__);
@@ -249,7 +252,7 @@ AGESA_STATUS agesa_WaitForAllApsFinished(UINT32 Func, UINTN Data,
return Status;
}
-AGESA_STATUS agesa_IdleAnAp(UINT32 Func, UINTN Data, VOID *ConfigPtr)
+AGESA_STATUS agesa_IdleAnAp(uint32_t Func, uintptr_t Data, void *ConfigPtr)
{
printk(BIOS_WARNING, "Warning - AGESA callout: %s no supported\n",
__func__);