Changeset 108427 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Mar 4, 2025 8:21:36 AM (2 months ago)
- svn:sync-xref-src-repo-rev:
- 167801
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/GICInternal.h
r108412 r108427 71 71 #define GIC_SPI_MAX 32 72 72 73 /** @def GIC_CACHE_LINE_SIZE 74 * Padding (in bytes) for aligning data in different cache lines. The ARMv8 cache 75 * line size is 64 bytes. 76 * 77 * See ARM spec "Cache Size ID Register, CCSIDR_EL1". 78 */ 79 #define GIC_CACHE_LINE_SIZE 64 80 81 #if 1 82 /** 83 * GIC Interrupt-Delivery Bitmap (IDB). 84 */ 85 typedef struct GICIDB 86 { 87 uint64_t volatile au64IntIdBitmap[33]; 88 uint32_t volatile fOutstandingNotification; 89 uint8_t abAlignment[52]; 90 } GICIDB; 91 AssertCompileMemberOffset(GICIDB, fOutstandingNotification, 264); 92 AssertCompileSizeAlignment(GICIDB, GIC_CACHE_LINE_SIZE); 93 /** Pointer to a pending-interrupt bitmap. */ 94 typedef GICIDB *PGICIDB; 95 /** Pointer to a const pending-interrupt bitmap. */ 96 typedef const GICIDB *PCGICIDB; 97 #endif 98 73 99 /** 74 100 * GIC PDM instance data (per-VM). … … 81 107 IOMMMIOHANDLE hMmioReDist; 82 108 109 /** @name Distributor register state for SPIs and extended SPIs. 110 * @{ 111 */ 112 #if 1 113 /** Interrupt group bitmap. */ 114 uint32_t bmIntrGroup[64]; 115 /** Interrupt config bitmap (edge-triggered vs level-sensitive). */ 116 uint32_t bmIntrConfig[128]; 117 /** Interrupt enabled bitmap. */ 118 uint32_t bmIntrEnabled[64]; 119 /** Interrupt pending bitmap. */ 120 uint32_t bmIntrPending[64]; 121 /** Interrupt active bitmap. */ 122 uint32_t bmIntrActive[64]; 123 /** Interrupt priorities. */ 124 uint8_t abIntrPriority[2048]; 125 /** Interrupt routing info. */ 126 uint32_t au32IntrRouting[2048]; 127 /** Interrupt routine mode bitmap. */ 128 uint32_t bmIntrRoutingMode[64]; 129 130 /** Flag whether group 0 interrupts are enabled. */ 131 bool fIrqGrp0Enabled; 132 /** Flag whether group 1 interrupts are enabled. */ 133 bool fIrqGrp1Enabled; 134 /** Flag whether affinity routing is enabled. */ 135 bool fAffRoutingEnabled; 136 /** Padding. */ 137 bool afPadding; 138 /** @} */ 139 #else 83 140 /** @name SPI distributor register state. 84 141 * @{ */ … … 105 162 volatile bool fIrqGrp1Enabled; 106 163 /** @} */ 164 #endif 107 165 108 166 /** @name Configurables. 109 167 * @{ */ 168 /** The maximum SPI supported (GICD_TYPER.ItsLinesNumber). */ 169 uint16_t uMaxSpi; 170 /** Maximum extended SPI supported (GICR_TYPER.ESPI_range). */ 171 uint16_t uMaxExtSpi; 110 172 /** The GIC architecture (GICD_PIDR2.ArchRev and GICR_PIDR2.ArchRev). */ 111 173 uint8_t uArchRev; … … 116 178 /** Whether NMIs are supported (GICD_TYPER.NMI). */ 117 179 bool fNmi; 118 /** The maximum SPI supported (GICD_TYPER.ItsLinesNumber). */ 119 uint16_t uMaxSpi; 120 /** Maximum extended SPI supported (GICR_TYPER.ESPI_range). */ 121 uint16_t uMaxExtSpi; 180 /** Whether range-selector is supported (GICD_TYPER.RSS and ICC_CTLR_EL1.RSS). */ 181 bool fRangeSelSupport; 122 182 /** @} */ 123 183 } GICDEV; … … 157 217 /** @name SGI and PPI redistributor register state. 158 218 * @{ */ 219 #if 1 220 /** Interrupt group bitmap. */ 221 uint32_t bmIntrGroup[3]; 222 /** Interrupt config bitmap (edge-triggered vs level-sensitive). */ 223 uint32_t bmIntrConfig[6]; 224 /** Interrupt enabled bitmap. */ 225 uint32_t bmIntrEnabled[3]; 226 /** Interrupt pending bitmap. */ 227 uint32_t bmIntrPending[3]; 228 /** Interrupt active bitmap. */ 229 uint32_t bmIntrActive[3]; 230 /** Interrupt priorities. */ 231 uint8_t abIntrPriority[96]; 232 /** Flag indicating register write pending (GICR_CTLR.RWP). */ 233 bool fRegWritePending; 234 #else 159 235 /** Interrupt Group 0 Register. */ 160 236 volatile uint32_t u32RegIGrp0; … … 171 247 /** The interrupt priority for each of the SGI/PPIs */ 172 248 volatile uint8_t abIntPriority[GIC_INTID_RANGE_PPI_LAST + 1]; 249 #endif 173 250 /** @} */ 174 251 175 252 /** @name ICC system register state. 176 253 * @{ */ 254 /** The control register (ICC_CTLR_EL1). */ 255 uint64_t uIccCtlr; 177 256 /** Flag whether group 0 interrupts are currently enabled. */ 178 volatile boolfIrqGrp0Enabled;257 bool fIrqGrp0Enabled; 179 258 /** Flag whether group 1 interrupts are currently enabled. */ 180 volatile boolfIrqGrp1Enabled;259 bool fIrqGrp1Enabled; 181 260 /** The current interrupt priority, only interrupts with a higher priority get signalled. */ 182 volatile uint8_tbInterruptPriority;261 uint8_t bInterruptPriority; 183 262 /** The interrupt controller Binary Point Register for Group 0 interrupts. */ 184 263 uint8_t bBinaryPointGrp0; … … 186 265 uint8_t bBinaryPointGrp1; 187 266 /** The running priorities caused by preemption. */ 188 volatile uint8_tabRunningPriorities[256];267 uint8_t abRunningPriorities[256]; 189 268 /** The index to the current running priority. */ 190 volatile uint8_tidxRunningPriority;269 uint8_t idxRunningPriority; 191 270 /** @} */ 192 271 … … 235 314 DECL_HIDDEN_CALLBACK(VBOXSTRICTRC) gicReDistMmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS off, void const *pv, unsigned cb); 236 315 237 DECLHIDDEN(void) gicResetCpu(PVMCPUCC pVCpu); 316 DECLHIDDEN(void) gicResetCpu(PPDMDEVINS pDevIns, PVMCPUCC pVCpu); 317 DECLHIDDEN(void) gicReset(PPDMDEVINS pDevIns); 318 DECLHIDDEN(uint16_t) gicReDistGetIntIdFromIndex(uint16_t idxIntr); 319 DECLHIDDEN(uint16_t) gicDistGetIntIdFromIndex(uint16_t idxIntr); 238 320 239 321 DECLCALLBACK(int) gicR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg);
Note:
See TracChangeset
for help on using the changeset viewer.