Commit b227c990 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

wifi: rtw89: 8922a: set memory heap address for secure firmware

Secure firmware is protected by public/private key cryptography. To help
firmware self verify integrity, configure a heap address for these
data before downloading firmware.
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230901073956.54203-9-pkshih@realtek.com
parent 38bae445
...@@ -912,6 +912,10 @@ static int rtw89_fw_download_suit(struct rtw89_dev *rtwdev, ...@@ -912,6 +912,10 @@ static int rtw89_fw_download_suit(struct rtw89_dev *rtwdev,
return ret; return ret;
} }
if (rtwdev->chip->chip_id == RTL8922A &&
(fw_suit->type == RTW89_FW_NORMAL || fw_suit->type == RTW89_FW_WOWLAN))
rtw89_write32(rtwdev, R_BE_SECURE_BOOT_MALLOC_INFO, 0x20248000);
ret = mac->fwdl_check_path_ready(rtwdev, true); ret = mac->fwdl_check_path_ready(rtwdev, true);
if (ret) { if (ret) {
rtw89_err(rtwdev, "[ERR]H2C path ready\n"); rtw89_err(rtwdev, "[ERR]H2C path ready\n");
......
...@@ -3670,6 +3670,8 @@ ...@@ -3670,6 +3670,8 @@
#define B_BE_LPS_STATUS BIT(3) #define B_BE_LPS_STATUS BIT(3)
#define B_BE_HCI_TXDMA_BUSY BIT(2) #define B_BE_HCI_TXDMA_BUSY BIT(2)
#define R_BE_SECURE_BOOT_MALLOC_INFO 0x0184
#define R_BE_WCPU_FW_CTRL 0x01E0 #define R_BE_WCPU_FW_CTRL 0x01E0
#define B_BE_RUN_ENV_MASK GENMASK(31, 30) #define B_BE_RUN_ENV_MASK GENMASK(31, 30)
#define B_BE_WCPU_FWDL_STATUS_MASK GENMASK(29, 26) #define B_BE_WCPU_FWDL_STATUS_MASK GENMASK(29, 26)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment