search for: is_64bit

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

Did you mean: is64bit
2007 Jan 04
2
Automatically choose between 32-bit and 64-bit kernel
...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 bit 29 is set + jnc is_32bit + +is_64bit: mov byte [Is64Bit],1 ; Flag that we're 64-bit +is_32bit: diff -ur...