Subject: RE: cross gdb & debugging agent

From: Lavu Sridhar <[email-masked]>
Date: Tue, 30 May 2000 02:04:24 +0530 (IST)

On Fri, 26 May 2000, Jungjun Kim wrote:
>I mean that you need to make link vmlinux again with defferent base address
>offset, not 0xc0008000.
>You can change base address by editing linux/arch/arm/Makefile .
>But I'm not sure this is the right way.

I have changed the address map in this file. But i have a feeling that
this is not the only place where the address map should be changed....
In the System.map file, there is a reference to the address 

c0004000 A swapper_pg_dir (on the last line)
 
>Then GDB can download vmlinux image.
>After downloading image, maybe you need to change CPSR register if the initial
>mode is USER32 because linux should be started with SVC32 mode.
>You can see the register values by the command "info registers".
>After fixing all these things, you can run by the "continue" command.

I have compiled the image, vmlinux file. (with base address 0x8000000)

and then when i gave the following instructions:

$xxgdb -b 115200
(xxgdb) load vmlinux
Loading section .init, size 0x7000 lma 0x8000000
Loading section .text, size 0x854f8 lma 0x8007000
Loading section .data, size 0xb508 lma 0x808e000
Start address 0x8000000 , load size 621056
Transfer rate: 68060 bits/sec, 511 bytes/write.
(xxgdb)continue
RDI_execute: undefined instruction

Program received signal SIGILL, Illegal instruction.
RDI_read: data abort, no memory at specified address?
RDI_read: data abort, no memory at specified address?
Error accessing memory address 0xe59ff010: Resource temporarily
unavailable.

I do not know how to proceed further....Plz advise.

Regards,
Lavu Sridhar

------------------------------------------------------------------------

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

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Mon, 29 May 2000 22:08:04 +0100 (BST)

> c0004000 A swapper_pg_dir (on the last line)

That's generated automatically and is dependent on the symbol TEXTADDR.

> I have compiled the image, vmlinux file. (with base address 0x8000000)

You don't want to do that if you are planning to run user executables -
they like to have lots of space to work in.  The only reason that you'd
set this address low is to increase the size of the memory available
for physical devices.  Even then, choosing 0x08000000 is extremely
excessive and is not likely to be useful.

> Error accessing memory address 0xe59ff010: Resource temporarily

I'd imagine that the image is being executed in user mode, which doesn't
allow it to access copro #15 registers (the MMU and chip ident).  You're
using Angel on the target, aren't you?

This is where I start wishing that there was a common standard for
Angel, where every version of Angel called its programs in exactly
the same way...
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Lavu Sridhar <[email-masked]>
Date: Tue, 30 May 2000 23:28:25 +0530 (IST)

Hello, I am using the CL7500FE Evaluation Board with the ANGEL Debugger
1.20 running on it. It has the DRAM mapped from the 0x0000 0000 to
0x1000 0000. I am using DRAM modules of the following size:

Bank1: 16MB (RAS0 {of 7500FE processor} 8MB & RAS1 8MB) 
0x0000 0000 to 0x0080 0000 (8MB) and 0x0400 0000 to 0x0480 0000 (8MB)
(The rest of the memory is folded back....)

      In the first set (RAS0) i had assumed that ANGEL is running its
programs... So I had attempted to write the Linux Kernel Image in the
address location of the 2nd set (RAS1). (for which i had changed the 
Base address to 0x0400 8000 from 0xc000 8000 in the arch/arm/Makefile)

I have compiled the 2.3.99 kernel using the armlinux cross tool chain. I
want to load the kernel image into the DRAM and execute it.... I have
tried the ARM SDT and the GDB, but they do not seem to work. I seem to be
on the wrong track. Could you advise me as to how i can get the kernel
image onto the DRAM and execute it??

Thanks,

Regards,
Lavu Sridhar

---

From: Jason Gunthorpe <[email-masked]>
Date: Wed, 31 May 2000 17:48:51 -0600 (MDT)

I have just got linux to boot on this board. Looks nice to finally see it
:>

Anyhow.. I have an early draft of what I have done so that others can also
look at it. It is not seperate enough from the main tree to apply it yet
though!

You can find what I have done at
http://amber.deltatee.com/~jgg/cl-ps7500fe

There is a 2.3.99 kernel, RMK's patch for that kernel, and my patch for
RMK's patch. Also is a file called head-cl7500.c that goes into
arch/arm/boot/compressed/. Angel boot and the required option file is also
there.

To make this work I decided to entirely rewrite the head.S, it seemed to
make some assumptions that are not valid on this chip. In particular you
cannot read back the MMU control register, you get 0. Also, with Angel
this board starts with the MMU on, it must be carefully turned off before
you can do anything real :> In a little while I will be adding the
necessary code to boot linux directly from flash..

Right now, this code uses both serial ports. COM2 is used to report
boot-time status messages so they are not lost by the angel loader. COM1
is used by the loader and by the kernel as the serial console.

My primary goal right now is to get it NFS-root booting with the kernel
located in a flash dimm. After that I will attempt to make a tidy patch
that can be megered with RMK's work!

I do not intend to do any work on making the video interface work.

Jason

Linux version 2.3.99-pre8-rmk2 (jgg@taupe) (gcc version 2.95.2 19991024
(release)) #49 Wed May 31 16:08:27 MDT 2000
Architecture: CL-PS7500
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Calibrating delay loop... 24.22 BogoMIPS
Memory: 16MB = 16MB total
Memory: 14576KB available (1103K code, 319K data, 52K init)
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
kmem_create: Poisoning requested, but con given - bdev_cache
Inode-cache hash table entries: 1024 (order: 1, 8192 bytes)
kmem_create: Poisoning requested, but con given - inode_cache
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.3
Based upon Swansea University Computer Society NET3.039
kmem_create: Poisoning requested, but con given - skbuff_head_cache
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 1024)
Starting kswapd v1.6
pty: 256 Unix98 ptys configured
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: registered device at major 7
loop: enabling 8 loop devices
cs89x0: no cs8900 or cs8920 detected.  Be sure to disable PnP with SETUP
Serial driver version 4.93 (2000-03-20) with no serial options enabled
ttyS00 at 0x03f8 (irq = 10) is a 16550A
ttyS01 at 0x02f8 (irq = 0) is a 16550A
ttyS02 at 0x804002e8 (irq = 41) is a 16450
ttyS03 at 0x804003e8 (irq = 40) is a 16450
IP-Config: No network devices available.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
devfs: v0.96 (20000430) Richard Gooch ([email-masked])
devfs: boot_options: 0x0
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "" or 02:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 02:00