EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions

NetworkPkg/UefiPxeBcDxe/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 *Info, 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 - 2011, Intel Corporation. All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file PxeBcBoot.c.


Function Documentation

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 448 of file PxeBcBoot.c.

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 556 of file PxeBcBoot.c.

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 810 of file PxeBcBoot.c.

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 765 of file PxeBcBoot.c.

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 29 of file PxeBcBoot.c.

EFI_STATUS PxeBcExtractDiscoverInfo ( IN PXEBC_PRIVATE_DATA Private,
IN UINT16  Type,
IN OUT EFI_PXE_BASE_CODE_DISCOVER_INFO Info,
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]InfoPointer 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 663 of file PxeBcBoot.c.

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 succesfully.
OthersFailed to install PxeBaseCodeCallbackProtocol.

Definition at line 897 of file PxeBcBoot.c.

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 1045 of file PxeBcBoot.c.

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 993 of file PxeBcBoot.c.

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 keybroad has not finish.

Definition at line 256 of file PxeBcBoot.c.

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 64 of file PxeBcBoot.c.

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 954 of file PxeBcBoot.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines