AGESA: Simplify parameters for S3 support functions
This save/restore facility operates on the same datablock. Change-Id: I6e1f176adc2addbf2659c724f94c1b8d46d4838f Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/19026 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
4d5321c9c4
commit
fa420b49c5
|
@ -134,7 +134,7 @@ AGESA_STATUS agesawrapper_amdinitresume(void)
|
|||
|
||||
AmdResumeParamsPtr->S3DataBlock.NvStorageSize = 0;
|
||||
AmdResumeParamsPtr->S3DataBlock.VolatileStorageSize = 0;
|
||||
OemInitResume(AmdResumeParamsPtr);
|
||||
OemInitResume(&AmdResumeParamsPtr->S3DataBlock);
|
||||
|
||||
status = AmdInitResume(AmdResumeParamsPtr);
|
||||
|
||||
|
@ -195,7 +195,7 @@ AGESA_STATUS agesawrapper_amds3laterestore(void)
|
|||
AmdS3LateParamsPtr->S3DataBlock.NvStorageSize = 0;
|
||||
#endif
|
||||
AmdS3LateParamsPtr->S3DataBlock.VolatileStorageSize = 0;
|
||||
OemS3LateRestore(AmdS3LateParamsPtr);
|
||||
OemS3LateRestore(&AmdS3LateParamsPtr->S3DataBlock);
|
||||
|
||||
status = AmdS3LateRestore(AmdS3LateParamsPtr);
|
||||
AGESA_EVENTLOG(status, &AmdInterfaceParams.StdHeader);
|
||||
|
@ -259,7 +259,7 @@ AGESA_STATUS agesawrapper_amdS3Save(void)
|
|||
AGESA_EVENTLOG(status, &AmdInterfaceParams.StdHeader);
|
||||
ASSERT(status == AGESA_SUCCESS);
|
||||
|
||||
OemS3Save(AmdS3SaveParamsPtr);
|
||||
OemS3Save(&AmdS3SaveParamsPtr->S3DataBlock);
|
||||
|
||||
AmdReleaseStruct(&AmdInterfaceParams);
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@ struct OEM_HOOK
|
|||
extern const struct OEM_HOOK OemCustomize;
|
||||
|
||||
/* For suspend-to-ram support. */
|
||||
AGESA_STATUS OemInitResume(AMD_RESUME_PARAMS *ResumeParams);
|
||||
AGESA_STATUS OemS3LateRestore(AMD_S3LATE_PARAMS *S3LateParams);
|
||||
AGESA_STATUS OemS3Save(AMD_S3SAVE_PARAMS *S3SaveParams);
|
||||
AGESA_STATUS OemInitResume(AMD_S3_PARAMS *dataBlock);
|
||||
AGESA_STATUS OemS3LateRestore(AMD_S3_PARAMS *dataBlock);
|
||||
AGESA_STATUS OemS3Save(AMD_S3_PARAMS *dataBlock);
|
||||
|
||||
#endif /* _AGESAWRAPPER_H_ */
|
||||
|
|
|
@ -58,10 +58,8 @@ static void get_s3nv_data(S3_DATA_TYPE S3DataType, uintptr_t *pos, uintptr_t *le
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
AGESA_STATUS OemInitResume(AMD_RESUME_PARAMS *ResumeParams)
|
||||
AGESA_STATUS OemInitResume(AMD_S3_PARAMS *dataBlock)
|
||||
{
|
||||
AMD_S3_PARAMS *dataBlock = &ResumeParams->S3DataBlock;
|
||||
uintptr_t pos, size;
|
||||
|
||||
get_s3nv_data(S3DataTypeNonVolatile, &pos, &size);
|
||||
|
@ -72,9 +70,8 @@ AGESA_STATUS OemInitResume(AMD_RESUME_PARAMS *ResumeParams)
|
|||
return AGESA_SUCCESS;
|
||||
}
|
||||
|
||||
AGESA_STATUS OemS3LateRestore(AMD_S3LATE_PARAMS *S3LateParams)
|
||||
AGESA_STATUS OemS3LateRestore(AMD_S3_PARAMS *dataBlock)
|
||||
{
|
||||
AMD_S3_PARAMS *dataBlock = &S3LateParams->S3DataBlock;
|
||||
void *dst;
|
||||
size_t len;
|
||||
|
||||
|
@ -112,9 +109,8 @@ static int spi_SaveS3info(u32 pos, u32 size, u8 *buf, u32 len)
|
|||
|
||||
static u8 MTRRStorage[S3_DATA_MTRR_SIZE];
|
||||
|
||||
AGESA_STATUS OemS3Save(AMD_S3SAVE_PARAMS *S3SaveParams)
|
||||
AGESA_STATUS OemS3Save(AMD_S3_PARAMS *dataBlock)
|
||||
{
|
||||
AMD_S3_PARAMS *dataBlock = &S3SaveParams->S3DataBlock;
|
||||
u32 MTRRStorageSize = 0;
|
||||
uintptr_t pos, size;
|
||||
|
||||
|
|
Loading…
Reference in New Issue