drivers/amd/agesa: Don't save regular boot MTRR to flash

Save the regular boot MTRRs that are restored on the S3 path during
the CPU init in cbmem instead of storing them to the SPI flash.

This was probably done because historically this code run with late
cbmem init (in ramstage).

TESTED on pcengines/apu1 and lenovo/g505s: S3 resume works fine.

Change-Id: Ia58e7cd1afb785ba0c379ba75ef6090b56cb9dc6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44294
Reviewed-by: Mike Banon <mikebdp2@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
This commit is contained in:
Arthur Heymans
2020-08-07 22:12:09 +02:00
committed by Michał Żygowski
parent df3d97e821
commit 750d57ff5d
5 changed files with 21 additions and 53 deletions

View File

@@ -38,7 +38,7 @@ void EmptyHeap(void);
void fixup_cbmem_to_UC(int s3resume);
void restore_mtrr(void);
void backup_mtrr(void *mtrr_store, u32 *mtrr_store_size);
void backup_mtrr(void);
const void *OemS3Saved_MTRR_Storage(void);
#endif /* _AGESA_HELPER_H_ */