linux-mips-fnet
[Top] [All Lists]

RE: Tags are dead alias Milo is dead part II

To: linux-mips@fnet.fr
Subject: RE: Tags are dead alias Milo is dead part II
From: Harald Koerfgen <harald.koerfgen@netcologne.de>
Date: Wed, 07 Oct 1998 20:20:22 +0200 (MEST)
In-reply-to: <19981007002547.44731@alpha.franken.de>
Organization: none
Reply-to: "Harald Koerfgen" <harald.koerfgen@netcologne.de>
Sender: harry@franz.no.dom
On 06-Oct-98 Thomas Bogendoerfer wrote:
> In the process of making Milo obsolete I've also removed tags stuff. This
> was simple for the Indy and took only a few hours for the Olivetti. I hope
> it's also possible for the Decstation. Before I'll start commiting the
> changes
> we should make sure, how to solve the missing tags for all plattforms.

Well, that'd certainly be possible for the DECstations too. We would then have
to use PROM callback functions from within the kernel with the disadvantage
that we have to keep the memory range 0x80000000 - 0x8002ffff reserved for the
PROM, thus wasting 192KB memory :-(.

Or do you have another way in mind passing information from the boot PROM/boot
loader to the kernel?
 
To be able to move the kernel down to 0x8000000 we rely quite heavily on having
infomation already gathered from the PROM and passed to the kernel. This is
actually done via tags, in fact, I have added some tags to the DECstation
source tree. But when common opinion is not to use tags, well, then let it be
so.

> Another old code, which might be obsolete now is the wired entry stuff
> in arch/mips/kernel/head.S. It's already disabled for R4k CPUs and
> I would prefer to remove that stuff also for the other CPUs. If you
> need wired entries, I would propose using the add_wired_entry()
> function as I already do it for the JAZZ hardware (arch/mips/jazz/setup.c).

No problem for the DECstations.
---
Regards,
Harald

P.S.: when you are already messing around with head.S, could you please apply
the following little patch?

--- snip here ---

--- linux-2.1.121-clean/arch/mips/kernel/head.S Wed Sep 23 23:28:05 1998
+++ linux-2.1.121-r3000/arch/mips/kernel/head.S Wed Oct  7 19:58:32 1998
@@ -11,7 +11,7 @@
  * Copyright (C) 1995, 1996, 1997, 1998 Ralf Baechle
  * Copyright (C) 1996 Paul M. Antoine
  * Modified for DECStation and hence R3000 support by Paul M. Antoine
- * Further modifications by David S. Miller
+ * Further modifications by David S. Miller and Harald Koerfgen
  *
  * Head.S contains the MIPS exception handler and startup code.
  */
@@ -257,6 +257,7 @@
 
        /* TLB refill, EXL == 0, R[23]00 version */
        LEAF(except_vec0_r2300)
+       .set    noat
        .set    mips1
        mfc0    k0, CP0_BADVADDR
        _GET_CURRENT(k1)                        # get current task ptr
@@ -266,23 +267,17 @@
        addu    k1, k1, k0
        mfc0    k0, CP0_CONTEXT
        lw      k1, (k1)
-       srl     k0, k0, 1
-       and     k0, k0, 0xffc
+       andi    k0, k0, 0xffc
        addu    k1, k1, k0
        lw      k0, (k1)
-       srl     k0, k0, 12
+       nop
        mtc0    k0, CP0_ENTRYLO0
        mfc0    k1, CP0_EPC
        tlbwr
-       nop
-       nop
-       nop
-       nop
        jr      k1
        rfe
        END(except_vec0_r2300)
 
-
        /* XTLB refill, EXL == 0, R4xx0 cpus only use this... */
        NESTED(except_vec1_generic, 0, sp)
        .set    noat
@@ -338,6 +333,7 @@
        /* General exception vector. */
        NESTED(except_vec3_generic, 0, sp)
        .set    noat
+       .set    mips0
        mfc0    k1, CP0_CAUSE
        la      k0, exception_handlers
        andi    k1, k1, 0x7c
@@ -374,6 +370,14 @@
         nop
 
 probe_done:
+       /*
+        * Stack for kernel and init, current variable
+        */
+       la      $28, init_task_union
+       addiu   t0, $28, KERNEL_STACK_SIZE-32
+       sw      t0, kernelsp
+       subu    sp, t0, 4*SZREG
+
 
 #ifndef CONFIG_SGI
        /* Get the memory upper limit the bootloader passed to us
@@ -451,16 +455,8 @@
        jal     wire_mappings_r3000
         nop    
 
-       /*
-        * Stack for kernel and init, current variable
-        */
-9:     la      $28, init_task_union
-       addiu   t0, $28, KERNEL_STACK_SIZE-32
-       sw      t0, kernelsp
-       subu    sp, t0, 4*SZREG
-
        /* Disable coprocessors */
-       mfc0    t0, CP0_STATUS
+9:     mfc0    t0, CP0_STATUS
        li      t1, ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX)
        and     t0, t1
        or      t0, ST0_CU0

<Prev in Thread] Current Thread [Next in Thread>