public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: robert@schwebel.de
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
	linux-embedded@waste.org, rkaiser@sysgo.de
Subject: Re: AMD SC410 boot problems with recent kernels
Date: Fri, 21 Dec 2001 14:09:12 -0800	[thread overview]
Message-ID: <3C23B308.9080800@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0112212154100.10528-200000@callisto.local>

Robert Schwebel wrote:

> Hi,
> 
> As I reported some days ago in
> 
>   http://marc.theaimsgroup.com/?l=linux-kernel&m=100876129529834&q=raw
> 
> there are boot problems with new kernels on AMD SC410 processors.


"On one particular SC410 board."


> Symptom
> is that the machine reboots right in the middle of the initialisation of
> the serial port (indeed, right in the middle of a printk message).
> 
> In the meantime I've tracked down the problem, but cannot fully find the
> origin. Here are some facts:
> 
> - The problem came in in 2.4.15. Linus has merged in some changes to
>   the boot code by H. Peter Anvin (which basically are a Good Thing(TM)).
>   They affect arch/i386/boot/setup.S.
> 
> - I could narrow it down to the A20 gate routines. My machine's BIOS
>   doesn't seem to have the appropiate routine, so the algorithm falls
>   back to using the keyboard controller method (which was also used
>   in the old code).
> 
> - The problem seems to come from the code that waits for A20 gate to
>   be _really_ enabled (shortly after a20_kbc:).
> 
> Attached is a experimental patch which demonstrates the problem: in line
> 687 you can change with a jump to "old_wait" or "new_wait" which routine
> shall be used. With the old one the machine starts, with the new one it
> reboots.
> 
> I must say I do not really understand what the problem is. First I thought
> that maybe the loop counter overruns, but it doesn't seem to happen. I
> have written the counter value to a port with LEDs and it seems to contain
> "1" when the waiting loop detects the successful A20 switch.
> 
> Any idea would be helpful...
> 


The loop counter you're outputting is the 2nd byte of the loop counter,
which really isn't interesting; what probably makes more sense to output
is the value of %dx in your code.

I would like to suggest making the following changes and try them out:

a) Change A20_TEST_LOOPS to something like 32768 in the new kernel code.

b) Add a "call delay" between the movw and the cmpw in your old_loop
   and see if it suddenly breaks;

c) Check what your %dx value is (if it's nonzero, there might be an
   issue.)

d) Once again, please complain to your motherboard/BIOS vendor and tell
   them to implement int 15h, ax=2401h.

e) Add a strictly serializing instruction sequence, such as:

	pushw %dx
	smsw %dx
	lmsw %dx
	popw %dx		

   ... where the "call delay" call is in a20_test.

	-hpa


  reply	other threads:[~2001-12-21 22:10 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-21 21:26 AMD SC410 boot problems with recent kernels Robert Schwebel
2001-12-21 22:09 ` H. Peter Anvin [this message]
2001-12-22 16:13   ` Robert Schwebel
2001-12-23  1:44     ` H. Peter Anvin
2001-12-23  9:45       ` Robert Schwebel
2001-12-23 10:19         ` H. Peter Anvin
2001-12-23 13:16         ` Christer Weinigel
2001-12-23 20:02           ` H. Peter Anvin
2001-12-30 22:02             ` Robert Schwebel
2001-12-30 23:15               ` H. Peter Anvin
2002-01-01 12:30 ` [PATCH][RFC] AMD Elan patch Robert Schwebel
2002-01-01 21:49   ` H. Peter Anvin
2002-01-01 23:27     ` Robert Schwebel
2002-01-01 23:38       ` H. Peter Anvin
2002-01-02  0:05         ` Dave Jones
2002-01-02  0:45           ` H. Peter Anvin
2002-01-02 13:49           ` Robert Schwebel
2002-01-02 14:03             ` Dave Jones
2002-01-02 16:10               ` Alan Cox
2002-01-02 22:40                 ` H. Peter Anvin
2002-01-02 23:10                   ` Alan Cox
2002-01-02 23:02                     ` H. Peter Anvin
2002-01-02 23:50                       ` Alan Cox
2002-01-03  9:04                       ` Robert Schwebel
2002-01-02 23:56                     ` Robert Kaiser
2002-01-03  0:10                       ` Alan Cox
2002-01-03  8:52                   ` Robert Schwebel
2002-01-02 16:06             ` Alan Cox
2002-01-02 16:56               ` Robert Schwebel
2002-01-02 17:26                 ` Robert Schwebel
2002-01-02 23:06                   ` Peter Wächtler
2002-01-02 23:21                     ` H. Peter Anvin
2002-01-02  1:07         ` [RFC] Embedded X86 systems Was: " Christer Weinigel
2002-01-02  8:45           ` Alan Cox
2002-01-02  9:05             ` Christer Weinigel
2002-01-02  9:18               ` Alan Cox
2002-01-05 12:23             ` Eric W. Biederman
2002-01-02  0:06     ` Christer Weinigel
2002-01-02  0:48       ` H. Peter Anvin
2002-01-02  1:10         ` Christer Weinigel
2002-01-02 13:58           ` Robert Schwebel
2002-01-02 20:47             ` Christer Weinigel
2002-01-02 13:55       ` Robert Schwebel
2002-01-02 15:54   ` Robert Schwebel
2002-01-11  9:38   ` [PATCH] " Robert Schwebel
2002-01-21  7:28     ` New version of " Robert Schwebel
2002-01-21 20:44       ` Marcelo Tosatti
2002-01-24  8:09       ` Robert Schwebel
2002-01-24  8:39         ` Robert Schwebel
2002-01-23 10:28     ` [PATCH] " Robert Schwebel
2002-01-23 21:30       ` Marcelo Tosatti
2002-01-22 14:47   ` [PATCH][RFC] " Robert Schwebel
2002-01-22 18:01     ` Dave Jones
2002-01-22 22:55   ` New version of AMD Elan patch available Robert Schwebel
2002-02-01 22:01     ` Robert Schwebel

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=3C23B308.9080800@zytor.com \
    --to=hpa@zytor.com \
    --cc=linux-embedded@waste.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkaiser@sysgo.de \
    --cc=robert@schwebel.de \
    /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