From: Christian Volkmann <haveaniceday@cv-sv.de>
To: unlisted-recipients:; (no To-header on input)
Cc: Dave Jones <davej@redhat.com>,
linux-kernel@vger.kernel.org, ak@suse.de,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: 2.6.22-rc1 does not boot on VIA C3_2 cause of X86_CMPXCHG64
Date: Thu, 17 May 2007 23:28:01 +0200 [thread overview]
Message-ID: <464CC8E1.5010407@cv-sv.de> (raw)
In-Reply-To: <464BB252.8010008@cv-sv.de>
Christian wrote:
Hmm, I really think so...:
>
> May I brought up a wrong reason with the command cmpxchg64.
> But disabling CONFIG_X86_CMPXCHG64 helps.
>
Hi,
I found some time to investigate. My resume is:
- kernel/verify_cpu.S causes the stop at boot time
Cause the required flag for CMPXCHG8B is not set.
- boot/setup.S did not print "PANIC: CPU too old for this kernel"
( not visible, also the message did not match )
- VIA C3_2: CMPXCHG8B should work always. Via C3 EBGA Datasheet R1.90 page 30 (3-4)
But the bit is not set cause of some early Win NT bugs.
- X86_CMPXCHG64 can be set and used. Just verify_cpu.S requires a change
to ignore the missing indicator at boot time.
My suggestion for the fix is:
- kernel/verify_cpu.S should be more tolerant if CONFIG_MVIAC3_2 is set
( see patch below )
- boot/setup.S should be fixed to print out a proper error message
( see below )
- X86_CMPXCHG64 patch(earlier mail in thread ) should not be used.
- Important: somebody to check other CPU types if the same behavior happens.
- middle term solution already planed: introduce arch/i386/boot/cpucheck.c
To be done by somebody with more detail knowledge than me: (never did x86 assembler before)
- I add "# missed before: set ds"
=> somebody should check if I am right with the way to set.
=> seems to be a generic error in setup.S not to set "ds" for error messages.
- other X86-CPU than AMD (?) or Intel
=> correct verify_cpu.S or set bits if required.
Best regards,
Christian
--- arch/i386/kernel/verify_cpu.S 2007-05-17 05:17:40.000000000 +0200
+++ arch/i386/kernel/verify_cpu.S 2007-05-17 23:14:18.266679323 +0200
@@ -54,6 +54,12 @@
andl $REQUIRED_MASK1,%edx
xorl $REQUIRED_MASK1,%edx
+/* VIAC3 does not report the existing CMPXCHG64 by default. So do not go to bad for CMPXCHG64 for this */
+/* via C3 EBGA datasheet R1.9 tells the command works also without shown bit. */
+#if CONFIG_MVIAC3_2
+ andl $~NEED_CMPXCHG64,%edx
+#endif
+
jnz bad
#endif /* REQUIRED_MASK1 */
--- arch/i386/boot/setup.S 2007-05-17 21:53:08.009226208 +0200
+++ arch/i386/boot/setup.S 2007-05-17 23:12:36.815989168 +0200
@@ -310,12 +310,15 @@
call verify_cpu
testl %eax,%eax
jz cpu_ok
+ # missed before: set ds
+ movw %cs, %ax # aka SETUPSEG
+ movw %ax, %ds
lea cpu_panic_mess,%si
call prtstr
1: jmp 1b
cpu_panic_mess:
- .asciz "PANIC: CPU too old for this kernel."
+ .asciz "PANIC: CPU too old for this kernel or CPUID function bits are wrong."
#include "../kernel/verify_cpu.S"
next prev parent reply other threads:[~2007-05-17 21:28 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 0:09 2.6.22-rc1 does not boot on VIA C3_2 cause of X86_CMPXCHG64 Christian
2007-05-17 0:42 ` Dave Jones
2007-05-17 1:15 ` H. Peter Anvin
2007-05-17 1:55 ` H. Peter Anvin
2007-05-17 1:39 ` Christian
2007-05-17 21:28 ` Christian Volkmann [this message]
2007-05-17 21:47 ` Dave Jones
2007-05-17 21:59 ` Christian Volkmann
2007-05-31 5:22 ` [RFC: 2.6 patch] i386: remove support for the Rise CPU Adrian Bunk
2007-05-31 13:31 ` Dave Jones
2007-05-31 17:37 ` Christian Volkmann
2007-05-31 17:48 ` Dave Jones
2007-05-19 10:22 ` 2.6.22-rc1 does not boot on VIA C3_2 cause of X86_CMPXCHG64 Hans de Bruin
2007-05-17 8:56 ` Alan Cox
2007-05-17 11:51 ` Andi Kleen
2007-05-17 15:02 ` Dave Jones
2007-05-17 22:14 ` H. Peter Anvin
2007-05-19 5:53 ` 2.6.22-rc1 does not boot on VIA C3_2 cause of X86_CMPXCHG64 II Andi Kleen
2007-05-19 6:02 ` Dave Jones
2007-05-19 11:47 ` Andi Kleen
2007-05-19 17:23 ` Dave Jones
2007-05-19 8:22 ` Claas Langbehn
2007-05-19 18:10 ` H. Peter Anvin
2007-05-19 11:42 ` Christian Volkmann
2007-05-19 11:54 ` Andi Kleen
2007-05-23 21:50 ` H. Peter Anvin
2007-05-19 17:26 ` Claas Langbehn
2007-05-19 20:22 ` Via C3: other flags possible ? Christian Volkmann
2007-05-19 22:36 ` Christian Volkmann
2007-05-19 22:52 ` Via C3/C7: " Simon Arlott
2007-05-20 8:19 ` Claas Langbehn
2007-05-20 13:14 ` Christian Volkmann
2007-05-20 12:59 ` Via C3: " Andi Kleen
2007-05-19 17:54 ` 2.6.22-rc1 does not boot on VIA C3_2 cause of X86_CMPXCHG64 II Claas Langbehn
2007-05-17 1:10 ` 2.6.22-rc1 does not boot on VIA C3_2 cause of X86_CMPXCHG64 Linus Torvalds
2007-05-17 1:25 ` Christian
2007-05-17 2:21 ` Linus Torvalds
2007-05-17 3:05 ` H. Peter Anvin
2007-05-17 3:16 ` Linus Torvalds
2007-05-17 4:51 ` H. Peter Anvin
2007-05-17 6:18 ` Dave Jones
2007-05-17 6:31 ` H. Peter Anvin
2007-05-17 6:17 ` Dave Jones
2007-05-17 9:22 ` Hans de Bruin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=464CC8E1.5010407@cv-sv.de \
--to=haveaniceday@cv-sv.de \
--cc=ak@suse.de \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).