Hello Nikos Nikoleris,

I'd like you to do a code review. Please visit

    https://gem5-review.googlesource.com/8143

to review the following change.


Change subject: arch-arm: Add support for automatic reset addr selection
......................................................................

arch-arm: Add support for automatic reset addr selection

Add an option to automatically set the aarch64 reset vector to the
entry point of the kernel. This is useful when running bare metal
workloads that don't use a normal boot loader.x

Change-Id: Id472f865d461f0d8d8ea8efe5db582c170de0b90
Signed-off-by: Andreas Sandberg <andreas.sandb...@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikole...@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrie...@arm.com>
---
M src/arch/arm/ArmSystem.py
M src/arch/arm/system.cc
2 files changed, 7 insertions(+), 3 deletions(-)



diff --git a/src/arch/arm/ArmSystem.py b/src/arch/arm/ArmSystem.py
index f76140b..5687477 100644
--- a/src/arch/arm/ArmSystem.py
+++ b/src/arch/arm/ArmSystem.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2012-2013, 2015-2017 ARM Limited
+# Copyright (c) 2009, 2012-2013, 2015-2018 ARM Limited
 # All rights reserved.
 #
 # The license below extends only to copyright in the software and shall
@@ -72,6 +72,8 @@
     reset_addr_64 = Param.Addr(0x0,
"Reset address if the highest implemented exception level is 64 bits "
         "(ARMv8)")
+    auto_reset_addr_64 = Param.Bool(False,
+ "Determine reset address from kernel entry point if no boot loader")
     phys_addr_range_64 = Param.UInt8(40,
"Supported physical address range in bits when using AArch64 (ARMv8)")
     have_large_asid_64 = Param.Bool(False,
diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc
index 097a87b..50ac4ae 100644
--- a/src/arch/arm/system.cc
+++ b/src/arch/arm/system.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2012-2013, 2015,2017 ARM Limited
+ * Copyright (c) 2010, 2012-2013, 2015,2017-2018 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -62,7 +62,9 @@
       _haveVirtualization(p->have_virtualization),
       _genericTimer(nullptr),
       _highestELIs64(p->highest_el_is_64),
-      _resetAddr64(p->reset_addr_64),
+      _resetAddr64(p->auto_reset_addr_64 ?
+                   (kernelEntry & loadAddrMask) + loadAddrOffset :
+                   p->reset_addr_64),
       _physAddrRange64(p->phys_addr_range_64),
       _haveLargeAsid64(p->have_large_asid_64),
       _m5opRange(p->m5ops_base ?

--
To view, visit https://gem5-review.googlesource.com/8143
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id472f865d461f0d8d8ea8efe5db582c170de0b90
Gerrit-Change-Number: 8143
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Nikos Nikoleris <nikos.nikole...@arm.com>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to