esp32c3/memprot: Fix incorrect access to DRAM0 split line registers

memprot_ll_set_dram0_split_line_* and memprot_ll_get_dram0_split_line_* APIs were accessing
incorrect configuration register
This commit is contained in:
Sachin Parekh 2021-04-09 16:51:34 +05:30
parent 8807d8a5d8
commit 65b9f87998

View File

@ -381,22 +381,22 @@ static inline void memprot_ll_set_dram0_split_line(const void *line_addr, uint32
static inline void memprot_ll_set_dram0_split_line_D_0(const void *line_addr) static inline void memprot_ll_set_dram0_split_line_D_0(const void *line_addr)
{ {
memprot_ll_set_dram0_split_line(line_addr, SENSITIVE_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_2_REG); memprot_ll_set_dram0_split_line(line_addr, SENSITIVE_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_4_REG);
} }
static inline void memprot_ll_set_dram0_split_line_D_1(const void *line_addr) static inline void memprot_ll_set_dram0_split_line_D_1(const void *line_addr)
{ {
memprot_ll_set_dram0_split_line(line_addr, SENSITIVE_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_3_REG); memprot_ll_set_dram0_split_line(line_addr, SENSITIVE_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_5_REG);
} }
static inline void* memprot_ll_get_dram0_split_line_D_0(void) static inline void* memprot_ll_get_dram0_split_line_D_0(void)
{ {
return memprot_ll_get_split_addr_from_reg(REG_READ(SENSITIVE_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_2_REG), SOC_DIRAM_DRAM_LOW); return memprot_ll_get_split_addr_from_reg(REG_READ(SENSITIVE_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_4_REG), SOC_DIRAM_DRAM_LOW);
} }
static inline void* memprot_ll_get_dram0_split_line_D_1(void) static inline void* memprot_ll_get_dram0_split_line_D_1(void)
{ {
return memprot_ll_get_split_addr_from_reg(REG_READ(SENSITIVE_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_3_REG), SOC_DIRAM_DRAM_LOW); return memprot_ll_get_split_addr_from_reg(REG_READ(SENSITIVE_CORE_X_IRAM0_DRAM0_DMA_SPLIT_LINE_CONSTRAIN_5_REG), SOC_DIRAM_DRAM_LOW);
} }