mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
gem5: revive dp650
This commit is contained in:
@@ -186,6 +186,10 @@ TODO: implement fully, some stuff is escaping currently.
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Gem5 args.
|
# Gem5 args.
|
||||||
|
self.add_argument(
|
||||||
|
'--dp650', default=False,
|
||||||
|
help='Use the ARM DP650 display processor instead of the default HDLCD on gem5.'
|
||||||
|
)
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
'--gem5-build-dir',
|
'--gem5-build-dir',
|
||||||
help='''\
|
help='''\
|
||||||
@@ -426,7 +430,10 @@ Valid emulators: {}
|
|||||||
env['gem5_arch'] = 'ARM'
|
env['gem5_arch'] = 'ARM'
|
||||||
if env['emulator'] == 'gem5':
|
if env['emulator'] == 'gem5':
|
||||||
if not env['_args_given']['machine']:
|
if not env['_args_given']['machine']:
|
||||||
env['machine'] = 'VExpress_GEM5_V1'
|
if env['dp650']:
|
||||||
|
env['machine'] = 'VExpress_GEM5_V1_DPU'
|
||||||
|
else:
|
||||||
|
env['machine'] = 'VExpress_GEM5_V1'
|
||||||
else:
|
else:
|
||||||
if not env['_args_given']['machine']:
|
if not env['_args_given']['machine']:
|
||||||
env['machine'] = 'virt'
|
env['machine'] = 'virt'
|
||||||
|
|||||||
12
run
12
run
@@ -40,10 +40,6 @@ https://superuser.com/questions/1373226/how-to-redirect-qemu-serial-output-to-bo
|
|||||||
'--debug-vm-args', default='',
|
'--debug-vm-args', default='',
|
||||||
help='Pass arguments to GDB.'
|
help='Pass arguments to GDB.'
|
||||||
)
|
)
|
||||||
self.add_argument(
|
|
||||||
'--dp650', default=False,
|
|
||||||
help='Use the ARM DP650 display processor instead of the default HDLCD on gem5.'
|
|
||||||
)
|
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
'--dtb',
|
'--dtb',
|
||||||
help='''\
|
help='''\
|
||||||
@@ -357,6 +353,10 @@ Run QEMU with VNC instead of the default SDL. Connect to it with:
|
|||||||
elif self.env['is_arm']:
|
elif self.env['is_arm']:
|
||||||
if self.env['kvm']:
|
if self.env['kvm']:
|
||||||
cmd.extend(['--cpu-type', 'ArmV8KvmCPU', LF])
|
cmd.extend(['--cpu-type', 'ArmV8KvmCPU', LF])
|
||||||
|
if self.env['dp650']:
|
||||||
|
dp650_cmd = 'dpu_'
|
||||||
|
else:
|
||||||
|
dp650_cmd = ''
|
||||||
cmd.extend([
|
cmd.extend([
|
||||||
# TODO why is it mandatory to pass mem= here? Not true for QEMU.
|
# TODO why is it mandatory to pass mem= here? Not true for QEMU.
|
||||||
# Anything smaller than physical blows up as expected, but why can't it auto-detect the right value?
|
# Anything smaller than physical blows up as expected, but why can't it auto-detect the right value?
|
||||||
@@ -367,7 +367,7 @@ Run QEMU with VNC instead of the default SDL. Connect to it with:
|
|||||||
if self.env['dtb'] is not None:
|
if self.env['dtb'] is not None:
|
||||||
dtb = self.env['dtb']
|
dtb = self.env['dtb']
|
||||||
elif self.env['dp650']:
|
elif self.env['dp650']:
|
||||||
dtb = os.path.join(common.gem5_system_dir, 'arm', 'dt', 'armv{}_gem5_v1_{}{}cpu.dtb'.format(common.armv, dp650_cmd, self.env['cpus'])), LF,
|
dtb = os.path.join(self.env['gem5_system_dir'], 'arm', 'dt', 'armv{}_gem5_v1_{}{}cpu.dtb'.format(self.env['armv'], dp650_cmd, self.env['cpus']))
|
||||||
if dtb is None:
|
if dtb is None:
|
||||||
if not self.env['baremetal']:
|
if not self.env['baremetal']:
|
||||||
cmd.extend(['--generate-dtb', LF])
|
cmd.extend(['--generate-dtb', LF])
|
||||||
@@ -400,7 +400,7 @@ Run QEMU with VNC instead of the default SDL. Connect to it with:
|
|||||||
'--little-cpus', '2', LF,
|
'--little-cpus', '2', LF,
|
||||||
])
|
])
|
||||||
if self.env['dtb']:
|
if self.env['dtb']:
|
||||||
cmd.extend(['--dtb', os.path.join(common.gem5_system_dir, 'arm', 'dt', 'armv8_gem5_v1_big_little_2_2.dtb'), NL])
|
cmd.extend(['--dtb', os.path.join(self.env['gem5_system_dir'], 'arm', 'dt', 'armv8_gem5_v1_big_little_2_2.dtb'), NL])
|
||||||
if self.env['wait_gdb']:
|
if self.env['wait_gdb']:
|
||||||
# https://stackoverflow.com/questions/49296092/how-to-make-gem5-wait-for-gdb-to-connect-to-reliably-break-at-start-kernel-of-th
|
# https://stackoverflow.com/questions/49296092/how-to-make-gem5-wait-for-gdb-to-connect-to-reliably-break-at-start-kernel-of-th
|
||||||
cmd.extend(['--param', 'system.cpu[0].wait_for_remote_gdb = True', LF])
|
cmd.extend(['--param', 'system.cpu[0].wait_for_remote_gdb = True', LF])
|
||||||
|
|||||||
Reference in New Issue
Block a user