[gem5-dev] Change in gem5/gem5[develop]: arm: Add a callSemihosting method that figures out the width.

2020-03-27 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/25951 )


Change subject: arm: Add a callSemihosting method that figures out the  
width.

..

arm: Add a callSemihosting method that figures out the width.

Change-Id: Ic94987fffd04648932e5dd085ffeef8500e335cf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25951
Tested-by: Gem5 Cloud Project GCB service account  
<345032938...@cloudbuild.gserviceaccount.com>

Reviewed-by: Giacomo Travaglini 
Maintainer: Giacomo Travaglini 
---
M src/arch/arm/system.cc
M src/arch/arm/system.hh
2 files changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
  Gem5 Cloud Project GCB service account: Regressions pass



diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc
index 5d8808c..5d261a7 100644
--- a/src/arch/arm/system.cc
+++ b/src/arch/arm/system.cc
@@ -191,6 +191,15 @@
 return getArmSystem(tc)->semihosting->call32(tc, gem5_ops);
 }

+bool
+ArmSystem::callSemihosting(ThreadContext *tc, bool gem5_ops)
+{
+if (ArmISA::inAArch64(tc))
+return callSemihosting64(tc, gem5_ops);
+else
+return callSemihosting32(tc, gem5_ops);
+}
+
 void
 ArmSystem::callSetStandByWfi(ThreadContext *tc)
 {
diff --git a/src/arch/arm/system.hh b/src/arch/arm/system.hh
index 370a3df..364a804 100644
--- a/src/arch/arm/system.hh
+++ b/src/arch/arm/system.hh
@@ -319,6 +319,9 @@
 /** Make a Semihosting call from aarch32 */
 static bool callSemihosting32(ThreadContext *tc, bool gem5_ops=false);

+/** Make a Semihosting call from either aarch64 or aarch32 */
+static bool callSemihosting(ThreadContext *tc, bool gem5_ops=false);
+
 /** Make a call to notify the power controller of STANDBYWFI assertion  
*/

 static void callSetStandByWfi(ThreadContext *tc);


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/25951
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: Ic94987fffd04648932e5dd085ffeef8500e335cf
Gerrit-Change-Number: 25951
Gerrit-PatchSet: 16
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Chun-Chen TK Hsu 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Gem5 Cloud Project GCB service account  
<345032938...@cloudbuild.gserviceaccount.com>

Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[develop]: arm: Add a callSemihosting method that figures out the width.

2020-02-26 Thread Gabe Black (Gerrit)
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/25951 )



Change subject: arm: Add a callSemihosting method that figures out the  
width.

..

arm: Add a callSemihosting method that figures out the width.

Change-Id: Ic94987fffd04648932e5dd085ffeef8500e335cf
---
M src/arch/arm/system.cc
M src/arch/arm/system.hh
2 files changed, 12 insertions(+), 0 deletions(-)



diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc
index 950caee..e25e201 100644
--- a/src/arch/arm/system.cc
+++ b/src/arch/arm/system.cc
@@ -303,6 +303,15 @@
 return getArmSystem(tc)->semihosting->call32(tc, gem5_ops);
 }

+bool
+ArmSystem::callSemihosting(ThreadContext *tc, bool gem5_ops)
+{
+if (ArmISA::inAArch64(tc))
+return callSemihosting64(tc, gem5_ops);
+else
+return callSemihosting32(tc, gem5_ops);
+}
+
 ArmSystem *
 ArmSystemParams::create()
 {
diff --git a/src/arch/arm/system.hh b/src/arch/arm/system.hh
index e890d10..709a12e 100644
--- a/src/arch/arm/system.hh
+++ b/src/arch/arm/system.hh
@@ -338,6 +338,9 @@

 /** Make a Semihosting call from aarch32 */
 static bool callSemihosting32(ThreadContext *tc, bool gem5_ops=false);
+
+/** Make a Semihosting call from either aarch64 or aarch32 */
+static bool callSemihosting(ThreadContext *tc, bool gem5_ops=false);
 };

 class GenericArmSystem : public ArmSystem

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/25951
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: Ic94987fffd04648932e5dd085ffeef8500e335cf
Gerrit-Change-Number: 25951
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev