|
iPXE
|
PXE API entry point. More...
#include <ipxe/uaccess.h>#include <ipxe/init.h>#include <ipxe/profile.h>#include <ipxe/netdevice.h>#include <rmsetjmp.h>#include <registers.h>#include <biosint.h>#include <pxe.h>#include <pxe_call.h>Go to the source code of this file.
Macros | |
| #define | EINFO_EPXENBP |
| #define | EPXENBP(status) EPLATFORM ( EINFO_EPXENBP, status ) |
| #define | pxe_int_1a_vector __use_text16 ( pxe_int_1a_vector ) |
| #define | _text16_memsz ABS_VALUE ( _text16_memsz ) |
| #define | _data16_memsz ABS_VALUE ( _data16_memsz ) |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| struct segoff | __text16 (pxe_int_1a_vector) |
| Vector for chaining INT 1A. More... | |
| void | pxe_int_1a (void) |
| INT 1A handler. More... | |
| size_t | ABS_SYMBOL (_text16_memsz) |
| Real-mode code segment size. More... | |
| size_t | ABS_SYMBOL (_data16_memsz) |
| Real-mode data segment size. More... | |
| static PXENV_EXIT_t | pxenv_unknown (struct s_PXENV_UNKNOWN *pxenv_unknown) |
| Handle an unknown PXE API call. More... | |
| static struct pxe_api_call * | find_pxe_api_call (uint16_t opcode) |
| Locate PXE API call. More... | |
| static struct profiler * | pxe_api_profiler (unsigned int opcode) |
| Determine applicable profiler (for debugging) More... | |
| __asmcall void | pxe_api_call (struct i386_all_regs *ix86) |
| Dispatch PXE API call. More... | |
| int | pxe_api_call_weak (struct i386_all_regs *ix86) |
| Dispatch weak PXE API call with PXE stack available. More... | |
| __asmcall void | pxe_loader_call (struct i386_all_regs *ix86) |
| Dispatch PXE loader call. More... | |
| static uint8_t | pxe_checksum (void *data, size_t size) |
| Calculate byte checksum as used by PXE. More... | |
| static void | pxe_init_structures (void) |
| Initialise !PXE and PXENV+ structures. More... | |
| struct init_fn pxe_init_fn | __init_fn (INIT_NORMAL) |
| PXE structure initialiser. More... | |
| void | pxe_activate (struct net_device *netdev) |
| Activate PXE stack. More... | |
| int | pxe_deactivate (void) |
| Deactivate PXE stack. More... | |
| int | pxe_start_nbp (void) |
| Start PXE NBP at 0000:7c00. More... | |
| static int | pxe_notify (struct net_device *netdev, void *priv __unused) |
| Notify BIOS of existence of network device. More... | |
| REQUIRING_SYMBOL (pxe_api_call) | |
| REQUIRE_OBJECT (pxe_preboot) | |
| REQUIRE_OBJECT (pxe_undi) | |
| REQUIRE_OBJECT (pxe_udp) | |
| REQUIRE_OBJECT (pxe_tftp) | |
| REQUIRE_OBJECT (pxe_file) | |
Variables | |
| static int | int_1a_hooked = 0 |
| INT 1A hooked flag. More... | |
| static struct profiler pxe_api_tx_profiler | __profiler |
| PXENV_UNDI_TRANSMIT API call profiler. More... | |
| struct pxe_api_call pxenv_unknown_api | __pxe_api_call |
| Unknown PXE API call list. More... | |
| rmjmp_buf | pxe_restart_nbp |
| Jump buffer for PXENV_RESTART_TFTP. More... | |
| struct net_driver pxe_driver | __net_driver |
| PXE BIOS notification driver. More... | |
PXE API entry point.
Definition in file pxe_call.c.
| #define EINFO_EPXENBP |
Definition at line 42 of file pxe_call.c.
| #define EPXENBP | ( | status | ) | EPLATFORM ( EINFO_EPXENBP, status ) |
Definition at line 45 of file pxe_call.c.
| #define pxe_int_1a_vector __use_text16 ( pxe_int_1a_vector ) |
Definition at line 49 of file pxe_call.c.
| #define _text16_memsz ABS_VALUE ( _text16_memsz ) |
Definition at line 59 of file pxe_call.c.
| #define _data16_memsz ABS_VALUE ( _data16_memsz ) |
Definition at line 63 of file pxe_call.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| struct segoff __text16 | ( | pxe_int_1a_vector | ) |
Vector for chaining INT 1A.
| void pxe_int_1a | ( | void | ) |
INT 1A handler.
Referenced by pxe_activate(), and pxe_deactivate().
| size_t ABS_SYMBOL | ( | _text16_memsz | ) |
Real-mode code segment size.
| size_t ABS_SYMBOL | ( | _data16_memsz | ) |
Real-mode data segment size.
|
static |
Handle an unknown PXE API call.
| pxenv_unknown | Pointer to a struct s_PXENV_UNKNOWN |
| PXENV_EXIT_FAILURE | Always |
| PXENV_STATUS_UNSUPPORTED | Always |
Definition at line 92 of file pxe_call.c.
References PXENV_EXIT_FAILURE, and PXENV_STATUS_UNSUPPORTED.
|
static |
Locate PXE API call.
| opcode | Opcode |
| call | PXE API call, or NULL |
Definition at line 107 of file pxe_call.c.
References for_each_table_entry, NULL, opcode, pxe_api_call::opcode, and PXE_API_CALLS.
Referenced by pxe_api_call().
|
static |
Determine applicable profiler (for debugging)
| opcode | PXE opcode |
| profiler | Profiler |
Definition at line 123 of file pxe_call.c.
References opcode, PXENV_UNDI_ISR, PXENV_UNDI_TRANSMIT, and PXENV_UNKNOWN.
Referenced by pxe_api_call().
| __asmcall void pxe_api_call | ( | struct i386_all_regs * | ix86 | ) |
Dispatch PXE API call.
| bx | PXE opcode |
| es:di | Address of PXE parameter block |
| ax | PXE exit code |
Definition at line 145 of file pxe_call.c.
References i386_regs::ax, i386_regs::bx, DBGC, i386_regs::di, pxe_api_call::entry, i386_seg_regs::es, find_pxe_api_call(), opcode, profile_start(), profile_stop(), pxe_api_profiler(), pxe_netdev, PXENV_STATUS_FAILURE, real_to_virt(), i386_all_regs::regs, i386_all_regs::segs, and u_PXENV_ANY::Status.
Referenced by pxe_api_call_weak().
| int pxe_api_call_weak | ( | struct i386_all_regs * | ix86 | ) |
Dispatch weak PXE API call with PXE stack available.
| ix86 | Registers for PXE call |
| present | Zero (PXE stack present) |
Definition at line 182 of file pxe_call.c.
References pxe_api_call().
| __asmcall void pxe_loader_call | ( | struct i386_all_regs * | ix86 | ) |
Dispatch PXE loader call.
| es:di | Address of PXE parameter block |
| ax | PXE exit code |
Definition at line 193 of file pxe_call.c.
References i386_regs::ax, i386_regs::di, i386_seg_regs::ds, i386_seg_regs::es, ppxe, PXENV_STATUS_FAILURE, real_to_virt(), i386_all_regs::regs, i386_all_regs::segs, s_UNDI_LOADER::Status, and undi_loader.
Calculate byte checksum as used by PXE.
| data | Data |
| size | Length of data |
| sum | Checksum |
Definition at line 218 of file pxe_call.c.
References bytes, data, and size.
Referenced by pxe_init_structures().
|
static |
Initialise !PXE and PXENV+ structures.
Definition at line 232 of file pxe_call.c.
References ppxe, pxe_checksum(), pxenv, rm_cs, and rm_ds.
| struct init_fn pxe_init_fn __init_fn | ( | INIT_NORMAL | ) |
PXE structure initialiser.
| void pxe_activate | ( | struct net_device * | netdev | ) |
Activate PXE stack.
| netdev | Net device to use as PXE net device |
Definition at line 269 of file pxe_call.c.
References __asm__(), __from_text16, __volatile__(), devices_get(), hook_bios_interrupt(), int_1a_hooked, netdev, pxe_int_1a(), pxe_int_1a_vector, pxe_set_netdev(), pxenv, and REAL_CODE.
Referenced by pxe_exec(), pxe_notify(), pxenv_start_undi(), and startpxe_payload().
| int pxe_deactivate | ( | void | ) |
Deactivate PXE stack.
| rc | Return status code |
Definition at line 300 of file pxe_call.c.
References DBGC, devices_put(), int_1a_hooked, NULL, pxe_int_1a(), pxe_int_1a_vector, pxe_netdev, pxe_set_netdev(), rc, strerror(), and unhook_bios_interrupt().
Referenced by pxe_exec(), pxe_notify(), pxenv_stop_undi(), and stoppxe_exec().
| int pxe_start_nbp | ( | void | ) |
Start PXE NBP at 0000:7c00.
| rc | Return status code |
Definition at line 330 of file pxe_call.c.
References __asm__(), __from_text16, __volatile__(), _data16_memsz, _text16_memsz, DBGC, discard_c, discard_D, EPXENBP, jmp, net_device::name, ppxe, pxe_netdev, pxe_restart_nbp, pxenv, REAL_CODE, rm_cs, rm_ds, rmsetjmp, and status.
Referenced by pxe_exec().
|
static |
Notify BIOS of existence of network device.
| netdev | Network device |
| priv | Private data |
| rc | Return status code |
Definition at line 374 of file pxe_call.c.
References netdev, pxe_activate(), pxe_deactivate(), and pxe_netdev.
| REQUIRING_SYMBOL | ( | pxe_api_call | ) |
| REQUIRE_OBJECT | ( | pxe_preboot | ) |
| REQUIRE_OBJECT | ( | pxe_undi | ) |
| REQUIRE_OBJECT | ( | pxe_udp | ) |
| REQUIRE_OBJECT | ( | pxe_tftp | ) |
| REQUIRE_OBJECT | ( | pxe_file | ) |
|
static |
INT 1A hooked flag.
Definition at line 55 of file pxe_call.c.
Referenced by pxe_activate(), and pxe_deactivate().
|
static |
PXENV_UNDI_TRANSMIT API call profiler.
Miscellaneous PXE API call profiler.
PXE unknown API call profiler.
PXENV_UNDI_ISR API call profiler.
This profiler can be used to measure the overhead of a dummy PXE API call.
Definition at line 66 of file pxe_call.c.
| struct pxe_api_call pxenv_unknown_api __pxe_api_call |
Unknown PXE API call list.
Definition at line 98 of file pxe_call.c.
| rmjmp_buf pxe_restart_nbp |
Jump buffer for PXENV_RESTART_TFTP.
PXENV_RESTART_TFTP jump buffer.
Definition at line 323 of file pxe_call.c.
Referenced by pxe_start_nbp(), and pxenv_restart_tftp().
| struct net_driver pxe_driver __net_driver |
PXE BIOS notification driver.
Definition at line 388 of file pxe_call.c.
1.8.15