Changeset 36716 in vbox
- Timestamp:
- Apr 18, 2011 2:17:17 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 71232
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pci.h
r36678 r36716 1049 1049 } 1050 1050 1051 PciBusAddress(int32_t iAddr) 1052 { 1053 clear(); 1054 fromLong(iAddr); 1055 } 1056 1051 1057 PciBusAddress& clear() 1052 1058 { … … 1140 1146 return true; 1141 1147 } 1148 1149 static const size_t cMaxAddrSize = 10; 1142 1150 }; 1143 1151 #endif /* __cplusplus */ -
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r36678 r36716 299 299 int rc = VINF_SUCCESS; 300 300 301 if (pAddr->iRegister > 0xff)302 {303 LogRel(("PCI: attempt to write extended register: %x (%d) <- val\n", pAddr->iRegister, cb, val));304 goto out;305 }306 307 301 if (pAddr->iBus != 0) 308 302 { … … 403 397 { 404 398 int rc = VINF_SUCCESS; 405 406 if (pPciAddr->iRegister > 0xff)407 {408 LogRel(("PCI: attempt to read extended register: %x\n", pPciAddr->iRegister));409 ich9pciNoMem(pu32, cb);410 goto out;411 }412 413 399 414 400 if (pPciAddr->iBus != 0) … … 949 935 pPciDev->name, iRegion, cbRegion, enmType)); 950 936 937 /* Make sure that we haven't marked this region as continuation of 64-bit region. */ 938 Assert(pPciDev->Int.s.aIORegions[iRegion].type != 0xff); 939 951 940 /* 952 941 * Register the I/O region. … … 957 946 pRegion->type = enmType; 958 947 pRegion->map_func = pfnCallback; 948 949 if ((enmType & PCI_ADDRESS_SPACE_BAR64) != 0) 950 { 951 AssertMsgReturn(iRegion < 4, 952 ("Region %d cannot be 64-bit\n", iRegion), 953 VERR_INVALID_PARAMETER); 954 /* Mark next region as continuation of this one. */ 955 pPciDev->Int.s.aIORegions[iRegion+1].type = 0xff; 956 } 959 957 960 958 /* Set type in the PCI config space. */ … … 1911 1909 { 1912 1910 PCIIORegion * pRegion = &aDev->Int.s.aIORegions[iRegion]; 1913 1914 int iRegionSize = pRegion->size; 1911 int64_t iRegionSize = pRegion->size; 1915 1912 1916 1913 Log3(("ich9pciWriteBarByte: region=%d off=%d val=%x size=%d\n", 1917 1914 iRegion, iOffset, u8Val, iRegionSize)); 1915 1916 if (iOffset > 3) 1917 Assert((aDev->Int.s.aIORegions[iRegion].type & PCI_ADDRESS_SPACE_BAR64) != 0); 1918 1919 /* Check if we're writing to upper part of 64-bit BAR. */ 1920 if (aDev->Int.s.aIORegions[iRegion].type == 0xff) 1921 { 1922 ich9pciWriteBarByte(aDev, iRegion-1, iOffset+4, u8Val); 1923 return; 1924 } 1918 1925 1919 1926 /* Region doesn't exist */ … … 1924 1931 /* Region size must be power of two */ 1925 1932 Assert((iRegionSize & (iRegionSize - 1)) == 0); 1926 uint8_t uMask = (( (uint32_t)iRegionSize - 1) >> (iOffset*8) ) & 0xff;1933 uint8_t uMask = ((iRegionSize - 1) >> (iOffset*8) ) & 0xff; 1927 1934 1928 1935 if (iOffset == 0)
Note:
See TracChangeset
for help on using the changeset viewer.