1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2015 Andreas Bießmann <andreas@biessmann.org>
5 * Copyright (c) 2011 The Chromium OS Authors.
6 * (C) Copyright 2002-2006
7 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
10 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
11 * Marius Groeger <mgroeger@sysgo.de>
15 DECLARE_GLOBAL_DATA_PTR;
17 int arch_reserve_stacks(void)
21 /* setup stack pointer for exceptions */
22 gd->irq_sp = gd->start_addr_sp;
24 /* Clear initial stack frame */
25 s = (ulong *)gd->start_addr_sp;
26 *s = 0; /* Terminate back chain */
27 *++s = 0; /* NULL return address */