- Timestamp:
- Mar 5, 2025 10:43:28 AM (2 months ago)
- svn:sync-xref-src-repo-rev:
- 167824
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/GICAll.cpp
r108449 r108450 1095 1095 { 1096 1096 Assert(idxReg < RT_ELEMENTS(pGicDev->bmIntrConfig)); 1097 pGicDev->bmIntrConfig[idxReg] = uValue ;1097 pGicDev->bmIntrConfig[idxReg] = uValue & 0xaaaaaaaa; 1098 1098 } 1099 1099 else … … 1391 1391 /* When affinity routing is disabled, reads return 0. */ 1392 1392 Assert(pGicDev->fAffRoutingEnabled); RT_NOREF(pGicDev); 1393 if (idxReg > 0) 1394 { 1395 Assert(idxReg < RT_ELEMENTS(pGicCpu->bmIntrConfig)); 1396 *puValue = pGicCpu->bmIntrConfig[idxReg]; 1397 } 1398 else 1399 { 1400 /* SGIs are read-only and are always edge-triggered. */ 1401 *puValue = 0xaaaaaaaa; 1402 } 1393 Assert(idxReg < RT_ELEMENTS(pGicCpu->bmIntrConfig)); 1394 *puValue = pGicCpu->bmIntrConfig[idxReg]; 1395 /* Ensure SGIs are read-only and remain configured as edge-triggered. */ 1396 Assert(idxReg > 0 || *puValue == 0xaaaaaaaa); 1403 1397 LogFlowFunc(("idxReg=%#x read %#x\n", idxReg, *puValue)); 1404 1398 return VINF_SUCCESS; … … 1423 1417 { 1424 1418 Assert(idxReg < RT_ELEMENTS(pGicCpu->bmIntrConfig)); 1425 pGicCpu->bmIntrConfig[idxReg] = uValue ;1419 pGicCpu->bmIntrConfig[idxReg] = uValue & 0xaaaaaaaa; 1426 1420 } 1427 1421 else 1428 1422 { 1429 /* SGIs are always edge triggered ignore writes, verify value on strict builds (e.g. aarch64 Win11writes this). */1423 /* SGIs are always edge-triggered ignore writes, verify value on strict builds (arm64 Win11 guests writes this). */ 1430 1424 Assert(uValue == 0xaaaaaaaa); 1431 1425 Assert(pGicCpu->bmIntrConfig[0] == uValue); … … 2019 2013 pGicCpu->abRunningPriorities[++pGicCpu->idxRunningPriority] = bPriority; 2020 2014 2021 /* Clear edge level interrupts like SGIs as pending. */ 2022 /** @todo do this for all edge-triggered? */ 2023 if (idxIntr <= GIC_INTID_RANGE_SGI_LAST) 2015 /* If it is an edge-triggered interrupt, mark it as no longer pending. */ 2016 AssertRelease(2 * idxIntr + 1 < sizeof(pGicCpu->bmIntrConfig) * 8); 2017 bool const fEdgeTriggered = ASMBitTest(&pGicCpu->bmIntrConfig[0], 2 * idxIntr + 1); 2018 if (fEdgeTriggered) 2024 2019 ASMBitClear(&pGicCpu->bmIntrPending[0], idxIntr); 2025 2020 … … 2047 2042 pGicCpu->idxRunningPriority, pGicCpu->idxRunningPriority + 1)); 2048 2043 pGicCpu->abRunningPriorities[++pGicCpu->idxRunningPriority] = bPriority; 2044 2045 /* If it is an edge-triggered interrupt, mark it as no longer pending. */ 2046 AssertRelease(2 * idxIntr + 1 < sizeof(pGicDev->bmIntrConfig) * 8); 2047 bool const fEdgeTriggered = ASMBitTest(&pGicDev->bmIntrConfig[0], 2 * idxIntr + 1); 2048 if (fEdgeTriggered) 2049 ASMBitClear(&pGicDev->bmIntrPending[0], idxIntr); 2049 2050 2050 2051 /* Update the distributor IRQ state to reflect change in active interrupt. */
Note:
See TracChangeset
for help on using the changeset viewer.