Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/29520
Change subject: soc/amd: Convert from AMD units to coreboot units ......................................................................
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 --- M src/soc/amd/common/block/include/amdblocks/BiosCallOuts.h M src/soc/amd/common/block/include/amdblocks/agesawrapper.h M src/soc/amd/common/block/pi/agesawrapper.c M src/soc/amd/common/block/pi/def_callouts.c M src/soc/amd/common/block/pi/heapmanager.c M src/soc/amd/stoneyridge/BiosCallOuts.c M src/soc/amd/stoneyridge/northbridge.c 7 files changed, 119 insertions(+), 102 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/29520/1
diff --git a/src/soc/amd/common/block/include/amdblocks/BiosCallOuts.h b/src/soc/amd/common/block/include/amdblocks/BiosCallOuts.h index 3d5ae8f..829630b 100644 --- a/src/soc/amd/common/block/include/amdblocks/BiosCallOuts.h +++ b/src/soc/amd/common/block/include/amdblocks/BiosCallOuts.h @@ -23,51 +23,59 @@ #define BSP_STACK_BASE_ADDR 0x30000
typedef struct _BIOS_HEAP_MANAGER { - UINT32 StartOfAllocatedNodes; - UINT32 StartOfFreedNodes; + 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;
-AGESA_STATUS agesa_GetTempHeapBase(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_HeapRebase(UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_GetTempHeapBase(uint32_t Func, uintptr_t Data, + void *ConfigPtr); +AGESA_STATUS agesa_HeapRebase(uint32_t Func, uintptr_t Data, void *ConfigPtr);
-AGESA_STATUS agesa_AllocateBuffer(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_DeallocateBuffer(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_LocateBuffer(UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_AllocateBuffer(uint32_t Func, uintptr_t Data, + void *ConfigPtr); +AGESA_STATUS agesa_DeallocateBuffer(uint32_t Func, uintptr_t Data, + void *ConfigPtr); +AGESA_STATUS agesa_LocateBuffer(uint32_t Func, uintptr_t Data, void *ConfigPtr);
-AGESA_STATUS agesa_NoopUnsupported(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_NoopSuccess(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_EmptyIdsInitData(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_Reset(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_RunFuncOnAp(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData, - VOID *ConfigPrt); +AGESA_STATUS agesa_NoopUnsupported(uint32_t Func, uintptr_t Data, + void *ConfigPtr); +AGESA_STATUS agesa_NoopSuccess(uint32_t Func, uintptr_t Data, void *ConfigPtr); +AGESA_STATUS agesa_EmptyIdsInitData(uint32_t Func, uintptr_t Data, + void *ConfigPtr); +AGESA_STATUS agesa_Reset(uint32_t Func, uintptr_t Data, void *ConfigPtr); +AGESA_STATUS agesa_RunFuncOnAp(uint32_t Func, uintptr_t Data, void *ConfigPtr); +AGESA_STATUS agesa_GfxGetVbiosImage(uint32_t Func, uintptr_t FchData, + void *ConfigPrt);
-AGESA_STATUS agesa_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_RunFcnOnAllAps(UINT32 Func, UINTN Data, VOID *ConfigPtr); -AGESA_STATUS agesa_PcieSlotResetControl(UINT32 Func, UINTN Data, - VOID *ConfigPtr); -AGESA_STATUS agesa_WaitForAllApsFinished(UINT32 Func, UINTN Data, - VOID *ConfigPtr); -AGESA_STATUS agesa_IdleAnAp(UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_ReadSpd(uint32_t Func, uintptr_t Data, void *ConfigPtr); +AGESA_STATUS agesa_RunFcnOnAllAps(uint32_t Func, uintptr_t Data, + void *ConfigPtr); +AGESA_STATUS agesa_PcieSlotResetControl(uint32_t Func, uintptr_t Data, + void *ConfigPtr); +AGESA_STATUS agesa_WaitForAllApsFinished(uint32_t Func, uintptr_t Data, + void *ConfigPtr); +AGESA_STATUS agesa_IdleAnAp(uint32_t Func, uintptr_t Data, void *ConfigPtr);
-AGESA_STATUS GetBiosCallout(UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS GetBiosCallout(uint32_t Func, uintptr_t Data, void *ConfigPtr);
-AGESA_STATUS agesa_fch_initreset(UINT32 Func, UINTN FchData, VOID *ConfigPtr); -AGESA_STATUS agesa_fch_initenv(UINT32 Func, UINTN FchData, VOID *ConfigPtr); -AGESA_STATUS agesa_HaltThisAp(UINT32 Func, UINTN Data, VOID *ConfigPtr); +AGESA_STATUS agesa_fch_initreset(uint32_t Func, uintptr_t FchData, + void *ConfigPtr); +AGESA_STATUS agesa_fch_initenv(uint32_t Func, uintptr_t FchData, + void *ConfigPtr); +AGESA_STATUS agesa_HaltThisAp(uint32_t Func, uintptr_t Data, void *ConfigPtr);
void platform_FchParams_reset(FCH_RESET_DATA_BLOCK *FchParams_reset); void platform_FchParams_env(FCH_DATA_BLOCK *FchParams_env); -AGESA_STATUS platform_PcieSlotResetControl(UINT32 Func, UINTN Data, - VOID *ConfigPtr); +AGESA_STATUS platform_PcieSlotResetControl(uint32_t Func, uintptr_t Data, + void *ConfigPtr); typedef struct { - UINT32 CalloutName; + uint32_t CalloutName; CALLOUT_ENTRY CalloutPtr; } BIOS_CALLOUT_STRUCT;
diff --git a/src/soc/amd/common/block/include/amdblocks/agesawrapper.h b/src/soc/amd/common/block/include/amdblocks/agesawrapper.h index 713f76c..a48a535 100644 --- a/src/soc/amd/common/block/include/amdblocks/agesawrapper.h +++ b/src/soc/amd/common/block/include/amdblocks/agesawrapper.h @@ -41,7 +41,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void); AGESA_STATUS agesawrapper_amdinitmid(void); void *agesawrapper_getlateinitptr(int pick); -AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINTN Data, +AGESA_STATUS agesawrapper_amdlaterunaptask(uint32_t Func, uintptr_t Data, void *ConfigPtr); AGESA_STATUS agesawrapper_amdinitrtb(void); AGESA_STATUS agesawrapper_amdinitresume(void); @@ -51,9 +51,9 @@ AGESA_STATUS agesawrapper_fchs3earlyrestore(void); AGESA_STATUS agesawrapper_fchs3laterestore(void);
-VOID OemCustomizeInitEarly(IN OUT AMD_EARLY_PARAMS *InitEarly); -VOID amd_initcpuio(void); -const void *agesawrapper_locate_module(const CHAR8 name[8]); +void OemCustomizeInitEarly(IN OUT AMD_EARLY_PARAMS *InitEarly); +void amd_initcpuio(void); +const void *agesawrapper_locate_module(const char name[8]);
void SetFchResetParams(FCH_RESET_INTERFACE *params); void OemPostParams(AMD_POST_PARAMS *PostParams); diff --git a/src/soc/amd/common/block/pi/agesawrapper.c b/src/soc/amd/common/block/pi/agesawrapper.c index 181eafd..9c10fec 100644 --- a/src/soc/amd/common/block/pi/agesawrapper.c +++ b/src/soc/amd/common/block/pi/agesawrapper.c @@ -49,7 +49,7 @@ static void *AcpiIvrs; static void *AcpiCrat;
-static AGESA_STATUS agesawrapper_readeventlog(UINT8 HeapStatus) +static AGESA_STATUS agesawrapper_readeventlog(uint8_t HeapStatus) { AGESA_STATUS Status; EVENT_PARAMS AmdEventParams = { @@ -190,7 +190,7 @@
PostParams->MemConfig.UmaMode = CONFIG_GFXUMA ? UMA_AUTO : UMA_NONE; PostParams->MemConfig.UmaSize = 0; - PostParams->MemConfig.BottomIo = (UINT16) + PostParams->MemConfig.BottomIo = (uint16_t) (CONFIG_BOTTOMIO_POSITION >> 24);
SetMemParams(PostParams); @@ -257,7 +257,7 @@ return status; }
-VOID *agesawrapper_getlateinitptr(int pick) +void *agesawrapper_getlateinitptr(int pick) { switch (pick) { case PICK_DMI: @@ -326,7 +326,8 @@
const struct device *dev = dev_find_slot(0, IOMMU_DEVFN); if (dev && dev->enabled) { - LateParams->GnbLateConfiguration.GnbIoapicId = CONFIG_MAX_CPUS + 1; + LateParams->GnbLateConfiguration.GnbIoapicId = CONFIG_MAX_CPUS + + 1; LateParams->GnbLateConfiguration.FchIoapicId = CONFIG_MAX_CPUS; }
@@ -359,8 +360,8 @@ return Status; }
-AGESA_STATUS agesawrapper_amdlaterunaptask(UINT32 Func, UINTN Data, - VOID *ConfigPtr) +AGESA_STATUS agesawrapper_amdlaterunaptask(uint32_t Func, uintptr_t Data, + void *ConfigPtr) { AGESA_STATUS Status; AP_EXE_PARAMS ApExeParams; @@ -585,7 +586,7 @@ return CONFIG_AGESA_POST_MEMORY_CBFS_NAME; }
-const void *agesawrapper_locate_module(const CHAR8 name[8]) +const void *agesawrapper_locate_module(const char name[8]) { const void *agesa; const AMD_IMAGE_HEADER *image; @@ -627,7 +628,7 @@ MODULE_ENTRY agesa_get_dispatcher(void) { const AMD_MODULE_HEADER *module; - static const CHAR8 id[8] = AGESA_ID; + static const char id[8] = AGESA_ID; MODULE_ENTRY val = car_get_var(agesa_dispatcher);
if (val != NULL) diff --git a/src/soc/amd/common/block/pi/def_callouts.c b/src/soc/amd/common/block/pi/def_callouts.c index 60bfad1..0fffaf3 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 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ * 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 @@ 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 @@ 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 @@ 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 @@ 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__); diff --git a/src/soc/amd/common/block/pi/heapmanager.c b/src/soc/amd/common/block/pi/heapmanager.c index e6a0c46..683a572 100644 --- a/src/soc/amd/common/block/pi/heapmanager.c +++ b/src/soc/amd/common/block/pi/heapmanager.c @@ -44,7 +44,8 @@ * Status Indicates whether TempHeapAddress was successfully * set. */ -AGESA_STATUS agesa_GetTempHeapBase(UINT32 Func, UINTN Data, VOID *ConfigPtr) +AGESA_STATUS agesa_GetTempHeapBase(uint32_t Func, uintptr_t Data, + void *ConfigPtr) { AGESA_TEMP_HEAP_BASE_PARAMS *pTempHeapBase;
@@ -67,12 +68,12 @@ * Status Indicates whether HeapAddress was successfully * set. */ -AGESA_STATUS agesa_HeapRebase(UINT32 Func, UINTN Data, VOID *ConfigPtr) +AGESA_STATUS agesa_HeapRebase(uint32_t Func, uintptr_t Data, void *ConfigPtr) { AGESA_REBASE_PARAMS *Rebase;
Rebase = (AGESA_REBASE_PARAMS *)ConfigPtr; - Rebase->HeapAddress = (UINTN)agesa_heap_base(); + Rebase->HeapAddress = (uintptr_t)agesa_heap_base(); if (!Rebase->HeapAddress) Rebase->HeapAddress = CONFIG_PI_AGESA_CAR_HEAP_BASE;
@@ -94,8 +95,8 @@ static AGESA_STATUS FindAllocatedNode(uint32_t handle, BIOS_BUFFER_NODE **last_allocd_or_match) { - UINT32 AllocNodeOffset; - UINT8 *BiosHeapBaseAddr; + uint32_t AllocNodeOffset; + uint8_t *BiosHeapBaseAddr; BIOS_BUFFER_NODE *AllocNodePtr; BIOS_HEAP_MANAGER *BiosHeapBasePtr; AGESA_STATUS Status = AGESA_SUCCESS; @@ -141,7 +142,8 @@
ROMSTAGE_CBMEM_INIT_HOOK(EmptyHeap)
-AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr) +AGESA_STATUS agesa_AllocateBuffer(uint32_t Func, uintptr_t Data, + void *ConfigPtr) { /* * Size variables explanation: @@ -155,17 +157,17 @@ * down into 2 nodes, once a node is selected as * the best fit. */ - UINT32 AvailableHeapSize; - UINT8 *BiosHeapBaseAddr; - UINT32 CurrNodeOffset; - UINT32 PrevNodeOffset; - UINT32 FreedNodeOffset; - UINT32 FreedNodeSize; - UINT32 BestFitNodeOffset; - UINT32 BestFitNodeSize; - UINT32 BestFitPrevNodeOffset; - UINT32 NextFreeOffset; - UINT32 MinimumSize; + uint32_t AvailableHeapSize; + uint8_t *BiosHeapBaseAddr; + uint32_t CurrNodeOffset; + uint32_t PrevNodeOffset; + uint32_t FreedNodeOffset; + uint32_t FreedNodeSize; + uint32_t BestFitNodeOffset; + uint32_t BestFitNodeSize; + uint32_t BestFitPrevNodeOffset; + uint32_t NextFreeOffset; + uint32_t MinimumSize; BIOS_BUFFER_NODE *CurrNodePtr; BIOS_BUFFER_NODE *FreedNodePtr; BIOS_BUFFER_NODE *BestFitNodePtr; @@ -192,7 +194,7 @@ CurrNodePtr->BufferHandle = AllocParams->BufferHandle; CurrNodePtr->BufferSize = AllocParams->BufferLength; CurrNodePtr->NextNodeOffset = 0; - AllocParams->BufferPointer = (UINT8 *)CurrNodePtr + AllocParams->BufferPointer = (uint8_t *)CurrNodePtr + sizeof(BIOS_BUFFER_NODE);
/* Update the remaining free space */ @@ -309,22 +311,23 @@ BestFitNodePtr->BufferHandle = AllocParams->BufferHandle; BestFitNodePtr->NextNodeOffset = 0;
- AllocParams->BufferPointer = (UINT8 *)BestFitNodePtr + + AllocParams->BufferPointer = (uint8_t *)BestFitNodePtr + sizeof(BIOS_BUFFER_NODE); }
return AGESA_SUCCESS; }
-AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr) +AGESA_STATUS agesa_DeallocateBuffer(uint32_t Func, uintptr_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; @@ -358,7 +361,7 @@ PrevNodePtr->NextNodeOffset = AllocNodePtr->NextNodeOffset;
/* Zero out the buffer, and clear the BufferHandle */ - memset((UINT8 *)AllocNodePtr + sizeof(BIOS_BUFFER_NODE), 0, + memset((uint8_t *)AllocNodePtr + sizeof(BIOS_BUFFER_NODE), 0, AllocNodePtr->BufferSize); AllocNodePtr->BufferHandle = 0;
@@ -429,7 +432,7 @@ return AGESA_SUCCESS; }
-AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr) +AGESA_STATUS agesa_LocateBuffer(uint32_t Func, uintptr_t Data, void *ConfigPtr) { BIOS_BUFFER_NODE *AllocNodePtr; AGESA_BUFFER_PARAMS *AllocParams; @@ -440,7 +443,7 @@ Status = FindAllocatedNode(AllocParams->BufferHandle, &AllocNodePtr);
if (Status == AGESA_SUCCESS) { - AllocParams->BufferPointer = (UINT8 *)((UINT8 *)AllocNodePtr + AllocParams->BufferPointer = (uint8_t *)((uint8_t *)AllocNodePtr + sizeof(BIOS_BUFFER_NODE)); AllocParams->BufferLength = AllocNodePtr->BufferSize; } diff --git a/src/soc/amd/stoneyridge/BiosCallOuts.c b/src/soc/amd/stoneyridge/BiosCallOuts.c index 5e6c899..fdef166 100644 --- a/src/soc/amd/stoneyridge/BiosCallOuts.c +++ b/src/soc/amd/stoneyridge/BiosCallOuts.c @@ -27,10 +27,10 @@ #include "chip.h" #include <amdblocks/car.h>
-void __weak platform_FchParams_reset( - FCH_RESET_DATA_BLOCK *FchParams_reset) {} +void __weak platform_FchParams_reset(FCH_RESET_DATA_BLOCK *FchParams_reset) {}
-AGESA_STATUS agesa_fch_initreset(UINT32 Func, UINTN FchData, VOID *ConfigPtr) +AGESA_STATUS agesa_fch_initreset(uint32_t Func, uintptr_t FchData, + void *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = ConfigPtr;
@@ -48,7 +48,8 @@ return AGESA_SUCCESS; }
-AGESA_STATUS agesa_fch_initenv(UINT32 Func, UINTN FchData, VOID *ConfigPtr) +AGESA_STATUS agesa_fch_initenv(uint32_t Func, uintptr_t FchData, + void *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = ConfigPtr; const struct device *dev = dev_find_slot(0, SATA_DEVFN); @@ -92,7 +93,7 @@ return AGESA_SUCCESS; }
-AGESA_STATUS agesa_ReadSpd(UINT32 Func, UINTN Data, VOID *ConfigPtr) +AGESA_STATUS agesa_ReadSpd(uint32_t Func, uintptr_t Data, void *ConfigPtr) { uint8_t spd_address; int err; @@ -137,7 +138,7 @@ return AGESA_SUCCESS; }
-AGESA_STATUS agesa_HaltThisAp(UINT32 Func, UINTN Data, VOID *ConfigPtr) +AGESA_STATUS agesa_HaltThisAp(uint32_t Func, uintptr_t Data, void *ConfigPtr) { AGESA_HALT_THIS_AP_PARAMS *info = ConfigPtr; uint32_t flags = 0; diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c index d7a20a3..9c52297 100644 --- a/src/soc/amd/stoneyridge/northbridge.c +++ b/src/soc/amd/stoneyridge/northbridge.c @@ -86,7 +86,8 @@ res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; }
-static void set_resource(struct device *dev, struct resource *resource, u32 nodeid) +static void set_resource(struct device *dev, struct resource *resource, + u32 nodeid) { resource_t rbase, rend; unsigned int reg, link_num; @@ -187,12 +188,12 @@ 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); + (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); + (void *)((u32)addr + 2), *(uint16_t *)addr - 2);
return (unsigned long)current; }