40 SERIAL_IO_INTERFACE_REVISION,
50 SERIAL_PORT_SUPPORT_CONTROL_MASK,
51 SERIAL_PORT_DEFAULT_TIMEOUT,
104 (
CompareGuid (&FlowControl->Guid, &gEfiUartDevicePathGuid))
133 &gSerialControllerDriver,
135 &gPciSioSerialComponentName,
136 &gPciSioSerialComponentName2
143 gSerialDevTemplate.SerialMode.BaudRate =
PcdGet64 (PcdUartDefaultBaudRate);
144 gSerialDevTemplate.SerialMode.DataBits =
PcdGet8 (PcdUartDefaultDataBits);
145 gSerialDevTemplate.SerialMode.Parity =
PcdGet8 (PcdUartDefaultParity);
146 gSerialDevTemplate.SerialMode.StopBits =
PcdGet8 (PcdUartDefaultStopBits);
147 gSerialDevTemplate.UartDevicePath.
BaudRate =
PcdGet64 (PcdUartDefaultBaudRate);
148 gSerialDevTemplate.UartDevicePath.
DataBits =
PcdGet8 (PcdUartDefaultDataBits);
149 gSerialDevTemplate.UartDevicePath.
Parity =
PcdGet8 (PcdUartDefaultParity);
150 gSerialDevTemplate.UartDevicePath.
StopBits =
PcdGet8 (PcdUartDefaultStopBits);
177 Status =
gBS->OpenProtocol (
179 &gEfiSioProtocolGuid,
183 EFI_OPEN_PROTOCOL_BY_DRIVER
185 if (Status == EFI_ALREADY_STARTED) {
189 if (!EFI_ERROR (Status)) {
195 &gEfiSioProtocolGuid,
200 Status =
gBS->OpenProtocol (
202 &gEfiDevicePathProtocolGuid,
203 (VOID **)&DevicePath,
206 EFI_OPEN_PROTOCOL_BY_DRIVER
208 ASSERT (Status != EFI_ALREADY_STARTED);
210 if (!EFI_ERROR (Status)) {
218 (Acpi->
HID != EISA_PNP_ID (0x501))
221 Status = EFI_UNSUPPORTED;
230 &gEfiDevicePathProtocolGuid,
261 Status =
gBS->OpenProtocol (
263 &gEfiPciIoProtocolGuid,
267 EFI_OPEN_PROTOCOL_BY_DRIVER
269 if (Status == EFI_ALREADY_STARTED) {
273 if (!EFI_ERROR (Status)) {
274 Status = PciIo->Pci.
Read (PciIo, EfiPciIoWidthUint8, 0,
sizeof (Pci), &Pci);
275 if (!EFI_ERROR (Status)) {
278 ; PciSerialParameter->
VendorId != 0xFFFF
279 ; PciSerialParameter++
282 if ((Pci.Hdr.VendorId == PciSerialParameter->
VendorId) &&
283 (Pci.Hdr.DeviceId == PciSerialParameter->
DeviceId)
290 if (PciSerialParameter->
VendorId == 0xFFFF) {
291 Status = EFI_UNSUPPORTED;
303 &gEfiPciIoProtocolGuid,
309 if (EFI_ERROR (Status)) {
316 Status =
gBS->OpenProtocol (
318 &gEfiDevicePathProtocolGuid,
319 (VOID **)&DevicePath,
322 EFI_OPEN_PROTOCOL_BY_DRIVER
324 ASSERT (Status != EFI_ALREADY_STARTED);
331 &gEfiDevicePathProtocolGuid,
366 Status = EFI_UNSUPPORTED;
374 return EFI_UNSUPPORTED;
381 return EFI_UNSUPPORTED;
391 return EFI_UNSUPPORTED;
397 if (EFI_ERROR (Status)) {
429 IN BOOLEAN CreateControllerNode,
441 UINT32 FlowControlMap;
457 ASSERT (SerialDevice !=
NULL);
459 SerialDevice->SerialIo.
Mode = &(SerialDevice->SerialMode);
460 SerialDevice->ParentDevicePath = ParentDevicePath;
461 SerialDevice->PciDeviceInfo = PciDeviceInfo;
462 SerialDevice->Instance = Instance;
477 if (PciSerialParameter !=
NULL) {
478 BarIndex = (PciSerialParameter->BarIndex == MAX_UINT8) ? 0 : PciSerialParameter->BarIndex;
479 Offset = PciSerialParameter->Offset;
480 if (PciSerialParameter->RegisterStride != 0) {
481 SerialDevice->
RegisterStride = PciSerialParameter->RegisterStride;
484 if (PciSerialParameter->ClockRate != 0) {
485 SerialDevice->
ClockRate = PciSerialParameter->ClockRate;
488 if (PciSerialParameter->ReceiveFifoDepth != 0) {
492 if (PciSerialParameter->TransmitFifoDepth != 0) {
503 SerialDevice->UartDevicePath.
BaudRate,
504 SerialDevice->UartDevicePath.
DataBits,
505 SerialDevice->UartDevicePath.
Parity,
506 SerialDevice->UartDevicePath.
StopBits,
511 Status = EFI_INVALID_PARAMETER;
515 if (PciSerialParameter ==
NULL) {
516 Status = ParentIo.Sio->GetResources (ParentIo.Sio, &Resources);
518 Status = ParentIo.PciIo->GetBarAttributes (ParentIo.PciIo, BarIndex,
NULL, (VOID **)&Resources);
521 if (!EFI_ERROR (Status)) {
527 while ((Resources.SmallHeader->Byte != ACPI_END_TAG_DESCRIPTOR) && (SerialDevice->
BaseAddress == 0)) {
528 switch (Resources.SmallHeader->Byte) {
529 case ACPI_IO_PORT_DESCRIPTOR:
531 if (Io->Length != 0) {
537 case ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR:
539 if (FixedIo->Length != 0) {
545 case ACPI_ADDRESS_SPACE_DESCRIPTOR:
547 if (AddressSpace->AddrLen != 0) {
548 if (AddressSpace->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM) {
552 SerialDevice->
BaseAddress = AddressSpace->AddrRangeMin + Offset;
558 if (Resources.SmallHeader->Bits.Type == 0) {
559 Resources.SmallHeader = (ACPI_SMALL_RESOURCE_HEADER *)((UINT8 *)Resources.SmallHeader
560 + Resources.SmallHeader->Bits.Length
561 +
sizeof (*Resources.SmallHeader));
563 Resources.LargeHeader = (ACPI_LARGE_RESOURCE_HEADER *)((UINT8 *)Resources.LargeHeader
564 + Resources.LargeHeader->Length
565 +
sizeof (*Resources.LargeHeader));
571 Status = EFI_INVALID_PARAMETER;
575 SerialDevice->HardwareFlowControl = (BOOLEAN)(FlowControlMap == UART_FLOW_CONTROL_HARDWARE);
582 EFI_P_PC_PRESENCE_DETECT | EFI_PERIPHERAL_SERIAL_PORT,
583 SerialDevice->ParentDevicePath
587 Status = EFI_DEVICE_ERROR;
590 EFI_P_EC_NOT_DETECTED | EFI_PERIPHERAL_SERIAL_PORT,
591 SerialDevice->ParentDevicePath
599 if (CreateControllerNode) {
602 SerialDevice->ParentDevicePath,
613 TempDevicePath = SerialDevice->DevicePath;
614 if (TempDevicePath !=
NULL) {
622 SerialDevice->ParentDevicePath,
631 if (FlowControl !=
NULL) {
632 TempDevicePath = SerialDevice->DevicePath;
633 if (TempDevicePath !=
NULL) {
642 ASSERT (SerialDevice->DevicePath !=
NULL);
647 SerialDevice->SerialMode.BaudRate = SerialDevice->UartDevicePath.
BaudRate;
648 SerialDevice->SerialMode.DataBits = SerialDevice->UartDevicePath.
DataBits;
649 SerialDevice->SerialMode.Parity = SerialDevice->UartDevicePath.
Parity;
650 SerialDevice->SerialMode.StopBits = SerialDevice->UartDevicePath.
StopBits;
655 Status = SerialDevice->SerialIo.Reset (&SerialDevice->SerialIo);
656 if (EFI_ERROR (Status)) {
659 EFI_P_EC_CONTROLLER_ERROR | EFI_PERIPHERAL_SERIAL_PORT,
660 SerialDevice->DevicePath
665 AddName (SerialDevice, Instance);
669 Status =
gBS->InstallMultipleProtocolInterfaces (
670 &SerialDevice->Handle,
671 &gEfiDevicePathProtocolGuid,
672 SerialDevice->DevicePath,
673 &gEfiSerialIoProtocolGuid,
674 &SerialDevice->SerialIo,
677 if (EFI_ERROR (Status)) {
684 Status =
gBS->OpenProtocol (
686 PciSerialParameter !=
NULL ? &gEfiPciIoProtocolGuid : &gEfiSioProtocolGuid,
689 SerialDevice->Handle,
690 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
693 if (EFI_ERROR (Status)) {
694 gBS->UninstallMultipleProtocolInterfaces (
695 SerialDevice->Handle,
696 &gEfiDevicePathProtocolGuid,
697 SerialDevice->DevicePath,
698 &gEfiSerialIoProtocolGuid,
699 &SerialDevice->SerialIo,
705 if (EFI_ERROR (Status)) {
706 if (SerialDevice->DevicePath !=
NULL) {
707 FreePool (SerialDevice->DevicePath);
710 if (SerialDevice->ControllerNameTable !=
NULL) {
743 BOOLEAN OpenByDriver;
750 Status =
gBS->OpenProtocolInformation (
756 if (EFI_ERROR (Status)) {
761 ASSERT (SerialDevices !=
NULL);
764 OpenByDriver =
FALSE;
765 for (Index = 0; Index < EntryCount; Index++) {
766 if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) {
767 Status =
gBS->OpenProtocol (
768 OpenInfoBuffer[Index].ControllerHandle,
769 &gEfiSerialIoProtocolGuid,
773 EFI_OPEN_PROTOCOL_GET_PROTOCOL
775 if (!EFI_ERROR (Status)) {
776 SerialDevices[(*Count)++] = SERIAL_DEV_FROM_THIS (SerialIo);
780 if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) != 0) {
786 if (OpenInfoBuffer !=
NULL) {
790 ASSERT ((*Count == 0) || (OpenByDriver));
792 return SerialDevices;
817 UINT32 ControllerNumber;
827 UINT32 PciSerialCount;
829 UINTN SerialDeviceCount;
832 BOOLEAN ContainsControllerNode;
837 Status =
gBS->OpenProtocol (
839 &gEfiDevicePathProtocolGuid,
840 (VOID **)&ParentDevicePath,
841 This->DriverBindingHandle,
843 EFI_OPEN_PROTOCOL_BY_DRIVER
845 if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
854 EFI_P_PC_ENABLE | EFI_PERIPHERAL_SERIAL_PORT,
861 IoProtocolGuid = &gEfiSioProtocolGuid;
862 Status =
gBS->OpenProtocol (
866 This->DriverBindingHandle,
868 EFI_OPEN_PROTOCOL_BY_DRIVER
870 if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
871 IoProtocolGuid = &gEfiPciIoProtocolGuid;
872 Status =
gBS->OpenProtocol (
876 This->DriverBindingHandle,
878 EFI_OPEN_PROTOCOL_BY_DRIVER
882 ASSERT (!EFI_ERROR (Status) || Status == EFI_ALREADY_STARTED);
891 ControllerNumber = 0;
892 ContainsControllerNode =
FALSE;
895 if (SerialDeviceCount != 0) {
896 if (RemainingDevicePath ==
NULL) {
907 for (Index = 0; Index < SerialDeviceCount; Index++) {
908 ASSERT ((SerialDevices !=
NULL) && (SerialDevices[Index] !=
NULL));
909 if ((!SerialDevices[Index]->ContainsControllerNode && !ContainsControllerNode) ||
910 (SerialDevices[Index]->ContainsControllerNode && ContainsControllerNode && (SerialDevices[Index]->Instance == ControllerNumber))
913 SerialIo = &SerialDevices[Index]->SerialIo;
914 Status = EFI_INVALID_PARAMETER;
920 SerialDevices[Index]->ClockRate,
929 Status = SerialIo->SetAttributes (
932 SerialIo->
Mode->ReceiveFifoDepth,
933 SerialIo->
Mode->Timeout,
942 Status = SerialIo->GetControl (SerialIo, &Control);
943 if (!EFI_ERROR (Status)) {
945 Control |= EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE;
947 Control &= ~EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE;
953 Control &= (EFI_SERIAL_REQUEST_TO_SEND | EFI_SERIAL_DATA_TERMINAL_READY |
954 EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE |
955 EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE);
956 Status = SerialIo->SetControl (SerialIo, Control);
964 if (Index != SerialDeviceCount) {
969 if (SerialDevices !=
NULL) {
978 if (RemainingDevicePath !=
NULL) {
984 PciDeviceInfo =
NULL;
985 if (IoProtocolGuid == &gEfiSioProtocolGuid) {
986 Status = EFI_NOT_FOUND;
987 if ((RemainingDevicePath ==
NULL) || !ContainsControllerNode) {
988 Node = ParentDevicePath;
995 DEBUG ((DEBUG_INFO,
"PciSioSerial: Create SIO child serial device - %r\n", Status));
998 Status = ParentIo.PciIo->Pci.
Read (ParentIo.PciIo, EfiPciIoWidthUint8, 0, sizeof (Pci), &Pci);
999 if (!EFI_ERROR (Status)) {
1004 for (PciSerialParameter =
PcdGetPtr (PcdPciSerialParameters); PciSerialParameter->
VendorId != 0xFFFF; PciSerialParameter++) {
1005 if ((PciSerialParameter->
VendorId == Pci.Hdr.VendorId) &&
1006 (PciSerialParameter->
DeviceId == Pci.Hdr.DeviceId)
1013 if (SerialDeviceCount == 0) {
1019 ASSERT (PciDeviceInfo !=
NULL);
1020 PciDeviceInfo->ChildCount = 0;
1021 PciDeviceInfo->PciIo = ParentIo.PciIo;
1022 Status = ParentIo.PciIo->Attributes (
1026 &PciDeviceInfo->PciAttributes
1029 if (!EFI_ERROR (Status)) {
1030 Status = ParentIo.PciIo->Attributes (
1036 if (!EFI_ERROR (Status)) {
1038 Status = ParentIo.PciIo->Attributes (
1050 ASSERT ((SerialDevices !=
NULL) && (SerialDevices[0] !=
NULL));
1051 PciDeviceInfo = SerialDevices[0]->PciDeviceInfo;
1052 ASSERT (PciDeviceInfo !=
NULL);
1055 Status = EFI_NOT_FOUND;
1056 if (PciSerialCount <= 1) {
1060 if ((RemainingDevicePath ==
NULL) || !ContainsControllerNode) {
1064 if (PciSerialCount == 0) {
1065 DefaultPciSerialParameter.
VendorId = Pci.Hdr.VendorId;
1066 DefaultPciSerialParameter.
DeviceId = Pci.Hdr.DeviceId;
1067 DefaultPciSerialParameter.
BarIndex = 0;
1068 DefaultPciSerialParameter.
Offset = 0;
1070 DefaultPciSerialParameter.
ClockRate = 0;
1071 PciSerialParameter = &DefaultPciSerialParameter;
1072 }
else if (PciSerialCount == 1) {
1073 PciSerialParameter =
PcdGetPtr (PcdPciSerialParameters);
1076 Status =
CreateSerialDevice (Controller, Uart, ParentDevicePath,
FALSE, 0, ParentIo, PciSerialParameter, PciDeviceInfo);
1077 DEBUG ((DEBUG_INFO,
"PciSioSerial: Create PCI child serial device (single) - %r\n", Status));
1078 if (!EFI_ERROR (Status)) {
1079 PciDeviceInfo->ChildCount++;
1086 if ((RemainingDevicePath ==
NULL) || ContainsControllerNode) {
1088 for (PciSerialParameter =
PcdGetPtr (PcdPciSerialParameters); PciSerialParameter->
VendorId != 0xFFFF; PciSerialParameter++) {
1089 if ((PciSerialParameter->
VendorId == Pci.Hdr.VendorId) &&
1090 (PciSerialParameter->
DeviceId == Pci.Hdr.DeviceId) &&
1091 ((RemainingDevicePath ==
NULL) || (ControllerNumber == PciSerialCount))
1097 Status =
CreateSerialDevice (Controller, Uart, ParentDevicePath,
TRUE, PciSerialCount, ParentIo, PciSerialParameter, PciDeviceInfo);
1099 DEBUG ((DEBUG_INFO,
"PciSioSerial: Create PCI child serial device (multiple) - %r\n", Status));
1100 if (!EFI_ERROR (Status)) {
1101 PciDeviceInfo->ChildCount++;
1110 if (SerialDevices !=
NULL) {
1117 if ((PciDeviceInfo !=
NULL) && (PciDeviceInfo->ChildCount != 0)) {
1121 if (EFI_ERROR (Status) && (SerialDeviceCount == 0)) {
1122 if (PciDeviceInfo !=
NULL) {
1123 Status = ParentIo.PciIo->Attributes (
1126 PciDeviceInfo->PciAttributes,
1133 gBS->CloseProtocol (
1135 &gEfiDevicePathProtocolGuid,
1136 This->DriverBindingHandle,
1139 gBS->CloseProtocol (
1142 This->DriverBindingHandle,
1174 BOOLEAN AllChildrenStopped;
1181 PciDeviceInfo =
NULL;
1183 Status =
gBS->HandleProtocol (
1185 &gEfiDevicePathProtocolGuid,
1186 (VOID **)&DevicePath
1194 EFI_P_PC_DISABLE | EFI_PERIPHERAL_SERIAL_PORT,
1198 if (NumberOfChildren == 0) {
1202 Status =
gBS->OpenProtocol (
1204 &gEfiPciIoProtocolGuid,
1206 This->DriverBindingHandle,
1208 EFI_OPEN_PROTOCOL_TEST_PROTOCOL
1210 gBS->CloseProtocol (
1212 !EFI_ERROR (Status) ? &gEfiPciIoProtocolGuid : &gEfiSioProtocolGuid,
1213 This->DriverBindingHandle,
1217 gBS->CloseProtocol (
1219 &gEfiDevicePathProtocolGuid,
1220 This->DriverBindingHandle,
1226 AllChildrenStopped =
TRUE;
1228 for (Index = 0; Index < NumberOfChildren; Index++) {
1229 Status =
gBS->OpenProtocol (
1230 ChildHandleBuffer[Index],
1231 &gEfiSerialIoProtocolGuid,
1233 This->DriverBindingHandle,
1235 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1237 if (!EFI_ERROR (Status)) {
1238 SerialDevice = SERIAL_DEV_FROM_THIS (SerialIo);
1239 ASSERT ((PciDeviceInfo ==
NULL) || (PciDeviceInfo == SerialDevice->PciDeviceInfo));
1240 PciDeviceInfo = SerialDevice->PciDeviceInfo;
1242 Status =
gBS->CloseProtocol (
1244 PciDeviceInfo !=
NULL ? &gEfiPciIoProtocolGuid : &gEfiSioProtocolGuid,
1245 This->DriverBindingHandle,
1246 ChildHandleBuffer[Index]
1249 Status =
gBS->UninstallMultipleProtocolInterfaces (
1250 ChildHandleBuffer[Index],
1251 &gEfiDevicePathProtocolGuid,
1252 SerialDevice->DevicePath,
1253 &gEfiSerialIoProtocolGuid,
1254 &SerialDevice->SerialIo,
1257 if (EFI_ERROR (Status)) {
1260 PciDeviceInfo !=
NULL ? &gEfiPciIoProtocolGuid : &gEfiSioProtocolGuid,
1262 This->DriverBindingHandle,
1263 ChildHandleBuffer[Index],
1264 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
1267 FreePool (SerialDevice->DevicePath);
1271 if (PciDeviceInfo !=
NULL) {
1272 ASSERT (PciDeviceInfo->ChildCount != 0);
1273 PciDeviceInfo->ChildCount--;
1278 if (EFI_ERROR (Status)) {
1279 AllChildrenStopped =
FALSE;
1283 if (!AllChildrenStopped) {
1284 return EFI_DEVICE_ERROR;
1289 if ((PciDeviceInfo !=
NULL) && (PciDeviceInfo->ChildCount == 0)) {
1290 ASSERT (PciDeviceInfo->PciIo !=
NULL);
1291 Status = PciDeviceInfo->PciIo->Attributes (
1292 PciDeviceInfo->PciIo,
1294 PciDeviceInfo->PciAttributes,
PACKED struct @96 EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR
PACKED struct @95 EFI_ACPI_IO_PORT_DESCRIPTOR
PACKED struct @89 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
UINT32 EFIAPI ReadUnaligned32(IN CONST UINT32 *Buffer)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
#define HARDWARE_DEVICE_PATH
#define MESSAGING_DEVICE_PATH
UINT8 EFIAPI DevicePathType(IN CONST VOID *Node)
UINTN EFIAPI DevicePathNodeLength(IN CONST VOID *Node)
UINT8 EFIAPI DevicePathSubType(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI NextDevicePathNode(IN CONST VOID *Node)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
VOID AddName(IN SERIAL_DEV *SerialDevice, IN UINT32 Instance)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type, Value, DevicePathParameter)
@ EfiPciIoAttributeOperationGet
@ EfiPciIoAttributeOperationEnable
@ EfiPciIoAttributeOperationSet
@ EfiPciIoAttributeOperationSupported
#define EFI_PCI_IO_ATTRIBUTE_MEMORY
Enable the Memory decode bit in the PCI Config Header.
#define EFI_PCI_IO_ATTRIBUTE_IO
Enable the I/O decode bit in the PCI Config Header.
#define PcdGet64(TokenName)
#define PcdGet8(TokenName)
#define PcdGet32(TokenName)
#define PcdGetPtr(TokenName)
#define IS_PCI_16550_SERIAL(_p)
#define EFI_PROGRESS_CODE
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_STATUS IsPciSerialController(EFI_HANDLE Controller)
EFI_STATUS CreateSerialDevice(IN EFI_HANDLE Controller, IN UART_DEVICE_PATH *Uart, IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath, IN BOOLEAN CreateControllerNode, IN UINT32 Instance, IN PARENT_IO_PROTOCOL_PTR ParentIo, IN PCI_SERIAL_PARAMETER *PciSerialParameter OPTIONAL, IN PCI_DEVICE_INFO *PciDeviceInfo OPTIONAL)
EFI_STATUS EFIAPI InitializePciSioSerial(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
BOOLEAN IsUartFlowControlDevicePathNode(IN UART_FLOW_CONTROL_DEVICE_PATH *FlowControl)
EFI_STATUS EFIAPI SerialControllerDriverStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI SerialControllerDriverStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI SerialControllerDriverSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS IsSioSerialController(EFI_HANDLE Controller)
SERIAL_DEV ** GetChildSerialDevices(IN EFI_HANDLE Controller, IN EFI_GUID *IoProtocolGuid, OUT UINTN *Count)
EFI_STATUS EFIAPI SerialSetAttributes(IN EFI_SERIAL_IO_PROTOCOL *This, IN UINT64 BaudRate, IN UINT32 ReceiveFifoDepth, IN UINT32 Timeout, IN EFI_PARITY_TYPE Parity, IN UINT8 DataBits, IN EFI_STOP_BITS_TYPE StopBits)
EFI_STATUS EFIAPI SerialSetControl(IN EFI_SERIAL_IO_PROTOCOL *This, IN UINT32 Control)
EFI_STATUS EFIAPI SerialReset(IN EFI_SERIAL_IO_PROTOCOL *This)
BOOLEAN SerialPresent(IN SERIAL_DEV *SerialDevice)
BOOLEAN VerifyUartParameters(IN UINT32 ClockRate, IN UINT64 BaudRate, IN UINT8 DataBits, IN EFI_PARITY_TYPE Parity, IN EFI_STOP_BITS_TYPE StopBits, OUT UINT64 *Divisor, OUT UINT64 *ActualBaudRate)
EFI_STATUS EFIAPI SerialWrite(IN EFI_SERIAL_IO_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer)
EFI_STATUS EFIAPI SerialGetControl(IN EFI_SERIAL_IO_PROTOCOL *This, OUT UINT32 *Control)
EFI_STATUS EFIAPI SerialRead(IN EFI_SERIAL_IO_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
UART_DEVICE_PATH * SkipControllerDevicePathNode(EFI_DEVICE_PATH_PROTOCOL *DevicePath, BOOLEAN *ContainsControllerNode, UINT32 *ControllerNumber)
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2(IN CONST EFI_HANDLE ImageHandle, IN CONST EFI_SYSTEM_TABLE *SystemTable, IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN EFI_HANDLE DriverBindingHandle, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
EFI_STATUS EFIAPI FreeUnicodeStringTable(IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable)
EFI_HANDLE DriverBindingHandle
EFI_SERIAL_IO_MODE * Mode
EFI_PCI_IO_PROTOCOL_CONFIG Read
UINT16 VendorId
Vendor ID to match the PCI device. The value 0xFFFF terminates the list of entries.
UINT8 RegisterStride
UART register stride in bytes. Set to 0 for default register stride of 1 byte.
UINT16 DeviceId
Device ID to match the PCI device.
UINT8 BarIndex
Which BAR to get the UART base address.
UINT64 Offset
The byte offset into to the BAR.
UINT32 ClockRate
UART clock rate. Set to 0 for default clock rate of 1843200 Hz.
UINT16 ReceiveFifoDepth
UART receive FIFO depth in bytes.
BOOLEAN MmioAccess
TRUE for MMIO, FALSE for IO.
UINT16 TransmitFifoDepth
UART transmit FIFO depth in bytes.
BOOLEAN ContainsControllerNode
TRUE if the device produced contains Controller node.
UINT8 RegisterStride
UART Register Stride.
EFI_PHYSICAL_ADDRESS BaseAddress
UART base address.
UINT32 ClockRate
UART clock rate.