Roger Chang has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/68198?usp=email )

 (

3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: arch-riscv,dev: Fix behavior issues of PLIC
......................................................................

arch-riscv,dev: Fix behavior issues of PLIC

1. Fix reserved size between enable memory map and threshold memory
map. The number of enablePadding should be the number of context in
PLIC
2. writePriority to memory should update

Change-Id: Ib4b7e5ecd183863e140c4f3382a75057902d446d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68198
Reviewed-by: Ayaz Akram <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Yu-hsin Wang <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M src/dev/riscv/plic.cc
1 file changed, 22 insertions(+), 1 deletion(-)

Approvals:
  Ayaz Akram: Looks good to me, but someone else must approve
  kokoro: Regressions pass
  Jason Lowe-Power: Looks good to me, approved
  Yu-hsin Wang: Looks good to me, approved




diff --git a/src/dev/riscv/plic.cc b/src/dev/riscv/plic.cc
index b8f765a..371af9e 100644
--- a/src/dev/riscv/plic.cc
+++ b/src/dev/riscv/plic.cc
@@ -203,7 +203,7 @@
         - plic->nSrc32 * 4;
     reserved.emplace_back("reserved1", reserve1_size);
     const size_t reserve2_size = thresholdStart - enableStart
-        - plic->nSrc32 * plic->nContext * enablePadding;
+        - plic->nContext * enablePadding;
     reserved.emplace_back("reserved2", reserve2_size);
     const size_t reserve3_size = plic->pioSize - thresholdStart
         - plic->nContext * thresholdPadding;
@@ -333,6 +333,8 @@
 Plic::writeThreshold(Register32& reg, const uint32_t& data,
     const int context_id)
 {
+    reg.update(data);
+
     DPRINTF(Plic,
         "Threshold updated - context: %d, val: %d\n",
         context_id, reg.get());

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/68198?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib4b7e5ecd183863e140c4f3382a75057902d446d
Gerrit-Change-Number: 68198
Gerrit-PatchSet: 6
Gerrit-Owner: Roger Chang <[email protected]>
Gerrit-Reviewer: Ayaz Akram <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Roger Chang <[email protected]>
Gerrit-Reviewer: Yu-hsin Wang <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-CC: Earl Ou <[email protected]>
Gerrit-CC: Hoa Nguyen <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to