arch-x86: Fix a bug in the protected mode IRET.
Fix the direction of the comparison which makes sure the new RIP will fit within the new CS limit. Change-Id: I3f3e66c185d0e1fbc430b0ae594d63cdd62b9dfd Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55887 Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -156,7 +156,7 @@ processCSDescriptor:
|
||||
# appropriate/other RIP checks.
|
||||
# if temp_RIP > CS.limit throw #GP(0)
|
||||
rdlimit t6, cs, dataSize=8
|
||||
sub t0, t1, t6, flags=(ECF,)
|
||||
sub t0, t6, t1, flags=(ECF,)
|
||||
fault "std::make_shared<GeneralProtection>(0)", flags=(CECF,)
|
||||
|
||||
#(temp_CPL!=CPL)
|
||||
|
||||
Reference in New Issue
Block a user