- Timestamp:
- Jun 16, 2021 6:01:27 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r89729 r89730 251 251 AssertCompileSize(DMARDIAG, 4); 252 252 253 #ifdef IN_RING3 253 254 /** DMAR diagnostic enum description expansion. 254 255 * The below construct ensures typos in the input to this macro are caught 255 256 * during compile time. */ 256 # define DMARDIAG_DESC(a_Name) RT_CONCAT(kDmarDiag_, a_Name) < kDmarDiag_End ? RT_STR(a_Name) : "Ignored"257 # define DMARDIAG_DESC(a_Name) RT_CONCAT(kDmarDiag_, a_Name) < kDmarDiag_End ? RT_STR(a_Name) : "Ignored" 257 258 258 259 /** DMAR diagnostics description for members in DMARDIAG. */ … … 319 320 }; 320 321 AssertCompile(RT_ELEMENTS(g_apszDmarDiagDesc) == kDmarDiag_End); 321 #undef DMARDIAG_DESC 322 # undef DMARDIAG_DESC 323 #endif /* IN_RING3 */ 322 324 323 325 /** … … 853 855 AssertCompile(sizeof(g_apbRw1cMasks) == sizeof(g_apbRwMasks)); 854 856 857 #ifdef IN_RING3 855 858 /** Array of valid domain-ID bits. */ 856 859 static uint16_t const g_auNdMask[] = { 0xf, 0x3f, 0xff, 0x3ff, 0xfff, 0x3fff, 0xffff, 0 }; 857 860 AssertCompile(RT_ELEMENTS(g_auNdMask) >= DMAR_ND); 861 #endif 858 862 859 863 860 864 #ifndef VBOX_DEVICE_STRUCT_TESTCASE 865 #ifdef IN_RING3 861 866 /** 862 867 * Returns the supported adjusted guest-address width (SAGAW) given the maximum … … 905 910 906 911 /** 912 * Returns table translation mode's descriptive name. 913 * 914 * @returns The descriptive name. 915 * @param uTtm The RTADDR_REG.TTM value. 916 */ 917 static const char* vtdRtaddrRegGetTtmDesc(uint8_t uTtm) 918 { 919 Assert(!(uTtm & 3)); 920 static const char* s_apszTtmNames[] = 921 { 922 "Legacy Mode", 923 "Scalable Mode", 924 "Reserved", 925 "Abort-DMA Mode" 926 }; 927 return s_apszTtmNames[uTtm & (RT_ELEMENTS(s_apszTtmNames) - 1)]; 928 } 929 #endif /* IN_RING3 */ 930 931 932 /** 907 933 * Returns whether the interrupt remapping (IR) fault is qualified or not. 908 934 * … … 923 949 return false; 924 950 } 925 }926 927 928 /**929 * Returns table translation mode's descriptive name.930 *931 * @returns The descriptive name.932 * @param uTtm The RTADDR_REG.TTM value.933 */934 static const char* vtdRtaddrRegGetTtmDesc(uint8_t uTtm)935 {936 Assert(!(uTtm & 3));937 static const char* s_apszTtmNames[] =938 {939 "Legacy Mode",940 "Scalable Mode",941 "Reserved",942 "Abort-DMA Mode"943 };944 return s_apszTtmNames[uTtm & (RT_ELEMENTS(s_apszTtmNames) - 1)];945 951 } 946 952
Note:
See TracChangeset
for help on using the changeset viewer.

