Changeset 80963 in vbox
- Timestamp:
- Sep 23, 2019 11:17:02 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133550
- Location:
- trunk/src/VBox/Devices/Bus
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPCI.cpp
r80962 r80963 805 805 * @callback_method_impl{FNIOMIOPORTNEWOUT, PCI address} 806 806 */ 807 static DECLCALLBACK(VBOXSTRICTRC) pciIOPortAddressWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb) 808 { 809 LogFunc(("Port=%#x u32=%#x cb=%d\n", Port, u32, cb)); 810 RT_NOREF2(Port, pvUser); 807 static DECLCALLBACK(VBOXSTRICTRC) 808 pciIOPortAddressWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t u32, unsigned cb) 809 { 810 LogFunc(("uPort=%#x u32=%#x cb=%d\n", uPort, u32, cb)); 811 RT_NOREF2(uPort, pvUser); 811 812 if (cb == 4) 812 813 { … … 825 826 * @callback_method_impl{FNIOMIOPORTNEWIN, PCI address} 826 827 */ 827 static DECLCALLBACK(VBOXSTRICTRC) pciIOPortAddressRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb) 828 { 829 RT_NOREF2(Port, pvUser); 828 static DECLCALLBACK(VBOXSTRICTRC) 829 pciIOPortAddressRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t *pu32, unsigned cb) 830 { 831 RT_NOREF2(uPort, pvUser); 830 832 if (cb == 4) 831 833 { … … 834 836 *pu32 = pThis->uConfigReg; 835 837 PCI_UNLOCK(pDevIns); 836 LogFunc((" Port=%#x cb=%d -> %#x\n",Port, cb, *pu32));838 LogFunc(("uPort=%#x cb=%d -> %#x\n", uPort, cb, *pu32)); 837 839 return VINF_SUCCESS; 838 840 } 839 841 /* else: 440FX does "pass through to the bus" for other writes, what ever that means. 840 842 * Linux probes for cmd640 using byte writes/reads during ide init. We'll just ignore it. */ 841 LogFunc((" Port=%#x cb=%d VERR_IOM_IOPORT_UNUSED\n",Port, cb));843 LogFunc(("uPort=%#x cb=%d VERR_IOM_IOPORT_UNUSED\n", uPort, cb)); 842 844 return VERR_IOM_IOPORT_UNUSED; 843 845 } … … 847 849 * @callback_method_impl{FNIOMIOPORTNEWOUT, PCI data} 848 850 */ 849 static DECLCALLBACK(VBOXSTRICTRC) pciIOPortDataWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb) 850 { 851 LogFunc(("Port=%#x u32=%#x cb=%d\n", Port, u32, cb)); 851 static DECLCALLBACK(VBOXSTRICTRC) 852 pciIOPortDataWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t u32, unsigned cb) 853 { 854 LogFunc(("uPort=%#x u32=%#x cb=%d\n", uPort, u32, cb)); 852 855 NOREF(pvUser); 853 856 VBOXSTRICTRC rcStrict = VINF_SUCCESS; 854 if (!( Port % cb))857 if (!(uPort % cb)) 855 858 { 856 859 PCI_LOCK(pDevIns, VINF_IOM_R3_IOPORT_WRITE); 857 rcStrict = pci_data_write(pDevIns, PDMINS_2_DATA(pDevIns, PDEVPCIROOT), Port, u32, cb);860 rcStrict = pci_data_write(pDevIns, PDMINS_2_DATA(pDevIns, PDEVPCIROOT), uPort, u32, cb); 858 861 PCI_UNLOCK(pDevIns); 859 862 } 860 863 else 861 AssertMsgFailed(("Write to port %#x u32=%#x cb=%d\n", Port, u32, cb));864 AssertMsgFailed(("Write to port %#x u32=%#x cb=%d\n", uPort, u32, cb)); 862 865 return rcStrict; 863 866 } … … 867 870 * @callback_method_impl{FNIOMIOPORTNEWIN, PCI data} 868 871 */ 869 static DECLCALLBACK(VBOXSTRICTRC) pciIOPortDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb) 872 static DECLCALLBACK(VBOXSTRICTRC) 873 pciIOPortDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t *pu32, unsigned cb) 870 874 { 871 875 NOREF(pvUser); 872 if (!( Port % cb))876 if (!(uPort % cb)) 873 877 { 874 878 PCI_LOCK(pDevIns, VINF_IOM_R3_IOPORT_READ); 875 VBOXSTRICTRC rcStrict = pci_data_read(PDMINS_2_DATA(pDevIns, PDEVPCIROOT), Port, cb, pu32);879 VBOXSTRICTRC rcStrict = pci_data_read(PDMINS_2_DATA(pDevIns, PDEVPCIROOT), uPort, cb, pu32); 876 880 PCI_UNLOCK(pDevIns); 877 LogFunc((" Port=%#x cb=%#x -> %#x (%Rrc)\n",Port, cb, *pu32, VBOXSTRICTRC_VAL(rcStrict)));881 LogFunc(("uPort=%#x cb=%#x -> %#x (%Rrc)\n", uPort, cb, *pu32, VBOXSTRICTRC_VAL(rcStrict))); 878 882 return rcStrict; 879 883 } 880 AssertMsgFailed(("Read from port %#x cb=%d\n", Port, cb));884 AssertMsgFailed(("Read from port %#x cb=%d\n", uPort, cb)); 881 885 return VERR_IOM_IOPORT_UNUSED; 882 886 } … … 888 892 */ 889 893 static DECLCALLBACK(VBOXSTRICTRC) 890 pciR3IOPortMagicPCIWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)891 { 892 RT_NOREF2(pvUser, Port);893 LogFunc((" Port=%#x u32=%#x cb=%d\n",Port, u32, cb));894 pciR3IOPortMagicPCIWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t u32, unsigned cb) 895 { 896 RT_NOREF2(pvUser, uPort); 897 LogFunc(("uPort=%#x u32=%#x cb=%d\n", uPort, u32, cb)); 894 898 if (cb == 4) 895 899 { 896 if (u32 == UINT32_C(19200509)) // Richard Adams 900 if (u32 == UINT32_C(19200509)) // Richard Adams - Note! In decimal rather hex. 897 901 { 898 902 int rc = pciR3FakePCIBIOS(pDevIns); … … 908 912 */ 909 913 static DECLCALLBACK(VBOXSTRICTRC) 910 pciR3IOPortMagicPCIRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)911 { 912 RT_NOREF5(pDevIns, pvUser, Port, pu32, cb);913 LogFunc((" Port=%#x cb=%d VERR_IOM_IOPORT_UNUSED\n",Port, cb));914 pciR3IOPortMagicPCIRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t *pu32, unsigned cb) 915 { 916 RT_NOREF5(pDevIns, pvUser, uPort, pu32, cb); 917 LogFunc(("uPort=%#x cb=%d VERR_IOM_IOPORT_UNUSED\n", uPort, cb)); 914 918 return VERR_IOM_IOPORT_UNUSED; 915 919 } -
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r80962 r80963 252 252 /** 253 253 * @callback_method_impl{FNIOMIOPORTNEWOUT, 254 * 254 * Port I/O Handler for PCI address OUT operations.} 255 255 * 256 256 * Emulates writes to Configuration Address Port at 0CF8h for Configuration … … 283 283 /** 284 284 * @callback_method_impl{FNIOMIOPORTNEWIN, 285 * 285 * Port I/O Handler for PCI data IN operations.} 286 286 * 287 287 * Emulates reads from Configuration Address Port at 0CF8h for Configuration … … 363 363 /** 364 364 * @callback_method_impl{FNIOMIOPORTNEWOUT, 365 * Port I/O Handler for PCI data OUT operations.365 * Port I/O Handler for PCI data OUT operations.} 366 366 * 367 367 * Emulates writes to Configuration Data Port at 0CFCh for Configuration … … 461 461 /** 462 462 * @callback_method_impl{FNIOMIOPORTNEWIN, 463 * Port I/O Handler for PCI data IN operations.463 * Port I/O Handler for PCI data IN operations.} 464 464 * 465 465 * Emulates reads from Configuration Data Port at 0CFCh for Configuration … … 2109 2109 * 2110 2110 * @returns Max subordinate bus number. 2111 * @param pPciRoot Global device instance data used to generate unique bus numbers. 2112 * @param pBus The PCI bus to initialize. 2113 * @param pbmUsed Pointer to a 32-bit bitmap tracking which device 2114 * (ranges) has been used. 2115 * @param uBusPrimary The primary bus number the bus is connected to. 2111 * @param pDevIns The device instance of the bus. 2112 * @param pPciRoot Global device instance data used to generate unique bus numbers. 2113 * @param pBus The PCI bus to initialize. 2114 * @param pbmUsed Pointer to a 32-bit bitmap tracking which device 2115 * (ranges) has been used. 2116 * @param uBusPrimary The primary bus number the bus is connected to. 2116 2117 */ 2117 2118 static uint8_t ich9pciBiosInitBridgeTopology(PPDMDEVINS pDevIns, PDEVPCIROOT pPciRoot, PDEVPCIBUS pBus,
Note:
See TracChangeset
for help on using the changeset viewer.