1 /* ----------------------------------------------------------------------- *
3 * Copyright 2007-2008 H. Peter Anvin - All Rights Reserved
4 * Copyright 2009 Intel Corporation; author: H. Peter Anvin
6 * Permission is hereby granted, free of charge, to any person
7 * obtaining a copy of this software and associated documentation
8 * files (the "Software"), to deal in the Software without
9 * restriction, including without limitation the rights to use,
10 * copy, modify, merge, publish, distribute, sublicense, and/or
11 * sell copies of the Software, and to permit persons to whom
12 * the Software is furnished to do so, subject to the following
15 * The above copyright notice and this permission notice shall
16 * be included in all copies or substantial portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
27 * ----------------------------------------------------------------------- */
32 * Data structures for shuffle and boot to protected mode
35 #ifndef _SYSLINUX_BOOTRM_H
36 #define _SYSLINUX_BOOTRM_H
41 #include <syslinux/movebits.h>
43 /* This register set is used by the shuffle and boot interface. It is
44 a completely different structure from what the __intcall() and
45 __farcall() interfaces use! */
46 struct syslinux_rm_regs
{
47 uint16_t es
; /* Offset 0 */
48 uint16_t _unused_cs
; /* Offset 2 */
49 uint16_t ss
; /* Offset 4 */
50 uint16_t ds
; /* Offset 6 */
51 uint16_t fs
; /* Offset 8 */
52 uint16_t gs
; /* Offset 10 */
54 reg32_t eax
; /* Offset 12 */
55 reg32_t ecx
; /* Offset 16 */
56 reg32_t edx
; /* Offset 20 */
57 reg32_t ebx
; /* Offset 24 */
58 reg32_t esp
; /* Offset 28 */
59 reg32_t ebp
; /* Offset 32 */
60 reg32_t esi
; /* Offset 36 */
61 reg32_t edi
; /* Offset 40 */
63 uint16_t ip
; /* Offset 44 */
64 uint16_t cs
; /* Offset 46 */
66 bool sti
; /* Offset 48 */
69 int syslinux_shuffle_boot_rm(struct syslinux_movelist
*fraglist
,
70 struct syslinux_memmap
*memmap
,
71 uint16_t bootflags
, struct syslinux_rm_regs
*regs
);
73 #endif /* _SYSLINUX_BOOTRM_H */