Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12271
-gerrit
commit 53d0ebbc263ac27b8cd827011b6cc3f4bad67113 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Fri Oct 30 23:38:40 2015 +0200
AMD binaryPI BiosCallouts: Remove cast
This cast only hides errors in matching the API properly.
Change-Id: I9b878ab997b8ff087a7209f94522646b10b94bf6 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/northbridge/amd/pi/BiosCallOuts.h | 2 +- src/northbridge/amd/pi/agesawrapper.c | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/northbridge/amd/pi/BiosCallOuts.h b/src/northbridge/amd/pi/BiosCallOuts.h index 6864f28..69f8355 100644 --- a/src/northbridge/amd/pi/BiosCallOuts.h +++ b/src/northbridge/amd/pi/BiosCallOuts.h @@ -61,7 +61,7 @@ AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
typedef struct { UINT32 CalloutName; - AGESA_STATUS (*CalloutPtr) (UINT32 Func, UINT32 Data, VOID* ConfigPtr); + CALLOUT_ENTRY CalloutPtr; } BIOS_CALLOUT_STRUCT;
extern const BIOS_CALLOUT_STRUCT BiosCallouts[]; diff --git a/src/northbridge/amd/pi/agesawrapper.c b/src/northbridge/amd/pi/agesawrapper.c index 9bdf340..7b9f153 100644 --- a/src/northbridge/amd/pi/agesawrapper.c +++ b/src/northbridge/amd/pi/agesawrapper.c @@ -67,7 +67,7 @@ AGESA_STATUS agesawrapper_amdinitreset(void) AmdParamStruct.NewStructSize = sizeof(AMD_RESET_PARAMS); AmdParamStruct.NewStructPtr = &AmdResetParams; AmdParamStruct.StdHeader.AltImageBasePtr = 0; - AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdParamStruct.StdHeader.CalloutPtr = &GetBiosCallout; AmdParamStruct.StdHeader.Func = 0; AmdParamStruct.StdHeader.ImageBasePtr = 0; AmdCreateStruct (&AmdParamStruct); @@ -99,7 +99,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void) AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY; AmdParamStruct.AllocationMethod = PreMemHeap; AmdParamStruct.StdHeader.AltImageBasePtr = 0; - AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdParamStruct.StdHeader.CalloutPtr = &GetBiosCallout; AmdParamStruct.StdHeader.Func = 0; AmdParamStruct.StdHeader.ImageBasePtr = 0; AmdCreateStruct (&AmdParamStruct); @@ -129,7 +129,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void) AmdParamStruct.AgesaFunctionName = AMD_INIT_POST; AmdParamStruct.AllocationMethod = PreMemHeap; AmdParamStruct.StdHeader.AltImageBasePtr = NULL; - AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdParamStruct.StdHeader.CalloutPtr = &GetBiosCallout; AmdParamStruct.StdHeader.Func = 0; AmdParamStruct.StdHeader.ImageBasePtr = 0;
@@ -185,7 +185,7 @@ AGESA_STATUS agesawrapper_amdinitenv(void) AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV; AmdParamStruct.AllocationMethod = PostMemDram; AmdParamStruct.StdHeader.AltImageBasePtr = 0; - AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdParamStruct.StdHeader.CalloutPtr = &GetBiosCallout; AmdParamStruct.StdHeader.Func = 0; AmdParamStruct.StdHeader.ImageBasePtr = 0; status = AmdCreateStruct (&AmdParamStruct); @@ -253,7 +253,7 @@ AGESA_STATUS agesawrapper_amdinitmid(void) AmdParamStruct.AgesaFunctionName = AMD_INIT_MID; AmdParamStruct.AllocationMethod = PostMemDram; AmdParamStruct.StdHeader.AltImageBasePtr = 0; - AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdParamStruct.StdHeader.CalloutPtr = &GetBiosCallout; AmdParamStruct.StdHeader.Func = 0; AmdParamStruct.StdHeader.ImageBasePtr = 0;
@@ -291,7 +291,7 @@ AGESA_STATUS agesawrapper_amdinitlate(void) AmdParamStruct.AgesaFunctionName = AMD_INIT_LATE; AmdParamStruct.AllocationMethod = PostMemDram; AmdParamStruct.StdHeader.AltImageBasePtr = 0; - AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdParamStruct.StdHeader.CalloutPtr = &GetBiosCallout; AmdParamStruct.StdHeader.HeapStatus = HEAP_SYSTEM_MEM; AmdParamStruct.StdHeader.Func = 0; AmdParamStruct.StdHeader.ImageBasePtr = 0; @@ -345,7 +345,7 @@ AGESA_STATUS agesawrapper_amdlaterunaptask ( &(ApExeParams.StdHeader));
ApExeParams.StdHeader.AltImageBasePtr = 0; - ApExeParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + ApExeParams.StdHeader.CalloutPtr = &GetBiosCallout; ApExeParams.StdHeader.Func = 0; ApExeParams.StdHeader.ImageBasePtr = 0; ApExeParams.FunctionNumber = Func; @@ -377,7 +377,7 @@ AGESA_STATUS agesawrapper_amdinitresume(void) AmdParamStruct.AgesaFunctionName = AMD_INIT_RESUME; AmdParamStruct.AllocationMethod = PreMemHeap; AmdParamStruct.StdHeader.AltImageBasePtr = 0; - AmdParamStruct.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdParamStruct.StdHeader.CalloutPtr = &GetBiosCallout; AmdParamStruct.StdHeader.Func = 0; AmdParamStruct.StdHeader.ImageBasePtr = 0; AmdCreateStruct (&AmdParamStruct); @@ -410,7 +410,7 @@ AGESA_STATUS agesawrapper_fchs3earlyrestore(void) StdHeader.HeapStatus = HEAP_SYSTEM_MEM; StdHeader.HeapBasePtr = GetHeapBase(&StdHeader) + 0x10; StdHeader.AltImageBasePtr = 0; - StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + StdHeader.CalloutPtr = &GetBiosCallout; StdHeader.Func = 0; StdHeader.ImageBasePtr = 0;
@@ -445,7 +445,7 @@ AGESA_STATUS agesawrapper_amds3laterestore(void) AmdInterfaceParams.AllocationMethod = ByHost; AmdInterfaceParams.AgesaFunctionName = AMD_S3LATE_RESTORE; AmdInterfaceParams.NewStructPtr = &AmdS3LateParams; - AmdInterfaceParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdInterfaceParams.StdHeader.CalloutPtr = &GetBiosCallout; AmdS3LateParamsPtr = &AmdS3LateParams; AmdInterfaceParams.NewStructSize = sizeof (AMD_S3LATE_PARAMS);
@@ -479,7 +479,7 @@ AGESA_STATUS agesawrapper_fchs3laterestore(void) StdHeader.HeapStatus = HEAP_SYSTEM_MEM; StdHeader.HeapBasePtr = GetHeapBase(&StdHeader) + 0x10; StdHeader.AltImageBasePtr = 0; - StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + StdHeader.CalloutPtr = &GetBiosCallout; StdHeader.Func = 0; StdHeader.ImageBasePtr = 0;
@@ -521,7 +521,7 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
AmdInterfaceParams.StdHeader.ImageBasePtr = 0; AmdInterfaceParams.StdHeader.HeapStatus = HEAP_SYSTEM_MEM; - AmdInterfaceParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdInterfaceParams.StdHeader.CalloutPtr = &GetBiosCallout; AmdInterfaceParams.AllocationMethod = PostMemDram; AmdInterfaceParams.AgesaFunctionName = AMD_S3_SAVE; AmdInterfaceParams.StdHeader.AltImageBasePtr = 0; @@ -580,7 +580,7 @@ AGESA_STATUS agesawrapper_amdreadeventlog (UINT8 HeapStatus) &(AmdEventParams.StdHeader));
AmdEventParams.StdHeader.AltImageBasePtr = 0; - AmdEventParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout; + AmdEventParams.StdHeader.CalloutPtr = &GetBiosCallout; AmdEventParams.StdHeader.Func = 0; AmdEventParams.StdHeader.ImageBasePtr = 0; AmdEventParams.StdHeader.HeapStatus = HeapStatus;