Adding upstream version 6.01~pre5+dfsg.
[syslinux-debian/hramrach.git] / core / pxeboot.c
blobb6c9099876d62dfd3d43149672e178973cbe8145
1 /*
2 * Copyright 1994-2009 H. Peter Anvin - All Rights Reserved
3 * Copyright 2009 Intel Corporation; author: H. Peter Anvin
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
12 #include <syslinux/video.h>
13 #include "pxe.h"
14 #include <com32.h>
16 #define LOCALBOOT_MSG "Booting from local disk..."
18 extern void local_boot16(void);
21 * Boot to the local disk by returning the appropriate PXE magic.
22 * AX contains the appropriate return code.
24 __export void local_boot(uint16_t ax)
26 com32sys_t ireg;
28 syslinux_force_text_mode();
30 writestr(LOCALBOOT_MSG);
31 crlf();
33 /* Restore the environment we were called with */
34 reset_pxe();
36 cleanup_hardware();
38 ireg.eax.w[0] = ax;
39 call16(local_boot16, &ireg, NULL);