Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
)\r
{\r
EFI_STATUS Status;\r
)\r
{\r
EFI_STATUS Status;\r
- DEVICE_PRODUCER_SERIAL *Sio1Ptr;\r
- DEVICE_PRODUCER_PARALLEL *Sio2Ptr;\r
- DEVICE_PRODUCER_FLOPPY *Sio3Ptr;\r
+ DEVICE_PRODUCER_SERIAL *SioSerial;\r
+ DEVICE_PRODUCER_PARALLEL *SioParallel;\r
+ DEVICE_PRODUCER_FLOPPY *SioFloppy;\r
UINTN HandleCount;\r
EFI_HANDLE *HandleBuffer;\r
UINTN Index;\r
UINTN HandleCount;\r
EFI_HANDLE *HandleBuffer;\r
UINTN Index;\r
// We want resource for legacy even if no 32-bit driver installed\r
//\r
for (ChildIndex = 0; ChildIndex < EntryCount; ChildIndex++) {\r
// We want resource for legacy even if no 32-bit driver installed\r
//\r
for (ChildIndex = 0; ChildIndex < EntryCount; ChildIndex++) {\r
- Sio1Ptr = &SioPtr->Serial[ResourceList->Device.UID];\r
- Sio1Ptr->Address = (UINT16) IoResource->StartRange;\r
- Sio1Ptr->Irq = (UINT8) InterruptResource->StartRange;\r
- Sio1Ptr->Mode = DEVICE_SERIAL_MODE_NORMAL | DEVICE_SERIAL_MODE_DUPLEX_HALF;\r
+ SioSerial = &SioPtr->Serial[ResourceList->Device.UID];\r
+ SioSerial->Address = (UINT16) IoResource->StartRange;\r
+ SioSerial->Irq = (UINT8) InterruptResource->StartRange;\r
+ SioSerial->Mode = DEVICE_SERIAL_MODE_NORMAL | DEVICE_SERIAL_MODE_DUPLEX_HALF;\r
}\r
\r
FreePool (OpenInfoBuffer);\r
}\r
\r
FreePool (OpenInfoBuffer);\r
InterruptResource != NULL &&\r
DmaResource != NULL\r
) {\r
InterruptResource != NULL &&\r
DmaResource != NULL\r
) {\r
- Sio2Ptr = &SioPtr->Parallel[ResourceList->Device.UID];\r
- Sio2Ptr->Address = (UINT16) IoResource->StartRange;\r
- Sio2Ptr->Irq = (UINT8) InterruptResource->StartRange;\r
- Sio2Ptr->Dma = (UINT8) DmaResource->StartRange;\r
- Sio2Ptr->Mode = DEVICE_PARALLEL_MODE_MODE_OUTPUT_ONLY;\r
+ SioParallel = &SioPtr->Parallel[ResourceList->Device.UID];\r
+ SioParallel->Address = (UINT16) IoResource->StartRange;\r
+ SioParallel->Irq = (UINT8) InterruptResource->StartRange;\r
+ SioParallel->Dma = (UINT8) DmaResource->StartRange;\r
+ SioParallel->Mode = DEVICE_PARALLEL_MODE_MODE_OUTPUT_ONLY;\r
if (IoResource != NULL && InterruptResource != NULL && DmaResource != NULL) {\r
Status = gBS->HandleProtocol (HandleBuffer[Index], &gEfiBlockIoProtocolGuid, (VOID **) &BlockIo);\r
if (!EFI_ERROR (Status)) {\r
if (IoResource != NULL && InterruptResource != NULL && DmaResource != NULL) {\r
Status = gBS->HandleProtocol (HandleBuffer[Index], &gEfiBlockIoProtocolGuid, (VOID **) &BlockIo);\r
if (!EFI_ERROR (Status)) {\r
- Sio3Ptr = &SioPtr->Floppy;\r
- Sio3Ptr->Address = (UINT16) IoResource->StartRange;\r
- Sio3Ptr->Irq = (UINT8) InterruptResource->StartRange;\r
- Sio3Ptr->Dma = (UINT8) DmaResource->StartRange;\r
- Sio3Ptr->NumberOfFloppy++;\r
+ SioFloppy = &SioPtr->Floppy;\r
+ SioFloppy->Address = (UINT16) IoResource->StartRange;\r
+ SioFloppy->Irq = (UINT8) InterruptResource->StartRange;\r
+ SioFloppy->Dma = (UINT8) DmaResource->StartRange;\r
+ SioFloppy->NumberOfFloppy++;\r