Lines Matching refs:SataPrivateData
394 EFI_SATA_CONTROLLER_PRIVATE_DATA *SataPrivateData;
400 SataPrivateData = NULL;
421 SataPrivateData = AllocateZeroPool (sizeof (EFI_SATA_CONTROLLER_PRIVATE_DATA));
422 if (SataPrivateData == NULL) {
430 SataPrivateData->Signature = SATA_CONTROLLER_SIGNATURE;
431 SataPrivateData->PciIo = PciIo;
432 SataPrivateData->IdeInit.GetChannelInfo = IdeInitGetChannelInfo;
433 SataPrivateData->IdeInit.NotifyPhase = IdeInitNotifyPhase;
434 SataPrivateData->IdeInit.SubmitData = IdeInitSubmitData;
435 SataPrivateData->IdeInit.DisqualifyMode = IdeInitDisqualifyMode;
436 SataPrivateData->IdeInit.CalculateMode = IdeInitCalculateMode;
437 SataPrivateData->IdeInit.SetTiming = IdeInitSetTiming;
438 SataPrivateData->IdeInit.EnumAll = SATA_ENUMER_ALL;
450 SataPrivateData->IdeInit.ChannelCount = IDE_MAX_CHANNEL;
451 SataPrivateData->DeviceCount = IDE_MAX_DEVICES;
459 SataPrivateData->IdeInit.ChannelCount = (UINT8) ((Data32 & B_AHCI_CAP_NPS) + 1);
460 SataPrivateData->DeviceCount = AHCI_MAX_DEVICES;
462 SataPrivateData->DeviceCount = AHCI_MULTI_MAX_DEVICES;
466 ChannelDeviceCount = (UINTN) (SataPrivateData->IdeInit.ChannelCount) * (UINTN) (SataPrivateData->DeviceCount);
467 SataPrivateData->DisqualifiedModes = AllocateZeroPool ((sizeof (EFI_ATA_COLLECTIVE_MODE)) * ChannelDeviceCount);
468 if (SataPrivateData->DisqualifiedModes == NULL) {
473 SataPrivateData->IdentifyData = AllocateZeroPool ((sizeof (EFI_IDENTIFY_DATA)) * ChannelDeviceCount);
474 if (SataPrivateData->IdentifyData == NULL) {
479 SataPrivateData->IdentifyValid = AllocateZeroPool ((sizeof (BOOLEAN)) * ChannelDeviceCount);
480 if (SataPrivateData->IdentifyValid == NULL) {
491 &(SataPrivateData->IdeInit),
504 if (SataPrivateData != NULL) {
505 if (SataPrivateData->DisqualifiedModes != NULL) {
506 FreePool (SataPrivateData->DisqualifiedModes);
508 if (SataPrivateData->IdentifyData != NULL) {
509 FreePool (SataPrivateData->IdentifyData);
511 if (SataPrivateData->IdentifyValid != NULL) {
512 FreePool (SataPrivateData->IdentifyValid);
514 FreePool (SataPrivateData);
546 EFI_SATA_CONTROLLER_PRIVATE_DATA *SataPrivateData;
563 SataPrivateData = SATA_CONTROLLER_PRIVATE_DATA_FROM_THIS (IdeInit);
564 ASSERT (SataPrivateData != NULL);
572 &(SataPrivateData->IdeInit),
579 if (SataPrivateData != NULL) {
580 if (SataPrivateData->DisqualifiedModes != NULL) {
581 FreePool (SataPrivateData->DisqualifiedModes);
583 if (SataPrivateData->IdentifyData != NULL) {
584 FreePool (SataPrivateData->IdentifyData);
586 if (SataPrivateData->IdentifyValid != NULL) {
587 FreePool (SataPrivateData->IdentifyValid);
589 FreePool (SataPrivateData);
606 @param[in] SataPrivateData The private data structure corresponding to the
622 IN CONST EFI_SATA_CONTROLLER_PRIVATE_DATA *SataPrivateData,
627 ASSERT (SataPrivateData != NULL);
628 ASSERT (Channel < SataPrivateData->IdeInit.ChannelCount);
629 ASSERT (Device < SataPrivateData->DeviceCount);
631 return Channel * SataPrivateData->DeviceCount + Device;
682 EFI_SATA_CONTROLLER_PRIVATE_DATA *SataPrivateData;
683 SataPrivateData = SATA_CONTROLLER_PRIVATE_DATA_FROM_THIS (This);
684 ASSERT (SataPrivateData != NULL);
688 *MaxDevices = SataPrivateData->DeviceCount;
779 EFI_SATA_CONTROLLER_PRIVATE_DATA *SataPrivateData;
782 SataPrivateData = SATA_CONTROLLER_PRIVATE_DATA_FROM_THIS (This);
783 ASSERT (SataPrivateData != NULL);
785 if ((Channel >= This->ChannelCount) || (Device >= SataPrivateData->DeviceCount)) {
789 DeviceIndex = FlatDeviceIndex (SataPrivateData, Channel, Device);
796 &(SataPrivateData->IdentifyData[DeviceIndex]),
801 SataPrivateData->IdentifyValid[DeviceIndex] = TRUE;
803 SataPrivateData->IdentifyValid[DeviceIndex] = FALSE;
858 EFI_SATA_CONTROLLER_PRIVATE_DATA *SataPrivateData;
861 SataPrivateData = SATA_CONTROLLER_PRIVATE_DATA_FROM_THIS (This);
862 ASSERT (SataPrivateData != NULL);
864 if ((Channel >= This->ChannelCount) || (BadModes == NULL) || (Device >= SataPrivateData->DeviceCount)) {
868 DeviceIndex = FlatDeviceIndex (SataPrivateData, Channel, Device);
875 &(SataPrivateData->DisqualifiedModes[DeviceIndex]),
946 EFI_SATA_CONTROLLER_PRIVATE_DATA *SataPrivateData;
954 SataPrivateData = SATA_CONTROLLER_PRIVATE_DATA_FROM_THIS (This);
955 ASSERT (SataPrivateData != NULL);
957 if ((Channel >= This->ChannelCount) || (SupportedModes == NULL) || (Device >= SataPrivateData->DeviceCount)) {
967 DeviceIndex = FlatDeviceIndex (SataPrivateData, Channel, Device);
969 IdentifyData = &(SataPrivateData->IdentifyData[DeviceIndex]);
970 IdentifyValid = SataPrivateData->IdentifyValid[DeviceIndex];
971 DisqualifiedModes = &(SataPrivateData->DisqualifiedModes[DeviceIndex]);