ArmSystem.py (13396:23277eaae855) ArmSystem.py (13608:e91969b61d3d)
1# Copyright (c) 2009, 2012-2013, 2015-2018 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 23 unchanged lines hidden (view full) ---

32# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35#
36# Authors: Ali Saidi
37# Glenn Bergmans
38
39from m5.params import *
1# Copyright (c) 2009, 2012-2013, 2015-2018 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 23 unchanged lines hidden (view full) ---

32# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35#
36# Authors: Ali Saidi
37# Glenn Bergmans
38
39from m5.params import *
40from m5.options import *
40from m5.SimObject import *
41from m5.util.fdthelper import *
42
43from System import System
44from ArmSemihosting import ArmSemihosting
45
46class ArmMachineType(Enum):
47 map = {

--- 85 unchanged lines hidden (view full) ---

133 "enable early kernel symbol tables before MMU")
134 enable_context_switch_stats_dump = Param.Bool(False, "enable stats/task info dumping at context switch boundaries")
135
136 panic_on_panic = Param.Bool(False, "Trigger a gem5 panic if the " \
137 "guest kernel panics")
138 panic_on_oops = Param.Bool(False, "Trigger a gem5 panic if the " \
139 "guest kernel oopses")
140
41from m5.SimObject import *
42from m5.util.fdthelper import *
43
44from System import System
45from ArmSemihosting import ArmSemihosting
46
47class ArmMachineType(Enum):
48 map = {

--- 85 unchanged lines hidden (view full) ---

134 "enable early kernel symbol tables before MMU")
135 enable_context_switch_stats_dump = Param.Bool(False, "enable stats/task info dumping at context switch boundaries")
136
137 panic_on_panic = Param.Bool(False, "Trigger a gem5 panic if the " \
138 "guest kernel panics")
139 panic_on_oops = Param.Bool(False, "Trigger a gem5 panic if the " \
140 "guest kernel oopses")
141
142 def generateDtb(self, outdir, filename):
143 """
144 Autogenerate DTB. Arguments are the folder where the DTB
145 will be stored, and the name of the DTB file.
146 """
147 state = FdtState(addr_cells=2, size_cells=2, cpu_cells=1)
148 rootNode = self.generateDeviceTree(state)
149
150 fdt = Fdt()
151 fdt.add_rootnode(rootNode)
152 dtb_filename = os.path.join(outdir, filename)
153 self.dtb_filename = fdt.writeDtbFile(dtb_filename)
154
141class LinuxArmSystem(GenericArmSystem):
142 type = 'LinuxArmSystem'
143 cxx_header = "arch/arm/linux/system.hh"
144
145 @cxxMethod
146 def dumpDmesg(self):
147 """Dump dmesg from the simulated kernel to standard out"""
148 pass
149
150 # Have Linux systems for ARM auto-calc their load_addr_mask for proper
151 # kernel relocation.
152 load_addr_mask = 0x0
153
154class FreebsdArmSystem(GenericArmSystem):
155 type = 'FreebsdArmSystem'
156 cxx_header = "arch/arm/freebsd/system.hh"
155class LinuxArmSystem(GenericArmSystem):
156 type = 'LinuxArmSystem'
157 cxx_header = "arch/arm/linux/system.hh"
158
159 @cxxMethod
160 def dumpDmesg(self):
161 """Dump dmesg from the simulated kernel to standard out"""
162 pass
163
164 # Have Linux systems for ARM auto-calc their load_addr_mask for proper
165 # kernel relocation.
166 load_addr_mask = 0x0
167
168class FreebsdArmSystem(GenericArmSystem):
169 type = 'FreebsdArmSystem'
170 cxx_header = "arch/arm/freebsd/system.hh"