]> Zhao Yanbai Git Server - minix.git/commitdiff
Hack to mask 1586 ('extended family') as 686
authorBen Gras <ben@minix3.org>
Wed, 5 Apr 2006 20:57:18 +0000 (20:57 +0000)
committerBen Gras <ben@minix3.org>
Wed, 5 Apr 2006 20:57:18 +0000 (20:57 +0000)
lib/i386/misc/getprocessor.s

index 3f6fe174c6b0d8e5cec07baa0b4b3031f857ba32..2b00a39b0a1d8ce999fcfee8a340793db17c452c 100755 (executable)
@@ -27,6 +27,10 @@ _getprocessor:
        .data1  0x0F, 0xA2      ! CPUID instruction tells the processor type
        andb    ah, 0x0F        ! Extract the family (5, 6, ...)
        movzxb  eax, ah
+       cmp     eax, 15         ! 15: extended family
+       jne     direct
+       mov     eax, 6          ! Make it 686
+direct:
        imul    eax, 100        ! 500, 600, ...
        add     eax, 86         ! 586, 686, ...
        mov     7*4(esp), eax   ! Pass eax through