diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2023-09-01 15:39:56 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-09-07 08:57:16 +0300 |
commit | b227c990de9a3af37d1c9e6fd9b193145b4ca779 (patch) | |
tree | c8b30c538b265533e96e348d4b6b37d1323b70c6 /drivers | |
parent | 38bae445a30befdf1d88476ef86ee27ee3525a28 (diff) | |
download | lwn-b227c990de9a3af37d1c9e6fd9b193145b4ca779.tar.gz lwn-b227c990de9a3af37d1c9e6fd9b193145b4ca779.zip |
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: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230901073956.54203-9-pkshih@realtek.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/fw.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/reg.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index e69cc3ec0eb9..dc951cf95576 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -912,6 +912,10 @@ static int rtw89_fw_download_suit(struct rtw89_dev *rtwdev, 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); if (ret) { rtw89_err(rtwdev, "[ERR]H2C path ready\n"); diff --git a/drivers/net/wireless/realtek/rtw89/reg.h b/drivers/net/wireless/realtek/rtw89/reg.h index 55ba995da1bc..95dc51eb515f 100644 --- a/drivers/net/wireless/realtek/rtw89/reg.h +++ b/drivers/net/wireless/realtek/rtw89/reg.h @@ -3670,6 +3670,8 @@ #define B_BE_LPS_STATUS BIT(3) #define B_BE_HCI_TXDMA_BUSY BIT(2) +#define R_BE_SECURE_BOOT_MALLOC_INFO 0x0184 + #define R_BE_WCPU_FW_CTRL 0x01E0 #define B_BE_RUN_ENV_MASK GENMASK(31, 30) #define B_BE_WCPU_FWDL_STATUS_MASK GENMASK(29, 26) |