Merge pull request #823 from panciyan/riscv

target/riscv: leaf PTE check PTE_W missing
This commit is contained in:
Tim Newsome 2023-04-07 10:05:57 -07:00 committed by GitHub
commit 0c76e263e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1984,7 +1984,7 @@ static int riscv_address_translate(struct target *target,
if (!(pte & PTE_V) || (!(pte & PTE_R) && (pte & PTE_W)))
return ERROR_FAIL;
if ((pte & PTE_R) || (pte & PTE_X)) /* Found leaf PTE. */
if ((pte & PTE_R) || (pte & PTE_W) || (pte & PTE_X)) /* Found leaf PTE. */
break;
i--;