linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* 601 vs head.S
@ 1999-02-20 23:16 Brad Midgley
  1999-02-21 10:59 ` Paul Mackerras
  1999-02-21 12:51 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 4+ messages in thread
From: Brad Midgley @ 1999-02-20 23:16 UTC (permalink / raw)
  To: linuxppc-dev


my quest is for a kernel that boots both on the 7200 and the imac. help me
out and i'll give you a free ppc601 card :)

i dug out my old 601 processor and verified that recent samba rsync
kernels won't boot on it. but the patch i have doesn't really help (it
only allows a few more lines of text to be printed before the inevitable
hang). does anyone have a patch that will make paul's kernel work on the
ppc601? 

without patch: 

Welcome to Linux, kernel 2.2.1
<hang>

with patch:

Welcome to Linux, kernel 2.2.1
started at ...
linked at ...
fb at...
MSR ...
<hang>

(here's the patch i have)

--- linux/arch/ppc/kernel/head.S        Fri Jan  8 18:27:01 1999
+++ linux.new/arch/ppc/kernel/head.S    Fri Jan  8 23:16:13 1999
@@ -1204,9 +1204,11 @@
 Hash_bits = 12                         /* e.g. 256kB hash table */
 Hash_msk = (((1 << Hash_bits) - 1) * 64)
        
+#ifdef __SMP__
        .globl  hash_table_lock
 hash_table_lock:
 .long  0
+#endif
        
        .globl  hash_page
 hash_page:


Brad
brad@pht.com | http:/www.pht.com/~brad/
Where do you want to go today..? the 9th floor





[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 601 vs head.S
  1999-02-20 23:16 601 vs head.S Brad Midgley
@ 1999-02-21 10:59 ` Paul Mackerras
  1999-02-21 21:13   ` Franz Sirl
  1999-02-21 12:51 ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Mackerras @ 1999-02-21 10:59 UTC (permalink / raw)
  To: brad; +Cc: linuxppc-dev


Brad Midgley <brad@pht.com> wrote:

> my quest is for a kernel that boots both on the 7200 and the imac. help me

Found it... had to take out the 2 nop's in hash_page this time.  Vger
(cvs) and samba (rsync) have the fix, if you want a precompiled
kernel, try ftp://ftp.linuxppc.org/linuxppc/kernel/powermac/test/vmlinux.

> out and i'll give you a free ppc601 card :)

No thanks, got one already. :)  Now if someone could send me one of
the quantum 1280S drives that are having fits, that could be useful.

Paul.

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 601 vs head.S
  1999-02-20 23:16 601 vs head.S Brad Midgley
  1999-02-21 10:59 ` Paul Mackerras
@ 1999-02-21 12:51 ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 1999-02-21 12:51 UTC (permalink / raw)
  To: Brad Midgley, linuxppc-dev


On Sat, Feb 20, 1999, Brad Midgley <brad@pht.com> wrote:

>without patch: 
>
>Welcome to Linux, kernel 2.2.1
><hang>
>
>with patch:
>
>Welcome to Linux, kernel 2.2.1
>started at ...
>linked at ...
>fb at...
>MSR ...
><hang>

Are you sure that the patch you copied is the only difference between
those two kernels ? I mean, the first text used to be printed by prom.c
until I changed it to the second one with my latest patch (the one that
goes with BootX 1.0.2x)

In both cases, you hang after the early init and before the framebuffer
is really initialized.


-- 
           E-Mail: <mailto:bh40@calva.net>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>




[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 601 vs head.S
  1999-02-21 10:59 ` Paul Mackerras
@ 1999-02-21 21:13   ` Franz Sirl
  0 siblings, 0 replies; 4+ messages in thread
From: Franz Sirl @ 1999-02-21 21:13 UTC (permalink / raw)
  To: Paul Mackerras, brad; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]

Am Sun, 21 Feb 1999 schrieb Paul Mackerras:
>Brad Midgley <brad@pht.com> wrote:
>
>> my quest is for a kernel that boots both on the 7200 and the imac. help me
>
>Found it... had to take out the 2 nop's in hash_page this time.  Vger
>(cvs) and samba (rsync) have the fix, if you want a precompiled
>kernel, try ftp://ftp.linuxppc.org/linuxppc/kernel/powermac/test/vmlinux.

Ugh, a workaround again. As somebody will break that again for sure, I thought
a little bit about it and came up with the appended patch. An (possible?)
explanation is included. I tried it with 0-7 nop's at the old position after
the found_slot label and it always worked. I even did remove the SYNC here and
it still worked. For this final patch I left the SYNC in, cause I don't know
what it is good for. It is against Cort's 990216 vger snapshot, tested on my
7200/75.

Franz.


--- head.S-org	Wed Feb 17 06:59:32 1999
+++ head.S	Sun Feb 21 22:20:49 1999
@@ -1361,13 +1361,6 @@
 found_slot:
 	stw	r6,4(r3)
 	SYNC
-/*
- * These nop's seem to be necessary to avoid getting a machine
- * check on the rfi on 601 processors.
- */
-	nop
-	nop
-
 #else /* __SMP__ */
 /*
  * Between the tlbie above and updating the hash table entry below,
@@ -1441,7 +1434,22 @@
 	lwz	r21,GPR21(r21)
 	SYNC
 	rfi
-	
+
+/* 
+ * These 8 nop's are here to avoid lockup of the 601 on the previous rfi
+ * instruction. They make sure that rfi gets a different cache sector than
+ * the following hash_page_out code and thus the rfi instruction is not 
+ * prefetched by not-taken branch instructions in the hash_page code.
+ */
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
 hash_page_out:
 #ifdef __SMP__
 	lis	r2,hash_table_lock@ha

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: linux-final.head.S.patch --]
[-- Type: text/english; name="linux-final.head.S.patch", Size: 832 bytes --]

--- head.S-org	Wed Feb 17 06:59:32 1999
+++ head.S	Sun Feb 21 22:20:49 1999
@@ -1361,13 +1361,6 @@
 found_slot:
 	stw	r6,4(r3)
 	SYNC
-/*
- * These nop's seem to be necessary to avoid getting a machine
- * check on the rfi on 601 processors.
- */
-	nop
-	nop
-
 #else /* __SMP__ */
 /*
  * Between the tlbie above and updating the hash table entry below,
@@ -1441,7 +1434,22 @@
 	lwz	r21,GPR21(r21)
 	SYNC
 	rfi
-	
+
+/* 
+ * These 8 nop's are here to avoid lockup of the 601 on the previous rfi
+ * instruction. They make sure that rfi gets a different cache sector than
+ * the following hash_page_out code and thus the rfi instruction is not 
+ * prefetched by not-taken branch instructions in the hash_page code.
+ */
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
 hash_page_out:
 #ifdef __SMP__
 	lis	r2,hash_table_lock@ha

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-02-21 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-02-20 23:16 601 vs head.S Brad Midgley
1999-02-21 10:59 ` Paul Mackerras
1999-02-21 21:13   ` Franz Sirl
1999-02-21 12:51 ` Benjamin Herrenschmidt

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).