iPXE
pxe_exit_hook.c File Reference

PXE exit hook. More...

#include <stdint.h>
#include <realmode.h>
#include <pxe.h>

Go to the source code of this file.

Macros

#define pxe_exit_hook   __use_data16 ( pxe_exit_hook )

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
segoff_t __data16 (pxe_exit_hook)
 PXE exit hook.
static PXENV_EXIT_t pxenv_file_exit_hook (struct s_PXENV_FILE_EXIT_HOOK *file_exit_hook)
 FILE EXIT HOOK.

Variables

struct pxe_api_call pxe_file_api_exit_hook __pxe_api_call
 PXE file API.

Detailed Description

PXE exit hook.

Definition in file pxe_exit_hook.c.

Macro Definition Documentation

◆ pxe_exit_hook

#define pxe_exit_hook   __use_data16 ( pxe_exit_hook )

Definition at line 38 of file pxe_exit_hook.c.

Referenced by __data16(), and pxenv_file_exit_hook().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ __data16()

segoff_t __data16 ( pxe_exit_hook )
extern

PXE exit hook.

References pxe_exit_hook.

◆ pxenv_file_exit_hook()

PXENV_EXIT_t pxenv_file_exit_hook ( struct s_PXENV_FILE_EXIT_HOOK * file_exit_hook)
static

FILE EXIT HOOK.

Parameters
file_exit_hookPointer to a struct s_PXENV_FILE_EXIT_HOOK
s_PXENV_FILE_EXIT_HOOK::HookSEG16:OFF16 to jump to
Return values
PXENV_EXIT_SUCCESSSuccessfully set hook
PXENV_EXIT_FAILUREWe're not an NBP build
s_PXENV_FILE_EXIT_HOOK::StatusPXE status code

Definition at line 52 of file pxe_exit_hook.c.

52 {
53 DBG ( "PXENV_FILE_EXIT_HOOK" );
54
55 /* We'll jump to the specified SEG16:OFF16 during exit */
56 pxe_exit_hook.segment = file_exit_hook->Hook.segment;
57 pxe_exit_hook.offset = file_exit_hook->Hook.offset;
58 file_exit_hook->Status = PXENV_STATUS_SUCCESS;
59 return PXENV_EXIT_SUCCESS;
60}
#define DBG(...)
Print a debugging message.
Definition compiler.h:498
#define PXENV_EXIT_SUCCESS
No error occurred.
Definition pxe_types.h:45
#define PXENV_STATUS_SUCCESS
Definition pxe_error.h:19
#define pxe_exit_hook
PXENV_STATUS_t Status
PXE status code.
Definition pxe_api.h:1690
SEGOFF16_t Hook
SEG16:OFF16 to jump to.
Definition pxe_api.h:1691

References DBG, s_PXENV_FILE_EXIT_HOOK::Hook, pxe_exit_hook, PXENV_EXIT_SUCCESS, PXENV_STATUS_SUCCESS, and s_PXENV_FILE_EXIT_HOOK::Status.

Variable Documentation

◆ __pxe_api_call

struct pxe_api_call pxe_file_api_exit_hook __pxe_api_call
Initial value:
=
#define PXENV_FILE_EXIT_HOOK
PXE API function code for pxenv_file_exit_hook()
Definition pxe_api.h:1686
#define PXE_API_CALL(_opcode, _entry, _params_type)
Define a PXE API call.
Definition pxe.h:106
static PXENV_EXIT_t pxenv_file_exit_hook(struct s_PXENV_FILE_EXIT_HOOK *file_exit_hook)
FILE EXIT HOOK.
Parameter block for pxenv_file_exit_hook()
Definition pxe_api.h:1689

PXE file API.

Definition at line 63 of file pxe_exit_hook.c.