mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: 2.5.55/.56 instant reboot problem on 486
Date: Sun, 12 Jan 2003 03:31:20 +0100 (MET)	[thread overview]
Message-ID: <200301120231.DAA14711@harpo.it.uu.se> (raw)

My '94 vintage 486 has problems booting 2.5.55 and 2.5.56.
When it fails, the boot gets to loading the kernel and
printing "Ok, booting the kernel.". Then there is a short
pause (line a tenth of a second) and the machine reboots.

After doing a binary search with "for(;;);" statements
(printk doesn't work this early) I found that the reboot
occurs in arch/i386/mm/init.c:kernel_physical_mapping_init():
(start_kernel() -> setup_arch() -> paging_init() ->
pagetable_init() -> kernel_physical_mapping_init())

diff -ruNp linux-2.5.55/arch/i386/mm/init.c linux-2.5.55.hack/arch/i386/mm/init.c
--- linux-2.5.55/arch/i386/mm/init.c	2003-01-12 02:20:49.000000000 +0100
+++ linux-2.5.55.hack/arch/i386/mm/init.c	2003-01-12 01:44:49.000000000 +0100
@@ -134,6 +134,7 @@ static void __init kernel_physical_mappi
 	pgd = pgd_base + pgd_ofs;
 	pfn = 0;
 
+	//for(;;);
 	for (; pgd_ofs < PTRS_PER_PGD; pgd++, pgd_ofs++) {
 		pmd = one_md_table_init(pgd);
 		if (pfn >= max_low_pfn)
@@ -151,6 +152,7 @@ static void __init kernel_physical_mappi
 			}
 		}
 	}	
+	for(;;);
 }
 
 static inline int page_kills_ppro(unsigned long pagenr)

If I uncomment the first "//for(;;);" the kernel hangs, but if
I keep it commented out, the kernel reboots -- i.e. it doesn't
get to the final "for(;;);" at the end of the function.

The problem is apparently related to the size of the kernel.
With gcc-2.95.3 and my normal config for this machine,
size vmlinux is

   text	   data	    bss	    dec	    hex	filename
1330953	 109008	 125656	1565617	 17e3b1	vmlinux

and the kernel reboots. If I alter the size by changing some
irrelevant config option (like disabling INPUT_MOUSEDEV or
enabling KALLSYMS), the reboot problem doesn't occur.

With gcc-3.2 the bug disappears, but only because gcc-3.2
generates a much larger code segment. If I remove some
driver & fs config options, the vmlinux size becomes almost
the same as above, and the reboot bug appears again.

The same kernel that fails on the 486 boots Ok on my newer
test boxes, so the problem is either 486-specific, related
to the actual memory size, or the BIOS memory size reporting
method (the 486 uses int 15 0x88); here's what 2.5.54 says:

BIOS-provided physical RAM map:
 BIOS-88: 0000000000000000 - 000000000009f000 (usable)
 BIOS-88: 0000000000100000 - 0000000001c00000 (usable)

The 486 has no known HW problems, and it survives memtest86.

/Mikael

             reply	other threads:[~2003-01-12  2:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-12  2:31 Mikael Pettersson [this message]
2003-01-12  4:17 ` Linus Torvalds
2003-01-12  7:13 ` Brian Gerst
2003-01-13  4:20   ` Bill Davidsen
2003-01-12 16:05 Mikael Pettersson

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=200301120231.DAA14711@harpo.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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

Powered by JetHome