1 ; -----------------------------------------------------------------------
3 ; Copyright 2005-2008 H. Peter Anvin - All Rights Reserved
4 ; Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin
6 ; This program is free software; you can redistribute it and/or modify
7 ; it under the terms of the GNU General Public License as published by
8 ; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 ; Boston MA 02111-1307, USA; either version 2 of the License, or
10 ; (at your option) any later version; incorporated herein by reference.
12 ; -----------------------------------------------------------------------
17 ; How to reset the stack pointer
24 ; This macro resets the stack pointer (including SS), and sets
25 ; DS == ES == 0, interrupts on, DF = 0.
27 ; It takes a 16-bit register that can be safely clobbered as parameter.
29 %macro RESET_STACK_AND_SEGS 1
34 mov dword [PMESP],__stack_end ; Reset PM stack
42 BaseStack dd StackHome ; ESP of the "home" stack pointer
43 dw 0 ; SS of the "home" stack pointer