summaryrefslogtreecommitdiff
path: root/src/mainboard/gizmosphere
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-04-30 23:13:08 +1000
committerPatrick Georgi <patrick@georgi-clan.de>2014-05-05 08:51:34 +0200
commit8864e1c1499c019615411fa9a93cba840bc81549 (patch)
tree9aa4538ec3506e2f9ad506fe3023f48d840c1429 /src/mainboard/gizmosphere
parent8e5435a74bfffb92bc2293e199d28e55494485d8 (diff)
downloadcoreboot-8864e1c1499c019615411fa9a93cba840bc81549.tar.xz
AMD F14h boards: Use std memset/memcpy func over AGESA
In amd/{persimmon,inagua} and derived boards avoid using AGESA reimplementation of memcpy as following the reasoning in: e2f3bfc jetway/nf81-t56n-lf: Use std memset/memcpy func over AGESA Change-Id: I943b46103c3bf1c5fd88b25e9f9595b9adfcafeb Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/5625 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/mainboard/gizmosphere')
-rwxr-xr-xsrc/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c23
-rwxr-xr-xsrc/mainboard/gizmosphere/gizmo/agesawrapper.c62
2 files changed, 18 insertions, 67 deletions
diff --git a/src/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c b/src/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c
index a2560e0607..26bf10b566 100755
--- a/src/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c
+++ b/src/mainboard/gizmosphere/gizmo/PlatformGnbPcie.c
@@ -26,6 +26,8 @@
#include "Filecode.h"
#include "BiosCallOuts.h"
+#include <string.h>
+
/*---------------------------------------------------------------------------------------*/
/**
* OemCustomizeInitEarly
@@ -135,24 +137,9 @@ PCIe_COMPLEX_DESCRIPTOR Brazos = {
AllocHeapParams.BufferPtr += sizeof(PortList);
BrazosPcieDdiPtr = (PCIe_DDI_DESCRIPTOR *) AllocHeapParams.BufferPtr;
- LibAmdMemFill (BrazosPcieComplexListPtr,
- 0,
- sizeof(Brazos),
- &InitEarly->StdHeader);
-
- LibAmdMemFill (BrazosPciePortPtr,
- 0,
- sizeof(PortList),
- &InitEarly->StdHeader);
-
- LibAmdMemFill (BrazosPcieDdiPtr,
- 0,
- sizeof(DdiList),
- &InitEarly->StdHeader);
-
- LibAmdMemCopy (BrazosPcieComplexListPtr, &Brazos, sizeof(Brazos), &InitEarly->StdHeader);
- LibAmdMemCopy (BrazosPciePortPtr, &PortList[0], sizeof(PortList), &InitEarly->StdHeader);
- LibAmdMemCopy (BrazosPcieDdiPtr, &DdiList[0], sizeof(DdiList), &InitEarly->StdHeader);
+ memcpy(BrazosPcieComplexListPtr, &Brazos, sizeof(Brazos));
+ memcpy(BrazosPciePortPtr, &PortList[0], sizeof(PortList));
+ memcpy(BrazosPcieDdiPtr, &DdiList[0], sizeof(DdiList));
((PCIe_COMPLEX_DESCRIPTOR*)BrazosPcieComplexListPtr)->PciePortList = (PCIe_PORT_DESCRIPTOR*)BrazosPciePortPtr;
diff --git a/src/mainboard/gizmosphere/gizmo/agesawrapper.c b/src/mainboard/gizmosphere/gizmo/agesawrapper.c
index a2698263d1..e9d1874707 100755
--- a/src/mainboard/gizmosphere/gizmo/agesawrapper.c
+++ b/src/mainboard/gizmosphere/gizmo/agesawrapper.c
@@ -189,15 +189,8 @@ agesawrapper_amdinitreset (
AMD_INTERFACE_PARAMS AmdParamStruct;
AMD_RESET_PARAMS AmdResetParams;
- LibAmdMemFill (&AmdParamStruct,
- 0,
- sizeof (AMD_INTERFACE_PARAMS),
- &(AmdParamStruct.StdHeader));
-
- LibAmdMemFill (&AmdResetParams,
- 0,
- sizeof (AMD_RESET_PARAMS),
- &(AmdResetParams.StdHeader));
+ memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
+ memset(&AmdResetParams, 0, sizeof(AMD_RESET_PARAMS));
AmdParamStruct.AgesaFunctionName = AMD_INIT_RESET;
AmdParamStruct.AllocationMethod = ByHost;
@@ -225,10 +218,7 @@ agesawrapper_amdinitearly (
AMD_INTERFACE_PARAMS AmdParamStruct;
AMD_EARLY_PARAMS *AmdEarlyParamsPtr;
- LibAmdMemFill (&AmdParamStruct,
- 0,
- sizeof (AMD_INTERFACE_PARAMS),
- &(AmdParamStruct.StdHeader));
+ memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
AmdParamStruct.AgesaFunctionName = AMD_INIT_EARLY;
AmdParamStruct.AllocationMethod = PreMemHeap;
@@ -276,10 +266,7 @@ agesawrapper_amdinitpost (
AMD_INTERFACE_PARAMS AmdParamStruct;
BIOS_HEAP_MANAGER *BiosManagerPtr;
- LibAmdMemFill (&AmdParamStruct,
- 0,
- sizeof (AMD_INTERFACE_PARAMS),
- &(AmdParamStruct.StdHeader));
+ memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
AmdParamStruct.AgesaFunctionName = AMD_INIT_POST;
AmdParamStruct.AllocationMethod = PreMemHeap;
@@ -317,10 +304,7 @@ agesawrapper_amdinitenv (
PCI_ADDR PciAddress;
UINT32 PciValue;
- LibAmdMemFill (&AmdParamStruct,
- 0,
- sizeof (AMD_INTERFACE_PARAMS),
- &(AmdParamStruct.StdHeader));
+ memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
AmdParamStruct.AgesaFunctionName = AMD_INIT_ENV;
AmdParamStruct.AllocationMethod = PostMemDram;
@@ -444,10 +428,7 @@ agesawrapper_amdinitmid (
/* Enable MMIO on AMD CPU Address Map Controller */
agesawrapper_amdinitcpuio ();
- LibAmdMemFill (&AmdParamStruct,
- 0,
- sizeof (AMD_INTERFACE_PARAMS),
- &(AmdParamStruct.StdHeader));
+ memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
AmdParamStruct.AgesaFunctionName = AMD_INIT_MID;
AmdParamStruct.AllocationMethod = PostMemDram;
@@ -474,10 +455,7 @@ agesawrapper_amdinitlate (
AMD_INTERFACE_PARAMS AmdParamStruct;
AMD_LATE_PARAMS * AmdLateParamsPtr;
- LibAmdMemFill (&AmdParamStruct,
- 0,
- sizeof (AMD_INTERFACE_PARAMS),
- &(AmdParamStruct.StdHeader));
+ memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
AmdParamStruct.AgesaFunctionName = AMD_INIT_LATE;
AmdParamStruct.AllocationMethod = PostMemDram;
@@ -529,10 +507,7 @@ agesawrapper_amdinitresume (
AMD_RESUME_PARAMS *AmdResumeParamsPtr;
S3_DATA_TYPE S3DataType;
- LibAmdMemFill (&AmdParamStruct,
- 0,
- sizeof (AMD_INTERFACE_PARAMS),
- &(AmdParamStruct.StdHeader));
+ memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
AmdParamStruct.AgesaFunctionName = AMD_INIT_RESUME;
AmdParamStruct.AllocationMethod = PreMemHeap;
@@ -571,10 +546,8 @@ agesawrapper_amds3laterestore (
AMD_S3LATE_PARAMS *AmdS3LateParamsPtr;
S3_DATA_TYPE S3DataType;
- LibAmdMemFill (&AmdS3LateParams,
- 0,
- sizeof (AMD_S3LATE_PARAMS),
- &(AmdS3LateParams.StdHeader));
+ memset(&AmdS3LateParams, 0, sizeof(AMD_S3LATE_PARAMS));
+
AmdInterfaceParams.StdHeader.ImageBasePtr = 0;
AmdInterfaceParams.AllocationMethod = ByHost;
AmdInterfaceParams.AgesaFunctionName = AMD_S3LATE_RESTORE;
@@ -612,10 +585,7 @@ agesawrapper_amdS3Save (
AMD_INTERFACE_PARAMS AmdInterfaceParams;
S3_DATA_TYPE S3DataType;
- LibAmdMemFill (&AmdInterfaceParams,
- 0,
- sizeof (AMD_INTERFACE_PARAMS),
- &(AmdInterfaceParams.StdHeader));
+ memset(&AmdInterfaceParams, 0, sizeof(AMD_INTERFACE_PARAMS));
AmdInterfaceParams.StdHeader.ImageBasePtr = 0;
AmdInterfaceParams.StdHeader.HeapStatus = HEAP_SYSTEM_MEM;
@@ -670,10 +640,7 @@ agesawrapper_amdlaterunaptask (
AGESA_STATUS Status;
AP_EXE_PARAMS ApExeParams;
- LibAmdMemFill (&ApExeParams,
- 0,
- sizeof (AP_EXE_PARAMS),
- &(ApExeParams.StdHeader));
+ memset(&ApExeParams, 0, sizeof(AP_EXE_PARAMS));
ApExeParams.StdHeader.AltImageBasePtr = 0;
ApExeParams.StdHeader.CalloutPtr = (CALLOUT_ENTRY) &GetBiosCallout;
@@ -699,10 +666,7 @@ agesawrapper_amdreadeventlog (
AGESA_STATUS Status;
EVENT_PARAMS AmdEventParams;
- LibAmdMemFill (&AmdEventParams,
- 0,
- sizeof (EVENT_PARAMS),
- &(AmdEventParams.StdHeader));
+ memset(&AmdEventParams, 0, sizeof(EVENT_PARAMS));
AmdEventParams.StdHeader.AltImageBasePtr = 0;
AmdEventParams.StdHeader.CalloutPtr = NULL;