Changeset 108877 in vbox
- Timestamp:
- Apr 8, 2025 7:42:07 AM (4 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168328
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/gic.h ¶
r108826 r108877 499 499 # define GIC_REDIST_REG_TYPER_VSGI_BIT 26 500 500 /** Bit 27 - 31 - Indicates the maximum PPI INTID that a GIC implementation can support. */ 501 # define GIC_REDIST_REG_TYPER_PPI_NUM ( RT_BIT_32(27) | RT_BIT_32(28) | RT_BIT_32(29) \502 | RT_BIT_32(30) | RT_BIT_32(31))503 # define GIC_REDIST_REG_TYPER_PPI_NUM_SET(a_PpiNum) (((a_PpiNum) << 27) & GIC_REDIST_REG_TYPER_PPI_NUM)501 # define GIC_REDIST_REG_TYPER_PPI_NUM ( RT_BIT_32(27) | RT_BIT_32(28) | RT_BIT_32(29) \ 502 | RT_BIT_32(30) | RT_BIT_32(31)) 503 # define GIC_REDIST_REG_TYPER_PPI_NUM_SET(a_PpiNum) (((a_PpiNum) << 27) & GIC_REDIST_REG_TYPER_PPI_NUM) 504 504 /** Maximum PPI INTID is 31. */ 505 # define GIC_REDIST_REG_TYPER_PPI_NUM_MAX_31 0505 # define GIC_REDIST_REG_TYPER_PPI_NUM_MAX_31 0 506 506 /** Maximum PPI INTID is 1087. */ 507 # define GIC_REDIST_REG_TYPER_PPI_NUM_MAX_1087 1507 # define GIC_REDIST_REG_TYPER_PPI_NUM_MAX_1087 1 508 508 /** Maximum PPI INTID is 1119. */ 509 # define GIC_REDIST_REG_TYPER_PPI_NUM_MAX_1119 2 509 # define GIC_REDIST_REG_TYPER_PPI_NUM_MAX_1119 2 510 # define GIC_REDIST_REG_TYPER_CPU_NUMBER_MASK (GIC_REDIST_REG_TYPER_CPU_NUMBER >> 8) 510 511 511 512 /** Redistributor Type Register (the affinity value of the 64-bit register) - RO. */ 512 #define GIC_REDIST_REG_TYPER_AFFINITY_OFF 0x000c513 #define GIC_REDIST_REG_TYPER_AFFINITY_OFF 0x000c 513 514 /** Bit 0 - 31 - The identity of the PE associated with this Redistributor. */ 514 # define GIC_REDIST_REG_TYPER_AFFINITY_VALUE UINT32_C(0xffffffff)515 # define GIC_REDIST_REG_TYPER_AFFINITY_VALUE UINT32_C(0xffffffff) 515 516 # define GIC_REDIST_REG_TYPER_AFFINITY_VALUE_SET(a_Aff) ((a_Aff) & GIC_REDIST_REG_TYPER_AFFINITY_VALUE) 516 517 -
trunk/src/VBox/VMM/VMMAll/GITSAll.cpp ¶
r108872 r108877 65 65 #define GITS_CRIT_SECT_IS_OWNER(a_pDevIns) PDMDevHlpCritSectIsOwner((a_pDevIns), (a_pDevIns)->CTX_SUFF(pCritSectRo)) 66 66 67 /** GITS diagnostic enum description expansion. 68 * The below construct ensures typos in the input to this macro are caught 69 * during compile time. */ 70 #define GITSDIAG_DESC(a_Name) RT_CONCAT(kGitsDiag_, a_Name) < kGitsDiag_End ? RT_STR(a_Name) : "Ignored" 71 67 72 68 73 /********************************************************************************************************************************* … … 81 86 AssertCompileSize(GITSITE, 8); 82 87 83 /** GITS diagnostic enum description expansion. 84 * The below construct ensures typos in the input to this macro are caught 85 * during compile time. */ 86 #define GITSDIAG_DESC(a_Name) RT_CONCAT(kGitsDiag_, a_Name) < kGitsDiag_End ? RT_STR(a_Name) : "Ignored" 88 89 /********************************************************************************************************************************* 90 * Global Variables * 91 *********************************************************************************************************************************/ 87 92 /** GITS diagnostics description for members in GITSDIAG. */ 88 93 static const char *const g_apszGitsDiagDesc[] = … … 94 99 AssertCompile(RT_ELEMENTS(g_apszGitsDiagDesc) == kGitsDiag_End); 95 100 #undef GITSDIAG_DESC 96 97 98 /*********************************************************************************************************************************99 * Global Variables *100 *********************************************************************************************************************************/101 101 102 102 … … 420 420 pGitsDev->uCmdReadReg = 0; 421 421 pGitsDev->uCmdWriteReg = 0; 422 RT_ZERO(pGitsDev->auCt); 422 423 } 423 424 … … 571 572 { 572 573 Assert(!RT_BF_GET(pGitsDev->uTypeReg.u, GITS_BF_CTRL_REG_TYPER_PTA)); /* GITS_TYPER is read-only */ 573 /** @todo Implementing me. Figure out interrupt collection, HCC etc. */ 574 //uint64_t const uDw2 = pCmd->au64[2].u; 575 //bool const fValid = RT_BF_GET(uDw2, GITS_BF_CMD_MAPC_DW2_VALID); 576 //uint32_t const uTargetCpuId = RT_BF_GET(uDw2, GITS_BF_CMD_MAPC_DW2_RDBASE); 577 //uint16_t const uIntrCollectionId = RT_BF_GET(uDw2, GITS_BF_CMD_MAPC_DW2_IC_ID); 574 uint64_t const uDw2 = pCmd->au64[2].u; 575 bool const fValid = RT_BF_GET(uDw2, GITS_BF_CMD_MAPC_DW2_VALID); 576 uint32_t const uTargetCpuId = RT_BF_GET(uDw2, GITS_BF_CMD_MAPC_DW2_RDBASE); 577 uint16_t const uIntrCollectionId = RT_BF_GET(uDw2, GITS_BF_CMD_MAPC_DW2_IC_ID); 578 579 AssertRelease(uIntrCollectionId < RT_ELEMENTS(pGitsDev->auCt)); 580 pGitsDev->auCt[uIntrCollectionId].fValid = fValid; 581 pGitsDev->auCt[uIntrCollectionId].idTargetCpu = uTargetCpuId; 582 break; 583 } 584 585 case GITS_CMD_ID_SYNC: 586 { 587 /* Nothing to do since all previous commands have committed their changes to device state. */ 588 break; 589 } 590 591 case GITS_CMD_ID_INVALL: 592 { 593 /* Nothing to do as we currently do not cache interrupt mappings. */ 578 594 break; 579 595 } -
trunk/src/VBox/VMM/include/GITSInternal.h ¶
r108865 r108877 96 96 #endif 97 97 98 /** 99 * GITS Collection Table Entry (CTE). 100 */ 101 typedef struct GITSCTE 102 { 103 /** Whether this entry is valid. */ 104 bool fValid; 105 /** Alignment. */ 106 bool afPadding; 107 /** Target CPU ID (size based on GICR_TYPER.Processor_Number). */ 108 uint16_t idTargetCpu; 109 } GITSCTE; 110 /** Pointer to a GITS Collection Table Entry (CTE). */ 111 typedef GITSCTE *PGITSCTE; 112 /** Pointer to a const GITS Collection Table Entry (CTE). */ 113 typedef GITSCTE const *PCGITSCTE; 114 AssertCompileSize(GITSCTE, 4); 98 115 99 116 /** … … 136 153 /** @} */ 137 154 155 /** @name Tables. 156 * @{ 157 */ 158 /** The collection table. */ 159 GITSCTE auCt[2048]; 160 /** @} */ 161 138 162 /** @name Configurables. 139 163 * @{ */
Note:
See TracChangeset
for help on using the changeset viewer.