TianoCore EDK2 master
Loading...
Searching...
No Matches
PxeBcBoot.h File Reference

Go to the source code of this file.

Macros

#define PXEBC_DISPLAY_MAX_LINE   70
 
#define PXEBC_DEFAULT_UDP_OVERHEAD_SIZE   8
 
#define PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE   4
 
#define PXEBC_IS_SIZE_OVERFLOWED(x)   ((sizeof (UINTN) < sizeof (UINT64)) && ((x) > 0xFFFFFFFF))
 

Functions

EFI_STATUS PxeBcExtractDiscoverInfo (IN PXEBC_PRIVATE_DATA *Private, IN UINT16 Type, IN OUT EFI_PXE_BASE_CODE_DISCOVER_INFO **DiscoverInfo, OUT PXEBC_BOOT_SVR_ENTRY **BootEntry, OUT EFI_PXE_BASE_CODE_SRVLIST **SrvList)
 
EFI_STATUS PxeBcDiscoverBootServer (IN PXEBC_PRIVATE_DATA *Private, IN UINT16 Type, IN UINT16 *Layer, IN BOOLEAN UseBis, IN EFI_IP_ADDRESS *DestIp, IN UINT16 IpCount, IN EFI_PXE_BASE_CODE_SRVLIST *SrvList)
 
EFI_STATUS PxeBcLoadBootFile (IN PXEBC_PRIVATE_DATA *Private, IN OUT UINTN *BufferSize, IN VOID *Buffer OPTIONAL)
 

Detailed Description

Boot functions declaration for UefiPxeBc Driver.

Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PxeBcBoot.h.

Macro Definition Documentation

◆ PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE

#define PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE   4

Definition at line 15 of file PxeBcBoot.h.

◆ PXEBC_DEFAULT_UDP_OVERHEAD_SIZE

#define PXEBC_DEFAULT_UDP_OVERHEAD_SIZE   8

Definition at line 14 of file PxeBcBoot.h.

◆ PXEBC_DISPLAY_MAX_LINE

#define PXEBC_DISPLAY_MAX_LINE   70

Definition at line 13 of file PxeBcBoot.h.

◆ PXEBC_IS_SIZE_OVERFLOWED

#define PXEBC_IS_SIZE_OVERFLOWED (   x)    ((sizeof (UINTN) < sizeof (UINT64)) && ((x) > 0xFFFFFFFF))

Definition at line 17 of file PxeBcBoot.h.

Function Documentation

◆ PxeBcDiscoverBootServer()

EFI_STATUS PxeBcDiscoverBootServer ( IN PXEBC_PRIVATE_DATA Private,
IN UINT16  Type,
IN UINT16 *  Layer,
IN BOOLEAN  UseBis,
IN EFI_IP_ADDRESS DestIp,
IN UINT16  IpCount,
IN EFI_PXE_BASE_CODE_SRVLIST SrvList 
)

Build the discover packet and send out for boot.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]TypePxeBc option boot item type.
[in]LayerPointer to option boot item layer.
[in]UseBisUse BIS or not.
[in]DestIpPointer to the server address.
[in]IpCountThe total count of the server address.
[in]SrvListPointer to the server address list.
Return values
EFI_SUCCESSSuccessfully discovered boot file.
EFI_OUT_OF_RESOURCESFailed to allocate resources.
EFI_NOT_FOUNDCan't get the PXE reply packet.
OthersFailed to discover boot file.

Build the discover packet and send out for boot server.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]TypePxeBc option boot item type.
[in]LayerPointer to option boot item layer.
[in]UseBisUse BIS or not.
[in]DestIpPointer to the destination address.
[in]IpCountThe count of the server address.
[in]SrvListPointer to the server address list.
Return values
EFI_SUCCESSSuccessfully discovered boot file.
EFI_OUT_OF_RESOURCESFailed to allocate resource.
EFI_NOT_FOUNDCan't get the PXE reply packet.
OthersFailed to discover boot file.

Definition at line 850 of file PxeBcBoot.c.

◆ PxeBcExtractDiscoverInfo()

EFI_STATUS PxeBcExtractDiscoverInfo ( IN PXEBC_PRIVATE_DATA Private,
IN UINT16  Type,
IN OUT EFI_PXE_BASE_CODE_DISCOVER_INFO **  DiscoverInfo,
OUT PXEBC_BOOT_SVR_ENTRY **  BootEntry,
OUT EFI_PXE_BASE_CODE_SRVLIST **  SrvList 
)

Extract the discover information and boot server entry from the cached packets if unspecified.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]TypeThe type of bootstrap to perform.
[in,out]DiscoverInfoPointer to EFI_PXE_BASE_CODE_DISCOVER_INFO.
[out]BootEntryPointer to PXEBC_BOOT_SVR_ENTRY.
[out]SrvListPointer to EFI_PXE_BASE_CODE_SRVLIST.
Return values
EFI_SUCCESSSuccessfully extracted the information.
EFI_DEVICE_ERRORFailed to extract the information.

Definition at line 729 of file PxeBcBoot.c.

◆ PxeBcLoadBootFile()

EFI_STATUS PxeBcLoadBootFile ( IN PXEBC_PRIVATE_DATA Private,
IN OUT UINTN BufferSize,
IN VOID *Buffer  OPTIONAL 
)

Load boot file into user buffer.

Parameters
[in]PrivatePointer to PxeBc private data.
[in,out]BufferSizeSize of user buffer for input; required buffer size for output.
[in]BufferPointer to user buffer.
Return values
EFI_SUCCESSSuccessfully obtained all the boot information.
EFI_BUFFER_TOO_SMALLThe buffer size is not enough for boot file.
EFI_ABORTEDUser cancelled the current operation.
OthersFailed to parse out the boot information.

Load boot file into user buffer.

Parameters
[in]PrivatePointer to PxeBc private data.
[in,out]BufferSizeSize of user buffer for input; required buffer size for output.
[in]BufferPointer to user buffer.
Return values
EFI_SUCCESSGet all the boot information successfully.
EFI_BUFFER_TOO_SMALLThe buffer size is not enough for boot file.
EFI_ABORTEDUser cancelled the current operation.
OthersFailed to parse out the boot information.

Definition at line 1142 of file PxeBcBoot.c.