diff options
author | Michał Żygowski <michal.zygowski@3mdeb.com> | 2019-12-02 17:02:00 +0100 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-12-04 12:28:16 +0000 |
commit | 5a6620277d6232a0d222047cbd7db414fb8585bc (patch) | |
tree | 69e63c9ccd4a4af1f058091a5a3dae02ae485e1a /src/soc/amd/common/block/acpimmio | |
parent | f65c1e40885377a07794fc59f38fce1c9230854f (diff) |
amdblocks/acpimmio: add common functions for AP entry
Move the stoneyridge implementation of get/set AP entry to the common
block.
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I9c73940ffe5f735dcd844911361355c384f617b1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37416
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Diffstat (limited to 'src/soc/amd/common/block/acpimmio')
-rw-r--r-- | src/soc/amd/common/block/acpimmio/biosram.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/acpimmio/biosram.c b/src/soc/amd/common/block/acpimmio/biosram.c index f0a1257fb9..e33f02d02c 100644 --- a/src/soc/amd/common/block/acpimmio/biosram.c +++ b/src/soc/amd/common/block/acpimmio/biosram.c @@ -15,6 +15,17 @@ #include <amdblocks/acpimmio.h> #include <amdblocks/biosram.h> +void *get_ap_entry_ptr(void) +{ + return (void *)biosram_read32(BIOSRAM_AP_ENTRY); +} + +void set_ap_entry_ptr(void *entry) +{ + biosram_write32(BIOSRAM_AP_ENTRY, (uintptr_t)entry); +} + + void backup_top_of_low_cacheable(uintptr_t ramtop) { biosram_write32(BIOSRAM_CBMEM_TOP, ramtop); |