From 0e8ce8b12e614925fdbbf306522e24aa8b05ac91 Mon Sep 17 00:00:00 2001 From: Adrian Herrera Date: Thu, 14 Nov 2019 09:57:13 +0000 Subject: [PATCH] sim: kernelExtras if no kernel provided kernelExtras facilitates a way for users to provide additional blobs to load into memory. As of now, the creation of the extra images is done independently of the kernel being provided, but the loading is only done if the kernel is present. This patch refactors the loading of extra images to be committed if no kernel is present. Change-Id: I900542e1034ade8d757d01823cfd4a30f0b36734 Reviewed-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22850 Tested-by: kokoro Reviewed-by: Gabe Black Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- src/sim/system.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sim/system.cc b/src/sim/system.cc index 0e7db5964..8c438086b 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2014,2017-2018 ARM Limited + * Copyright (c) 2011-2014,2017-2019 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -354,14 +354,14 @@ System::initState() } // Load program sections into memory kernelImage.write(physProxy); - for (const auto &extra_kernel : kernelExtras) - extra_kernel->buildImage().move(mapper).write(physProxy); DPRINTF(Loader, "Kernel start = %#x\n", kernelStart); DPRINTF(Loader, "Kernel end = %#x\n", kernelEnd); DPRINTF(Loader, "Kernel entry = %#x\n", kernelEntry); DPRINTF(Loader, "Kernel loaded...\n"); } + for (const auto &extra_kernel : kernelExtras) + extra_kernel->buildImage().move(mapper).write(physProxy); } } -- 2.30.2