Changeset 64281 in vbox for trunk/include
- Timestamp:
- Oct 15, 2016 4:46:29 PM (8 years ago)
- Location:
- trunk/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r64255 r64281 272 272 /** CPU group number (always zero, except on windows). */ 273 273 uint16_t iCpuGroup; 274 /** CPU group number (same as iCpuSet, except on windows). */274 /** CPU group member number (same as iCpuSet, except on windows). */ 275 275 uint16_t iCpuGroupMember; 276 276 /** The APIC ID of this CPU. */ … … 289 289 typedef SUPGIPCPU *PSUPGIPCPU; 290 290 291 /** 292 * CPU group information. 293 * @remarks Windows only. 294 */ 295 typedef struct SUPGIPCPUGROUP 296 { 297 /** Current number of CPUs in this group. */ 298 uint16_t volatile cMembers; 299 /** Maximum number of CPUs in the group. */ 300 uint16_t cMaxMembers; 301 /** The CPU set index of the members. This table has cMaxMembers entries. 302 * @note For various reasons, entries from cMembers and up to cMaxMembers are 303 * may change as the host OS does set dynamic assignments during CPU 304 * hotplugging. */ 305 int16_t aiCpuSetIdxs[1]; 306 } SUPGIPCPUGROUP; 307 /** Pointer to a GIP CPU group structure. */ 308 typedef SUPGIPCPUGROUP *PSUPGIPCPUGROUP; 309 /** Pointer to a const GIP CPU group structure. */ 310 typedef SUPGIPCPUGROUP const *PCSUPGIPCPUGROUP; 291 311 292 312 /** … … 358 378 /** @} */ 359 379 380 /** @def SUPGIP_MAX_CPU_GROUPS 381 * Maximum number of CPU groups. */ 382 #if RTCPUSET_MAX_CPUS >= 256 383 # define SUPGIP_MAX_CPU_GROUPS 256 384 #else 385 # define SUPGIP_MAX_CPU_GROUPS 256 386 #endif 360 387 361 388 /** … … 419 446 /** CPU set index to CPU table index. */ 420 447 uint16_t aiCpuFromCpuSetIdx[RTCPUSET_MAX_CPUS]; 421 /** Table indexed by CPU group index to get the CPU set index of the first 422 * CPU. */ 423 uint16_t aiFirstCpuSetIdxFromCpuGroup[RTCPUSET_MAX_CPUS]; 448 /** Table indexed by CPU group to containing offsets to SUPGIPCPUGROUP 449 * structures, invalid entries are set to UINT16_MAX. The offsets are relative 450 * to the start of this structure. 451 * @note Windows only. The other hosts sets all entries to UINT16_MAX! */ 452 uint16_t aoffCpuGroup[SUPGIP_MAX_CPU_GROUPS]; 424 453 425 454 /** Array of per-cpu data. … … 450 479 * Upper 16 bits is the major version. Major version is only changed with 451 480 * incompatible changes in the GIP. */ 452 #define SUPGLOBALINFOPAGE_VERSION 0x000 70000481 #define SUPGLOBALINFOPAGE_VERSION 0x00080000 453 482 454 483 /** -
trunk/include/iprt/mangling.h
r64255 r64281 1303 1303 # define RTMpGetCurFrequency RT_MANGLER(RTMpGetCurFrequency) 1304 1304 # define RTMpGetDescription RT_MANGLER(RTMpGetDescription) 1305 # define RTMpGetCpuGroupCounts RT_MANGLER(RTMpGetCpuGroupCounts) 1306 # define RTMpGetMaxCpuGroupCount RT_MANGLER(RTMpGetMaxCpuGroupCount) 1305 1307 # define RTMpGetMaxCpuId RT_MANGLER(RTMpGetMaxCpuId) 1306 1308 # define RTMpGetMaxFrequency RT_MANGLER(RTMpGetMaxFrequency) … … 1326 1328 # define RTMpOnSpecific RT_MANGLER(RTMpOnSpecific) /* r0drv */ 1327 1329 # define RTMpPokeCpu RT_MANGLER(RTMpPokeCpu) /* r0drv */ 1330 # define RTMpSetIndexFromCpuGroupMember RT_MANGLER(RTMpSetIndexFromCpuGroupMember) 1328 1331 # define RTMsgError RT_MANGLER(RTMsgError) 1329 1332 # define RTMsgErrorExit RT_MANGLER(RTMsgErrorExit) -
trunk/include/iprt/mp.h
r62473 r64281 88 88 */ 89 89 RTDECL(RTCPUID) RTMpCpuIdFromSetIndex(int iCpu); 90 91 /** 92 * Translates an NT process group member to a CPU set index. 93 * 94 * @returns CPU set index, -1 if not valid. 95 * @param idxGroup The CPU group. 96 * @param idxMember The CPU group member number. 97 * 98 * @remarks Only available on Windows. 99 */ 100 RTDECL(int) RTMpSetIndexFromCpuGroupMember(uint32_t idxGroup, uint32_t idxMember); 101 102 /** 103 * Gets the member numbers for a CPU group. 104 * 105 * @returns Maximum number of group members. 106 * @param idxGroup The CPU group. 107 * @param pcActive Where to return the number of active members. 108 * 109 * @remarks Only available on Windows. 110 */ 111 RTDECL(uint32_t) RTMpGetCpuGroupCounts(uint32_t idxGroup, uint32_t *pcActive); 112 113 /** 114 * Get the maximum number of CPU groups. 115 * 116 * @returns Maximum number of CPU groups. 117 * 118 * @remarks Only available on Windows. 119 */ 120 RTDECL(uint32_t) RTMpGetMaxCpuGroupCount(void); 90 121 91 122 /** -
trunk/include/iprt/nt/nt.h
r64255 r64281 2454 2454 typedef ULONG (NTAPI *PFNKEQUERYMAXIMUMPROCESSORCOUNTEX)(USHORT GroupNumber); 2455 2455 typedef USHORT (NTAPI *PFNKEQUERYMAXIMUMGROUPCOUNT)(VOID); 2456 typedef ULONG (NTAPI *PFNKEQUERYACTIVEPROCESSORCOUNT)(KAFFINITY *pfActiveProcessors); 2457 typedef ULONG (NTAPI *PFNKEQUERYACTIVEPROCESSORCOUNTEX)(USHORT GroupNumber); 2456 2458 typedef NTSTATUS (NTAPI *PFNKEQUERYLOGICALPROCESSORRELATIONSHIP)(PROCESSOR_NUMBER *pProcNumber, 2457 2459 LOGICAL_PROCESSOR_RELATIONSHIP RelationShipType,
Note:
See TracChangeset
for help on using the changeset viewer.