42#define EINFO_EPXENBP \
43 __einfo_uniqify ( EINFO_EPLATFORM, 0x01, \
44 "External PXE NBP error" )
45#define EPXENBP( status ) EPLATFORM ( EINFO_EPXENBP, status )
49#define pxe_int_1a_vector __use_text16 ( pxe_int_1a_vector )
59#define _text16_memsz ABS_VALUE ( _text16_memsz )
63#define _data16_memsz ABS_VALUE ( _data16_memsz )
67 { .name =
"pxeapi.tx" };
71 { .name =
"pxeapi.isr" };
79 { .name =
"pxeapi.unknown" };
83 { .name =
"pxeapi.misc" };
128 return &pxe_api_tx_profiler;
130 return &pxe_api_isr_profiler;
132 return &pxe_api_unknown_profiler;
134 return &pxe_api_misc_profiler;
160 call = &pxenv_unknown_api;
167 ret = call->
entry ( params );
240 ppxe.Stack.Physical_address = rm_ds_phys;
242 ppxe.UNDIData.Physical_address = rm_ds_phys;
244 ppxe.UNDICode.Physical_address = rm_cs_phys;
245 ppxe.UNDICodeWrite.segment_address =
rm_cs;
246 ppxe.UNDICodeWrite.Physical_address = rm_cs_phys;
289 :
"=a" ( discard_a ),
"=b" ( discard_b ),
335 DBGC ( &
pxe_netdev,
"PXE NBP starting with netdev %s, code %04x:%04zx, "
346 "movw %%cx, %%es\n\t"
350 "lcall $0, $0x7c00\n\t"
353 :
"=a" (
status ),
"=b" ( discard_b ),
358 "d" ( virt_to_phys ( &
pxenv ) ),
#define NULL
NULL pointer (VOID *)
struct arbelprm_rc_send_wqe rc
#define __asmcall
Declare a function with standard calling conventions.
__asm__ __volatile__("call *%9" :"=a"(result), "=c"(discard_ecx), "=d"(discard_edx) :"d"(0), "a"(code), "b"(0), "c"(in_phys), "D"(0), "S"(out_phys), "m"(hypercall))
void hook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Hook INT vector.
int unhook_bios_interrupt(unsigned int interrupt, unsigned int handler, struct segoff *chain_vector)
Unhook INT vector.
static void devices_get(void)
Prevent devices from being removed on shutdown.
static void devices_put(void)
Allow devices to be removed on shutdown.
uint8_t data[48]
Additional event data.
static struct net_device * netdev
#define ABS_SYMBOL(name)
Declare an absolute symbol (e.g.
#define __unused
Declare a variable or data structure as unused.
#define INIT_NORMAL
Normal initialisation.
uint16_t size
Buffer size.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define REQUIRE_OBJECT(object)
Require an object.
#define PXENV_EXIT_FAILURE
An error occurred.
UINT16_t PXENV_EXIT_t
A PXE exit code.
#define PXENV_STATUS_UNSUPPORTED
#define PXENV_STATUS_FAILURE
#define PXENV_UNDI_ISR
PXE API function code for pxenv_undi_isr()
#define PXENV_UNDI_TRANSMIT
PXE API function code for pxenv_undi_transmit()
#define REQUIRING_SYMBOL(symbol)
Specify the file's requiring symbol.
#define __profiler
Declare a profiler.
static void profile_stop(struct profiler *profiler)
Stop profiling.
static void profile_start(struct profiler *profiler)
Start profiling.
#define __init_fn(init_order)
Declare an initialisation functon.
Access to external ("user") memory.
#define __from_text16(pointer)
#define REAL_CODE(asm_code_str)
#define __text16(variable)
uint8_t jmp
"jmp" instruction
Network device management.
#define __net_driver
Declare a network driver.
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")
#define PXE_API_CALL(_opcode, _entry, _params_type)
Define a PXE API call.
#define __pxe_api_call
Declare a PXE API call.
#define PXE_API_CALLS
PXE API call table.
#define PXENV_UNKNOWN
PXE API invalid function code.
static uint8_t pxe_checksum(void *data, size_t size)
Calculate byte checksum as used by PXE.
static struct pxe_api_call * find_pxe_api_call(uint16_t opcode)
Locate PXE API call.
static struct profiler * pxe_api_profiler(unsigned int opcode)
Determine applicable profiler (for debugging)
void pxe_int_1a(void)
INT 1A handler.
static void pxe_init_structures(void)
Initialise !PXE and PXENV+ structures.
__asmcall void pxe_api_call(struct i386_all_regs *ix86)
Dispatch PXE API call.
rmjmp_buf pxe_restart_nbp
Jump buffer for PXENV_RESTART_TFTP.
static int int_1a_hooked
INT 1A hooked flag.
void pxe_activate(struct net_device *netdev)
Activate PXE stack.
int pxe_start_nbp(void)
Start PXE NBP at 0000:7c00.
int pxe_deactivate(void)
Deactivate PXE stack.
int pxe_api_call_weak(struct i386_all_regs *ix86)
Dispatch weak PXE API call with PXE stack available.
#define pxe_int_1a_vector
__asmcall void pxe_loader_call(struct i386_all_regs *ix86)
Dispatch PXE loader call.
static int pxe_notify(struct net_device *netdev, void *priv __unused)
Notify BIOS of existence of network device.
static PXENV_EXIT_t pxenv_unknown(struct s_PXENV_UNKNOWN *pxenv_unknown)
Handle an unknown PXE API call.
static struct pxe_tftp_connection pxe_tftp
The PXE TFTP connection.
static struct pxe_udp_connection pxe_udp
The PXE UDP connection.
void pxe_set_netdev(struct net_device *netdev)
Set network device as current PXE network device.
struct net_device * pxe_netdev
static __always_inline void * real_to_virt(unsigned int segment, unsigned int offset)
Convert segment:offset address to virtual address.
char * strerror(int errno)
Retrieve string representation of error number.
struct i386_seg_regs segs
An initialisation function.
A network upper-layer driver.
A data structure for storing profiling information.
PXENV_EXIT_t(* entry)(union u_PXENV_ANY *params)
Entry point.
A real-mode-extended jump buffer.
Parameter block for pxenv_unknown()
Parameter block for undi_loader()
PXENV_STATUS_t Status
PXE status code.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
static struct tlan_private * priv