From 52f5cdce17f6ef4e37984e098d186cefe3950eb4 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Tue, 30 Jan 2018 15:28:14 -0700 Subject: soc/amd/common: Add S3 supporting functions Add functions that the wrapper will call to get and save the S3 data. The wrapper requires two types of data saved: * Non-volatile: Information that is the minimum required for bringing the DRAM controller back online. This change uses the common mrc_cache driver to manage the storage * Volatile: May be stored in DRAM; information required to complete the system restoration process. TEST=Suspend/Resume Kahlee with complete S3 patch stack BUG=b:69614064 Change-Id: Ie60162ea10f053393bc84e927dbd80c9279e6b63 Signed-off-by: Marshall Dawson Reviewed-on: https://review.coreboot.org/22727 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- .../amd/common/block/include/amdblocks/s3_resume.h | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/soc/amd/common/block/include/amdblocks/s3_resume.h (limited to 'src/soc/amd/common/block/include/amdblocks/s3_resume.h') diff --git a/src/soc/amd/common/block/include/amdblocks/s3_resume.h b/src/soc/amd/common/block/include/amdblocks/s3_resume.h new file mode 100644 index 0000000000..13f801021c --- /dev/null +++ b/src/soc/amd/common/block/include/amdblocks/s3_resume.h @@ -0,0 +1,26 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2017 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __AMD_S3_RESUME_H__ +#define __AMD_S3_RESUME_H__ + +#include + +int save_s3_info(void *nv_base, size_t nv_size, + void *vol_base, size_t vol_size); +void get_s3nv_info(void **base, size_t *size); +void get_s3vol_info(void **base, size_t *size); + +#endif /* __AMD_S3_RESUME_H__ */ -- cgit v1.2.3