Changeset 20534 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jun 13, 2009 8:58:04 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/VMMR0A.asm
r19575 r20534 81 81 jz .entry_error 82 82 %ifdef VBOX_STRICT 83 mov edx, esi 84 mov edi, esi 85 mov ecx, 2048 86 mov eax, 0eeeeeeeeh 83 cmp dword [esi], 0h 84 jne .entry_error 85 mov edx, esi 86 mov edi, esi 87 mov ecx, 2048 88 mov eax, 0eeeeeeeeh 87 89 repne stosd 88 90 %endif … … 101 103 and dword [esi + 1ch], byte 0 ; clear marker. 102 104 105 %ifdef VBOX_STRICT 106 mov esi, [ebx + VMMR0JMPBUF.pvSavedStack] 107 cmp [esi], 0eeeeeeeeh ; Check for stack overflow 108 jne .stack_overflow 109 cmp [esi + 04h], 0eeeeeeeeh 110 jne .stack_overflow 111 cmp [esi + 08h], 0eeeeeeeeh 112 jne .stack_overflow 113 cmp [esi + 0ch], 0eeeeeeeeh 114 jne .stack_overflow 115 cmp [esi + 10h], 0eeeeeeeeh 116 jne .stack_overflow 117 cmp [esi + 20h], 0eeeeeeeeh 118 jne .stack_overflow 119 cmp [esi + 30h], 0eeeeeeeeh 120 jne .stack_overflow 121 mov dword [esi], 0h ; Reset the marker 122 %endif 123 103 124 %else ; !VMM_R0_SWITCH_STACK 104 125 mov ecx, [esp + 0ch] ; pvArg1 … … 129 150 jmp .proper_return 130 151 131 ; 132 ; Resume VMMR0CallHost the call. 133 ; 134 .resume: 135 %ifdef VMM_R0_SWITCH_STACK 136 ; Switch stack. 137 mov esp, [edx + VMMR0JMPBUF.SpResume] 138 %else ; !VMM_R0_SWITCH_STACK 139 ; Sanity checks. 140 cmp ecx, [edx + VMMR0JMPBUF.SpCheck] 141 je .espCheck_ok 152 .stack_overflow: 153 mov eax, VERR_INTERNAL_ERROR_5 154 jmp .proper_return 155 156 ; 157 ; Aborting resume. 158 ; 142 159 .bad: 143 160 and dword [edx + VMMR0JMPBUF.eip], byte 0 ; used for valid check. … … 148 165 ret 149 166 167 ; 168 ; Resume VMMR0CallHost the call. 169 ; 170 .resume: 171 ; Sanity checks. 172 %ifdef VMM_R0_SWITCH_STACK 173 mov eax, [edx + VMMR0JMPBUF.pvSavedStack] 174 %ifdef RT_STRICT 175 cmp dword [eax], 0eeeeeeeeh 176 %endif 177 lea eax, [eax + 8192 - 32] 178 cmp dword [eax + 1ch], 0deadbeefh ; Marker 1. 179 jne .bad 180 %ifdef RT_STRICT 181 cmp [esi + 18h], edx ; The saved pJmpBuf pointer. 182 jne .bad 183 cmp dword [esi + 14h], 00c00ffeeh ; Marker 2. 184 jne .bad 185 cmp dword [esi + 10h], 0f00dbeefh ; Marker 3. 186 jne .bad 187 %endif 188 %else ; !VMM_R0_SWITCH_STACK 189 cmp ecx, [edx + VMMR0JMPBUF.SpCheck] 190 jne .bad 150 191 .espCheck_ok: 151 192 mov ecx, [edx + VMMR0JMPBUF.cbSavedStack] … … 158 199 cmp ecx, edi 159 200 jne .bad 160 161 ; 201 %endif 202 203 %ifdef VMM_R0_SWITCH_STACK 204 ; Switch stack. 205 mov esp, [edx + VMMR0JMPBUF.SpResume] 206 %else 162 207 ; Restore the stack. 163 ;164 208 mov ecx, [edx + VMMR0JMPBUF.cbSavedStack] 165 209 shr ecx, 2 … … 171 215 mov byte [edx + VMMR0JMPBUF.fInRing3Call], 0 172 216 173 ;174 217 ; Continue where we left off. 175 ;176 218 %ifdef VBOX_STRICT 177 219 pop eax ; magic … … 235 277 jz .entry_error 236 278 %ifdef VBOX_STRICT 279 cmp dword [r15], 0h 280 jne .entry_error 237 281 mov rdi, r15 238 282 mov rcx, 1024 … … 255 299 call r11 256 300 mov rdx, r12 ; Restore pJmpBuf 301 302 %ifdef VMM_R0_SWITCH_STACK 303 %ifdef VBOX_STRICT 304 mov r15, [rdx + VMMR0JMPBUF.pvSavedStack] 305 mov dword [r15], 0h ; Reset the marker 306 %endif 307 %endif 257 308 258 309 ;
Note:
See TracChangeset
for help on using the changeset viewer.