Merge branch 'nocomapi'
[syslinux/sherbszt.git] / core / pxeboot.c
blobd9960d8163c78a190abf3a58dab85b9445ff7a8d
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;
27 memset(&ireg, 0, sizeof ireg);
29 syslinux_force_text_mode();
31 writestr(LOCALBOOT_MSG);
32 crlf();
34 /* Restore the environment we were called with */
35 reset_pxe();
37 cleanup_hardware();
39 ireg.eax.w[0] = ax;
40 call16(local_boot16, &ireg, NULL);