2 Definitions for the web server.
4 Copyright (c) 2011, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _WEB_SERVER_H_
16 #define _WEB_SERVER_H_
21 #include <Guid/EventGroup.h>
23 #include <Library/BaseMemoryLib.h>
24 #include <Library/DebugLib.h>
25 #include <Library/PcdLib.h>
26 #include <Library/UefiApplicationEntryPoint.h>
27 #include <Library/UefiBootServicesTableLib.h>
28 #include <Library/UefiLib.h>
29 #include <Protocol/BlockIo.h>
31 #include <netinet/in.h>
33 #include <sys/EfiSysCall.h>
35 #include <sys/socket.h>
37 #if defined(_MSC_VER) // Handle Microsoft VC++ compiler specifics.
38 #pragma warning ( disable : 4054 )
39 #pragma warning ( disable : 4152 )
40 #endif // defined(_MSC_VER)
42 //------------------------------------------------------------------------------
44 //------------------------------------------------------------------------------
46 #define PAGE_ACPI_DSDT L"/DSDT"
47 #define PAGE_ACPI_FADT L"/FADT"
48 #define PAGE_ACPI_RSDP_10B L"/RSDP1.0b"
49 #define PAGE_ACPI_RSDP_30 L"/RSDP3.0"
50 #define PAGE_ACPI_RSDT L"/RSDT"
51 #define PAGE_BOOT_SERVICES_TABLE L"/BootServicesTable"
52 #define PAGE_CONFIGURATION_TABLE L"/ConfigurationTable"
53 #define PAGE_DXE_SERVICES_TABLE L"/DxeServicesTable"
54 #define PAGE_RUNTIME_SERVICES_TABLE L"/RuntimeServicesTable"
56 //------------------------------------------------------------------------------
58 //------------------------------------------------------------------------------
60 #define DSDT_SIGNATURE 0x54445344
61 #define FADT_SIGNATURE 0x50434146
63 //------------------------------------------------------------------------------
65 //------------------------------------------------------------------------------
67 #if defined(_MSC_VER) /* Handle Microsoft VC++ compiler specifics. */
68 #define DBG_ENTER() DEBUG (( DEBUG_INFO, "Entering " __FUNCTION__ "\n" )) ///< Display routine entry
69 #define DBG_EXIT() DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ "\n" )) ///< Display routine exit
70 #define DBG_EXIT_DEC(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %d\n", Status )) ///< Display routine exit with decimal value
71 #define DBG_EXIT_HEX(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: 0x%08x\n", Status )) ///< Display routine exit with hex value
72 #define DBG_EXIT_STATUS(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %r\n", Status )) ///< Display routine exit with status value
73 #define DBG_EXIT_TF(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", returning %s\n", (FALSE == Status) ? L"FALSE" : L"TRUE" )) ///< Display routine with TRUE/FALSE value
77 #define DBG_EXIT_DEC(Status)
78 #define DBG_EXIT_HEX(Status)
79 #define DBG_EXIT_STATUS(Status)
80 #define DBG_EXIT_TF(Status)
83 #define DIM(x) ( sizeof ( x ) / sizeof ( x[0] )) ///< Compute the number of entries in an array
85 //------------------------------------------------------------------------------
87 //------------------------------------------------------------------------------
89 #define DEBUG_SOCKET_POLL 0x00080000 ///< Display the socket poll messages
90 #define DEBUG_PORT_WORK 0x00040000 ///< Display the port work messages
91 #define DEBUG_SERVER_LISTEN 0x00020000 ///< Display the socket poll messages
92 #define DEBUG_HTTP_PORT 0x00010000 ///< Display HTTP port related messages
93 #define DEBUG_REQUEST 0x00008000 ///< Display the HTTP request messages
95 #define HTTP_PORT_POLL_DELAY ( 2 * 1000 ) ///< Delay in milliseconds for attempts to open the HTTP port
96 #define CLIENT_POLL_DELAY 50 ///< Delay in milliseconds between client polls
98 #define TPL_WEB_SERVER TPL_CALLBACK ///< TPL for routine synchronization
103 This macro which is enabled when debug is enabled verifies that
104 the new TPL value is >= the current TPL value.
110 #if !defined(MDEPKG_NDEBUG)
112 #define VERIFY_TPL(tpl) \
114 EFI_TPL PreviousTpl; \
116 PreviousTpl = gBS->RaiseTPL ( TPL_HIGH_LEVEL ); \
117 gBS->RestoreTPL ( PreviousTpl ); \
118 if ( PreviousTpl > tpl ) { \
119 DEBUG (( DEBUG_ERROR, "Current TPL: %d, New TPL: %d\r\n", PreviousTpl, tpl )); \
120 ASSERT ( PreviousTpl <= tpl ); \
124 #else // MDEPKG_NDEBUG
126 #define VERIFY_TPL(tpl)
128 #endif // MDEPKG_NDEBUG
130 #define WEB_SERVER_SIGNATURE SIGNATURE_32 ('W','e','b','S') ///< DT_WEB_SERVER memory signature
132 #define SPACES_ADDRESS_TO_DATA 2
133 #define BYTES_ON_A_LINE 16
134 #define SPACES_BETWEEN_BYTES 1
135 #define SPACES_DATA_TO_ASCII 2
138 //------------------------------------------------------------------------------
139 // Protocol Declarations
140 //------------------------------------------------------------------------------
142 extern EFI_COMPONENT_NAME_PROTOCOL gComponentName
; ///< Component name protocol declaration
143 extern EFI_COMPONENT_NAME2_PROTOCOL gComponentName2
; ///< Component name 2 protocol declaration
144 extern EFI_DRIVER_BINDING_PROTOCOL gDriverBinding
; ///< Driver binding protocol declaration
146 //------------------------------------------------------------------------------
148 //------------------------------------------------------------------------------
151 Port control structure
157 size_t RequestLength
; ///< Request length in bytes
158 size_t TxBytes
; ///< Bytes in the TX buffer
159 UINT8 Request
[ 65536 ]; ///< Page request
160 UINT8 RxBuffer
[ 65536 ]; ///< Receive buffer
161 UINT8 TxBuffer
[ 65536 ]; ///< Transmit buffer
165 Web server control structure
168 UINTN Signature
; ///< Structure identification
173 EFI_HANDLE ImageHandle
; ///< Image handle
176 // HTTP port management
178 BOOLEAN bRunning
; ///< Web server running
179 EFI_EVENT TimerEvent
; ///< Timer to open HTTP port
180 int HttpListenPort
; ///< File descriptor for the HTTP listen port over TCP4
181 int HttpListenPort6
; ///< File descriptor for the HTTP listen port over TCP6
184 // Client port management
186 nfds_t MaxEntries
; ///< Maximum entries in the PortList array
187 nfds_t Entries
; ///< The current number of entries in the PortList array
188 struct pollfd
* pFdList
; ///< List of socket file descriptors
189 WSDT_PORT
** ppPortList
; ///< List of port management structures
192 //#define SERVER_FROM_SERVICE(a) CR (a, DT_WEB_SERVER, ServiceBinding, WEB_SERVER_SIGNATURE) ///< Locate DT_LAYER from service binding
194 extern DT_WEB_SERVER mWebServer
;
197 Process an HTTP request
199 @param [in] SocketFD The socket's file descriptor to add to the list.
200 @param [in] pPort The WSDT_PORT structure address
201 @param [out] pbDone Address to receive the request completion status
203 @retval EFI_SUCCESS The request was successfully processed
210 IN WSDT_PORT
* pPort
,
215 Data structure to delcare page support routines
218 UINT16
* pPageName
; ///< Name of the page
219 PFN_RESPONSE pfnResponse
; ///< Routine to generate the response
220 UINT16
* pDescription
; ///< Description of the page
223 extern CONST DT_PAGE mPageList
[]; ///< List of pages
224 extern CONST UINTN mPageCount
; ///< Number of pages
226 //------------------------------------------------------------------------------
228 //------------------------------------------------------------------------------
231 Respond with the ACPI DSDT table
233 @param [in] SocketFD The socket's file descriptor to add to the list.
234 @param [in] pPort The WSDT_PORT structure address
235 @param [out] pbDone Address to receive the request completion status
237 @retval EFI_SUCCESS The request was successfully processed
243 IN WSDT_PORT
* pPort
,
248 Respond with the ACPI FADT table
250 @param [in] SocketFD The socket's file descriptor to add to the list.
251 @param [in] pPort The WSDT_PORT structure address
252 @param [out] pbDone Address to receive the request completion status
254 @retval EFI_SUCCESS The request was successfully processed
260 IN WSDT_PORT
* pPort
,
265 Respond with the ACPI RSDP 1.0b table
267 @param [in] SocketFD The socket's file descriptor to add to the list.
268 @param [in] pPort The WSDT_PORT structure address
269 @param [out] pbDone Address to receive the request completion status
271 @retval EFI_SUCCESS The request was successfully processed
277 IN WSDT_PORT
* pPort
,
282 Respond with the ACPI RSDP 3.0 table
284 @param [in] SocketFD The socket's file descriptor to add to the list.
285 @param [in] pPort The WSDT_PORT structure address
286 @param [out] pbDone Address to receive the request completion status
288 @retval EFI_SUCCESS The request was successfully processed
294 IN WSDT_PORT
* pPort
,
299 Respond with the ACPI RSDT table
301 @param [in] SocketFD The socket's file descriptor to add to the list.
302 @param [in] pPort The WSDT_PORT structure address
303 @param [out] pbDone Address to receive the request completion status
305 @retval EFI_SUCCESS The request was successfully processed
311 IN WSDT_PORT
* pPort
,
316 Respond with the boot services table
318 @param [in] SocketFD The socket's file descriptor to add to the list.
319 @param [in] pPort The WSDT_PORT structure address
320 @param [out] pbDone Address to receive the request completion status
322 @retval EFI_SUCCESS The request was successfully processed
326 BootServicesTablePage (
328 IN WSDT_PORT
* pPort
,
333 Respond with the configuration tables
335 @param [in] SocketFD The socket's file descriptor to add to the list.
336 @param [in] pPort The WSDT_PORT structure address
337 @param [out] pbDone Address to receive the request completion status
339 @retval EFI_SUCCESS The request was successfully processed
343 ConfigurationTablePage (
345 IN WSDT_PORT
* pPort
,
350 Respond with the DHCP options
352 @param [in] SocketFD The socket's file descriptor to add to the list.
353 @param [in] pPort The WSDT_PORT structure address
354 @param [out] pbDone Address to receive the request completion status
356 @retval EFI_SUCCESS The request was successfully processed
362 IN WSDT_PORT
* pPort
,
367 Respond with the DXE services table
369 @param [in] SocketFD The socket's file descriptor to add to the list.
370 @param [in] pPort The WSDT_PORT structure address
371 @param [out] pbDone Address to receive the request completion status
373 @retval EFI_SUCCESS The request was successfully processed
377 DxeServicesTablePage (
379 IN WSDT_PORT
* pPort
,
384 Respond with the Exit page
386 @param [in] SocketFD The socket's file descriptor to add to the list.
387 @param [in] pPort The WSDT_PORT structure address
388 @param [out] pbDone Address to receive the request completion status
390 @retval EFI_SUCCESS The request was successfully processed
396 IN WSDT_PORT
* pPort
,
401 Respond with the firmware status
403 @param [in] SocketFD The socket's file descriptor to add to the list.
404 @param [in] pPort The WSDT_PORT structure address
405 @param [out] pbDone Address to receive the request completion status
407 @retval EFI_SUCCESS The request was successfully processed
413 IN WSDT_PORT
* pPort
,
418 Respond with the handles in the system
420 @param [in] SocketFD The socket's file descriptor to add to the list.
421 @param [in] pPort The WSDT_PORT structure address
422 @param [out] pbDone Address to receive the request completion status
424 @retval EFI_SUCCESS The request was successfully processed
430 IN WSDT_PORT
* pPort
,
435 Respond with the Hello World page
437 @param [in] SocketFD The socket's file descriptor to add to the list.
438 @param [in] pPort The WSDT_PORT structure address
439 @param [out] pbDone Address to receive the request completion status
441 @retval EFI_SUCCESS The request was successfully processed
447 IN WSDT_PORT
* pPort
,
452 Respond with the list of known pages
454 @param [in] SocketFD The socket's file descriptor to add to the list.
455 @param [in] pPort The WSDT_PORT structure address
456 @param [out] pbDone Address to receive the request completion status
458 @retval EFI_SUCCESS The request was successfully processed
464 IN WSDT_PORT
* pPort
,
469 Respond with the Ports page
471 @param [in] SocketFD The socket's file descriptor to add to the list.
472 @param [in] pPort The WSDT_PORT structure address
473 @param [out] pbDone Address to receive the request completion status
475 @retval EFI_SUCCESS The request was successfully processed
481 IN WSDT_PORT
* pPort
,
486 Page to reboot the system
488 @param [in] SocketFD The socket's file descriptor to add to the list.
489 @param [in] pPort The WSDT_PORT structure address
490 @param [out] pbDone Address to receive the request completion status
492 @retval EFI_SUCCESS The request was successfully processed
498 IN WSDT_PORT
* pPort
,
503 Respond with the runtime services table
505 @param [in] SocketFD The socket's file descriptor to add to the list.
506 @param [in] pPort The WSDT_PORT structure address
507 @param [out] pbDone Address to receive the request completion status
509 @retval EFI_SUCCESS The request was successfully processed
513 RuntimeSservicesTablePage (
515 IN WSDT_PORT
* pPort
,
520 Respond with the system table
522 @param [in] SocketFD The socket's file descriptor to add to the list.
523 @param [in] pPort The WSDT_PORT structure address
524 @param [out] pbDone Address to receive the request completion status
526 @retval EFI_SUCCESS The request was successfully processed
532 IN WSDT_PORT
* pPort
,
536 //------------------------------------------------------------------------------
538 //------------------------------------------------------------------------------
541 Display the EFI Table Header
543 @param [in] SocketFD The socket's file descriptor to add to the list.
544 @param [in] pPort The WSDT_PORT structure address
545 @param [in] pHeader Address of the EFI_TABLE_HEADER structure
547 @retval EFI_SUCCESS The request was successfully processed
553 IN WSDT_PORT
* pPort
,
554 IN EFI_TABLE_HEADER
* pHeader
558 Buffer the HTTP page header
560 @param [in] SocketFD The socket's file descriptor to add to the list.
561 @param [in] pPort The WSDT_PORT structure address
562 @param [in] pTitle A zero terminated Unicode title string
564 @retval EFI_SUCCESS The request was successfully processed
570 IN WSDT_PORT
* pPort
,
571 IN CONST CHAR16
* pTitle
575 Buffer and send the HTTP page trailer
577 @param [in] SocketFD The socket's file descriptor to add to the list.
578 @param [in] pPort The WSDT_PORT structure address
579 @param [out] pbDone Address to receive the request completion status
581 @retval EFI_SUCCESS The request was successfully processed
587 IN WSDT_PORT
* pPort
,
592 Process an HTTP request
594 @param [in] SocketFD The socket's file descriptor to add to the list.
595 @param [in] pPort The WSDT_PORT structure address
596 @param [out] pbDone Address to receive the request completion status
598 @retval EFI_SUCCESS The request was successfully processed
604 IN WSDT_PORT
* pPort
,
609 Buffer data for sending
611 @param [in] SocketFD The socket's file descriptor to add to the list.
612 @param [in] pPort The WSDT_PORT structure address
613 @param [in] LengthInBytes Length of valid data in the buffer
614 @param [in] pBuffer Buffer of data to send
616 @retval EFI_SUCCESS The request was successfully processed
622 IN WSDT_PORT
* pPort
,
623 IN
size_t LengthInBytes
,
624 IN CONST UINT8
* pBuffer
630 @param [in] SocketFD The socket's file descriptor to add to the list.
631 @param [in] pPort The WSDT_PORT structure address
632 @param [in] pString A zero terminated Unicode string
634 @retval EFI_SUCCESS The request was successfully processed
640 IN WSDT_PORT
* pPort
,
641 IN CONST
char * pString
647 @param [in] SocketFD The socket's file descriptor to add to the list.
648 @param [in] pPort The WSDT_PORT structure address
649 @param [in] Data The data byte to send
651 @retval EFI_SUCCESS The request was successfully processed
657 IN WSDT_PORT
* pPort
,
664 @param [in] SocketFD The socket's file descriptor to add to the list.
665 @param [in] pPort The WSDT_PORT structure address
666 @param [in] Character Character to display
667 @param [in] pReplacement Replacement character string
669 @retval EFI_SUCCESS The request was successfully processed
675 IN WSDT_PORT
* pPort
,
677 IN CHAR8
* pReplacement
683 @param [in] SocketFD The socket's file descriptor to add to the list.
684 @param [in] pPort The WSDT_PORT structure address
685 @param [in] ByteCount The number of bytes to display
686 @param [in] pData Address of the byte array
688 @retval EFI_SUCCESS The request was successfully processed
694 IN WSDT_PORT
* pPort
,
696 IN CONST UINT8
* pData
700 Display a row containing a GUID value
702 @param [in] SocketFD The socket's file descriptor to add to the list.
703 @param [in] pPort The WSDT_PORT structure address
704 @param [in] pGuid Address of the GUID to display
706 @retval EFI_SUCCESS The request was successfully processed
712 IN WSDT_PORT
* pPort
,
713 IN CONST EFI_GUID
* pGuid
717 Output a hex value to the HTML page
719 @param [in] SocketFD Socket file descriptor
720 @param [in] pPort The WSDT_PORT structure address
721 @param [in] Bits Number of bits to display
722 @param [in] Value Value to display
724 @retval EFI_SUCCESS Successfully displayed the address
729 IN WSDT_PORT
* pPort
,
735 Output a hex value to the HTML page
737 @param [in] SocketFD Socket file descriptor
738 @param [in] pPort The WSDT_PORT structure address
739 @param [in] Value Value to display
741 @retval EFI_SUCCESS Successfully displayed the address
746 IN WSDT_PORT
* pPort
,
751 Output an IP address to the HTML page
753 @param [in] SocketFD Socket file descriptor
754 @param [in] pPort The WSDT_PORT structure address
755 @param [in] pAddress Address of the socket address
757 @retval EFI_SUCCESS Successfully displayed the address
762 IN WSDT_PORT
* pPort
,
763 IN
struct sockaddr_in6
* pAddress
767 Send a Unicode string
769 @param [in] SocketFD The socket's file descriptor to add to the list.
770 @param [in] pPort The WSDT_PORT structure address
771 @param [in] pString A zero terminated Unicode string
773 @retval EFI_SUCCESS The request was successfully processed
777 HttpSendUnicodeString (
779 IN WSDT_PORT
* pPort
,
780 IN CONST UINT16
* pString
784 Output a value to the HTML page
786 @param [in] SocketFD Socket file descriptor
787 @param [in] pPort The WSDT_PORT structure address
788 @param [in] Value Value to display
790 @retval EFI_SUCCESS Successfully displayed the address
795 IN WSDT_PORT
* pPort
,
800 Display a row containing a decimal value
802 @param [in] SocketFD The socket's file descriptor to add to the list.
803 @param [in] pPort The WSDT_PORT structure address
804 @param [in] pName Address of a zero terminated name string
805 @param [in] Value The value to display
807 @retval EFI_SUCCESS The request was successfully processed
813 IN WSDT_PORT
* pPort
,
814 IN CONST CHAR8
* pName
,
819 Display a row containing a GUID value
821 @param [in] SocketFD The socket's file descriptor to add to the list.
822 @param [in] pPort The WSDT_PORT structure address
823 @param [in] pName Address of a zero terminated name string
824 @param [in] pGuid Address of the GUID to display
826 @retval EFI_SUCCESS The request was successfully processed
832 IN WSDT_PORT
* pPort
,
833 IN CONST CHAR8
* pName
,
834 IN CONST EFI_GUID
* pGuid
838 Display a row containing a hex value
840 @param [in] SocketFD The socket's file descriptor to add to the list.
841 @param [in] pPort The WSDT_PORT structure address
842 @param [in] pName Address of a zero terminated name string
843 @param [in] Value The value to display
844 @param [in] pWebPage Address of a zero terminated web page name
846 @retval EFI_SUCCESS The request was successfully processed
852 IN WSDT_PORT
* pPort
,
853 IN CONST CHAR8
* pName
,
855 IN CONST CHAR16
* pWebPage
859 Display a row containing a pointer
861 @param [in] SocketFD The socket's file descriptor to add to the list.
862 @param [in] pPort The WSDT_PORT structure address
863 @param [in] pName Address of a zero terminated name string
864 @param [in] pAddress The address to display
865 @param [in] pWebPage Address of a zero terminated web page name
867 @retval EFI_SUCCESS The request was successfully processed
873 IN WSDT_PORT
* pPort
,
874 IN CONST CHAR8
* pName
,
875 IN CONST VOID
* pAddress
,
876 IN CONST CHAR16
* pWebPage
880 Display a row containing a revision
882 @param [in] SocketFD The socket's file descriptor to add to the list.
883 @param [in] pPort The WSDT_PORT structure address
884 @param [in] pName Address of a zero terminated name string
885 @param [in] Revision The revision to display
887 @retval EFI_SUCCESS The request was successfully processed
893 IN WSDT_PORT
* pPort
,
894 IN CONST CHAR8
* pName
,
899 Display a row containing a unicode string
901 @param [in] SocketFD The socket's file descriptor to add to the list.
902 @param [in] pPort The WSDT_PORT structure address
903 @param [in] pName Address of a zero terminated name string
904 @param [in] pString Address of a zero terminated unicode string
906 @retval EFI_SUCCESS The request was successfully processed
912 IN WSDT_PORT
* pPort
,
913 IN CONST CHAR8
* pName
,
914 IN CONST CHAR16
* pString
920 @param [in] SocketFD The socket's file descriptor to add to the list.
921 @param [in] pPort The WSDT_PORT structure address
922 @param [in] pName Address of a zero terminated name string
923 @param [in] pTable Address of the table
925 @retval EFI_SUCCESS The request was successfully processed
931 IN WSDT_PORT
* pPort
,
932 IN CONST CHAR16
* pName
,
933 IN CONST VOID
* pTable
939 @param [in] SocketFD The socket's file descriptor to add to the list.
940 @param [in] pPort The WSDT_PORT structure address
941 @param [out] pbDone Address to receive the request completion status
943 @retval EFI_SUCCESS The request was successfully processed
949 IN WSDT_PORT
* pPort
,
954 HTTP port creation timer routine
956 This routine polls the socket layer waiting for the initial network connection
957 which will enable the creation of the HTTP port. The socket layer will manage
958 the coming and going of the network connections after that until the last network
959 connection is broken.
961 @param [in] pWebServer The web server control structure address.
966 IN DT_WEB_SERVER
* pWebServer
970 Start the web server port creation timer
972 @param [in] pWebServer The web server control structure address.
974 @retval EFI_SUCCESS The timer was successfully started.
975 @retval EFI_ALREADY_STARTED The timer is already running.
976 @retval Other The timer failed to start.
980 WebServerTimerStart (
981 IN DT_WEB_SERVER
* pWebServer
985 Stop the web server port creation timer
987 @param [in] pWebServer The web server control structure address.
989 @retval EFI_SUCCESS The HTTP port timer is stopped
990 @retval Other Failed to stop the HTTP port timer
995 IN DT_WEB_SERVER
* pWebServer
998 //------------------------------------------------------------------------------
999 // Driver Binding Protocol Support
1000 //------------------------------------------------------------------------------
1003 Stop this driver on Controller by removing NetworkInterfaceIdentifier protocol and
1004 closing the DevicePath and PciIo protocols on Controller.
1006 @param [in] pThis Protocol instance pointer.
1007 @param [in] Controller Handle of device to stop driver on.
1008 @param [in] NumberOfChildren How many children need to be stopped.
1009 @param [in] pChildHandleBuffer Not used.
1011 @retval EFI_SUCCESS This driver is removed Controller.
1012 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
1013 @retval other This driver was not removed from this device.
1019 IN EFI_DRIVER_BINDING_PROTOCOL
* pThis
,
1020 IN EFI_HANDLE Controller
,
1021 IN UINTN NumberOfChildren
,
1022 IN EFI_HANDLE
* pChildHandleBuffer
1025 //------------------------------------------------------------------------------
1026 // EFI Component Name Protocol Support
1027 //------------------------------------------------------------------------------
1030 Retrieves a Unicode string that is the user readable name of the driver.
1032 This function retrieves the user readable name of a driver in the form of a
1033 Unicode string. If the driver specified by This has a user readable name in
1034 the language specified by Language, then a pointer to the driver name is
1035 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
1036 by This does not support the language specified by Language,
1037 then EFI_UNSUPPORTED is returned.
1039 @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1040 EFI_COMPONENT_NAME_PROTOCOL instance.
1041 @param [in] pLanguage A pointer to a Null-terminated ASCII string
1042 array indicating the language. This is the
1043 language of the driver name that the caller is
1044 requesting, and it must match one of the
1045 languages specified in SupportedLanguages. The
1046 number of languages supported by a driver is up
1047 to the driver writer. Language is specified
1048 in RFC 3066 or ISO 639-2 language code format.
1049 @param [out] ppDriverName A pointer to the Unicode string to return.
1050 This Unicode string is the name of the
1051 driver specified by This in the language
1052 specified by Language.
1054 @retval EFI_SUCCESS The Unicode string for the Driver specified by
1055 This and the language specified by Language was
1056 returned in DriverName.
1057 @retval EFI_INVALID_PARAMETER Language is NULL.
1058 @retval EFI_INVALID_PARAMETER DriverName is NULL.
1059 @retval EFI_UNSUPPORTED The driver specified by This does not support
1060 the language specified by Language.
1066 IN EFI_COMPONENT_NAME_PROTOCOL
* pThis
,
1067 IN CHAR8
* pLanguage
,
1068 OUT CHAR16
** ppDriverName
1073 Retrieves a Unicode string that is the user readable name of the controller
1074 that is being managed by a driver.
1076 This function retrieves the user readable name of the controller specified by
1077 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1078 driver specified by This has a user readable name in the language specified by
1079 Language, then a pointer to the controller name is returned in ControllerName,
1080 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1081 managing the controller specified by ControllerHandle and ChildHandle,
1082 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1083 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1085 @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1086 EFI_COMPONENT_NAME_PROTOCOL instance.
1087 @param [in] ControllerHandle The handle of a controller that the driver
1088 specified by This is managing. This handle
1089 specifies the controller whose name is to be
1091 @param [in] ChildHandle The handle of the child controller to retrieve
1092 the name of. This is an optional parameter that
1093 may be NULL. It will be NULL for device
1094 drivers. It will also be NULL for a bus drivers
1095 that wish to retrieve the name of the bus
1096 controller. It will not be NULL for a bus
1097 driver that wishes to retrieve the name of a
1099 @param [in] pLanguage A pointer to a Null-terminated ASCII string
1100 array indicating the language. This is the
1101 language of the driver name that the caller is
1102 requesting, and it must match one of the
1103 languages specified in SupportedLanguages. The
1104 number of languages supported by a driver is up
1105 to the driver writer. Language is specified in
1106 RFC 3066 or ISO 639-2 language code format.
1107 @param [out] ppControllerName A pointer to the Unicode string to return.
1108 This Unicode string is the name of the
1109 controller specified by ControllerHandle and
1110 ChildHandle in the language specified by
1111 Language from the point of view of the driver
1114 @retval EFI_SUCCESS The Unicode string for the user readable name in
1115 the language specified by Language for the
1116 driver specified by This was returned in
1118 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
1119 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1121 @retval EFI_INVALID_PARAMETER Language is NULL.
1122 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1123 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1124 managing the controller specified by
1125 ControllerHandle and ChildHandle.
1126 @retval EFI_UNSUPPORTED The driver specified by This does not support
1127 the language specified by Language.
1133 IN EFI_COMPONENT_NAME_PROTOCOL
* pThis
,
1134 IN EFI_HANDLE ControllerHandle
,
1135 IN OPTIONAL EFI_HANDLE ChildHandle
,
1136 IN CHAR8
* pLanguage
,
1137 OUT CHAR16
** ppControllerName
1140 //------------------------------------------------------------------------------
1142 #endif // _WEB_SERVER_H_