2007-01-13 18:23:44 +01:00
|
|
|
#ifndef _PXE_CALL_H
|
|
|
|
#define _PXE_CALL_H
|
|
|
|
|
|
|
|
/** @file
|
|
|
|
*
|
|
|
|
* PXE API entry point
|
|
|
|
*/
|
|
|
|
|
2009-05-01 16:41:06 +02:00
|
|
|
FILE_LICENCE ( GPL2_OR_LATER );
|
|
|
|
|
2007-01-14 03:20:10 +01:00
|
|
|
#include <pxe_api.h>
|
|
|
|
#include <realmode.h>
|
2010-05-21 04:10:03 +02:00
|
|
|
#include <setjmp.h>
|
2007-01-14 03:20:10 +01:00
|
|
|
|
2009-06-28 21:08:58 +02:00
|
|
|
struct net_device;
|
|
|
|
|
2007-06-30 15:56:35 +02:00
|
|
|
/** PXE load address segment */
|
|
|
|
#define PXE_LOAD_SEGMENT 0
|
|
|
|
|
|
|
|
/** PXE load address offset */
|
|
|
|
#define PXE_LOAD_OFFSET 0x7c00
|
|
|
|
|
|
|
|
/** PXE physical load address */
|
|
|
|
#define PXE_LOAD_PHYS ( ( PXE_LOAD_SEGMENT << 4 ) + PXE_LOAD_OFFSET )
|
|
|
|
|
2007-01-14 03:20:10 +01:00
|
|
|
/** !PXE structure */
|
|
|
|
extern struct s_PXE __text16 ( ppxe );
|
|
|
|
#define ppxe __use_text16 ( ppxe )
|
|
|
|
|
|
|
|
/** PXENV+ structure */
|
|
|
|
extern struct s_PXENV __text16 ( pxenv );
|
|
|
|
#define pxenv __use_text16 ( pxenv )
|
|
|
|
|
2010-05-21 04:10:03 +02:00
|
|
|
/** PXENV_RESTART_TFTP jump buffer */
|
|
|
|
extern rmjmp_buf pxe_restart_nbp;
|
|
|
|
|
2009-06-28 21:08:58 +02:00
|
|
|
extern void pxe_activate ( struct net_device *netdev );
|
|
|
|
extern int pxe_deactivate ( void );
|
2007-06-30 15:56:35 +02:00
|
|
|
extern int pxe_start_nbp ( void );
|
2008-11-19 01:18:32 +01:00
|
|
|
extern __asmcall void pxe_api_call ( struct i386_all_regs *ix86 );
|
2009-10-07 01:15:06 +02:00
|
|
|
extern int _pxe_api_call_weak ( struct i386_all_regs *ix86 )
|
|
|
|
__attribute__ (( weak ));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dispatch PXE API call weakly
|
|
|
|
*
|
|
|
|
* @v ix86 Registers for PXE call
|
|
|
|
* @ret present Zero if the PXE stack is present, nonzero if not
|
|
|
|
*
|
|
|
|
* A successful return only indicates that the PXE stack was available
|
|
|
|
* for dispatching the call; it says nothing about the success of
|
|
|
|
* whatever the call asked for.
|
|
|
|
*/
|
|
|
|
static inline int pxe_api_call_weak ( struct i386_all_regs *ix86 )
|
|
|
|
{
|
|
|
|
if ( _pxe_api_call_weak != NULL )
|
|
|
|
return _pxe_api_call_weak ( ix86 );
|
|
|
|
return -1;
|
|
|
|
}
|
2007-01-13 18:23:44 +01:00
|
|
|
|
|
|
|
#endif /* _PXE_CALL_H */
|