mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(hal): Fix the external memory vaddr region validity check
- For c6 and h2, the vaddr end calculated was off by 1 byte.
This commit is contained in:
parent
d3c99ed3b8
commit
a0da805f2b
@ -102,7 +102,7 @@ static inline bool mmu_ll_check_valid_ext_vaddr_region(uint32_t mmu_id, uint32_t
|
|||||||
{
|
{
|
||||||
(void)mmu_id;
|
(void)mmu_id;
|
||||||
(void)type;
|
(void)type;
|
||||||
uint32_t vaddr_end = vaddr_start + len;
|
uint32_t vaddr_end = vaddr_start + len - 1;
|
||||||
return (ADDRESS_IN_IRAM0_CACHE(vaddr_start) && ADDRESS_IN_IRAM0_CACHE(vaddr_end)) || (ADDRESS_IN_DRAM0_CACHE(vaddr_start) && ADDRESS_IN_DRAM0_CACHE(vaddr_end));
|
return (ADDRESS_IN_IRAM0_CACHE(vaddr_start) && ADDRESS_IN_IRAM0_CACHE(vaddr_end)) || (ADDRESS_IN_DRAM0_CACHE(vaddr_start) && ADDRESS_IN_DRAM0_CACHE(vaddr_end));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ static inline bool mmu_ll_check_valid_ext_vaddr_region(uint32_t mmu_id, uint32_t
|
|||||||
{
|
{
|
||||||
(void)mmu_id;
|
(void)mmu_id;
|
||||||
(void)type;
|
(void)type;
|
||||||
uint32_t vaddr_end = vaddr_start + len;
|
uint32_t vaddr_end = vaddr_start + len - 1;
|
||||||
return (ADDRESS_IN_IRAM0_CACHE(vaddr_start) && ADDRESS_IN_IRAM0_CACHE(vaddr_end)) || (ADDRESS_IN_DRAM0_CACHE(vaddr_start) && ADDRESS_IN_DRAM0_CACHE(vaddr_end));
|
return (ADDRESS_IN_IRAM0_CACHE(vaddr_start) && ADDRESS_IN_IRAM0_CACHE(vaddr_end)) || (ADDRESS_IN_DRAM0_CACHE(vaddr_start) && ADDRESS_IN_DRAM0_CACHE(vaddr_end));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user