diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-06-28 07:38:46 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-11-09 20:52:07 +0100 |
commit | 9d6f365643d78c223b7ebf9e214381ec707b482a (patch) | |
tree | 96a77b4bb24e865f854bec44cb3e4f2d2061e43d /src/lib/cbfs.c | |
parent | 2c7ad8c8d3f7e508ee64f1af4fe81a60b8c84da1 (diff) |
ACPI S3: Remove HIGH_MEMORY_SAVE where possible
Add implementation to use actual requirements of ramstage size
for S3 resume backup in CBMEM. The backup covers complete pages of 4 KiB.
Only the required amount of low memory is backed up when ACPI_TINY_LOWMEM_BACKUP
is selected for the platform. Enable this option for AGESA and binaryPI, other
platforms (without RELOCATABLE_RAMSTAGE) currently keep their romstage ramstack
in low memory for s3 resume path.
Change-Id: Ide7ce013f3727c2928cdb00fbcc7e7e84e859ff1
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15255
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Diffstat (limited to 'src/lib/cbfs.c')
-rw-r--r-- | src/lib/cbfs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 5a2f63f95d..19737a4192 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -187,6 +187,18 @@ size_t cbfs_boot_load_struct(const char *name, void *buf, size_t buf_size) buf, buf_size, compression_algo); } +size_t cbfs_prog_stage_section(struct prog *pstage, uintptr_t *base) +{ + struct cbfs_stage stage; + const struct region_device *fh = prog_rdev(pstage); + + if (rdev_readat(fh, &stage, 0, sizeof(stage)) != sizeof(stage)) + return 0; + + *base = (uintptr_t)stage.load; + return stage.memlen; +} + int cbfs_prog_stage_load(struct prog *pstage) { struct cbfs_stage stage; |