2 Include for Serial Driver
4 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 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.
19 #include <FrameworkDxe.h>
21 #include <Protocol/IsaIo.h>
22 #include <Protocol/SerialIo.h>
23 #include <Protocol/DevicePath.h>
25 #include <Library/DebugLib.h>
26 #include <Library/UefiDriverEntryPoint.h>
27 #include <Library/UefiLib.h>
28 #include <Library/DevicePathLib.h>
29 #include <Library/BaseMemoryLib.h>
30 #include <Library/MemoryAllocationLib.h>
31 #include <Library/UefiBootServicesTableLib.h>
32 #include <Library/ReportStatusCodeLib.h>
33 #include <Library/PcdLib.h>
36 // Driver Binding Externs
38 extern EFI_DRIVER_BINDING_PROTOCOL gSerialControllerDriver
;
39 extern EFI_COMPONENT_NAME_PROTOCOL gIsaSerialComponentName
;
40 extern EFI_COMPONENT_NAME2_PROTOCOL gIsaSerialComponentName2
;
43 // Internal Data Structures
45 #define SERIAL_DEV_SIGNATURE SIGNATURE_32 ('s', 'e', 'r', 'd')
46 #define SERIAL_MAX_BUFFER_SIZE 16
47 #define TIMEOUT_STALL_INTERVAL 10
50 // Name: SERIAL_DEV_FIFO
51 // Purpose: To define Receive FIFO and Transmit FIFO
52 // Context: Used by serial data transmit and receive
54 // First UINT32: The index of the first data in array Data[]
55 // Last UINT32: The index, which you can put a new data into array Data[]
56 // Surplus UINT32: Identify how many data you can put into array Data[]
57 // Data[] UINT8 : An array, which used to store data
63 UINT8 Data
[SERIAL_MAX_BUFFER_SIZE
];
75 // Purpose: To provide device specific information
78 // Signature UINTN: The identity of the serial device
79 // SerialIo SERIAL_IO_PROTOCOL: Serial I/O protocol interface
80 // SerialMode SERIAL_IO_MODE:
81 // DevicePath EFI_DEVICE_PATH_PROTOCOL *: Device path of the serial device
82 // Handle EFI_HANDLE: The handle instance attached to serial device
83 // BaseAddress UINT16: The base address of specific serial device
84 // Receive SERIAL_DEV_FIFO: The FIFO used to store data,
85 // which is received by UART
86 // Transmit SERIAL_DEV_FIFO: The FIFO used to store data,
87 // which you want to transmit by UART
88 // SoftwareLoopbackEnable BOOLEAN:
89 // Type EFI_UART_TYPE: Specify the UART type of certain serial device
95 EFI_SERIAL_IO_PROTOCOL SerialIo
;
96 EFI_SERIAL_IO_MODE SerialMode
;
97 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
99 EFI_DEVICE_PATH_PROTOCOL
*ParentDevicePath
;
100 UART_DEVICE_PATH UartDevicePath
;
101 EFI_ISA_IO_PROTOCOL
*IsaIo
;
104 SERIAL_DEV_FIFO Receive
;
105 SERIAL_DEV_FIFO Transmit
;
106 BOOLEAN SoftwareLoopbackEnable
;
107 BOOLEAN HardwareFlowControl
;
109 EFI_UNICODE_STRING_TABLE
*ControllerNameTable
;
112 #define SERIAL_DEV_FROM_THIS(a) CR (a, SERIAL_DEV, SerialIo, SERIAL_DEV_SIGNATURE)
115 // Serial Driver Defaults
117 #define SERIAL_PORT_DEFAULT_RECEIVE_FIFO_DEPTH 1
118 #define SERIAL_PORT_DEFAULT_TIMEOUT 1000000
119 #define SERIAL_PORT_SUPPORT_CONTROL_MASK (EFI_SERIAL_CLEAR_TO_SEND | \
120 EFI_SERIAL_DATA_SET_READY | \
121 EFI_SERIAL_RING_INDICATE | \
122 EFI_SERIAL_CARRIER_DETECT | \
123 EFI_SERIAL_REQUEST_TO_SEND | \
124 EFI_SERIAL_DATA_TERMINAL_READY | \
125 EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | \
126 EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE | \
127 EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE | \
128 EFI_SERIAL_OUTPUT_BUFFER_EMPTY | \
129 EFI_SERIAL_INPUT_BUFFER_EMPTY)
132 // 115200 baud with rounding errors
134 #define SERIAL_PORT_MAX_BAUD_RATE 115400
135 #define SERIAL_PORT_MIN_BAUD_RATE 50
137 #define SERIAL_PORT_MAX_RECEIVE_FIFO_DEPTH 16
138 #define SERIAL_PORT_MIN_TIMEOUT 1 // 1 uS
139 #define SERIAL_PORT_MAX_TIMEOUT 100000000 // 100 seconds
143 #define SERIAL_REGISTER_THR 0 // WO Transmit Holding Register
144 #define SERIAL_REGISTER_RBR 0 // RO Receive Buffer Register
145 #define SERIAL_REGISTER_DLL 0 // R/W Divisor Latch LSB
146 #define SERIAL_REGISTER_DLM 1 // R/W Divisor Latch MSB
147 #define SERIAL_REGISTER_IER 1 // R/W Interrupt Enable Register
148 #define SERIAL_REGISTER_IIR 2 // RO Interrupt Identification Register
149 #define SERIAL_REGISTER_FCR 2 // WO FIFO Cotrol Register
150 #define SERIAL_REGISTER_LCR 3 // R/W Line Control Register
151 #define SERIAL_REGISTER_MCR 4 // R/W Modem Control Register
152 #define SERIAL_REGISTER_LSR 5 // R/W Line Status Register
153 #define SERIAL_REGISTER_MSR 6 // R/W Modem Status Register
154 #define SERIAL_REGISTER_SCR 7 // R/W Scratch Pad Register
157 // Name: SERIAL_PORT_IER_BITS
158 // Purpose: Define each bit in Interrupt Enable Register
161 // Ravie Bit0: Receiver Data Available Interrupt Enable
162 // Theie Bit1: Transmistter Holding Register Empty Interrupt Enable
163 // Rie Bit2: Receiver Interrupt Enable
164 // Mie Bit3: Modem Interrupt Enable
165 // Reserved Bit4-Bit7: Reserved
173 } SERIAL_PORT_IER_BITS
;
176 // Name: SERIAL_PORT_IER
180 // Bits SERIAL_PORT_IER_BITS: Bits of the IER
181 // Data UINT8: the value of the IER
184 SERIAL_PORT_IER_BITS Bits
;
189 // Name: SERIAL_PORT_FCR_BITS
190 // Purpose: Define each bit in FIFO Control Register
193 // TrFIFOE Bit0: Transmit and Receive FIFO Enable
194 // ResetRF Bit1: Reset Reciever FIFO
195 // ResetTF Bit2: Reset Transmistter FIFO
196 // Dms Bit3: DMA Mode Select
197 // Reserved Bit4-Bit5: Reserved
198 // Rtb Bit6-Bit7: Receive Trigger Bits
207 } SERIAL_PORT_FCR_BITS
;
210 // Name: SERIAL_PORT_FCR
214 // Bits SERIAL_PORT_FCR_BITS: Bits of the FCR
215 // Data UINT8: the value of the FCR
218 SERIAL_PORT_FCR_BITS Bits
;
223 // Name: SERIAL_PORT_LCR_BITS
224 // Purpose: Define each bit in Line Control Register
227 // SerialDB Bit0-Bit1: Number of Serial Data Bits
228 // StopB Bit2: Number of Stop Bits
229 // ParEn Bit3: Parity Enable
230 // EvenPar Bit4: Even Parity Select
231 // SticPar Bit5: Sticky Parity
232 // BrCon Bit6: Break Control
233 // DLab Bit7: Divisor Latch Access Bit
243 } SERIAL_PORT_LCR_BITS
;
246 // Name: SERIAL_PORT_LCR
250 // Bits SERIAL_PORT_LCR_BITS: Bits of the LCR
251 // Data UINT8: the value of the LCR
254 SERIAL_PORT_LCR_BITS Bits
;
259 // Name: SERIAL_PORT_MCR_BITS
260 // Purpose: Define each bit in Modem Control Register
263 // DtrC Bit0: Data Terminal Ready Control
264 // Rts Bit1: Request To Send Control
265 // Out1 Bit2: Output1
266 // Out2 Bit3: Output2, used to disable interrupt
267 // Lme; Bit4: Loopback Mode Enable
268 // Reserved Bit5-Bit7: Reserved
277 } SERIAL_PORT_MCR_BITS
;
280 // Name: SERIAL_PORT_MCR
284 // Bits SERIAL_PORT_MCR_BITS: Bits of the MCR
285 // Data UINT8: the value of the MCR
288 SERIAL_PORT_MCR_BITS Bits
;
293 // Name: SERIAL_PORT_LSR_BITS
294 // Purpose: Define each bit in Line Status Register
297 // Dr Bit0: Receiver Data Ready Status
298 // Oe Bit1: Overrun Error Status
299 // Pe Bit2: Parity Error Status
300 // Fe Bit3: Framing Error Status
301 // Bi Bit4: Break Interrupt Status
302 // Thre Bit5: Transmistter Holding Register Status
303 // Temt Bit6: Transmitter Empty Status
304 // FIFOe Bit7: FIFO Error Status
315 } SERIAL_PORT_LSR_BITS
;
318 // Name: SERIAL_PORT_LSR
322 // Bits SERIAL_PORT_LSR_BITS: Bits of the LSR
323 // Data UINT8: the value of the LSR
326 SERIAL_PORT_LSR_BITS Bits
;
331 // Name: SERIAL_PORT_MSR_BITS
332 // Purpose: Define each bit in Modem Status Register
335 // DeltaCTS Bit0: Delta Clear To Send Status
336 // DeltaDSR Bit1: Delta Data Set Ready Status
337 // TrailingEdgeRI Bit2: Trailing Edge of Ring Indicator Status
338 // DeltaDCD Bit3: Delta Data Carrier Detect Status
339 // Cts Bit4: Clear To Send Status
340 // Dsr Bit5: Data Set Ready Status
341 // Ri Bit6: Ring Indicator Status
342 // Dcd Bit7: Data Carrier Detect Status
347 UINT8 TrailingEdgeRI
: 1;
353 } SERIAL_PORT_MSR_BITS
;
356 // Name: SERIAL_PORT_MSR
360 // Bits SERIAL_PORT_MSR_BITS: Bits of the MSR
361 // Data UINT8: the value of the MSR
364 SERIAL_PORT_MSR_BITS Bits
;
370 // Define serial register I/O macros
372 #define READ_RBR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_RBR)
373 #define READ_DLL(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_DLL)
374 #define READ_DLM(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_DLM)
375 #define READ_IER(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_IER)
376 #define READ_IIR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_IIR)
377 #define READ_LCR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_LCR)
378 #define READ_MCR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_MCR)
379 #define READ_LSR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_LSR)
380 #define READ_MSR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_MSR)
381 #define READ_SCR(IO, B) IsaSerialReadPort (IO, B, SERIAL_REGISTER_SCR)
383 #define WRITE_THR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_THR, D)
384 #define WRITE_DLL(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_DLL, D)
385 #define WRITE_DLM(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_DLM, D)
386 #define WRITE_IER(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_IER, D)
387 #define WRITE_FCR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_FCR, D)
388 #define WRITE_LCR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_LCR, D)
389 #define WRITE_MCR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_MCR, D)
390 #define WRITE_LSR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_LSR, D)
391 #define WRITE_MSR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_MSR, D)
392 #define WRITE_SCR(IO, B, D) IsaSerialWritePort (IO, B, SERIAL_REGISTER_SCR, D)
396 // Driver model protocol interface
399 Check to see if this driver supports the given controller
401 @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
402 @param Controller The handle of the controller to test.
403 @param RemainingDevicePath A pointer to the remaining portion of a device path.
405 @return EFI_SUCCESS This driver can support the given controller
410 SerialControllerDriverSupported (
411 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
412 IN EFI_HANDLE Controller
,
413 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
417 Start to management the controller passed in
419 @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
420 @param Controller The handle of the controller to test.
421 @param RemainingDevicePath A pointer to the remaining portion of a device path.
423 @return EFI_SUCCESS Driver is started successfully
427 SerialControllerDriverStart (
428 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
429 IN EFI_HANDLE Controller
,
430 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
434 Disconnect this driver with the controller, uninstall related protocol instance
436 @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
437 @param Controller The handle of the controller to test.
438 @param NumberOfChildren Number of child device.
439 @param ChildHandleBuffer A pointer to the remaining portion of a device path.
441 @retval EFI_SUCCESS Operation successfully
442 @retval EFI_DEVICE_ERROR Cannot stop the driver successfully
447 SerialControllerDriverStop (
448 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
449 IN EFI_HANDLE Controller
,
450 IN UINTN NumberOfChildren
,
451 IN EFI_HANDLE
*ChildHandleBuffer
455 // Serial I/O Protocol Interface
460 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
462 @retval EFI_SUCCESS Reset successfully
463 @retval EFI_DEVICE_ERROR Failed to reset
469 IN EFI_SERIAL_IO_PROTOCOL
*This
473 Set new attributes to a serial device.
475 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
476 @param BaudRate The baudrate of the serial device
477 @param ReceiveFifoDepth The depth of receive FIFO buffer
478 @param Timeout The request timeout for a single char
479 @param Parity The type of parity used in serial device
480 @param DataBits Number of databits used in serial device
481 @param StopBits Number of stopbits used in serial device
483 @retval EFI_SUCCESS The new attributes were set
484 @retval EFI_INVALID_PARAMETERS One or more attributes have an unsupported value
485 @retval EFI_UNSUPPORTED Data Bits can not set to 5 or 6
486 @retval EFI_DEVICE_ERROR The serial device is not functioning correctly (no return)
491 IsaSerialSetAttributes (
492 IN EFI_SERIAL_IO_PROTOCOL
*This
,
494 IN UINT32 ReceiveFifoDepth
,
496 IN EFI_PARITY_TYPE Parity
,
498 IN EFI_STOP_BITS_TYPE StopBits
504 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
505 @param Control Control bits that can be settable
507 @retval EFI_SUCCESS New Control bits were set successfully
508 @retval EFI_UNSUPPORTED The Control bits wanted to set are not supported
513 IsaSerialSetControl (
514 IN EFI_SERIAL_IO_PROTOCOL
*This
,
521 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
522 @param Control Control signals of the serial device
524 @retval EFI_SUCCESS Get Control signals successfully
529 IsaSerialGetControl (
530 IN EFI_SERIAL_IO_PROTOCOL
*This
,
535 Write the specified number of bytes to serial device.
537 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
538 @param BufferSize On input the size of Buffer, on output the amount of
539 data actually written
540 @param Buffer The buffer of data to write
542 @retval EFI_SUCCESS The data were written successfully
543 @retval EFI_DEVICE_ERROR The device reported an error
544 @retval EFI_TIMEOUT The write operation was stopped due to timeout
550 IN EFI_SERIAL_IO_PROTOCOL
*This
,
551 IN OUT UINTN
*BufferSize
,
556 Read the specified number of bytes from serial device.
558 @param This Pointer to EFI_SERIAL_IO_PROTOCOL
559 @param BufferSize On input the size of Buffer, on output the amount of
560 data returned in buffer
561 @param Buffer The buffer to return the data into
563 @retval EFI_SUCCESS The data were read successfully
564 @retval EFI_DEVICE_ERROR The device reported an error
565 @retval EFI_TIMEOUT The read operation was stopped due to timeout
571 IN EFI_SERIAL_IO_PROTOCOL
*This
,
572 IN OUT UINTN
*BufferSize
,
577 // Internal Functions
580 Use scratchpad register to test if this serial port is present.
582 @param SerialDevice Pointer to serial device structure
584 @return if this serial port is present
587 IsaSerialPortPresent (
588 IN SERIAL_DEV
*SerialDevice
592 Detect whether specific FIFO is full or not.
594 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
596 @return whether specific FIFO is full or not
601 IN SERIAL_DEV_FIFO
*Fifo
605 Detect whether specific FIFO is empty or not.
607 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
609 @return whether specific FIFO is empty or not
614 IN SERIAL_DEV_FIFO
*Fifo
618 Add data to specific FIFO.
620 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
621 @param Data the data added to FIFO
623 @retval EFI_SUCCESS Add data to specific FIFO successfully
624 @retval EFI_OUT_OF_RESOURCE Failed to add data because FIFO is already full
629 IN SERIAL_DEV_FIFO
*Fifo
,
634 Remove data from specific FIFO.
636 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO
637 @param Data the data removed from FIFO
639 @retval EFI_SUCCESS Remove data from specific FIFO successfully
640 @retval EFI_OUT_OF_RESOURCE Failed to remove data because FIFO is empty
644 IsaSerialFifoRemove (
645 IN SERIAL_DEV_FIFO
*Fifo
,
650 Reads and writes all avaliable data.
652 @param SerialDevice The device to flush
654 @retval EFI_SUCCESS Data was read/written successfully.
655 @retval EFI_OUT_OF_RESOURCE Failed because software receive FIFO is full. Note, when
656 this happens, pending writes are not done.
660 IsaSerialReceiveTransmit (
661 IN SERIAL_DEV
*SerialDevice
665 Use IsaIo protocol to read serial port.
667 @param IsaIo Pointer to EFI_ISA_IO_PROTOCOL instance
668 @param BaseAddress Serial port register group base address
669 @param Offset Offset in register group
671 @return Data read from serial port
676 IN EFI_ISA_IO_PROTOCOL
*IsaIo
,
677 IN UINT16 BaseAddress
,
682 Use IsaIo protocol to write serial port.
684 @param IsaIo Pointer to EFI_ISA_IO_PROTOCOL instance
685 @param BaseAddress Serial port register group base address
686 @param Offset Offset in register group
687 @param Data data which is to be written to some serial port register
692 IN EFI_ISA_IO_PROTOCOL
*IsaIo
,
693 IN UINT16 BaseAddress
,
700 // EFI Component Name Functions
703 Retrieves a Unicode string that is the user readable name of the driver.
705 This function retrieves the user readable name of a driver in the form of a
706 Unicode string. If the driver specified by This has a user readable name in
707 the language specified by Language, then a pointer to the driver name is
708 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
709 by This does not support the language specified by Language,
710 then EFI_UNSUPPORTED is returned.
712 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
713 EFI_COMPONENT_NAME_PROTOCOL instance.
715 @param Language[in] A pointer to a Null-terminated ASCII string
716 array indicating the language. This is the
717 language of the driver name that the caller is
718 requesting, and it must match one of the
719 languages specified in SupportedLanguages. The
720 number of languages supported by a driver is up
721 to the driver writer. Language is specified
722 in RFC 4646 or ISO 639-2 language code format.
724 @param DriverName[out] A pointer to the Unicode string to return.
725 This Unicode string is the name of the
726 driver specified by This in the language
727 specified by Language.
729 @retval EFI_SUCCESS The Unicode string for the Driver specified by
730 This and the language specified by Language was
731 returned in DriverName.
733 @retval EFI_INVALID_PARAMETER Language is NULL.
735 @retval EFI_INVALID_PARAMETER DriverName is NULL.
737 @retval EFI_UNSUPPORTED The driver specified by This does not support
738 the language specified by Language.
743 IsaSerialComponentNameGetDriverName (
744 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
746 OUT CHAR16
**DriverName
751 Retrieves a Unicode string that is the user readable name of the controller
752 that is being managed by a driver.
754 This function retrieves the user readable name of the controller specified by
755 ControllerHandle and ChildHandle in the form of a Unicode string. If the
756 driver specified by This has a user readable name in the language specified by
757 Language, then a pointer to the controller name is returned in ControllerName,
758 and EFI_SUCCESS is returned. If the driver specified by This is not currently
759 managing the controller specified by ControllerHandle and ChildHandle,
760 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
761 support the language specified by Language, then EFI_UNSUPPORTED is returned.
763 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
764 EFI_COMPONENT_NAME_PROTOCOL instance.
766 @param ControllerHandle[in] The handle of a controller that the driver
767 specified by This is managing. This handle
768 specifies the controller whose name is to be
771 @param ChildHandle[in] The handle of the child controller to retrieve
772 the name of. This is an optional parameter that
773 may be NULL. It will be NULL for device
774 drivers. It will also be NULL for a bus drivers
775 that wish to retrieve the name of the bus
776 controller. It will not be NULL for a bus
777 driver that wishes to retrieve the name of a
780 @param Language[in] A pointer to a Null-terminated ASCII string
781 array indicating the language. This is the
782 language of the driver name that the caller is
783 requesting, and it must match one of the
784 languages specified in SupportedLanguages. The
785 number of languages supported by a driver is up
786 to the driver writer. Language is specified in
787 RFC 4646 or ISO 639-2 language code format.
789 @param ControllerName[out] A pointer to the Unicode string to return.
790 This Unicode string is the name of the
791 controller specified by ControllerHandle and
792 ChildHandle in the language specified by
793 Language from the point of view of the driver
796 @retval EFI_SUCCESS The Unicode string for the user readable name in
797 the language specified by Language for the
798 driver specified by This was returned in
801 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
803 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
806 @retval EFI_INVALID_PARAMETER Language is NULL.
808 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
810 @retval EFI_UNSUPPORTED The driver specified by This is not currently
811 managing the controller specified by
812 ControllerHandle and ChildHandle.
814 @retval EFI_UNSUPPORTED The driver specified by This does not support
815 the language specified by Language.
820 IsaSerialComponentNameGetControllerName (
821 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
822 IN EFI_HANDLE ControllerHandle
,
823 IN EFI_HANDLE ChildHandle OPTIONAL
,
825 OUT CHAR16
**ControllerName
829 Add the component name for the serial io device
831 @param SerialDevice A pointer to the SERIAL_DEV instance.
833 @param IsaIo A pointer to the EFI_ISA_IO_PROTOCOL instance.
838 IN SERIAL_DEV
*SerialDevice
,
839 IN EFI_ISA_IO_PROTOCOL
*IsaIo