soc/mediatek/mt8196: Notify MCUPM to support MTE

Before CPU resume, it is necessary to reinitialize the MTE-related
settings of booker in MCUPM to prevent the loss of booker
configurations after resume.

BUG=b:467186613
TEST=Build pass, Verify S/R OK on Navi and Sapphire.

Change-Id: Ieaf4c2ea0f8a5c372a5dbf4d0f6c44fbd978e6a6
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90546
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Jarried Lin 2025-12-18 14:24:31 +08:00 committed by Matt DeVillier
commit 56a7ae4389
2 changed files with 5 additions and 0 deletions

View file

@ -4,6 +4,7 @@
#include <device/mmio.h>
#include <soc/addressmap.h>
#include <soc/booker.h>
#include <soc/mcupm_plat.h>
#define REG_READ_ONLY_HASH_VALUE (MCUCFG_BASE + 0x059C)
#define REG_MCUSYS_RESERVED_REG2 (MCUCFG_BASE + 0xFFE8)
@ -61,6 +62,9 @@ void booker_mte_init(uint64_t mte_tag_addr)
{
int i;
/* Notify MCUPM to configure MTE on resume path. */
setbits32p(MTE_ENABLE_REG, 0xF);
printk(BIOS_DEBUG, "%s: MTE tag addr %#llx\n", __func__, mte_tag_addr);
/* Setting MTU TAG */

View file

@ -92,5 +92,6 @@
#define ABNORMALBOOT_REG GPR_BASE_ADDR_MCU(1)
#define WARMBOOT_REG GPR_BASE_ADDR_MCU(23)
#define MTE_ENABLE_REG GPR_BASE_ADDR_MCU(25)
#endif /* __SOC_MEDIATEK_MT8196_INCLUDE_SOC_MCUPM_PLAT_H__ */