Rev 4429 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4429 | Rev 4923 | ||
---|---|---|---|
Line 352... | Line 352... | ||
352 | 352 | ||
353 | xor eax, eax |
353 | xor eax, eax |
354 | mov [cpu_type], eax |
354 | mov [cpu_type], eax |
355 | mov [cpu_caps-OS_BASE], eax |
355 | mov [cpu_caps-OS_BASE], eax |
- | 356 | mov [cpu_caps+4-OS_BASE], eax |
|
Line 356... | Line 357... | ||
356 | mov [cpu_caps+4-OS_BASE], eax |
357 | mov [cpu_phys_addr_width-OS_BASE], 32 |
357 | 358 | ||
358 | pushfd |
359 | pushfd |
359 | pop eax |
360 | pop eax |
Line 376... | Line 377... | ||
376 | popfd |
377 | popfd |
377 | pushfd |
378 | pushfd |
378 | pop eax |
379 | pop eax |
379 | xor eax, ecx |
380 | xor eax, ecx |
380 | je .end_cpuid |
381 | je .end_cpuid |
381 | mov [cpu_id], 1 |
- | |
Line 382... | Line 382... | ||
382 | 382 | ||
383 | xor eax, eax |
383 | xor eax, eax |
Line 384... | Line 384... | ||
384 | cpuid |
384 | cpuid |
Line 400... | Line 400... | ||
400 | mov [cpu_sign-OS_BASE], eax |
400 | mov [cpu_sign-OS_BASE], eax |
401 | mov [cpu_info-OS_BASE], ebx |
401 | mov [cpu_info-OS_BASE], ebx |
402 | mov [cpu_caps-OS_BASE], edx |
402 | mov [cpu_caps-OS_BASE], edx |
403 | mov [cpu_caps+4-OS_BASE], ecx |
403 | mov [cpu_caps+4-OS_BASE], ecx |
Line -... | Line 404... | ||
- | 404 | ||
- | 405 | bt edx, CAPS_PAE |
|
- | 406 | jnc @f |
|
- | 407 | mov [cpu_phys_addr_width-OS_BASE], 36 |
|
- | 408 | @@: |
|
- | 409 | mov eax, 0x80000000 |
|
- | 410 | cpuid |
|
- | 411 | cmp eax, 0x80000008 |
|
- | 412 | jb @f |
|
- | 413 | mov eax, 0x80000008 |
|
- | 414 | cpuid |
|
- | 415 | mov [cpu_phys_addr_width-OS_BASE], al |
|
- | 416 | @@: |
|
- | 417 | ||
404 | 418 | mov eax, [cpu_sign-OS_BASE] |
|
405 | shr eax, 8 |
419 | shr eax, 8 |
406 | and eax, 0x0f |
420 | and eax, 0x0f |
407 | ret |
421 | ret |
408 | .end_cpuid: |
422 | .end_cpuid: |