Subject: ARM Linux command line

From: ejc <[email-masked]>
Date: Tue, 11 Jan 2000 12:11:45 -0600

Greetings.

I am trying to use the Linux command-line on an EBSA-285-like board. 
Has anyone else used this functionality?  If so, on what platorm(s)?   
My attempts thus far appear to trigger a kernel panic when it tries to
fork() the init() function.  (I don't know why yet...)  Any information,
hints, documentation pointers, etc. would be greatly appreciated.

TIA,

Eli
[email-masked]

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 11 Jan 2000 20:34:48 +0000 (GMT)

> hints, documentation pointers, etc. would be greatly appreciated.

What is the kernel panic message?
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: ejc <[email-masked]>
Date: Tue, 11 Jan 2000 16:46:35 -0600

> What is the kernel panic message?

Here is the message I get:  (Some comments follow)

POSIX conformance testing by UNIFIX
Unable to handle kernel paging request at virtual address 0a000026
memmap = 00004000, pgd = c0004000
*pgd = 00000000, *pmd = 00000000
Internal error: Oops: 2
CPU: 0
pc : [<c001a2e0>]    lr : [<c010402c>]
sp : c0101f24  ip : c0100000  fp : c0101f70
r10: c00081a0  r9 : c010401c  r8 : c0101fc4
r7 : c0100000  r6 : 00000078  r5 : cfefc000  r4 : c000b8bc
r3 : 00000001  r2 : 0a000012  r1 : 60000013  r0 : c0102e88
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  Segment kernel
Control: 517D  Table: 0000517D  DAC: 0000001F
Process swapper (pid: 0, stackpage=c0101000)
Stack: 
c0101f00:                                               c010402c
c001a2e0 200000
13 
c0101f20: ffffffff 00000040 c0101f54 fffffff5  00000001 c0101f88
dc6bceae 00000f
00 
c0101f40: 00000000 00000000 00000000 c000b8bc  c000c848 00000078
c0100000 c0101f
c4 
c0101f60: 4401a104 c0101f80 c0101f74 c0010f70  c001a164 00000000
c0101f84 c000c6
c0 
c0101f80: c0010f64 c000b8bc 00000f00 00000000  00000f00 60000013
c000b8bc c01027
60 
c0101fa0: c0120c94 c012e42c c0102994 4401a104  c00081a0 c0101fe0
00000000 dc6bce
ae 
c0101fc0: f77f7fcd c000dbe0 60000013 00000f00  c010275c c0101ffc
c0101fe4 c000b7
d8 
c0101fe0: c000dbc8 c0102a44 c0120d24 c012e42c  00000000 c0102000
c0008284 c000b6
88 
Backtrace: 
Function entered at [<c001a158>] from [<c0010f70>]
  r9 = 4401a104
  r8 = c0101fc4
  r7 = c0100000
  r6 = 00000078
  r5 = c000c848
  r4 = c000b8bc
Function entered at [<c0010f58>] from [<c000c6c0>]
Code: e3520000 0a000012 (e5920014) e3500000 0a00000f 
Kernel panic: Attempted to kill the idle task!
In swapper task - not syncing

---------
Comments:
Based upon System.map,
pc is within do_fork (c001a158 T do_fork)
lr is tarray_freelist (c010402c D tarray_freelist)
I have a printk() at the beginning of init() that is not being printed,
so we're not making it into that.

Ok, I did some test command lines and came up with the following:
The command line I want to be able to use is "root=/dev/sda2 mem=256M
bigphysarea=512"
The root and bigphysarea options appear to work.  ("root=/dev/sda2
bigphysarea=512" does not oops)
However, the commandline of "mem=256M" triggers an oops.

Looking at the code for that (setup_mem()), a bug didn't jump out at
me... I did modify one line in an attempt to fix it, but it had no
obvious effect.
if (c == ' ' && len + 4 < COMMAND_LINE_SIZE) {
instead of 
if (c == ' ' ) {
I'm still studying it...
Suggestions?

TIA,

Eli
[email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 11 Jan 2000 22:55:55 +0000 (GMT)

> so we're not making it into that.

I'd guess that either the kernel did not compile properly (did you use a
clean source and rebuild everything)?

> However, the commandline of "mem=256M" triggers an oops.

You've got the bigphysarea patches in?  I haven't looked at those, so
can't comment on any behavioural changes.

Does the 'mem=256M' cause the oops you reported, or a different oops?
   _____

---

From: ejc <[email-masked]>
Date: Wed, 12 Jan 2000 09:47:57 -0600

> clean source and rebuild everything)?

Doing a `make clean' and rebuilding makes no difference...  Is there
something in particular I can look for?

> can't comment on any behavioural changes.

I wouldn't expect this to have an effect on the command line... *shrug*

> Does the 'mem=256M' cause the oops you reported, or a different oops?

An essentially identical oops...  The stack has a couple of slightly
different values, but the backtrace, etc. is identical.  (Copy at the
end of this message.)

I'm happy to study this problem, I was mostly looking for pointers and
confirmation that it is known to work on other EBSA-285[-like] board(s)
to know if it was necessarily my fault.  :)

Suggestions, comments, ideas all welcome.

Thanks,

Eli
[email-masked]

Commandline: mem=256M
 Defaulting to 512 pages. 
bigphysarea: Allocated 512 pages at 0xc0400000 (0xe0400000 bus,
0x00400000 phys).
Running bigphysarea Debugging tests: Test alloc gave c0400000, c0402000
and c040a000.
bigphysarea: 512 of 512 pages free (0 objects)
Calibrating delay loop... 195.38 BogoMIPS
Memory: 256012k/256M available (984k code, 20k reserved, 5120k data, 8k
init)
c001a2e0 20000013 
dd6beeee 00000f00 
c0100000 c0101fc4 
c0101f84 c000c6c0 
c000b8bc c0102760 
00000000 dd6beeee 
c0101fe4 c000b7d8 
c0008284 c000b688

---

From: ejc <[email-masked]>
Date: Wed, 12 Jan 2000 10:41:06 -0600

I found my problem.

> > > However, the commandline of "mem=256M" triggers an oops.

This here is a 128M DIMM...  argh.  "mem=128M" works just fine.  (Anyone
have a spare dunce-cap?)

I appologize for taking your time.

Thanks again,

Eli
[email-masked]