Changeset 101116 in vbox for trunk/src/VBox/Main
- Timestamp:
- Sep 13, 2023 4:12:44 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp
r101057 r101116 418 418 case StorageBus_VirtioSCSI: 419 419 cCtrs = aChipset == ChipsetType_ICH9 ? 8 : 1; 420 /** @todo r=andy How many we want to define explicitly for ARMv8Virtual? */ 420 421 break; 421 422 case StorageBus_USB: … … 635 636 HRESULT PlatformProperties::getSupportedFirmwareTypes(std::vector<FirmwareType_T> &aSupportedFirmwareTypes) 636 637 { 637 static const FirmwareType_T aFirmwareTypes[] = 638 { 639 FirmwareType_BIOS, 640 FirmwareType_EFI, 641 FirmwareType_EFI32, 642 FirmwareType_EFI64, 643 FirmwareType_EFIDUAL, 644 }; 645 aSupportedFirmwareTypes.assign(aFirmwareTypes, 646 aFirmwareTypes + RT_ELEMENTS(aFirmwareTypes)); 638 switch (mPlatformArchitecture) 639 { 640 case PlatformArchitecture_x86: 641 { 642 static const FirmwareType_T aFirmwareTypes[] = 643 { 644 FirmwareType_BIOS, 645 FirmwareType_EFI, 646 FirmwareType_EFI32, 647 FirmwareType_EFI64, 648 FirmwareType_EFIDUAL 649 }; 650 aSupportedFirmwareTypes.assign(aFirmwareTypes, 651 aFirmwareTypes + RT_ELEMENTS(aFirmwareTypes)); 652 break; 653 } 654 655 case PlatformArchitecture_ARM: 656 { 657 static const FirmwareType_T aFirmwareTypes[] = 658 { 659 FirmwareType_EFI, 660 FirmwareType_EFI32, 661 FirmwareType_EFI64, 662 FirmwareType_EFIDUAL 663 }; 664 aSupportedFirmwareTypes.assign(aFirmwareTypes, 665 aFirmwareTypes + RT_ELEMENTS(aFirmwareTypes)); 666 break; 667 } 668 669 default: 670 AssertFailedStmt(aSupportedFirmwareTypes.clear()); 671 break; 672 } 673 647 674 return S_OK; 648 675 } … … 650 677 HRESULT PlatformProperties::getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes) 651 678 { 652 static const GraphicsControllerType_T aGraphicsControllerTypes[] = 653 { 654 GraphicsControllerType_VBoxVGA, 655 GraphicsControllerType_VMSVGA, 656 GraphicsControllerType_VBoxSVGA, 657 GraphicsControllerType_Null, 658 }; 659 aSupportedGraphicsControllerTypes.assign(aGraphicsControllerTypes, 660 aGraphicsControllerTypes + RT_ELEMENTS(aGraphicsControllerTypes)); 679 switch (mPlatformArchitecture) 680 { 681 case PlatformArchitecture_x86: 682 { 683 static const GraphicsControllerType_T aGraphicsControllerTypes[] = 684 { 685 GraphicsControllerType_VBoxVGA, 686 GraphicsControllerType_VMSVGA, 687 GraphicsControllerType_VBoxSVGA, 688 GraphicsControllerType_Null 689 }; 690 aSupportedGraphicsControllerTypes.assign(aGraphicsControllerTypes, 691 aGraphicsControllerTypes + RT_ELEMENTS(aGraphicsControllerTypes)); 692 break; 693 } 694 695 case PlatformArchitecture_ARM: 696 { 697 static const GraphicsControllerType_T aGraphicsControllerTypes[] = 698 { 699 GraphicsControllerType_VMSVGA, 700 GraphicsControllerType_Null 701 }; 702 aSupportedGraphicsControllerTypes.assign(aGraphicsControllerTypes, 703 aGraphicsControllerTypes + RT_ELEMENTS(aGraphicsControllerTypes)); 704 break; 705 } 706 707 default: 708 AssertFailedStmt(aSupportedGraphicsControllerTypes.clear()); 709 break; 710 } 711 661 712 return S_OK; 662 713 } … … 671 722 NetworkAdapterType_I82543GC, 672 723 NetworkAdapterType_I82545EM, 673 NetworkAdapterType_Virtio ,724 NetworkAdapterType_Virtio 674 725 }; 675 726 aSupportedNetworkAdapterTypes.assign(aNetworkAdapterTypes, … … 684 735 UartType_U16450, 685 736 UartType_U16550A, 686 UartType_U16750 ,737 UartType_U16750 687 738 }; 688 739 aSupportedUartTypes.assign(aUartTypes, … … 697 748 USBControllerType_OHCI, 698 749 USBControllerType_EHCI, 699 USBControllerType_XHCI ,750 USBControllerType_XHCI 700 751 }; 701 752 aSupportedUSBControllerTypes.assign(aUSBControllerTypes, … … 706 757 HRESULT PlatformProperties::getSupportedAudioControllerTypes(std::vector<AudioControllerType_T> &aSupportedAudioControllerTypes) 707 758 { 708 static const AudioControllerType_T aAudioControllerTypes[] = 709 { 710 AudioControllerType_AC97, 711 AudioControllerType_SB16, 712 AudioControllerType_HDA, 713 }; 714 aSupportedAudioControllerTypes.assign(aAudioControllerTypes, 715 aAudioControllerTypes + RT_ELEMENTS(aAudioControllerTypes)); 759 switch (mPlatformArchitecture) 760 { 761 case PlatformArchitecture_x86: 762 { 763 static const AudioControllerType_T aAudioControllerTypes[] = 764 { 765 AudioControllerType_AC97, 766 AudioControllerType_SB16, 767 AudioControllerType_HDA, 768 }; 769 aSupportedAudioControllerTypes.assign(aAudioControllerTypes, 770 aAudioControllerTypes + RT_ELEMENTS(aAudioControllerTypes)); 771 break; 772 } 773 774 case PlatformArchitecture_ARM: 775 { 776 /** @todo None yet / needs to be tested first. */ 777 aSupportedAudioControllerTypes.clear(); 778 break; 779 } 780 781 default: 782 AssertFailedStmt(aSupportedAudioControllerTypes.clear()); 783 break; 784 } 785 786 716 787 return S_OK; 717 788 } … … 719 790 HRESULT PlatformProperties::getSupportedStorageBuses(std::vector<StorageBus_T> &aSupportedStorageBuses) 720 791 { 721 static const StorageBus_T aStorageBuses[] = 722 { 723 StorageBus_SATA, 724 StorageBus_IDE, 725 StorageBus_SCSI, 726 StorageBus_Floppy, 727 StorageBus_SAS, 728 StorageBus_USB, 729 StorageBus_PCIe, 730 StorageBus_VirtioSCSI, 731 }; 732 aSupportedStorageBuses.assign(aStorageBuses, 733 aStorageBuses + RT_ELEMENTS(aStorageBuses)); 792 switch (mPlatformArchitecture) 793 { 794 case PlatformArchitecture_x86: 795 { 796 static const StorageBus_T aStorageBuses[] = 797 { 798 StorageBus_SATA, 799 StorageBus_IDE, 800 StorageBus_SCSI, 801 StorageBus_Floppy, 802 StorageBus_SAS, 803 StorageBus_USB, 804 StorageBus_PCIe, 805 StorageBus_VirtioSCSI, 806 }; 807 aSupportedStorageBuses.assign(aStorageBuses, 808 aStorageBuses + RT_ELEMENTS(aStorageBuses)); 809 break; 810 } 811 812 case PlatformArchitecture_ARM: 813 { 814 static const StorageBus_T aStorageBuses[] = 815 { 816 StorageBus_VirtioSCSI 817 }; 818 aSupportedStorageBuses.assign(aStorageBuses, 819 aStorageBuses + RT_ELEMENTS(aStorageBuses)); 820 break; 821 } 822 823 default: 824 AssertFailedStmt(aSupportedStorageBuses.clear()); 825 break; 826 } 827 734 828 return S_OK; 735 829 } … … 737 831 HRESULT PlatformProperties::getSupportedStorageControllerTypes(std::vector<StorageControllerType_T> &aSupportedStorageControllerTypes) 738 832 { 739 static const StorageControllerType_T aStorageControllerTypes[] = 740 { 741 StorageControllerType_IntelAhci, 742 StorageControllerType_PIIX4, 743 StorageControllerType_PIIX3, 744 StorageControllerType_ICH6, 745 StorageControllerType_LsiLogic, 746 StorageControllerType_BusLogic, 747 StorageControllerType_I82078, 748 StorageControllerType_LsiLogicSas, 749 StorageControllerType_USB, 750 StorageControllerType_NVMe, 751 StorageControllerType_VirtioSCSI, 752 }; 753 aSupportedStorageControllerTypes.assign(aStorageControllerTypes, 754 aStorageControllerTypes + RT_ELEMENTS(aStorageControllerTypes)); 833 switch (mPlatformArchitecture) 834 { 835 case PlatformArchitecture_x86: 836 { 837 static const StorageControllerType_T aStorageControllerTypes[] = 838 { 839 StorageControllerType_IntelAhci, 840 StorageControllerType_PIIX4, 841 StorageControllerType_PIIX3, 842 StorageControllerType_ICH6, 843 StorageControllerType_LsiLogic, 844 StorageControllerType_BusLogic, 845 StorageControllerType_I82078, 846 StorageControllerType_LsiLogicSas, 847 StorageControllerType_USB, 848 StorageControllerType_NVMe, 849 StorageControllerType_VirtioSCSI 850 }; 851 aSupportedStorageControllerTypes.assign(aStorageControllerTypes, 852 aStorageControllerTypes + RT_ELEMENTS(aStorageControllerTypes)); 853 break; 854 } 855 856 case PlatformArchitecture_ARM: 857 { 858 static const StorageControllerType_T aStorageControllerTypes[] = 859 { 860 StorageControllerType_VirtioSCSI 861 }; 862 aSupportedStorageControllerTypes.assign(aStorageControllerTypes, 863 aStorageControllerTypes + RT_ELEMENTS(aStorageControllerTypes)); 864 break; 865 } 866 867 default: 868 AssertFailedStmt(aSupportedStorageControllerTypes.clear()); 869 break; 870 } 871 755 872 return S_OK; 756 873 } … … 758 875 HRESULT PlatformProperties::getSupportedChipsetTypes(std::vector<ChipsetType_T> &aSupportedChipsetTypes) 759 876 { 760 static const ChipsetType_T aChipsetTypes[] = 761 { 762 ChipsetType_PIIX3, 763 ChipsetType_ICH9, 764 }; 765 aSupportedChipsetTypes.assign(aChipsetTypes, 766 aChipsetTypes + RT_ELEMENTS(aChipsetTypes)); 877 switch (mPlatformArchitecture) 878 { 879 case PlatformArchitecture_x86: 880 { 881 static const ChipsetType_T aChipsetTypes[] = 882 { 883 ChipsetType_PIIX3, 884 ChipsetType_ICH9 885 }; 886 aSupportedChipsetTypes.assign(aChipsetTypes, 887 aChipsetTypes + RT_ELEMENTS(aChipsetTypes)); 888 break; 889 } 890 891 case PlatformArchitecture_ARM: 892 { 893 static const ChipsetType_T aChipsetTypes[] = 894 { 895 ChipsetType_ARMv8Virtual 896 }; 897 aSupportedChipsetTypes.assign(aChipsetTypes, 898 aChipsetTypes + RT_ELEMENTS(aChipsetTypes)); 899 break; 900 } 901 902 default: 903 AssertFailedStmt(aSupportedChipsetTypes.clear()); 904 break; 905 } 906 767 907 return S_OK; 768 908 } … … 770 910 HRESULT PlatformProperties::getSupportedIommuTypes(std::vector<IommuType_T> &aSupportedIommuTypes) 771 911 { 772 static const IommuType_T aIommuTypes[] = 773 { 774 IommuType_None, 775 IommuType_Automatic, 776 IommuType_AMD, 777 /** @todo Add Intel when it's supported. */ 778 }; 779 aSupportedIommuTypes.assign(aIommuTypes, 780 aIommuTypes + RT_ELEMENTS(aIommuTypes)); 912 switch (mPlatformArchitecture) 913 { 914 case PlatformArchitecture_x86: 915 { 916 static const IommuType_T aIommuTypes[] = 917 { 918 IommuType_None, 919 IommuType_Automatic, 920 IommuType_AMD 921 /** @todo Add Intel when it's supported. */ 922 }; 923 aSupportedIommuTypes.assign(aIommuTypes, 924 aIommuTypes + RT_ELEMENTS(aIommuTypes)); 925 break; 926 } 927 928 case PlatformArchitecture_ARM: 929 { 930 static const IommuType_T aIommuTypes[] = 931 { 932 IommuType_None 933 }; 934 aSupportedIommuTypes.assign(aIommuTypes, 935 aIommuTypes + RT_ELEMENTS(aIommuTypes)); 936 break; 937 } 938 939 default: 940 AssertFailedStmt(aSupportedIommuTypes.clear()); 941 break; 942 } 943 781 944 return S_OK; 782 945 } … … 784 947 HRESULT PlatformProperties::getSupportedTpmTypes(std::vector<TpmType_T> &aSupportedTpmTypes) 785 948 { 786 static const TpmType_T aTpmTypes[] = 787 { 788 TpmType_None, 789 TpmType_v1_2, 790 TpmType_v2_0 791 }; 792 aSupportedTpmTypes.assign(aTpmTypes, 793 aTpmTypes + RT_ELEMENTS(aTpmTypes)); 794 return S_OK; 795 } 949 switch (mPlatformArchitecture) 950 { 951 case PlatformArchitecture_x86: 952 { 953 static const TpmType_T aTpmTypes[] = 954 { 955 TpmType_None, 956 TpmType_v1_2, 957 TpmType_v2_0 958 }; 959 aSupportedTpmTypes.assign(aTpmTypes, 960 aTpmTypes + RT_ELEMENTS(aTpmTypes)); 961 break; 962 } 963 964 case PlatformArchitecture_ARM: 965 { 966 static const TpmType_T aTpmTypes[] = 967 { 968 TpmType_None 969 }; 970 aSupportedTpmTypes.assign(aTpmTypes, 971 aTpmTypes + RT_ELEMENTS(aTpmTypes)); 972 break; 973 } 974 975 default: 976 AssertFailedStmt(aSupportedTpmTypes.clear()); 977 break; 978 } 979 980 return S_OK; 981 }
Note:
See TracChangeset
for help on using the changeset viewer.