- Timestamp:
- Mar 5, 2015 3:17:54 PM (10 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bootsector2-test1-template.mac
r53625 r54653 157 157 db TMPL_MODE_STR, ', RDTSC', 0 158 158 ENDPROC TMPL_NM(BenchmarkRdTsc_rm) 159 160 TMPL_BEGINCODE 161 BITS TMPL_BITS 162 163 164 ;; 165 ; Run the Read CR4 benchmark for this mode. 166 ; 167 ; @uses nothing 168 ; 169 BEGINCODELOW 170 BITS 16 171 BEGINPROC TMPL_NM(BenchmarkRdCr4_rm) 172 call TMPL_NM(Bs2IsModeSupported_rm) 173 jz .done 174 call TMPL_NM(Bs2EnterMode_rm) 175 BITS TMPL_BITS 176 push xBP 177 mov xBP, xSP 178 push sAX 179 push sBX 180 push sCX 181 push sDX 182 push sDI 183 sub sSP, 20h 184 185 ; Get the current time. 186 mov xAX, xSP 187 call TMPL_NM_CMN(GetNanoTS) 188 189 ; Do the test. 190 mov edi, TEST_INSTRUCTION_COUNT_READCR4 / 4 191 .again: 192 mov sAX, cr4 193 mov sAX, cr4 194 mov sAX, cr4 195 mov sAX, cr4 196 dec edi 197 jnz .again 198 199 ; Calc the elapsed time and report the result. 200 mov xAX, xSP 201 call TMPL_NM_CMN(GetElapsedNanoTS) 202 203 mov xCX, .s_szTestName 204 mov edx, TEST_INSTRUCTION_COUNT_READCR4 205 mov xAX, xSP 206 call TMPL_NM_CMN(ReportResult) 207 208 add sSP, 20h 209 pop sDI 210 pop sDX 211 pop sCX 212 pop sBX 213 pop sAX 214 leave 215 216 call TMPL_NM(Bs2ExitMode) 217 BITS 16 218 .done: 219 ret 220 221 .s_szTestName: 222 db TMPL_MODE_STR, ', Read CR4', 0 223 ENDPROC TMPL_NM(BenchmarkRdCr4_rm) 159 224 160 225 TMPL_BEGINCODE -
trunk/src/VBox/ValidationKit/bootsectors/bootsector2-test1.asm
r53195 r54653 37 37 ;; The number of RDTSC instructions to test. 38 38 %define TEST_INSTRUCTION_COUNT_RDTSC 4000000 39 40 ;; The number of RDTSC instructions to test. 41 %define TEST_INSTRUCTION_COUNT_READCR4 1000000 39 42 40 43 ;; The number of instructions to test. … … 93 96 94 97 ; 98 ; Read CR4 99 ; 100 mov ax, .s_szTstRdCr4 101 call TestSub_r86 102 call BenchmarkRdCr4_rm_pp32 103 call BenchmarkRdCr4_rm_pae32 104 call BenchmarkRdCr4_rm_lm64 105 call BenchmarkRdCr4_rm_pe16 106 call BenchmarkRdCr4_rm_pe32 107 call BenchmarkRdCr4_rm_rm 108 109 ; 95 110 ; I/O port access. 96 111 ; … … 128 143 .s_szTstRdTsc: 129 144 db 'RDTSC', 0 145 .s_szTstRdCr4: 146 db 'Read CR4', 0 130 147 .s_szTstNopIoPort: 131 148 db 'NOP I/O Port Access', 0
Note:
See TracChangeset
for help on using the changeset viewer.