Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 1 | /* |
Stefan Reinauer | 10b29d8 | 2010-04-09 10:12:18 +0000 | [diff] [blame] | 2 | * Copyright 2002 Eric Biederman |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 3 | * |
| 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 Reinauer | 10b29d8 | 2010-04-09 10:12:18 +0000 | [diff] [blame] | 6 | * published by the Free Software Foundation; version 2 of the License. |
Martin Roth | 4af5886 | 2016-01-21 13:15:16 -0700 | [diff] [blame] | 7 | * |
| 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 Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 12 | */ |
Alexandru Gagniuc | 5005bb0 | 2011-04-11 20:17:22 +0000 | [diff] [blame] | 13 | #include <cpu/x86/post_code.h> |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 14 | |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 15 | __main: |
Alexandru Gagniuc | 5005bb0 | 2011-04-11 20:17:22 +0000 | [diff] [blame] | 16 | post_code(POST_PREPARE_RAMSTAGE) |
Stefan Reinauer | 10b29d8 | 2010-04-09 10:12:18 +0000 | [diff] [blame] | 17 | cld /* clear direction flag */ |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 18 | |
Kyösti Mälkki | 1729cd8 | 2014-10-16 12:47:25 +0300 | [diff] [blame] | 19 | movl $CONFIG_RAMTOP, %esp |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 20 | movl %esp, %ebp |
Stefan Reinauer | 10b29d8 | 2010-04-09 10:12:18 +0000 | [diff] [blame] | 21 | call copy_and_run |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 22 | |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 23 | .Lhlt: |
Alexandru Gagniuc | 5005bb0 | 2011-04-11 20:17:22 +0000 | [diff] [blame] | 24 | post_code(POST_DEAD_CODE) |
Patrick Georgi | 3c970ee | 2010-02-19 19:59:03 +0000 | [diff] [blame] | 25 | hlt |
| 26 | jmp .Lhlt |