blob: 737549ed4a2e8f8019ef4c59ba00c0af1aa32648 [file] [log] [blame]
Stefan Reinauer14e22772010-04-27 06:56:47 +00001/*
Stefan Reinauer10b29d82010-04-09 10:12:18 +00002 * Copyright 2002 Eric Biederman
Patrick Georgi3c970ee2010-02-19 19:59:03 +00003 *
4 * This file is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
Stefan Reinauer10b29d82010-04-09 10:12:18 +00006 * published by the Free Software Foundation; version 2 of the License.
Martin Roth4af58862016-01-21 13:15:16 -07007 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
Patrick Georgi3c970ee2010-02-19 19:59:03 +000012 */
Alexandru Gagniuc5005bb02011-04-11 20:17:22 +000013#include <cpu/x86/post_code.h>
Patrick Georgi3c970ee2010-02-19 19:59:03 +000014
Patrick Georgi3c970ee2010-02-19 19:59:03 +000015__main:
Alexandru Gagniuc5005bb02011-04-11 20:17:22 +000016 post_code(POST_PREPARE_RAMSTAGE)
Stefan Reinauer10b29d82010-04-09 10:12:18 +000017 cld /* clear direction flag */
Stefan Reinauer14e22772010-04-27 06:56:47 +000018
Kyösti Mälkki1729cd82014-10-16 12:47:25 +030019 movl $CONFIG_RAMTOP, %esp
Patrick Georgi3c970ee2010-02-19 19:59:03 +000020 movl %esp, %ebp
Stefan Reinauer10b29d82010-04-09 10:12:18 +000021 call copy_and_run
Patrick Georgi3c970ee2010-02-19 19:59:03 +000022
Stefan Reinauer14e22772010-04-27 06:56:47 +000023.Lhlt:
Alexandru Gagniuc5005bb02011-04-11 20:17:22 +000024 post_code(POST_DEAD_CODE)
Patrick Georgi3c970ee2010-02-19 19:59:03 +000025 hlt
26 jmp .Lhlt