From: Robert Kaiser <rob@sysgo.de>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, mo6 <sjoos@pandora.be>,
Brian Gerst <bgerst@didntduck.org>,
Miles Lane <miles@megapathdsl.net>,
Paul Gortmaker <p_gortmaker@yahoo.com>,
"Tom G. Christensen" <tom.christensen@get2net.dk>,
alan@lxorguk.ukuu.org.uk (Alan Cox),
Linus Torvalds <torvalds@transmeta.com>
Subject: [SOLVED + PATCH] Re: Anybody got 2.4.0 running on a 386 ?
Date: Mon, 15 Jan 2001 19:38:05 +0100 [thread overview]
Message-ID: <01011520014201.12336@rob> (raw)
In-Reply-To: <01010922090000.02630@rob> <01011000082300.03050@rob> <3A5C8DB2.48A4A48@yahoo.com>
In-Reply-To: <3A5C8DB2.48A4A48@yahoo.com>
Hi everybody,
I finally found the reason why 386es have trouble booting the 2.4.0 kernel:
In routine pagetable_init() in arch/i386/mm/init.c, a pte gets installed before
it actually has been filled with valid entries. This causes the kernel text
segment to be temporarily unmapped. Pentiums are only lucky to not crash
because they have a bigger TLB than 386s.
Here is a patch to fix this:
--- init.c.orig Wed Nov 29 07:43:39 2000
+++ init.c Mon Jan 15 18:36:08 2001
@@ -317,7 +317,7 @@
pgd_t *pgd, *pgd_base;
int i, j, k;
pmd_t *pmd;
- pte_t *pte;
+ pte_t *pte, *pte_base;
/*
* This can be zero as well - no problem, in that case we exit
@@ -366,11 +366,7 @@
continue;
}
- pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
- set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte)));
-
- if (pte != pte_offset(pmd, 0))
- BUG();
+ pte_base = pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
for (k = 0; k < PTRS_PER_PTE; pte++, k++) {
vaddr = i*PGDIR_SIZE + j*PMD_SIZE + k*PAGE_SIZE;
@@ -378,6 +374,10 @@
break;
*pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL);
}
+ set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte_base)));
+ if (pte_base != pte_offset(pmd, 0))
+ BUG();
+
}
}
Thanks to everybody who helped with ideas and suggestions, especially Ingo
Molnar!
Cheers
Rob
----------------------------------------------------------------
Robert Kaiser email: rkaiser@sysgo.de
SYSGO RTS GmbH
Am Pfaffenstein 14 phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-15 19:02 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-09 20:53 Anybody got 2.4.0 running on a 386 ? Robert Kaiser
2001-01-09 21:15 ` Brian Gerst
2001-01-09 21:17 ` Robert Kaiser
2001-01-09 21:46 ` Brian Gerst
2001-01-09 22:17 ` Robert Kaiser
2001-01-09 22:57 ` Ingo Molnar
2001-01-09 23:44 ` Robert Kaiser
2001-01-10 0:19 ` Alex Buell
2001-01-10 0:20 ` Ingo Molnar
2001-01-10 0:24 ` Ingo Molnar
2001-01-10 16:00 ` Robert Kaiser
2001-01-10 21:29 ` Tom G. Christensen
2001-01-10 22:04 ` X performance on 2.4.0 v.s. 2.4.0-test12 Alan Olsen
2001-01-09 23:03 ` Anybody got 2.4.0 running on a 386 ? Brian Gerst
2001-01-09 23:04 ` Robert Kaiser
2001-01-09 23:28 ` Anuradha Ratnaweera
2001-01-09 23:42 ` Robert Kaiser
2001-01-10 1:48 ` Miles Lane
2001-01-10 15:25 ` Robert Kaiser
2001-01-10 21:04 ` Miles Lane
2001-01-10 16:28 ` Paul Gortmaker
2001-01-15 18:38 ` Robert Kaiser [this message]
2001-01-15 19:11 ` [SOLVED + PATCH] " Linus Torvalds
2001-01-09 22:44 ` Timur Tabi
2001-01-09 21:59 ` Brian Gerst
2001-01-10 19:51 ` mo6
2001-01-10 20:18 ` Brian Gerst
2001-01-10 21:53 ` mo6
2001-01-11 12:20 ` mo6
2001-01-10 3:53 ` Tom Leete
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=01011520014201.12336@rob \
--to=rob@sysgo.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miles@megapathdsl.net \
--cc=mingo@elte.hu \
--cc=p_gortmaker@yahoo.com \
--cc=sjoos@pandora.be \
--cc=tom.christensen@get2net.dk \
--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;
as well as URLs for NNTP newsgroup(s).