1 #ifndef _PXE_CALL_H 2 #define _PXE_CALL_H 3 4 /** @file 5 * 6 * PXE API entry point 7 */ 8 9 FILE_LICENCE ( GPL2_OR_LATER ); 10 11 #include <pxe_api.h> 12 #include <realmode.h> 13 14 struct net_device; 15 16 /** PXE load address segment */ 17 #define PXE_LOAD_SEGMENT 0 18 19 /** PXE load address offset */ 20 #define PXE_LOAD_OFFSET 0x7c00 21 22 /** PXE physical load address */ 23 #define PXE_LOAD_PHYS ( ( PXE_LOAD_SEGMENT << 4 ) + PXE_LOAD_OFFSET ) 24 25 /** !PXE structure */ 26 extern struct s_PXE __text16 ( ppxe ); 27 #define ppxe __use_text16 ( ppxe ) 28 29 /** PXENV+ structure */ 30 extern struct s_PXENV __text16 ( pxenv ); 31 #define pxenv __use_text16 ( pxenv ) 32 33 extern void pxe_activate ( struct net_device *netdev ); 34 extern int pxe_deactivate ( void ); 35 extern int pxe_start_nbp ( void ); 36 extern __asmcall void pxe_api_call ( struct i386_all_regs *ix86 ); 37 extern int _pxe_api_call_weak ( struct i386_all_regs *ix86 ) 38 __attribute__ (( weak )); 39 40 /** 41 * Dispatch PXE API call weakly 42 * 43 * @v ix86 Registers for PXE call 44 * @ret present Zero if the PXE stack is present, nonzero if not 45 * 46 * A successful return only indicates that the PXE stack was available 47 * for dispatching the call; it says nothing about the success of 48 * whatever the call asked for. 49 */ pxe_api_call_weak(struct i386_all_regs * ix86)50static inline int pxe_api_call_weak ( struct i386_all_regs *ix86 ) 51 { 52 if ( _pxe_api_call_weak != NULL ) 53 return _pxe_api_call_weak ( ix86 ); 54 return -1; 55 } 56 57 #endif /* _PXE_CALL_H */ 58