search for: test_amd

Displaying 1 result from an estimated 1 matches for "test_amd".

Did you mean: test_ad
2007 Jan 04
2
Automatically choose between 32-bit and 64-bit kernel
...ax + popfd ; Restore the original flags + xor eax,ebx + jz is_32bit +; +; Now check for the 64-bit flag in the CPU features byte ($0000_0001, edx) +; This is bit 30 for Intel CPUs, and bit 29 for AMD CPUs +; + mov eax, 00000000h ; Find last Intel cpuid # + cpuid + cmp eax, 00000000h + je test_amd + mov eax, 00000001h ; Read Intel CPU flags + cpuid + bt edx, 30 ; 64-bit if bit 30 is set + jc is_64bit + +test_amd: mov eax, 80000000h ; Find last AMD cpuid # + cpuid + cmp eax, 80000000h + jbe is_32bit + mov eax, 80000001h ; Read AMD CPU flags + cpuid + bt edx, 29 ; 64-bit if bi...