Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/26993 )

Change subject: configs: Enable Semihosting for baremetal.py
......................................................................

configs: Enable Semihosting for baremetal.py

This is enabled via the --semihosting option

Change-Id: If6961cba8ec4a3aa22e788db6fe0ae54e169bb9c
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26993
Tested-by: Gem5 Cloud Project GCB service account <345032938...@cloudbuild.gserviceaccount.com>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Reviewed-by: Gabe Black <gabebl...@google.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
---
M configs/example/arm/baremetal.py
1 file changed, 21 insertions(+), 1 deletion(-)

Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass
  Gem5 Cloud Project GCB service account: Regressions pass



diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py
index c691a7d..85ded9c 100644
--- a/configs/example/arm/baremetal.py
+++ b/configs/example/arm/baremetal.py
@@ -104,6 +104,14 @@

     MemConfig.config_mem(args, system)

+    if args.semi_enable:
+        system.semihosting = ArmSemihosting(
+            stdin=args.semi_stdin,
+            stdout=args.semi_stdout,
+            stderr=args.semi_stderr,
+            cmd_line = " ".join([ args.kernel ] + args.args)
+        )
+
     # Add the PCI devices we need for this system. The base system
     # doesn't have any PCI devices by default since they are assumed
     # to be added by the configurastion scripts needin them.
@@ -203,7 +211,19 @@
     parser.add_argument("--restore", type=str, default=None)
     parser.add_argument("--dtb-gen", action="store_true",
help="Doesn't run simulation, it generates a DTB only")
-
+    parser.add_argument("--semi-enable", action="store_true",
+                        help="Enable semihosting support")
+    parser.add_argument("--semi-stdin", type=str, default="stdin",
+                        help="Standard input for semihosting " \
+                        "(default: gem5's stdin)")
+    parser.add_argument("--semi-stdout", type=str, default="stdout",
+                        help="Standard output for semihosting " \
+                        "(default: gem5's stdout)")
+    parser.add_argument("--semi-stderr", type=str, default="stderr",
+                        help="Standard error for semihosting " \
+                        "(default: gem5's stderr)")
+    parser.add_argument("args", default=[], nargs="*",
+                        help="Semihosting arguments to pass to benchmark")

     args = parser.parse_args()


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/26993
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: If6961cba8ec4a3aa22e788db6fe0ae54e169bb9c
Gerrit-Change-Number: 26993
Gerrit-PatchSet: 6
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Ciro Santilli <ciro.santi...@arm.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Gem5 Cloud Project GCB service account <345032938...@cloudbuild.gserviceaccount.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to