Merge pull request #270 from liamchalk00/main

pmpcfg test cases
This commit is contained in:
David Harris 2023-04-22 08:41:11 -07:00 committed by GitHub
commit 0c459e5edd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
// pmpcfg part 1 // pmpcfg part 1
// Kevin Wan, kewan@hmc.edu, 4/18/2023 // Kevin Wan, kewan@hmc.edu, 4/18/2023
// Liam Chalk, lchalk@hmc.edu, 4/19/2023 // Liam Chalk, lchalk@hmc.edu, 4/21/2023
// locks each pmpXcfg bit field in order, from X = 15 to X = 0, with the A[1:0] field set to TOR. // locks each pmpXcfg bit field in order, from X = 15 to X = 0, with the A[1:0] field set to TOR.
// See the next part in pmpcfg1.S // See the next part in pmpcfg1.S
@ -19,32 +19,37 @@ main:
li t0, 0x90000000 li t0, 0x90000000
csrw pmpaddr0, t0 csrw pmpaddr0, t0
li t0, 0x00000017 li t0, 0x00001700
csrw pmpcfg0, t0
li t0, 0x90000000
csrw pmpaddr0, t0
li t0, 0x00001700
csrw pmpcfg1, t0 csrw pmpcfg1, t0
li t0, 0x90000000 li t0, 0x90000000
csrw pmpaddr0, t0 csrw pmpaddr0, t0
li t0, 0x00000017 li t0, 0x00001700
csrw pmpcfg2, t0 csrw pmpcfg2, t0
li t0, 0x90000000 li t0, 0x90000000
csrw pmpaddr0, t0 csrw pmpaddr0, t0
li t0, 0x00000017 li t0, 0x00001700
csrw pmpcfg3, t0 csrw pmpcfg3, t0
li t0, 0x90000000 li t0, 0x90000000
csrw pmpaddr1, t0 csrw pmpaddr1, t0
li t0, 0x00000017 li t0, 0x00001700
csrw pmpcfg1, t0 csrw pmpcfg1, t0
li t0, 0x90000000 li t0, 0x90000000
csrw pmpaddr1, t0 csrw pmpaddr2, t0
li t0, 0x00000017 li t0, 0x00001700
csrw pmpcfg2, t0 csrw pmpcfg2, t0
li t0, 0x90000000 li t0, 0x90000000
csrw pmpaddr1, t0 csrw pmpaddr3, t0
li t0, 0x00000017 li t0, 0x00001700
csrw pmpcfg3, t0 csrw pmpcfg3, t0
li t0, 0x8800000000000000 li t0, 0x8800000000000000