Rev 3908 | Rev 4287 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3908 | Rev 4265 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | ;; Distributed under GPL. See file COPYING for details. ;; |
9 | ;; Distributed under GPL. See file COPYING for details. ;; |
10 | ;; Copyright 2003 Ville Turjanmaa ;; |
10 | ;; Copyright 2003 Ville Turjanmaa ;; |
11 | ;; ;; |
11 | ;; ;; |
12 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
12 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 13... | Line 13... | ||
13 | 13 | ||
Line 14... | Line 14... | ||
14 | $Revision: 3908 $ |
14 | $Revision: 4265 $ |
15 | 15 | ||
16 | align 4 ;3A08 |
16 | align 4 ;3A08 |
17 | build_interrupt_table: |
17 | build_interrupt_table: |
Line 245... | Line 245... | ||
245 | @@: |
245 | @@: |
246 | DEBUGF 1, "K : EAX : %x EBX : %x ECX : %x\n", [reg_eax+4], [reg_ebx+4], [reg_ecx+4] |
246 | DEBUGF 1, "K : EAX : %x EBX : %x ECX : %x\n", [reg_eax+4], [reg_ebx+4], [reg_ecx+4] |
247 | DEBUGF 1, "K : EDX : %x ESI : %x EDI : %x\n", [reg_edx+4], [reg_esi+4], [reg_edi+4] |
247 | DEBUGF 1, "K : EDX : %x ESI : %x EDI : %x\n", [reg_edx+4], [reg_esi+4], [reg_edi+4] |
248 | DEBUGF 1, "K : EBP : %x EIP : %x ESP : %x\n", [reg_ebp+4], [reg_eip+4], ebx |
248 | DEBUGF 1, "K : EBP : %x EIP : %x ESP : %x\n", [reg_ebp+4], [reg_eip+4], ebx |
249 | DEBUGF 1, "K : Flags : %x CS : %x (%s)\n", [reg_eflags+4], eax, edi |
249 | DEBUGF 1, "K : Flags : %x CS : %x (%s)\n", [reg_eflags+4], eax, edi |
- | 250 | ||
- | 251 | DEBUGF 1, "K : Stack dump:\n" |
|
- | 252 | push eax ebx ecx edx |
|
- | 253 | call .check_ESP |
|
- | 254 | test eax, eax |
|
- | 255 | jnz .error_ESP |
|
- | 256 | DEBUGF 1, "K : [ESP+00]: %x",[ebx] |
|
- | 257 | add ebx, 4 |
|
- | 258 | call .check_ESP |
|
- | 259 | test eax, eax |
|
- | 260 | jnz .error_ESP |
|
- | 261 | DEBUGF 1, " [ESP+04]: %x",[ebx] |
|
- | 262 | add ebx, 4 |
|
- | 263 | call .check_ESP |
|
- | 264 | test eax, eax |
|
- | 265 | jnz .error_ESP |
|
- | 266 | DEBUGF 1, " [ESP+08]: %x\n",[ebx] |
|
- | 267 | add ebx, 4 |
|
- | 268 | call .check_ESP |
|
- | 269 | test eax, eax |
|
- | 270 | jnz .error_ESP |
|
- | 271 | DEBUGF 1, "K : [ESP+12]: %x",[ebx] |
|
- | 272 | add ebx, 4 |
|
- | 273 | call .check_ESP |
|
- | 274 | test eax, eax |
|
- | 275 | jnz .error_ESP |
|
- | 276 | DEBUGF 1, " [ESP+16]: %x",[ebx] |
|
- | 277 | add ebx, 4 |
|
- | 278 | call .check_ESP |
|
- | 279 | test eax, eax |
|
- | 280 | jnz .error_ESP |
|
- | 281 | DEBUGF 1, " [ESP+20]: %x\n",[ebx] |
|
- | 282 | add ebx, 4 |
|
- | 283 | call .check_ESP |
|
- | 284 | test eax, eax |
|
- | 285 | jnz .error_ESP |
|
- | 286 | DEBUGF 1, "K : [ESP+24]: %x",[ebx] |
|
- | 287 | add ebx, 4 |
|
- | 288 | call .check_ESP |
|
- | 289 | test eax, eax |
|
- | 290 | jnz .error_ESP |
|
- | 291 | DEBUGF 1, " [ESP+28]: %x",[ebx] |
|
- | 292 | add ebx, 4 |
|
- | 293 | call .check_ESP |
|
- | 294 | test eax, eax |
|
- | 295 | jnz .error_ESP |
|
- | 296 | DEBUGF 1, " [ESP+32]: %x\n",[ebx] |
|
- | 297 | pop edx ecx ebx eax |
|
- | 298 | ret |
|
- | 299 | .error_ESP: |
|
- | 300 | pop edx ecx ebx eax |
|
- | 301 | DEBUGF 1, "\n" |
|
- | 302 | DEBUGF 1, "K : Unexpected end of the stack\n" |
|
- | 303 | ret |
|
- | 304 | ;-------------------------------------- |
|
- | 305 | .check_ESP: |
|
- | 306 | push ebx |
|
- | 307 | shr ebx, 12 |
|
- | 308 | mov ecx, ebx |
|
- | 309 | shr ecx, 10 |
|
- | 310 | mov edx, [master_tab+ecx*4] |
|
- | 311 | test edx, PG_MAP |
|
- | 312 | jz .fail ;page table is not created |
|
- | 313 | ;incorrect address in the program |
|
- | 314 | ||
- | 315 | mov eax, [page_tabs+ebx*4] |
|
- | 316 | test eax, 2 |
|
- | 317 | jz .fail ;address not reserved for use. error |
|
- | 318 | ||
- | 319 | pop ebx |
|
- | 320 | xor eax, eax |
|
- | 321 | ret |
|
- | 322 | ||
- | 323 | .fail: |
|
- | 324 | pop ebx |
|
- | 325 | xor eax, eax |
|
- | 326 | dec eax |
|
250 | ret |
327 | ret |
251 | ;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
328 | ;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
Line 252... | Line 329... | ||
252 | 329 | ||
253 | restore reg_ss |
330 | restore reg_ss |