fix(LoadUnit): no longer allow tlb missing misaligned load to enter misalignbuffer (#4760)
EMU Test / Changes Detection (push) Has been cancelled Details
Release Jobs / build-xsdev-image (push) Has been cancelled Details
EMU Test / Generate Verilog (push) Has been cancelled Details
EMU Test / EMU - Basics (push) Has been cancelled Details
EMU Test / EMU - CHI (push) Has been cancelled Details
EMU Test / Docker Build (push) Has been cancelled Details
EMU Test / EMU - Performance (push) Has been cancelled Details
EMU Test / EMU - MC (push) Has been cancelled Details
EMU Test / SIMV - Basics (push) Has been cancelled Details
EMU Test / Upload Artifacts (push) Has been cancelled Details
EMU Test / Check Submodules (push) Has been cancelled Details
EMU Test / Check Format (push) Has been cancelled Details

Misaligned load that cause TLB miss are no longer allowed to enter the
loadmisalignbuffer.
This is because it would cause subsequent exception addresses to be
incorrect :

The original address of the misaligned load is 0x07, while the first
request address after splitting is 0x00.
Thus, when a page fault exception occurs, 0x00 would be considered the
exception address instead of the original 0x07.

---

Store have always been handled this way and do not require modification.
This commit is contained in:
Anzo 2025-05-31 16:38:27 +08:00 committed by GitHub
parent 74435e9a9c
commit 8769efd7b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -1211,8 +1211,7 @@ class LoadUnit(implicit p: Parameters) extends XSModule
// soft prefetch will not trigger any exception (but ecc error interrupt may
// be triggered)
val s2_tlb_unrelated_exceps = s2_in.uop.exceptionVec(loadAddrMisaligned) ||
s2_in.uop.exceptionVec(breakPoint)
val s2_tlb_unrelated_exceps = s2_in.uop.exceptionVec(breakPoint)
when (!s2_in.delayedLoadError && (s2_prf || s2_in.tlbMiss && !s2_tlb_unrelated_exceps)) {
s2_exception_vec := 0.U.asTypeOf(s2_exception_vec.cloneType)
s2_isMisalign := false.B