Changeset 100706 in vbox
- Timestamp:
- Jul 26, 2023 1:06:39 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp
r100108 r100706 36 36 #include "ResourceStoreImpl.h" 37 37 #include "Global.h" 38 #include "VMMDev.h" 38 39 39 40 // generated header … … 64 65 #include <VBox/param.h> 65 66 #include <VBox/version.h> 67 #ifdef VBOX_WITH_SHARED_CLIPBOARD 68 # include <VBox/HostServices/VBoxClipboardSvc.h> 69 #endif 70 #ifdef VBOX_WITH_DRAG_AND_DROP 71 # include "GuestImpl.h" 72 # include "GuestDnDPrivate.h" 73 #endif 66 74 67 75 #ifdef VBOX_WITH_EXTPACK … … 95 103 { 96 104 RT_NOREF(pVM /* when everything is disabled */); 97 VMMDev *pVMMDev = m_pVMMDev; Assert(pVMMDev); RT_NOREF(pVMMDev); /** @todo Comes later. */105 VMMDev *pVMMDev = m_pVMMDev; Assert(pVMMDev); 98 106 ComPtr<IMachine> pMachine = i_machine(); 99 107 … … 460 468 InsertConfigInteger(pCfg, "MmioBase", 0x09020000); 461 469 InsertConfigInteger(pCfg, "DmaEnabled", 1); 462 InsertConfigInteger(pCfg, "QemuRamfbSupport", 1);470 InsertConfigInteger(pCfg, "QemuRamfbSupport", 0); 463 471 InsertConfigNode(pInst, "LUN#0", &pLunL0); 464 472 InsertConfigString(pLunL0, "Driver", "MainDisplay"); … … 615 623 vrc = RTFdtNodeFinalize(hFdt); VRC(); 616 624 625 InsertConfigNode(pDevices, "vga", &pDev); 626 InsertConfigNode(pDev, "0", &pInst); 627 InsertConfigInteger(pInst, "Trusted", 1); 628 InsertConfigInteger(pInst, "PCIBusNo", 0); 629 InsertConfigInteger(pInst, "PCIDeviceNo", 2); 630 InsertConfigInteger(pInst, "PCIFunctionNo", 0); 631 InsertConfigNode(pInst, "Config", &pCfg); 632 InsertConfigInteger(pCfg, "VRamSize", 32 * _1M); 633 InsertConfigInteger(pCfg, "MonitorCount", 1); 634 i_attachStatusDriver(pInst, DeviceType_Graphics3D); 635 InsertConfigInteger(pCfg, "VMSVGAEnabled", true); 636 InsertConfigInteger(pCfg, "VMSVGAPciBarLayout", true); 637 InsertConfigInteger(pCfg, "VMSVGAPciId", true); 638 InsertConfigInteger(pCfg, "VMSVGA3dEnabled", false); 639 InsertConfigInteger(pCfg, "VmSvga3", true); 640 InsertConfigInteger(pCfg, "VmSvgaExposeLegacyVga", false); 641 642 /* Attach the display. */ 643 InsertConfigNode(pInst, "LUN#0", &pLunL0); 644 InsertConfigString(pLunL0, "Driver", "MainDisplay"); 645 InsertConfigNode(pLunL0, "Config", &pCfg); 646 647 648 InsertConfigNode(pDevices, "VMMDev", &pDev); 649 InsertConfigNode(pDev, "0", &pInst); 650 InsertConfigInteger(pInst, "Trusted", 1); 651 InsertConfigInteger(pInst, "PCIBusNo", 0); 652 InsertConfigInteger(pInst, "PCIDeviceNo", 0); 653 InsertConfigInteger(pInst, "PCIFunctionNo", 0); 654 InsertConfigNode(pInst, "Config", &pCfg); 655 InsertConfigInteger(pCfg, "MmioReq", 1); 656 657 /* the VMM device's Main driver */ 658 InsertConfigNode(pInst, "LUN#0", &pLunL0); 659 InsertConfigString(pLunL0, "Driver", "HGCM"); 660 InsertConfigNode(pLunL0, "Config", &pCfg); 661 662 /* 663 * Attach the status driver. 664 */ 665 i_attachStatusDriver(pInst, DeviceType_SharedFolder); 666 667 #ifdef VBOX_WITH_SHARED_CLIPBOARD 668 /* 669 * Shared Clipboard. 670 */ 671 { 672 ClipboardMode_T enmClipboardMode = ClipboardMode_Disabled; 673 hrc = pMachine->COMGETTER(ClipboardMode)(&enmClipboardMode); H(); 674 # ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 675 BOOL fFileTransfersEnabled; 676 hrc = pMachine->COMGETTER(ClipboardFileTransfersEnabled)(&fFileTransfersEnabled); H(); 677 # endif 678 679 /* Load the service */ 680 vrc = pVMMDev->hgcmLoadService("VBoxSharedClipboard", "VBoxSharedClipboard"); 681 if (RT_SUCCESS(vrc)) 682 { 683 LogRel(("Shared Clipboard: Service loaded\n")); 684 685 /* Set initial clipboard mode. */ 686 vrc = i_changeClipboardMode(enmClipboardMode); 687 AssertLogRelMsg(RT_SUCCESS(vrc), ("Shared Clipboard: Failed to set initial clipboard mode (%d): vrc=%Rrc\n", 688 enmClipboardMode, vrc)); 689 690 /* Setup the service. */ 691 VBOXHGCMSVCPARM parm; 692 HGCMSvcSetU32(&parm, !i_useHostClipboard()); 693 vrc = pVMMDev->hgcmHostCall("VBoxSharedClipboard", VBOX_SHCL_HOST_FN_SET_HEADLESS, 1, &parm); 694 AssertLogRelMsg(RT_SUCCESS(vrc), ("Shared Clipboard: Failed to set initial headless mode (%RTbool): vrc=%Rrc\n", 695 !i_useHostClipboard(), vrc)); 696 697 # ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 698 vrc = i_changeClipboardFileTransferMode(RT_BOOL(fFileTransfersEnabled)); 699 AssertLogRelMsg(RT_SUCCESS(vrc), ("Shared Clipboard: Failed to set initial file transfers mode (%u): vrc=%Rrc\n", 700 fFileTransfersEnabled, vrc)); 701 702 /** @todo Register area callbacks? (See also deregistration todo in Console::i_powerDown.) */ 703 # endif 704 } 705 else 706 LogRel(("Shared Clipboard: Not available, vrc=%Rrc\n", vrc)); 707 vrc = VINF_SUCCESS; /* None of the potential failures above are fatal. */ 708 } 709 #endif /* VBOX_WITH_SHARED_CLIPBOARD */ 710 711 #ifdef VBOX_WITH_DRAG_AND_DROP 712 /* 713 * Drag and Drop. 714 */ 715 { 716 DnDMode_T enmMode = DnDMode_Disabled; 717 hrc = pMachine->COMGETTER(DnDMode)(&enmMode); H(); 718 719 /* Load the service */ 720 vrc = pVMMDev->hgcmLoadService("VBoxDragAndDropSvc", "VBoxDragAndDropSvc"); 721 if (RT_FAILURE(vrc)) 722 { 723 LogRel(("Drag and drop service is not available, vrc=%Rrc\n", vrc)); 724 /* That is not a fatal failure. */ 725 vrc = VINF_SUCCESS; 726 } 727 else 728 { 729 vrc = HGCMHostRegisterServiceExtension(&m_hHgcmSvcExtDragAndDrop, "VBoxDragAndDropSvc", 730 &GuestDnD::notifyDnDDispatcher, 731 GuestDnDInst()); 732 if (RT_FAILURE(vrc)) 733 Log(("Cannot register VBoxDragAndDropSvc extension, vrc=%Rrc\n", vrc)); 734 else 735 { 736 LogRel(("Drag and drop service loaded\n")); 737 vrc = i_changeDnDMode(enmMode); 738 } 739 } 740 } 741 #endif /* VBOX_WITH_DRAG_AND_DROP */ 742 617 743 InsertConfigNode(pDevices, "usb-xhci", &pDev); 744 InsertConfigNode(pDev, "0", &pInst); 745 InsertConfigInteger(pInst, "Trusted", 1); 746 InsertConfigInteger(pInst, "PCIBusNo", 0); 747 InsertConfigInteger(pInst, "PCIDeviceNo", 1); 748 InsertConfigInteger(pInst, "PCIFunctionNo", 0); 749 InsertConfigNode(pInst, "Config", &pCfg); 750 InsertConfigNode(pInst, "LUN#0", &pLunL0); 751 InsertConfigString(pLunL0, "Driver","VUSBRootHub"); 752 InsertConfigNode(pInst, "LUN#1", &pLunL0); 753 InsertConfigString(pLunL0, "Driver","VUSBRootHub"); 754 755 #if 0 756 InsertConfigNode(pDevices, "e1000", &pDev); 618 757 InsertConfigNode(pDev, "0", &pInst); 619 758 InsertConfigInteger(pInst, "Trusted", 1); … … 622 761 InsertConfigInteger(pInst, "PCIFunctionNo", 0); 623 762 InsertConfigNode(pInst, "Config", &pCfg); 624 InsertConfigNode(pInst, "LUN#0", &pLunL0);625 InsertConfigString(pLunL0, "Driver","VUSBRootHub");626 InsertConfigNode(pInst, "LUN#1", &pLunL0);627 InsertConfigString(pLunL0, "Driver","VUSBRootHub");628 629 InsertConfigNode(pDevices, "e1000", &pDev);630 InsertConfigNode(pDev, "0", &pInst);631 InsertConfigInteger(pInst, "Trusted", 1);632 InsertConfigInteger(pInst, "PCIBusNo", 0);633 InsertConfigInteger(pInst, "PCIDeviceNo", 1);634 InsertConfigInteger(pInst, "PCIFunctionNo", 0);635 InsertConfigNode(pInst, "Config", &pCfg);636 763 InsertConfigInteger(pCfg, "CableConnected", 1); 637 764 InsertConfigInteger(pCfg, "LineSpeed", 0); 638 765 InsertConfigInteger(pCfg, "AdapterType", 0); 766 #else 767 InsertConfigNode(pDevices, "virtio-net", &pDev); 768 InsertConfigNode(pDev, "0", &pInst); 769 InsertConfigInteger(pInst, "Trusted", 1); 770 InsertConfigNode(pInst, "Config", &pCfg); 771 InsertConfigInteger(pCfg, "CableConnected", 1); 772 InsertConfigInteger(pCfg, "MmioBase", 0x0a000000); 773 InsertConfigInteger(pCfg, "Irq", 16); 774 775 vrc = RTFdtNodeAddF(hFdt, "virtio_mmio@%RX32", 0x0a000000); VRC(); 776 vrc = RTFdtNodePropertyAddEmpty( hFdt, "dma-coherent"); VRC(); 777 vrc = RTFdtNodePropertyAddCellsU32(hFdt, "interrupts", 3, 0x00, 16, 0x04); VRC(); 778 vrc = RTFdtNodePropertyAddCellsU32(hFdt, "reg", 4, 0, 0x0a000000, 0, 0x200); VRC(); 779 vrc = RTFdtNodePropertyAddString(hFdt, "compatible", "virtio,mmio"); VRC(); 780 vrc = RTFdtNodeFinalize(hFdt); VRC(); 781 #endif 639 782 640 783 const char *pszMac = "080027ede92c"; … … 796 939 } 797 940 941 case StorageControllerType_NVMe: 942 { 943 InsertConfigInteger(pCtlInst, "PCIBusNo", 0); 944 InsertConfigInteger(pCtlInst, "PCIDeviceNo", 3); 945 InsertConfigInteger(pCtlInst, "PCIFunctionNo", 0); 946 947 /* Attach the status driver */ 948 i_attachStatusDriver(pCtlInst, RT_BIT_32(DeviceType_HardDisk) | RT_BIT_32(DeviceType_DVD) /*?*/, 949 1, &paLedDevType, &mapMediumAttachments, pszCtrlDev, ulInstance); 950 break; 951 } 952 798 953 case StorageControllerType_LsiLogic: 799 954 case StorageControllerType_BusLogic: … … 803 958 case StorageControllerType_I82078: 804 959 case StorageControllerType_LsiLogicSas: 805 case StorageControllerType_NVMe:806 960 807 961 default: … … 902 1056 #endif 903 1057 1058 vrc = RTFdtNodeAdd(hFdt, "chosen"); VRC(); 1059 vrc = RTFdtNodePropertyAddString( hFdt, "stdout-path", "pl011@9000000"); VRC(); 1060 vrc = RTFdtNodePropertyAddString( hFdt, "stdin-path", "pl011@9000000"); VRC(); 1061 vrc = RTFdtNodeFinalize(hFdt); 1062 904 1063 /* Finalize the FDT and add it to the resource store. */ 905 1064 vrc = RTFdtFinalize(hFdt);
Note:
See TracChangeset
for help on using the changeset viewer.