Changeset 80682 in vbox
- Timestamp:
- Sep 9, 2019 7:54:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHDA.cpp
r80681 r80682 4897 4897 4898 4898 /* PCI Device */ 4899 PCIDevSetVendorId (&pThis->PciDev, HDA_PCI_VENDOR_ID); /* nVidia */4900 PCIDevSetDeviceId (&pThis->PciDev, HDA_PCI_DEVICE_ID); /* HDA */4901 4902 PCIDevSetCommand (&pThis->PciDev, 0x0000); /* 04 rw,ro - pcicmd. */4903 PCIDevSetStatus (&pThis->PciDev, VBOX_PCI_STATUS_CAP_LIST); /* 06 rwc?,ro? - pcists. */4904 PCIDevSetRevisionId (&pThis->PciDev, 0x01); /* 08 ro - rid. */4905 PCIDevSetClassProg (&pThis->PciDev, 0x00); /* 09 ro - pi. */4906 PCIDevSetClassSub (&pThis->PciDev, 0x03); /* 0a ro - scc; 03 == HDA. */4907 PCIDevSetClassBase (&pThis->PciDev, 0x04); /* 0b ro - bcc; 04 == multimedia. */4908 PCIDevSetHeaderType (&pThis->PciDev, 0x00); /* 0e ro - headtyp. */4909 PCIDevSetBaseAddress (&pThis->PciDev, 0, /* 10 rw - MMIO */4899 PCIDevSetVendorId( &pThis->PciDev, HDA_PCI_VENDOR_ID); /* nVidia */ 4900 PCIDevSetDeviceId( &pThis->PciDev, HDA_PCI_DEVICE_ID); /* HDA */ 4901 4902 PCIDevSetCommand( &pThis->PciDev, 0x0000); /* 04 rw,ro - pcicmd. */ 4903 PCIDevSetStatus( &pThis->PciDev, VBOX_PCI_STATUS_CAP_LIST); /* 06 rwc?,ro? - pcists. */ 4904 PCIDevSetRevisionId( &pThis->PciDev, 0x01); /* 08 ro - rid. */ 4905 PCIDevSetClassProg( &pThis->PciDev, 0x00); /* 09 ro - pi. */ 4906 PCIDevSetClassSub( &pThis->PciDev, 0x03); /* 0a ro - scc; 03 == HDA. */ 4907 PCIDevSetClassBase( &pThis->PciDev, 0x04); /* 0b ro - bcc; 04 == multimedia. */ 4908 PCIDevSetHeaderType( &pThis->PciDev, 0x00); /* 0e ro - headtyp. */ 4909 PCIDevSetBaseAddress( &pThis->PciDev, 0, /* 10 rw - MMIO */ 4910 4910 false /* fIoSpace */, false /* fPrefetchable */, true /* f64Bit */, 0x00000000); 4911 PCIDevSetInterruptLine (&pThis->PciDev, 0x00); /* 3c rw. */4912 PCIDevSetInterruptPin (&pThis->PciDev, 0x01); /* 3d ro - INTA#. */4911 PCIDevSetInterruptLine( &pThis->PciDev, 0x00); /* 3c rw. */ 4912 PCIDevSetInterruptPin( &pThis->PciDev, 0x01); /* 3d ro - INTA#. */ 4913 4913 4914 4914 #if defined(HDA_AS_PCI_EXPRESS) 4915 PCIDevSetCapabilityList 4915 PCIDevSetCapabilityList(&pThis->PciDev, 0x80); 4916 4916 #elif defined(VBOX_WITH_MSI_DEVICES) 4917 PCIDevSetCapabilityList 4917 PCIDevSetCapabilityList(&pThis->PciDev, 0x60); 4918 4918 #else 4919 PCIDevSetCapabilityList 4919 PCIDevSetCapabilityList(&pThis->PciDev, 0x50); /* ICH6 datasheet 18.1.16 */ 4920 4920 #endif 4921 4921 … … 4923 4923 /// of these values needs to be properly documented! 4924 4924 /* HDCTL off 0x40 bit 0 selects signaling mode (1-HDA, 0 - Ac97) 18.1.19 */ 4925 PCIDevSetByte( &pThis->PciDev, 0x40, 0x01);4925 PCIDevSetByte( &pThis->PciDev, 0x40, 0x01); 4926 4926 4927 4927 /* Power Management */ 4928 PCIDevSetByte( &pThis->PciDev, 0x50 + 0, VBOX_PCI_CAP_ID_PM);4929 PCIDevSetByte( &pThis->PciDev, 0x50 + 1, 0x0); /* next */4930 PCIDevSetWord( &pThis->PciDev, 0x50 + 2, VBOX_PCI_PM_CAP_DSI | 0x02 /* version, PM1.1 */ );4928 PCIDevSetByte( &pThis->PciDev, 0x50 + 0, VBOX_PCI_CAP_ID_PM); 4929 PCIDevSetByte( &pThis->PciDev, 0x50 + 1, 0x0); /* next */ 4930 PCIDevSetWord( &pThis->PciDev, 0x50 + 2, VBOX_PCI_PM_CAP_DSI | 0x02 /* version, PM1.1 */ ); 4931 4931 4932 4932 #ifdef HDA_AS_PCI_EXPRESS 4933 4933 /* PCI Express */ 4934 PCIDevSetByte( &pThis->PciDev, 0x80 + 0, VBOX_PCI_CAP_ID_EXP); /* PCI_Express */4935 PCIDevSetByte( &pThis->PciDev, 0x80 + 1, 0x60); /* next */4934 PCIDevSetByte( &pThis->PciDev, 0x80 + 0, VBOX_PCI_CAP_ID_EXP); /* PCI_Express */ 4935 PCIDevSetByte( &pThis->PciDev, 0x80 + 1, 0x60); /* next */ 4936 4936 /* Device flags */ 4937 PCIDevSetWord( &pThis->PciDev, 0x80 + 2,4938 /* version */ 0x1 |4939 /* Root Complex Integrated Endpoint */ (VBOX_PCI_EXP_TYPE_ROOT_INT_EP << 4) |4940 /* MSI */ (100) << 9);4937 PCIDevSetWord( &pThis->PciDev, 0x80 + 2, 4938 1 /* version */ 4939 | (VBOX_PCI_EXP_TYPE_ROOT_INT_EP << 4) /* Root Complex Integrated Endpoint */ 4940 | (100 << 9) /* MSI */ ); 4941 4941 /* Device capabilities */ 4942 PCIDevSetDWord( &pThis->PciDev, 0x80 + 4, VBOX_PCI_EXP_DEVCAP_FLRESET);4942 PCIDevSetDWord( &pThis->PciDev, 0x80 + 4, VBOX_PCI_EXP_DEVCAP_FLRESET); 4943 4943 /* Device control */ 4944 PCIDevSetWord( &pThis->PciDev, 0x80 + 8, 0);4944 PCIDevSetWord( &pThis->PciDev, 0x80 + 8, 0); 4945 4945 /* Device status */ 4946 PCIDevSetWord( &pThis->PciDev, 0x80 + 10, 0);4946 PCIDevSetWord( &pThis->PciDev, 0x80 + 10, 0); 4947 4947 /* Link caps */ 4948 PCIDevSetDWord( &pThis->PciDev, 0x80 + 12, 0);4948 PCIDevSetDWord( &pThis->PciDev, 0x80 + 12, 0); 4949 4949 /* Link control */ 4950 PCIDevSetWord( &pThis->PciDev, 0x80 + 16, 0);4950 PCIDevSetWord( &pThis->PciDev, 0x80 + 16, 0); 4951 4951 /* Link status */ 4952 PCIDevSetWord( &pThis->PciDev, 0x80 + 18, 0);4952 PCIDevSetWord( &pThis->PciDev, 0x80 + 18, 0); 4953 4953 /* Slot capabilities */ 4954 PCIDevSetDWord( &pThis->PciDev, 0x80 + 20, 0);4954 PCIDevSetDWord( &pThis->PciDev, 0x80 + 20, 0); 4955 4955 /* Slot control */ 4956 PCIDevSetWord( &pThis->PciDev, 0x80 + 24, 0);4956 PCIDevSetWord( &pThis->PciDev, 0x80 + 24, 0); 4957 4957 /* Slot status */ 4958 PCIDevSetWord( &pThis->PciDev, 0x80 + 26, 0);4958 PCIDevSetWord( &pThis->PciDev, 0x80 + 26, 0); 4959 4959 /* Root control */ 4960 PCIDevSetWord( &pThis->PciDev, 0x80 + 28, 0);4960 PCIDevSetWord( &pThis->PciDev, 0x80 + 28, 0); 4961 4961 /* Root capabilities */ 4962 PCIDevSetWord( &pThis->PciDev, 0x80 + 30, 0);4962 PCIDevSetWord( &pThis->PciDev, 0x80 + 30, 0); 4963 4963 /* Root status */ 4964 PCIDevSetDWord( &pThis->PciDev, 0x80 + 32, 0);4964 PCIDevSetDWord( &pThis->PciDev, 0x80 + 32, 0); 4965 4965 /* Device capabilities 2 */ 4966 PCIDevSetDWord( &pThis->PciDev, 0x80 + 36, 0);4966 PCIDevSetDWord( &pThis->PciDev, 0x80 + 36, 0); 4967 4967 /* Device control 2 */ 4968 PCIDevSetQWord( &pThis->PciDev, 0x80 + 40, 0);4968 PCIDevSetQWord( &pThis->PciDev, 0x80 + 40, 0); 4969 4969 /* Link control 2 */ 4970 PCIDevSetQWord( &pThis->PciDev, 0x80 + 48, 0);4970 PCIDevSetQWord( &pThis->PciDev, 0x80 + 48, 0); 4971 4971 /* Slot control 2 */ 4972 PCIDevSetWord( &pThis->PciDev, 0x80 + 56, 0);4972 PCIDevSetWord( &pThis->PciDev, 0x80 + 56, 0); 4973 4973 #endif 4974 4974
Note:
See TracChangeset
for help on using the changeset viewer.