Subject: Re: ARM3/ARM6 compatibility

From: David Alan Gilbert <[email-masked]>
Date: Thu, 15 May 97 16:11:36 BST

I'm wondering if the right thing to do is to move to fully 32 bit in
the 2.1.x series when we move to ELF.

The thing is the old machines (A400's etc) just aren't going to be
able to cope with ELF; with only 128x32K pages and the extra page
dirtying ELF is supposed to bring I don't think they stand a chance
unless you are the lucky ones who have 8 or more MB in the old
machines.

I don't know if this is the right thing to do.

Dave

---

From: Matthew Wilcox <[email-masked]>
Date: Thu, 15 May 1997 17:14:22 +0100 (BST)

I don't thinkn that's necessary.  It isn't actually necessary for programs
to execute code out of the 26bit limit - what was the last thing you
developed that had a 64MB program size?  It would make sense to compile
things in 26bit compatibility mode as they execute slightly faster (due to
the need to make fewer comparisons round function calls) and are slightly
smaller.  I would emphasise that this is a very slight difference.
Probably less than 0.5% for big programs.  But if ELF does require double
mapping of pages as Russell indicated he thought it did, the old machines
are stuffed for ELF.  So, targets for gcc of:

arm-linuxaout (26 bit code produced.  libc4)
arm32-linux (32 bit code.  libc 6)
arm-linux (26 bit code.  libc6)

It should only be necessary to select between 26 and 32 bit code when
doing the kernel, to be honest.  Oh, I keep changing my mind what the
Right Thing To Do is ;-(

(Hey, are we going to support thumb at some stage?  ;-)

---

From: Philip Blundell <[email-masked]>
Date: Thu, 15 May 1997 19:10:22 +0100 (BST)

> the 2.1.x series when we move to ELF.

I think this is the wrong thing to do.  Supporting 26-bit mode doesn't
cost us much and we don't want to leave people with no machines without
any support at all.  The only ARMLinux machines I have at home are ARM3
vintage; frankly I'm not about to rush to spend 1000 pounds or however it
is on a RiscPC.

> dirtying ELF is supposed to bring I don't think they stand a chance

Can you quantify this "extra page dirtying"?  I suspect there are other
things we can do to improve the situation though - ELF will let us have
more shared libraries, for example, and we can do the trick of discarding
the kernel's init code.

p.

---

From: Philip Blundell <[email-masked]>
Date: Thu, 15 May 1997 19:39:30 +0100 (BST)

> the need to make fewer comparisons round function calls) and are slightly

I suspect this difference really does get lost in the noise. 

> (Hey, are we going to support thumb at some stage?  ;-)

There's not a lot to support.  Binutils should be able to cope with Thumb
now, I think.  If somebody builds a Thumb machine then we could port Linux
to it.

p.

---

From: Philip Blundell <[email-masked]>
Date: Thu, 15 May 1997 21:07:54 +0100 (BST)

> are stuffed for ELF.  So, targets for gcc of:

I've forgotten exactly _why_ ELF is thought to require `double mapping of
pages'.  Can somebody explain it?

p.

---

From: [email-masked]
Date: Thu, 15 May 1997 22:23:40 +0100 (BST)

> more shared libraries, for example, and we can do the trick of discarding

With 32k page sizes, that isn't going to save much.  Maybe one page if you're
lucky.  The kernel will still take 20 pages...  There actually isn't much
init code that can be removed (I think it's about 8k or so).
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |       Russell King      [email-masked]         --- ---
  | | | | http://whirligig.ecs.soton.ac.uk/~rmk92/home.html  /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |      *  who wishes that he was in Hong Kong  *      ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: [email-masked]
Date: Thu, 15 May 1997 22:18:08 +0100 (BST)

> unless you are the lucky ones who have 8 or more MB in the old

Under ELF, especially on the 386, the intermediate page between text and
data is mapped in twice - one after each other.  This cannot be done under
the MEMC (since it uses a one to one physical -> logical mapping).

The only way that you could do it is to immediately create one extra dirty
page extra on top of the dirty pages caused by dynamic linking (if used).

I don't believe that it would be a good idea to do this to an already
page-starved architecture.  ARM6, yep. ARM2, 3.  Definitely not.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |       Russell King      [email-masked]         --- ---
  | | | | http://whirligig.ecs.soton.ac.uk/~rmk92/home.html  /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |      *  who wishes that he was in Hong Kong  *      ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Alan Cox <[email-masked]>
Date: Fri, 16 May 1997 09:05:57 +0100 (BST)

> the MEMC (since it uses a one to one physical -> logical mapping).

There is no requirement to map it twice, so you can avoid that by careful
alignment of sections. 

> page extra on top of the dirty pages caused by dynamic linking (if used).

You should be able to get all the dynamic linking, GOT etc in one page
surely  (especially at 32K pages)

Alan

---

From: Philip Blundell <[email-masked]>
Date: Fri, 16 May 1997 10:12:19 +0100 (BST)

> the MEMC (since it uses a one to one physical -> logical mapping).

Just because the 386 does that doesn't mean we have to.  I have the ELF
specs from Sun's manuals here and they don't say you have to double-map
pages.  I think this is a non-issue. 

If necessary I imagine we could force the data section to be page aligned.

p.

---

From: Philip Blundell <[email-masked]>
Date: Fri, 16 May 1997 10:32:11 +0100 (BST)

> init code that can be removed (I think it's about 8k or so).

One page is still significant when you've only got 128.  I get something
like 24k thrown out on my PC and my Alpha at the moment, and not all the
drivers have the __initfunc()s added yet, so I'm hopeful we can save at
least a page or so.

p.

---

From: Andy Hayward <[email-masked]>
Date: Fri, 16 May 1997 10:55:17 +0100

>unless you are the lucky ones who have 8 or more MB in the old

Talking about memory; I can remember speaking with Russell at
AcornWorld '96; he mentioned that the code to support >2 MEMC's
on the older machines was either (a) not written or (b) no tested.
What is the situation here?

Thanks

ach

---

From: Matt <[email-masked]>
Date: Fri, 16 May 1997 11:40:36 +0100 (BST)

Just wondering if the ARM6 kernel code is late or early abort - ie is all
the chatting about ARM6 compatibility also referring to the ARM7.  I
realise that the basics of the two processors is the same - the
'abortedness' being the only difference I know about :)

I wait with baited breath to reformat my HD and install linux-arm7 :)
(will I suffocate :)? )

Take care,

Matt
-==-

---

From: David <[email-masked]>
Date: Mon, 26 May 1997 21:04:39 +0100 (BST)

Dear All,

Does anyone know what would I have to do to get ARMLinux going on an
A7000+, if I were to buy one? (i.e. what would be different to say, an
A5000) Will ARMLinux take advantage of the hardware FP in said machine by
default, or would I have to alter things?

Also: Whats the position on using a SCSI Zip drive?

Thanks,
David.