Changeset 83448 in vbox for trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp
- Timestamp:
- Mar 26, 2020 6:09:34 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp
r83442 r83448 1266 1266 uint32_t u5MapCapType : 5; /**< Bits 31:27 - MsiMapCapType: MSI Mapping capability type. */ 1267 1267 } n; 1268 /** The 32-bit unsigned integer view. */ 1269 uint32_t u32; 1268 1270 } MSI_MAP_CAP_HDR_T; 1269 1271 AssertCompileSize(MSI_MAP_CAP_HDR_T, 4); 1272 1273 /** 1274 * Performance Optimization Control Register (MMIO). 1275 * In accordance with the AMD spec. 1276 */ 1277 typedef union 1278 { 1279 struct 1280 { 1281 uint32_t u13Rsvd0 : 13; /**< Bits 12:0 - Reserved. */ 1282 uint32_t u1PerfOptEn : 1; /**< Bit 13 - PerfOptEn: Performance Optimization Enable. */ 1283 uint32_t u17Rsvd0 : 18; /**< Bits 31:14 - Reserved. */ 1284 } n; 1285 /** The 32-bit unsigned integer view. */ 1286 uint32_t u32; 1287 } IOMMU_PERF_OPT_CTRL_T; 1288 AssertCompileSize(IOMMU_PERF_OPT_CTRL_T, 4); 1289 1290 /** 1291 * XT (x2APIC) IOMMU General Interrupt Control Register (MMIO). 1292 * In accordance with the AMD spec. 1293 */ 1294 typedef union 1295 { 1296 struct 1297 { 1298 uint32_t u2Rsvd0 : 2; /**< Bits 1:0 - Reserved.*/ 1299 uint32_t u1X2ApicIntrDstMode : 1; /**< Bit 2 - Destination Mode for general interrupt.*/ 1300 uint32_t u4Rsvd0 : 4; /**< Bits 7:3 - Reserved.*/ 1301 uint32_t u24X2ApicIntrDstLo : 24; /**< Bits 31:8 - Destination for general interrupt (Lo).*/ 1302 uint32_t u8X2ApicIntrVector : 8; /**< Bits 39:32 - Vector for general interrupt.*/ 1303 uint32_t u1X2ApicIntrDeliveryMode : 1; /**< Bit 40 - Delivery Mode for general interrupt.*/ 1304 uint32_t u15Rsvd0 : 15; /**< Bits 55:41 - Reserved.*/ 1305 uint32_t u7X2ApicIntrDstHi : 7; /**< Bits 63:56 - Destination for general interrupt (Hi) .*/ 1306 } n; 1307 /** The 64-bit unsigned integer view. */ 1308 uint64_t u64; 1309 } IOMMU_XT_GEN_INTR_CTRL_T; 1310 AssertCompileSize(IOMMU_XT_GEN_INTR_CTRL_T, 8); 1311 1312 /** 1313 * XT (x2APIC) IOMMU General Interrupt Control Register (MMIO). 1314 * In accordance with the AMD spec. 1315 */ 1316 typedef union 1317 { 1318 struct 1319 { 1320 uint32_t u2Rsvd0 : 2; /**< Bits 1:0 - Reserved.*/ 1321 uint32_t u1X2ApicIntrDstMode : 1; /**< Bit 2 - Destination Mode for the interrupt.*/ 1322 uint32_t u4Rsvd0 : 4; /**< Bits 7:3 - Reserved.*/ 1323 uint32_t u24X2ApicIntrDstLo : 24; /**< Bits 31:8 - Destination for the interrupt (Lo).*/ 1324 uint32_t u8X2ApicIntrVector : 8; /**< Bits 39:32 - Vector for the interrupt.*/ 1325 uint32_t u1X2ApicIntrDeliveryMode : 1; /**< Bit 40 - Delivery Mode for the interrupt.*/ 1326 uint32_t u15Rsvd0 : 15; /**< Bits 55:41 - Reserved.*/ 1327 uint32_t u7X2ApicIntrDstHi : 7; /**< Bits 63:56 - Destination for the interrupt (Hi) .*/ 1328 } n; 1329 /** The 64-bit unsigned integer view. */ 1330 uint64_t u64; 1331 } IOMMU_XT_INTR_CTRL_T; 1332 AssertCompileSize(IOMMU_XT_INTR_CTRL_T, 8); 1333 1334 /** 1335 * XT (x2APIC) IOMMU PPR Interrupt Control Register (MMIO). 1336 * In accordance with the AMD spec. 1337 * Currently identical to IOMMU_XT_INTR_CTRL_T. 1338 */ 1339 typedef IOMMU_XT_INTR_CTRL_T IOMMU_XT_PPR_INTR_CTRL_T; 1340 1341 /** 1342 * XT (x2APIC) IOMMU GA (Guest Address) Log Control Register (MMIO). 1343 * In accordance with the AMD spec. 1344 * Currently identical to IOMMU_XT_INTR_CTRL_T. 1345 */ 1346 typedef IOMMU_XT_INTR_CTRL_T IOMMU_XT_GALOG_INTR_CTRL_T; 1347 1348 /** 1349 * IOMMU Reserved Register (MMIO). 1350 * In accordance with the AMD spec. 1351 * This register is reserved for hardware use (although RW?). 1352 */ 1353 typedef uint64_t IOMMU_RSVD_REG_T; 1354 1355 /** 1356 * Command Buffer Head Pointer Register (MMIO). 1357 * In accordance with the AMD spec. 1358 */ 1359 typedef union 1360 { 1361 struct 1362 { 1363 uint32_t u4Rsvd0 : 4; /**< Bits 3:0 - Reserved. */ 1364 uint32_t u15Ptr : 15; /**< Bits 18:14 - Buffer pointer. */ 1365 uint32_t u13Rsvd0 : 13; /**< Bits 31:19 - Reserved. */ 1366 uint32_t u32Rsvd0; /**< Bits 63:32 - Reserved. */ 1367 } n; 1368 /** The 32-bit unsigned integer view. */ 1369 uint32_t au32[2]; 1370 /** The 64-bit unsigned integer view. */ 1371 uint64_t u64; 1372 } CMD_BUF_HEAD_PTR_T; 1373 AssertCompileSize(CMD_BUF_HEAD_PTR_T, 8); 1374 1375 /** 1376 * Command Buffer Tail Pointer Register (MMIO). 1377 * In accordance with the AMD spec. 1378 * Currently identical to CMD_BUF_HEAD_PTR_T. 1379 */ 1380 typedef CMD_BUF_HEAD_PTR_T CMD_BUF_TAIL_PTR_T; 1381 1382 /** 1383 * Event Log Head Pointer Register (MMIO). 1384 * In accordance with the AMD spec. 1385 * Currently identical to CMD_BUF_HEAD_PTR_T. 1386 */ 1387 typedef CMD_BUF_HEAD_PTR_T EVT_LOG_HEAD_PTR_T; 1388 1389 /** 1390 * Event Log Tail Pointer Register (MMIO). 1391 * In accordance with the AMD spec. 1392 * Currently identical to CMD_BUF_HEAD_PTR_T. 1393 */ 1394 typedef CMD_BUF_HEAD_PTR_T EVT_LOG_TAIL_PTR_T; 1395 1396 /** 1397 * IOMMU Status Register (MMIO). 1398 * In accordance with the AMD spec. 1399 */ 1400 typedef union 1401 { 1402 struct 1403 { 1404 uint32_t u1EvtOverflow : 1; /**< Bit 0 - EventOverflow: Event log overflow. */ 1405 uint32_t u1EvtLogIntr : 1; /**< Bit 1 - EventLogInt: Event log interrupt. */ 1406 uint32_t u1CompWaitIntr : 1; /**< Bit 2 - ComWaitInt: Completion wait interrupt . */ 1407 uint32_t u1EvtLogRunning : 1; /**< Bit 3 - EventLogRun: Event logging is running. */ 1408 uint32_t u1CmdBufRunning : 1; /**< Bit 4 - CmdBufRun: Command buffer is running. */ 1409 uint32_t u1PprOverflow : 1; /**< Bit 5 - PprOverflow: Peripheral Page Request Log (PPR) overflow. */ 1410 uint32_t u1PprIntr : 1; /**< Bit 6 - PprInt: PPR interrupt. */ 1411 uint32_t u1PprLogRunning : 1; /**< Bit 7 - PprLogRun: PPR logging is running. */ 1412 uint32_t u1GstLogRunning : 1; /**< Bit 8 - GALogRun: Guest virtual-APIC logging is running. */ 1413 uint32_t u1GstLogOverflow : 1; /**< Bit 9 - GALOverflow: Guest virtual-APIC log overflow. */ 1414 uint32_t u1GstLogIntr : 1; /**< Bit 10 - GAInt: Guest virtual-APIC log interrupt. */ 1415 uint32_t u1PprOverflowB : 1; /**< Bit 11 - PprOverflowB: PPR log B overflow. */ 1416 uint32_t u1PprLogActive : 1; /**< Bit 12 - PprLogActive: PPR log A is active. */ 1417 uint32_t u2Rsvd0 : 2; /**< Bits 14:13 - Reserved. */ 1418 uint32_t u1EvtOverflowB : 1; /**< Bit 15 - EvtOverflowB: Event log B overflow. */ 1419 uint32_t u1EvtLogActive : 1; /**< Bit 16 - EvtLogActive: Event log A active. */ 1420 uint32_t u1PprOverflowEarlyB : 1; /**< Bit 17 - PprOverflowEarlyB: PPR log B overflow early warning. */ 1421 uint32_t u1PprOverflowEarly : 1; /**< Bit 18 - PprOverflowEarly: PPR log overflow early warning. */ 1422 uint32_t u13Rsvd0 : 13; /**< Bits 31:19 - Reserved. */ 1423 uint32_t u32Rsvd0; /**< Bits 63:32 - Reserved . */ 1424 } n; 1425 /** The 32-bit unsigned integer view. */ 1426 uint32_t au32[2]; 1427 /** The 64-bit unsigned integer view. */ 1428 uint64_t u64; 1429 } IOMMU_STATUS_T; 1430 AssertCompileSize(IOMMU_STATUS_T, 8); 1431 1432 /** 1433 * PPR Log Head Pointer Register (MMIO). 1434 * In accordance with the AMD spec. 1435 * Currently identical to CMD_BUF_HEAD_PTR_T. 1436 */ 1437 typedef CMD_BUF_HEAD_PTR_T PPR_LOG_HEAD_PTR_T; 1438 1439 /** 1440 * PPR Log Tail Pointer Register (MMIO). 1441 * In accordance with the AMD spec. 1442 * Currently identical to CMD_BUF_HEAD_PTR_T. 1443 */ 1444 typedef CMD_BUF_HEAD_PTR_T PPR_LOG_TAIL_PTR_T; 1270 1445 1271 1446 … … 1317 1492 MSI_ADDR_T MsiAddr; /**< MSI Address register.*/ 1318 1493 MSI_DATA_T MsiData; /**< MSI Data register. */ 1319 MSI_MAP_CAP_HDR_T MsiMapCapHdr; /**< MSI Mapping Capability Header register. */ 1494 MSI_MAP_CAP_HDR_T MsiMapCapHdr; /**< MSI Capping capability header register. */ 1495 /** @} */ 1496 1497 /** @name MMIO: Performance Optimization Control registers. 1498 * @{ */ 1499 IOMMU_PERF_OPT_CTRL_T IommuPerfOptCtrl; /**< IOMMU Performance optimization control register. */ 1500 /** @} */ 1501 1502 /** @name MMIO: x2APIC Control registers. 1503 * @{ */ 1504 IOMMU_XT_GEN_INTR_CTRL_T IommuXtGenIntrCtrl; /**< IOMMU X2APIC General interrupt control register. */ 1505 IOMMU_XT_PPR_INTR_CTRL_T IommuXtPprIntrCtrl; /**< IOMMU X2APIC PPR interrupt control register. */ 1506 IOMMU_XT_GALOG_INTR_CTRL_T IommuXtGALogIntrCtrl; /**< IOMMU X2APIC Guest Log interrupt control register. */ 1507 /** @} */ 1508 1509 /** @name MMIO: Reserved register. 1510 * @{ */ 1511 IOMMU_RSVD_REG_T IommuRsvdReg; /**< IOMMU Reserved Register. */ 1512 /** @} */ 1513 1514 /** @name MMIO: Command and Event Log registers. 1515 * @{ */ 1516 CMD_BUF_HEAD_PTR_T CmdBufHeadPtr; /**< Command buffer head pointer register. */ 1517 CMD_BUF_TAIL_PTR_T CmdBufTailPtr; /**< Command buffer tail pointer register. */ 1518 EVT_LOG_HEAD_PTR_T EvtLogHeadPtr; /**< Event log head pointer register. */ 1519 EVT_LOG_TAIL_PTR_T EvtLogTailPtr; /**< Event log tail pointer register. */ 1520 /** @} */ 1521 1522 /** @name MMIO: Command Event status register. 1523 * @{ */ 1524 IOMMU_STATUS_T IommuStatus; /**< IOMMU status register. */ 1525 /** @} */ 1526 1527 /** @name MMIO: PPR Log Head and Tail Pointer registers. 1528 * @{ */ 1529 PPR_LOG_HEAD_PTR_T PprLogHeadPtr; /**< IOMMU PPR log head pointer register. */ 1530 PPR_LOG_TAIL_PTR_T PprLogTailPtr; /**< IOMMU PPR log tail pointer register. */ 1320 1531 /** @} */ 1321 1532 } IOMMU;
Note:
See TracChangeset
for help on using the changeset viewer.