]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
Per UEFI spec, SetMode() should clear screen anyway with black color.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcSupport.h
CommitLineData
30368135 1/** @file\r
f737cfb9 2 Support routines for PxeBc.\r
6d3ea23f 3Copyright (c) 2007 - 2009, Intel Corporation.<BR> \r
30368135 4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
f737cfb9 12**/\r
30368135 13\r
f737cfb9 14#ifndef __EFI_PXEBC_SUPPORT_H__\r
15#define __EFI_PXEBC_SUPPORT_H__\r
30368135 16\r
f737cfb9 17/**\r
18 This function gets system guid and serial number from the smbios table.\r
30368135 19\r
f737cfb9 20 @param SystemGuid The pointer of returned system guid.\r
21 @param SystemSerialNumber The pointer of returned system serial number.\r
30368135 22\r
f737cfb9 23 @retval EFI_SUCCESS Successfully get the system guid and system serial\r
24 number.\r
25 @retval EFI_NOT_FOUND Not find the SMBIOS table.\r
30368135 26\r
27**/\r
30368135 28EFI_STATUS\r
29GetSmbiosSystemGuidAndSerialNumber (\r
30 IN EFI_GUID *SystemGuid,\r
31 OUT CHAR8 **SystemSerialNumber\r
32 );\r
33\r
34\r
35/**\r
f737cfb9 36 The common notify function associated with various PxeBc events. \r
30368135 37\r
f737cfb9 38 @param Event The event signaled.\r
39 @param Context The context.\r
30368135 40\r
f737cfb9 41 @return None\r
30368135 42\r
43**/\r
44VOID\r
6d3ea23f 45EFIAPI\r
30368135 46PxeBcCommonNotify (\r
47 IN EFI_EVENT Event,\r
48 IN VOID *Context\r
d59b8b55 49 );\r
30368135 50\r
f737cfb9 51\r
52/**\r
53 This function initialize(or configure) the Udp4Write instance.\r
54 \r
55 @param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance.\r
56 @param StationIp Pointer to the station ip address.\r
57 @param SubnetMask Pointer to the subnetmask of the station ip address.\r
58 @param Gateway Pointer to the gateway ip address.\r
59 @param SrcPort Pointer to the srouce port of the station.\r
60 \r
61 @retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.\r
62 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
63 RARP, etc.) is not finished yet.\r
64 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:\r
65 @retval EFI_ALREADY_STARTED The EFI UDPv4 Protocol instance is already started/configured\r
66 and must be stopped/reset before it can be reconfigured.\r
67 @retval EFI_ACCESS_DENIED UdpConfigData. AllowDuplicatePort is FALSE\r
68 and UdpConfigData.StationPort is already used by\r
69 other instance.\r
70 @retval EFI_OUT_OF_RESOURCES The EFI UDPv4 Protocol driver cannot allocate memory for this\r
71 EFI UDPv4 Protocol instance.\r
72 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance\r
73 was not opened.\r
74 @retval Others Please examine the function Udp4->Routes(Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway) returns.\r
75 \r
76**/\r
30368135 77EFI_STATUS\r
78PxeBcConfigureUdpWriteInstance (\r
79 IN EFI_UDP4_PROTOCOL *Udp4,\r
80 IN EFI_IPv4_ADDRESS *StationIp,\r
81 IN EFI_IPv4_ADDRESS *SubnetMask,\r
82 IN EFI_IPv4_ADDRESS *Gateway,\r
83 IN OUT UINT16 *SrcPort\r
84 );\r
f737cfb9 85/**\r
86 Convert number to ASCII value.\r
87\r
88 @param Number Numeric value to convert to decimal ASCII value.\r
81b07614 89 @param Buffer Buffer to place ASCII version of the Number.\r
f737cfb9 90 @param Length Length of Buffer.\r
91\r
f737cfb9 92**/\r
30368135 93VOID\r
94CvtNum (\r
95 IN UINTN Number,\r
96 IN UINT8 *Buffer,\r
f737cfb9 97 IN UINTN Length\r
30368135 98 );\r
99\r
100\r
101/**\r
f737cfb9 102 Convert unsigned int number to decimal number.\r
30368135 103\r
d59b8b55 104 @param Number The unsigned int number will be converted.\r
105 @param Buffer Pointer to the buffer to store the decimal number after transform.\r
30368135 106\r
f737cfb9 107 @return the length of the number after transform.\r
30368135 108\r
109**/\r
110UINTN\r
111UtoA10 (\r
f737cfb9 112 IN UINTN Number,\r
113 IN CHAR8 *Buffer\r
d59b8b55 114 );\r
30368135 115\r
116\r
117/**\r
f737cfb9 118 Convert ASCII numeric string to a UINTN value.\r
30368135 119\r
f737cfb9 120 @param Buffer Pointer to the 8-byte unsigned int value.\r
d59b8b55 121\r
f737cfb9 122 @return UINTN value of the ASCII string.\r
30368135 123\r
124**/\r
125UINT64\r
126AtoU64 (\r
f737cfb9 127 IN UINT8 *Buffer\r
d59b8b55 128 );\r
30368135 129\r
130\r
131#endif\r
132\r