2 Boot functions declaration for UefiPxeBc Driver.
4 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __EFI_PXEBC_BOOT_H__
11 #define __EFI_PXEBC_BOOT_H__
13 #define PXEBC_DISPLAY_MAX_LINE 70
14 #define PXEBC_DEFAULT_UDP_OVERHEAD_SIZE 8
15 #define PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE 4
17 #define PXEBC_IS_SIZE_OVERFLOWED(x) ((sizeof (UINTN) < sizeof (UINT64)) && ((x) > 0xFFFFFFFF))
21 Extract the discover information and boot server entry from the
22 cached packets if unspecified.
24 @param[in] Private Pointer to PxeBc private data.
25 @param[in] Type The type of bootstrap to perform.
26 @param[in, out] DiscoverInfo Pointer to EFI_PXE_BASE_CODE_DISCOVER_INFO.
27 @param[out] BootEntry Pointer to PXEBC_BOOT_SVR_ENTRY.
28 @param[out] SrvList Pointer to EFI_PXE_BASE_CODE_SRVLIST.
30 @retval EFI_SUCCESS Successfully extracted the information.
31 @retval EFI_DEVICE_ERROR Failed to extract the information.
35 PxeBcExtractDiscoverInfo (
36 IN PXEBC_PRIVATE_DATA
*Private
,
38 IN OUT EFI_PXE_BASE_CODE_DISCOVER_INFO
**DiscoverInfo
,
39 OUT PXEBC_BOOT_SVR_ENTRY
**BootEntry
,
40 OUT EFI_PXE_BASE_CODE_SRVLIST
**SrvList
45 Build the discover packet and send out for boot.
47 @param[in] Private Pointer to PxeBc private data.
48 @param[in] Type PxeBc option boot item type.
49 @param[in] Layer Pointer to option boot item layer.
50 @param[in] UseBis Use BIS or not.
51 @param[in] DestIp Pointer to the server address.
52 @param[in] IpCount The total count of the server address.
53 @param[in] SrvList Pointer to the server address list.
55 @retval EFI_SUCCESS Successfully discovered boot file.
56 @retval EFI_OUT_OF_RESOURCES Failed to allocate resources.
57 @retval EFI_NOT_FOUND Can't get the PXE reply packet.
58 @retval Others Failed to discover boot file.
62 PxeBcDiscoverBootServer (
63 IN PXEBC_PRIVATE_DATA
*Private
,
67 IN EFI_IP_ADDRESS
*DestIp
,
69 IN EFI_PXE_BASE_CODE_SRVLIST
*SrvList
74 Load boot file into user buffer.
76 @param[in] Private Pointer to PxeBc private data.
77 @param[in, out] BufferSize Size of user buffer for input;
78 required buffer size for output.
79 @param[in] Buffer Pointer to user buffer.
81 @retval EFI_SUCCESS Successfully obtained all the boot information.
82 @retval EFI_BUFFER_TOO_SMALL The buffer size is not enough for boot file.
83 @retval EFI_ABORTED User cancelled the current operation.
84 @retval Others Failed to parse out the boot information.
89 IN PXEBC_PRIVATE_DATA
*Private
,
90 IN OUT UINTN
*BufferSize
,
91 IN VOID
*Buffer OPTIONAL