Skip to content

Commit bc9e348

Browse files
committed
start simple integration to test dp650
Not yet merged on gem5 mailine, review published at: https://gem5-review.googlesource.com/c/public/gem5/+/11036/1
1 parent aefe11a commit bc9e348

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

README.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3560,6 +3560,7 @@ Tested on: link:http://github.com/cirosantilli/linux-kernel-module-cheat/commit/
35603560
For `aarch64` we also need to configure the kernel with link:linux_config/display[]:
35613561

35623562
....
3563+
git -C "$(./getvar linux_src_dir)" fetch https://gem5.googlesource.com/arm/linux gem5/v4.15:gem5/v4.15
35633564
git -C "$(./getvar linux_src_dir)" checkout gem5/v4.15
35643565
./build-linux \
35653566
--arch aarch64 \

common.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ def get_argparse(default_args=None, argparse_args=None):
305305
Use the docker download Ubuntu root filesystem instead of the default Buildroot one.
306306
'''
307307
)
308+
parser.add_argument(
309+
'--dp650', default=False, action='store_true'
310+
)
308311
parser.add_argument(
309312
'-L', '--linux-build-id', default=default_build_id,
310313
help='Linux build ID. Allows you to keep multiple separate Linux builds. Default: %(default)s'
@@ -737,12 +740,6 @@ def setup(parser):
737740
common.buildroot_toolchain_prefix = 'arm-buildroot-linux-uclibcgnueabihf'
738741
common.crosstool_ng_toolchain_prefix = 'arm-unknown-eabi'
739742
common.ubuntu_toolchain_prefix = 'arm-linux-gnueabihf'
740-
if common.emulator == 'gem5':
741-
if common.machine is None:
742-
common.machine = 'VExpress_GEM5_V1'
743-
else:
744-
if common.machine is None:
745-
common.machine = 'virt'
746743
common.is_arm = True
747744
elif args.arch == 'aarch64':
748745
common.armv = 8
@@ -751,12 +748,6 @@ def setup(parser):
751748
common.buildroot_toolchain_prefix = 'aarch64-buildroot-linux-uclibc'
752749
common.crosstool_ng_toolchain_prefix = 'aarch64-unknown-elf'
753750
common.ubuntu_toolchain_prefix = 'aarch64-linux-gnu'
754-
if common.emulator == 'gem5':
755-
if common.machine is None:
756-
common.machine = 'VExpress_GEM5_V1'
757-
else:
758-
if common.machine is None:
759-
common.machine = 'virt'
760751
common.is_arm = True
761752
elif args.arch == 'x86_64':
762753
common.crosstool_ng_toolchain_prefix = 'x86_64-unknown-elf'
@@ -769,6 +760,16 @@ def setup(parser):
769760
else:
770761
if common.machine is None:
771762
common.machine = 'pc'
763+
if is_arm:
764+
if common.emulator == 'gem5':
765+
if common.machine is None:
766+
if args.dp650:
767+
common.machine = 'VExpress_GEM5_V1_DPU'
768+
else:
769+
common.machine = 'VExpress_GEM5_V1'
770+
else:
771+
if common.machine is None:
772+
common.machine = 'virt'
772773
common.buildroot_out_dir = os.path.join(common.out_dir, 'buildroot')
773774
common.buildroot_build_dir = os.path.join(common.buildroot_out_dir, 'build', args.buildroot_build_id, args.arch)
774775
common.buildroot_download_dir = os.path.join(common.buildroot_out_dir, 'download')

run

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,15 @@ def main(args, extra_args=None):
192192
elif common.is_arm:
193193
if args.kvm:
194194
cmd.extend(['--cpu-type', 'ArmV8KvmCPU', common.Newline])
195+
if args.dp650:
196+
dp650_cmd = 'dpu_'
197+
else:
198+
dp650_cmd = ''
195199
cmd.extend([
196200
# TODO why is it mandatory to pass mem= here? Not true for QEMU.
197201
# Anything smaller than physical blows up as expected, but why can't it auto-detect the right value?
198202
'--command-line', 'earlyprintk=pl011,0x1c090000 lpj=19988480 rw loglevel=8 mem={} root=/dev/sda {}'.format(memory, kernel_cli), common.Newline,
199-
'--dtb-filename', os.path.join(common.gem5_system_dir, 'arm', 'dt', 'armv{}_gem5_v1_{}cpu.dtb'.format(common.armv, args.cpus)), common.Newline,
203+
'--dtb-filename', os.path.join(common.gem5_system_dir, 'arm', 'dt', 'armv{}_gem5_v1_{}{}cpu.dtb'.format(common.armv, dp650_cmd, args.cpus)), common.Newline,
200204
'--machine-type', common.machine, common.Newline,
201205
])
202206
if common.baremetal is None:

0 commit comments

Comments
 (0)