Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314558

Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers

From "H. Peter Anvin" <hpa@zytor.com>
Newsgroups linux.kernel
Subject Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers
Date 2016-01-21 23:00 +0100
Message-ID <qTvqO-2KT-7@gated-at.bofh.it> (permalink)
References (3 earlier) <qTuXL-2zU-1@gated-at.bofh.it> <qTuXM-2zU-11@gated-at.bofh.it> <qTv7r-2E4-13@gated-at.bofh.it> <qTv7r-2E4-11@gated-at.bofh.it> <qTvh7-2He-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On January 21, 2016 1:47:32 PM PST, Borislav Petkov <bp@alien8.de> wrote:
>On Thu, Jan 21, 2016 at 01:37:36PM -0800, H. Peter Anvin wrote:
>> No, you still need to be able to find the beginning of the capability
>> array, but the point is that right now it is implicit in that code
>that
>> CPUID_1_EDX == 0.
>
>Ah, you wanna be able to do:
>
>---
>diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
>index af1112980dd4..143646f0add1 100644
>--- a/arch/x86/kernel/head_32.S
>+++ b/arch/x86/kernel/head_32.S
>@@ -441,7 +443,7 @@ enable_paging:
> 	movb %al,X86_MODEL
> 	andb $0x0f,%cl		# mask mask revision
> 	movb %cl,X86_MASK
>-	movl %edx,X86_CAPABILITY
>+	movl %edx,X86_CAPABILITY + CPUID_1_EDX*4
> 
> is486:
> 	movl $0x50022,%ecx	# set AM, WP, NE and MP

Basically, yes.
-- 
Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2] x86: use enum cpuid_leafs instead of magic numbers Huaitong Han <huaitong.han@intel.com> - 2016-01-21 12:10 +0100
  Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers Borislav Petkov <bp@alien8.de> - 2016-01-21 12:50 +0100
    Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 22:10 +0100
      Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers Borislav Petkov <bp@alien8.de> - 2016-01-21 22:30 +0100
        Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 22:30 +0100
          Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 22:40 +0100
            Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers Borislav Petkov <bp@alien8.de> - 2016-01-21 22:50 +0100
              Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 23:00 +0100
          Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers Borislav Petkov <bp@alien8.de> - 2016-01-21 22:40 +0100
  Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 22:10 +0100

csiph-web