From dd2d29a1e1edb37fbaf2905ec6c1db50f6e661c0 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Mon, 13 Apr 2015 22:54:20 +0200 Subject: sandbox: Split bootm code out into lib/bootm Follow the convention of other architectures and move the platform specific linux bootm code into sandbox/lib/bootm.c. Signed-off-by: Sjoerd Simons Acked-by: Simon Glass --- arch/sandbox/lib/bootm.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 arch/sandbox/lib/bootm.c (limited to 'arch/sandbox/lib/bootm.c') diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c new file mode 100644 index 0000000000..8ddf4ef30d --- /dev/null +++ b/arch/sandbox/lib/bootm.c @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +{ + if (flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO)) { + bootstage_mark(BOOTSTAGE_ID_RUN_OS); + printf("## Transferring control to Linux (at address %08lx)...\n", + images->ep); + reset_cpu(0); + } + + return 0; +} -- cgit v1.2.1