TianoCore EDK2 master
Loading...
Searching...
No Matches
PxeBcBoot.c File Reference
#include "PxeBcImpl.h"

Go to the source code of this file.

Functions

VOID PxeBcDisplayBootItem (IN UINT8 *Str, IN UINT8 Len)
 
EFI_STATUS PxeBcSelectBootPrompt (IN PXEBC_PRIVATE_DATA *Private)
 
EFI_STATUS PxeBcSelectBootMenu (IN PXEBC_PRIVATE_DATA *Private, OUT UINT16 *Type, IN BOOLEAN UseDefaultItem)
 
EFI_STATUS PxeBcDhcp4BootInfo (IN OUT PXEBC_PRIVATE_DATA *Private, OUT UINT64 *BufferSize)
 
EFI_STATUS PxeBcDhcp6BootInfo (IN OUT PXEBC_PRIVATE_DATA *Private, OUT UINT64 *BufferSize)
 
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 PxeBcDiscoverBootFile (IN OUT PXEBC_PRIVATE_DATA *Private, OUT UINT64 *BufferSize)
 
EFI_STATUS PxeBcInstallCallback (IN OUT PXEBC_PRIVATE_DATA *Private, OUT BOOLEAN *NewMakeCallback)
 
VOID PxeBcUninstallCallback (IN PXEBC_PRIVATE_DATA *Private, IN BOOLEAN NewMakeCallback)
 
EFI_STATUS PxeBcReadBootFileList (IN PXEBC_PRIVATE_DATA *Private, IN OUT UINT64 *BufferSize, IN VOID *Buffer OPTIONAL)
 
EFI_STATUS PxeBcLoadBootFile (IN PXEBC_PRIVATE_DATA *Private, IN OUT UINTN *BufferSize, IN VOID *Buffer OPTIONAL)
 

Detailed Description

Boot functions implementation for UefiPxeBc Driver.

Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP

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

Definition in file PxeBcBoot.c.

Function Documentation

◆ PxeBcDhcp4BootInfo()

EFI_STATUS PxeBcDhcp4BootInfo ( IN OUT PXEBC_PRIVATE_DATA Private,
OUT UINT64 *  BufferSize 
)

Parse out the boot information from the last Dhcp4 reply packet.

Parameters
[in,out]PrivatePointer to PxeBc private data.
[out]BufferSizeSize of the boot file to be downloaded.
Return values
EFI_SUCCESSSuccessfully parsed out all the boot information.
OthersFailed to parse out the boot information.

Definition at line 454 of file PxeBcBoot.c.

◆ PxeBcDhcp6BootInfo()

EFI_STATUS PxeBcDhcp6BootInfo ( IN OUT PXEBC_PRIVATE_DATA Private,
OUT UINT64 *  BufferSize 
)

Parse out the boot information from the last Dhcp6 reply packet.

Parameters
[in,out]PrivatePointer to PxeBc private data.
[out]BufferSizeSize of the boot file to be downloaded.
Return values
EFI_SUCCESSSuccessfully parsed out all the boot information.
EFI_BUFFER_TOO_SMALL
OthersFailed to parse out the boot information.

Definition at line 600 of file PxeBcBoot.c.

◆ PxeBcDiscoverBootFile()

EFI_STATUS PxeBcDiscoverBootFile ( IN OUT PXEBC_PRIVATE_DATA Private,
OUT UINT64 *  BufferSize 
)

Discover all the boot information for boot file.

Parameters
[in,out]PrivatePointer to PxeBc private data.
[out]BufferSizeSize of the boot file to be downloaded.
Return values
EFI_SUCCESSSuccessfully obtained all the boot information .
EFI_BUFFER_TOO_SMALLThe buffer size is not enough for boot file.
EFI_ABORTEDUser cancel current operation.
OthersFailed to parse out the boot information.

Definition at line 894 of file PxeBcBoot.c.

◆ 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 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.

◆ PxeBcDisplayBootItem()

VOID PxeBcDisplayBootItem ( IN UINT8 *  Str,
IN UINT8  Len 
)

Display the string of the boot item.

If the length of the boot item string beyond 70 Char, just display 70 Char.

Parameters
[in]StrThe pointer to the string.
[in]LenThe length of the string.

Definition at line 23 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.

◆ PxeBcInstallCallback()

EFI_STATUS PxeBcInstallCallback ( IN OUT PXEBC_PRIVATE_DATA Private,
OUT BOOLEAN *  NewMakeCallback 
)

Install PxeBaseCodeCallbackProtocol if not installed before.

Parameters
[in,out]PrivatePointer to PxeBc private data.
[out]NewMakeCallbackIf TRUE, it is a new callback. Otherwise, it is not new callback.
Return values
EFI_SUCCESSPxeBaseCodeCallbackProtocol installed successfully.
OthersFailed to install PxeBaseCodeCallbackProtocol.

Definition at line 1001 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_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.

◆ PxeBcReadBootFileList()

EFI_STATUS PxeBcReadBootFileList ( IN PXEBC_PRIVATE_DATA Private,
IN OUT UINT64 *  BufferSize,
IN VOID *Buffer  OPTIONAL 
)

Download one of boot file in the list, and it's special for IPv6.

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_SUCCESSRead one of boot file in the list successfully.
EFI_BUFFER_TOO_SMALLThe buffer size is not enough for boot file.
EFI_NOT_FOUNDThere is no proper boot file available.
OthersFailed to download boot file in the list.

Definition at line 1093 of file PxeBcBoot.c.

◆ PxeBcSelectBootMenu()

EFI_STATUS PxeBcSelectBootMenu ( IN PXEBC_PRIVATE_DATA Private,
OUT UINT16 *  Type,
IN BOOLEAN  UseDefaultItem 
)

Select the boot menu by user's input.

Parameters
[in]PrivatePointer to PxeBc private data.
[out]TypeThe type of the menu.
[in]UseDefaultItemUse default item or not.
Return values
EFI_ABORTEDUser cancel operation.
EFI_SUCCESSSelect the boot menu success.
EFI_NOT_READYRead the input key from the keyboard has not finish.

Definition at line 261 of file PxeBcBoot.c.

◆ PxeBcSelectBootPrompt()

EFI_STATUS PxeBcSelectBootPrompt ( IN PXEBC_PRIVATE_DATA Private)

Select and maintain the boot prompt if needed.

Parameters
[in]PrivatePointer to PxeBc private data.
Return values
EFI_SUCCESSSelected boot prompt done.
EFI_TIMEOUTSelected boot prompt timed out.
EFI_NOT_FOUNDThe proxy offer is not Pxe10.
EFI_ABORTEDUser cancelled the operation.
EFI_NOT_READYReading the input key from the keyboard has not finish.

Definition at line 57 of file PxeBcBoot.c.

◆ PxeBcUninstallCallback()

VOID PxeBcUninstallCallback ( IN PXEBC_PRIVATE_DATA Private,
IN BOOLEAN  NewMakeCallback 
)

Uninstall PxeBaseCodeCallbackProtocol.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]NewMakeCallbackIf TRUE, it is a new callback. Otherwise, it is not new callback.

Definition at line 1056 of file PxeBcBoot.c.