iPXE
|
PXE Preboot API. More...
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <ipxe/uaccess.h>
#include <ipxe/dhcp.h>
#include <ipxe/fakedhcp.h>
#include <ipxe/device.h>
#include <ipxe/netdevice.h>
#include <ipxe/isapnp.h>
#include <ipxe/init.h>
#include <ipxe/if_ether.h>
#include <basemem_packet.h>
#include <biosint.h>
#include <rmsetjmp.h>
#include "pxe.h"
#include "pxe_call.h"
Go to the source code of this file.
Data Structures | |
union | pxe_cached_info |
A cached DHCP packet. More... | |
struct | pxe_dhcp_packet_creator |
A PXE DHCP packet creator. More... | |
Macros | |
#define | cached_info __use_data16 ( cached_info ) |
Enumerations | |
enum | pxe_cached_info_indices { CACHED_INFO_DHCPDISCOVER = ( PXENV_PACKET_TYPE_DHCP_DISCOVER - 1 ), CACHED_INFO_DHCPACK = ( PXENV_PACKET_TYPE_DHCP_ACK - 1 ), CACHED_INFO_BINL = ( PXENV_PACKET_TYPE_CACHED_REPLY - 1 ), NUM_CACHED_INFOS } |
Zero-based versions of PXENV_GET_CACHED_INFO::PacketType. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static const char * | pxenv_get_cached_info_name (int packet_type) |
Name PXENV_GET_CACHED_INFO packet type. More... | |
static union pxe_cached_info | __bss16_array (cached_info, [NUM_CACHED_INFOS]) |
void | pxe_fake_cached_info (void) |
Construct cached DHCP packets. More... | |
static PXENV_EXIT_t | pxenv_unload_stack (struct s_PXENV_UNLOAD_STACK *unload_stack) |
UNLOAD BASE CODE STACK. More... | |
static PXENV_EXIT_t | pxenv_get_cached_info (struct s_PXENV_GET_CACHED_INFO *get_cached_info) |
static PXENV_EXIT_t | pxenv_restart_tftp (struct s_PXENV_TFTP_READ_FILE *restart_tftp) |
static PXENV_EXIT_t | pxenv_start_undi (struct s_PXENV_START_UNDI *start_undi) |
static PXENV_EXIT_t | pxenv_stop_undi (struct s_PXENV_STOP_UNDI *stop_undi) |
static PXENV_EXIT_t | pxenv_start_base (struct s_PXENV_START_BASE *start_base) |
static PXENV_EXIT_t | pxenv_stop_base (struct s_PXENV_STOP_BASE *stop_base) |
Variables | |
uint16_t | isapnp_read_port |
ISAPnP Read Port address. More... | |
static struct pxe_dhcp_packet_creator | pxe_dhcp_packet_creators [] |
PXE DHCP packet creators. More... | |
struct pxe_api_call pxe_preboot_api [] | __pxe_api_call |
PXE preboot API. More... | |
PXE Preboot API.
Definition in file pxe_preboot.c.
#define cached_info __use_data16 ( cached_info ) |
Definition at line 129 of file pxe_preboot.c.
Zero-based versions of PXENV_GET_CACHED_INFO::PacketType.
Enumerator | |
---|---|
CACHED_INFO_DHCPDISCOVER | |
CACHED_INFO_DHCPACK | |
CACHED_INFO_BINL | |
NUM_CACHED_INFOS |
Definition at line 54 of file pxe_preboot.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Name PXENV_GET_CACHED_INFO packet type.
packet_type | Packet type |
name | Name of packet type |
Definition at line 104 of file pxe_preboot.c.
References PXENV_PACKET_TYPE_CACHED_REPLY, PXENV_PACKET_TYPE_DHCP_ACK, and PXENV_PACKET_TYPE_DHCP_DISCOVER.
Referenced by pxenv_get_cached_info().
|
static |
void pxe_fake_cached_info | ( | void | ) |
Construct cached DHCP packets.
Definition at line 135 of file pxe_preboot.c.
References assert(), cached_info, pxe_dhcp_packet_creator::create, DBGC, info, memset(), NULL, pxe_dhcp_packet_creators, pxe_netdev, rc, and strerror().
Referenced by pxe_exec().
|
static |
UNLOAD BASE CODE STACK.
None | - |
... |
Definition at line 171 of file pxe_preboot.c.
References DBGC, pxe_netdev, PXENV_EXIT_SUCCESS, PXENV_STATUS_SUCCESS, and s_PXENV_UNLOAD_STACK::Status.
|
static |
Definition at line 183 of file pxe_preboot.c.
References __from_data16, buffer, s_PXENV_GET_CACHED_INFO::Buffer, s_PXENV_GET_CACHED_INFO::BufferLimit, s_PXENV_GET_CACHED_INFO::BufferSize, cached_info, copy_to_user(), DBGC, info, len, NUM_CACHED_INFOS, s_PXENV_GET_CACHED_INFO::PacketType, pxe_netdev, PXENV_EXIT_FAILURE, PXENV_EXIT_SUCCESS, pxenv_get_cached_info_name(), PXENV_STATUS_SUCCESS, PXENV_STATUS_UNSUPPORTED, real_to_user(), rm_ds, and s_PXENV_GET_CACHED_INFO::Status.
|
static |
Definition at line 262 of file pxe_preboot.c.
References s_PXENV_TFTP_READ_FILE::Buffer, s_PXENV_TFTP_READ_FILE::BufferSize, DBGC, PXE_LOAD_PHYS, pxe_netdev, pxe_restart_nbp, PXENV_EXIT_SUCCESS, PXENV_RESTART_TFTP, pxenv_tftp_read_file(), and rmlongjmp.
|
static |
Definition at line 284 of file pxe_preboot.c.
References s_PXENV_START_UNDI::AX, BUS_TYPE_ISAPNP, BUS_TYPE_PCI, s_PXENV_START_UNDI::BX, DBGC, s_PXENV_START_UNDI::DX, find_netdev_by_location(), ISAPNP_CSN_MAX, ISAPNP_CSN_MIN, isapnp_read_port, ISAPNP_READ_PORT_MAX, ISAPNP_READ_PORT_MIN, net_device::name, netdev, pxe_activate(), pxe_netdev, PXENV_EXIT_FAILURE, PXENV_EXIT_SUCCESS, PXENV_STATUS_SUCCESS, PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC, startup(), and s_PXENV_START_UNDI::Status.
|
static |
Definition at line 333 of file pxe_preboot.c.
References DBGC, hooked_bios_interrupts, pxe_deactivate(), pxe_netdev, PXENV_EXIT_FAILURE, PXENV_EXIT_SUCCESS, PXENV_STATUS_KEEP_UNDI, PXENV_STATUS_SUCCESS, shutdown_boot(), and s_PXENV_STOP_UNDI::Status.
|
static |
Definition at line 358 of file pxe_preboot.c.
References DBGC, pxe_netdev, PXENV_EXIT_FAILURE, PXENV_STATUS_UNSUPPORTED, and s_PXENV_START_BASE::Status.
|
static |
Definition at line 369 of file pxe_preboot.c.
References DBGC, pxe_netdev, PXENV_EXIT_SUCCESS, PXENV_STATUS_SUCCESS, and s_PXENV_STOP_BASE::Status.
uint16_t isapnp_read_port |
ISAPnP Read Port address.
ROM prefix may be able to set this address, which is why this is non-static.
Definition at line 51 of file pxe_preboot.c.
Referenced by pxenv_start_undi().
|
static |
PXE DHCP packet creators.
Definition at line 91 of file pxe_preboot.c.
Referenced by pxe_fake_cached_info().
struct pxe_api_call pxe_preboot_api [] __pxe_api_call |
PXE preboot API.
Definition at line 382 of file pxe_preboot.c.