New style dpalloc/hostalloc routines (diff).

2002-12-20 Thread Pantelis Antoniou

Paul Mackerras wrote:

Pantelis Antoniou writes:


+# Support new type of routines, usable from modules
+bool 'Use new type dpalloc routines()' CONFIG_NEW_DPALLOC
+bool 'Use new type hostalloc routines()' CONFIG_NEW_HOSTALLOC
+if [ $CONFIG_NEW_DPALLOC = y -o $CONFIG_NEW_HOSTALLOC = y ]; then
+  define_bool CONFIG_CPM_RHEAP y
+fi


I don't want to see config options that select between different
internal implementations of the same thing.  Either your new routines
are better, and we'll use them, or they are worse, and we'll use the
old ones.  Having a config option just leads to tons of ifdefs
throughout the code, which makes it harder to read and understand.
Having two implementations of the same thing is just bloat.

Similarly, I don't like the way all your new routines have a new_
prefix on the name.  You should be thinking of replacing the existing
routines rather than providing an alternative implementation with a
different name.  Where you have changed the API, either fix the
drivers or provide a compatibility routine.

The way it looks at the moment, it seems that you don't really have
the conviction that your code is better than what is there already.
Please redo your patch so that it just replaces the old routines.  And
please don't send it as a bkpatch since they are impossible to read, a
plain diff -u is much better.

Paul.





Well that's easy to do since that's the way it is in my tree.

The only reason for the new_ prefixes and the config options was to
make it easy for people to test them.

I didn't sent it only as a bkpatch, a following mail had the patch in
diff format.

Anyway I'll repost them as per you suggestions...

Pantelis


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





use bdi on board with ppcbug

2002-12-20 Thread 于婧

hi!
  I want to debug the kernel on the motorola lopec p011 board with bdi tools.
And the first thing I must solve is to let the ppcbug go under the bdi 
control.But  I don't know where the entry of ppcbug is,so I can't go the 
ppcbug.Has anybody know that?Or,the ppcbug can not be run under this 
circumstances?

  Wait for your reply?
  Thanks in advance!


   yujing
yuj at mail.ndsc.com.cn

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





kgdb compile error

2002-12-20 Thread 于婧

hi!
  I want to debug the kernel with kgdb,so I build the kernel with 
CONFIG_KGDB.While there are something wrong with it.The error is listed below:
/
ppc_74xx-ld -T arch/ppc/vmlinux.lds -Ttext 0xc000 -Bstatic 
arch/ppc/kernel/head.o init/main.o init/version.o \
 --start-group \
 arch/ppc/kernel/kernel.o arch/ppc/platforms/platform.o arch/ppc/mm/mm.o 
arch/ppc/lib/lib.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
  drivers/char/char.o drivers/block/block.o drivers/misc/misc.o 
drivers/net/net.o drivers/media/media.o drivers/ide/idedriver.o 
drivers/scsi/scsidrv.o drivers/cdrom/driver.o drivers/pci/driver.o 
drivers/macintosh/macintosh.o \
 net/network.o \
 /home/yujing/mykernel/kernel/lib/lib.a \
 --end-group \
 -o vmlinux
ppc_74xx-ld: Dwarf Error: Could not find abbrev number 106.
ppc_74xx-ld: Dwarf Error: Could not find abbrev number 97.
ppc_74xx-ld: Dwarf Error: Line offset (33554432) bigger than line size (223020).
ppc_74xx-ld: Dwarf Error: Could not find abbrev number 95.
ppc_74xx-ld: Dwarf Error: Could not find abbrev number 95.
ppc_74xx-ld: Dwarf Error: Could not find abbrev number 95.
ppc_74xx-ld: Dwarf Error: Could not find abbrev number 95.
ppc_74xx-ld: Dwarf Error: Could not find abbrev number 95.
ppc_74xx-ld: Dwarf Error: Could not find abbrev number 99.
arch/ppc/kernel/kernel.o: In function `_get_L2CR':
arch/ppc/kernel/entry.S(.text+0x89fc): undefined reference to
'getDebugChar'
arch/ppc/kernel/entry.S(.text+0x89fc): relocation truncated to fit: R_PPC_REL24 
getDebugChar
arch/ppc/kernel/entry.S(.text+0x8a30): undefined reference to `getDebugChar'
arch/ppc/kernel/entry.S(.text+0x8a30): relocation truncated to fit: R_PPC_REL24 
getDebugChar
arch/ppc/kernel/entry.S(.text+0x8a4c): undefined reference to `getDebugChar'
arch/ppc/kernel/entry.S(.text+0x8a4c): relocation truncated to fit: R_PPC_REL24 
getDebugChar
arch/ppc/kernel/entry.S(.text+0x8a5c): undefined reference to `getDebugChar'
arch/ppc/kernel/entry.S(.text+0x8a5c): relocation truncated to fit: R_PPC_REL24 
getDebugChar
arch/ppc/kernel/entry.S(.text+0x8a7c): undefined reference to `putDebugChar'
arch/ppc/kernel/entry.S(.text+0x8a7c): relocation truncated to fit: R_PPC_REL24 
putDebugChar
arch/ppc/kernel/entry.S(.text+0x8a88): undefined reference to `putDebugChar'
arch/ppc/kernel/entry.S(.text+0x8a88): relocation truncated to fit: R_PPC_REL24 
putDebugChar
arch/ppc/kernel/entry.S(.text+0x8aa0): undefined reference to `putDebugChar'
arch/ppc/kernel/entry.S(.text+0x8aa0): relocation truncated to fit: R_PPC_REL24 
putDebugChar
arch/ppc/kernel/entry.S(.text+0x8aac): undefined reference to `putDebugChar'
arch/ppc/kernel/entry.S(.text+0x8aac): relocation truncated to fit: R_PPC_REL24 
putDebugChar
arch/ppc/kernel/entry.S(.text+0x8b20): undefined reference to `putDebugChar'
arch/ppc/kernel/entry.S(.text+0x8b20): relocation truncated to fit: R_PPC_REL24 
putDebugChar
arch/ppc/kernel/kernel.o(.text+0x8b3c):arch/ppc/kernel/entry.S: more undefined 
references to `putDebugChar' follow
arch/ppc/kernel/kernel.o: In function `_get_L2CR':
arch/ppc/kernel/entry.S(.text+0x8b3c): relocation truncated to fit: R_PPC_REL24 
putDebugChar
arch/ppc/kernel/entry.S(.text+0x8b58): relocation truncated to fit: R_PPC_REL24 
putDebugChar
arch/ppc/kernel/entry.S(.text+0x8b68): relocation truncated to fit: R_PPC_REL24 
putDebugChar
arch/ppc/kernel/entry.S(.text+0x8b78): relocation truncated to fit: R_PPC_REL24 
putDebugChar
arch/ppc/kernel/entry.S(.text+0x8b7c): undefined reference to `getDebugChar'
arch/ppc/kernel/entry.S(.text+0x8b7c): relocation truncated to fit: R_PPC_REL24 
getDebugChar
arch/ppc/kernel/entry.S(.text+0x8df4): undefined reference to 
`kgdb_interruptible'
arch/ppc/kernel/entry.S(.text+0x8df4): relocation truncated to fit: R_PPC_REL24 
kgdb_interruptible
arch/ppc/kernel/entry.S(.text+0x9388): undefined reference to 
`kgdb_interruptible'
arch/ppc/kernel/entry.S(.text+0x9388): relocation truncated to fit: R_PPC_REL24 
kgdb_interruptible
make: *** [vmlinux] Error 1
 ///
What's the problem?Wait for your help!
Thanks in advance!
 yujing
   yuj 
at mail.ndsc.com.cn

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





New style dpalloc/hostalloc routines (diff).

2002-12-20 Thread Pantelis Antoniou
Paul Mackerras wrote:

Pantelis Antoniou writes:



+# Support new type of routines, usable from modules
+bool 'Use new type dpalloc routines()' CONFIG_NEW_DPALLOC
+bool 'Use new type hostalloc routines()' CONFIG_NEW_HOSTALLOC
+if [ $CONFIG_NEW_DPALLOC = y -o $CONFIG_NEW_HOSTALLOC = y ]; then
+  define_bool CONFIG_CPM_RHEAP y
+fi



I don't want to see config options that select between different
internal implementations of the same thing.  Either your new routines
are better, and we'll use them, or they are worse, and we'll use the
old ones.  Having a config option just leads to tons of ifdefs
throughout the code, which makes it harder to read and understand.
Having two implementations of the same thing is just bloat.

Similarly, I don't like the way all your new routines have a new_
prefix on the name.  You should be thinking of replacing the existing
routines rather than providing an alternative implementation with a
different name.  Where you have changed the API, either fix the
drivers or provide a compatibility routine.

The way it looks at the moment, it seems that you don't really have
the conviction that your code is better than what is there already.
Please redo your patch so that it just replaces the old routines.  And
please don't send it as a bkpatch since they are impossible to read, a
plain diff -u is much better.

Paul.






OK

Here is the updated patch in diff format as per your suggestions.

Any more suggestions?

Pantelis



-- next part --
A non-text attachment was scrubbed...
Name: linuxppc_2_4_devel-dpalloc.patch.gz
Type: application/x-gunzip
Size: 8109 bytes
Desc: not available
Url : 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20021220/daf2254c/attachment.bin
 


linuxppc_2_4_devel patch: board config updates

2002-12-20 Thread Wolfgang Denk
I wrote:

 this is a patch against linuxppc_2_4_devel BK Changeset 1.1197
 (trini at kernel.crashing.org|ChangeSet|20021219180614|11718)

 It updates the configuration files for a couple of  boards  supported
 by DENX.

Resent (compressed) because of list's attachment size limits.


Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.

-- next part --
A non-text attachment was scrubbed...
Name: board_configs.patch.gz
Type: application/x-gzip
Size: 10945 bytes
Desc: board_configs.patch.gz
Url : 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20021220/4be06b32/attachment.bin
 


Walnut configuration (old problem)

2002-12-20 Thread llandre

I've just start working with the Walnut board. I downloaded:
1) linuxppc_2_4 with rsync
2) linuxppc_2_4_devel with rsync
3) linuxppc_2_4_devel with bk

but in all cases I encountered the same problem described here
http://lists.linuxppc.org/linuxppc-embedded/200207/msg5.html.

I followed the instructions proposed here
http://lists.linuxppc.org/linuxppc-embedded/200207/msg6.html but this
didn't solve the problem.

Anybody can help me?

Thanks in advance,

llandre

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





pb compiling cross gcc, binutils, glibc and so on ...

2002-12-20 Thread James Don

I was given this script ... it works ;-)

Just match the directory structures ;-)

Maybe it will help ... make sure you have bison,flex,tetex installed ...

Good luck,
Jim

#!/bin/bash

#-
# This bash script creates a linux x866 gcc cross compiler
# for powerpc. This file has been tested with the following
# modules:
#1.) binutils-2.13.90.0.2.tar.gz
#2.) gcc-3.2.tar.gz
#3.) newlib-synSept12-2002.tar.gz
#-

# Defining target
TARGET=powerpc-linux


# Defining prefix - final toolchain location
PREFIX=$HOME/ppcgcc

# PATH must updated
PATH=$PREFIX/bin:$PATH
export PATH

# My local includes
INCLUDE=/usr/include/

# Configuring packages versions
GCC_VER=2.95.3
BINUTILS_VER=2.13.90.0.2
NEWLIB_VER=1.10.0

echo ===
echo BUILDING BINUTILS FOR $TARGET
echo ===
# binutils
rm -rf binutils-$BINUTILS_VER binutils
tar zxvf binutils-$BINUTILS_VER.tar.gz
mkdir binutils
cd binutils
../binutils-$BINUTILS_VER/configure --target=$TARGET --prefix=$PREFIX
make all
make install
cd ..



echo ===
echo BUILDING GCC FOR $TARGET
echo ===

echo extract GCC source from tar ball ...
rm -rf gcc-$GCC_VER gcc
tar zxvf gcc-core-$GCC_VER.tar.gz
tar zxvf gcc-g++-$GCC_VER.tar.gz


echo extract newlib source from tar ball- needed for gcc ...
rm -rf  newlib-$NEWLIB_VER newlib
tar zxvf newlib-$NEWLIB_VER.tar.gz

echo set up symbolic links to newlib in gcc dir
cd  gcc-$GCC_VER
ln -s ../newlib-$NEWLIB_VER/newlib newlib
ln -s ../newlib-$NEWLIB_VER/libgloss libgloss
cd ..

echo build gcc ...
mkdir gcc
cd gcc
../gcc-$GCC_VER/configure --target=$TARGET --with-newlib --prefix=$PREFIX
--with-gnu-as --with-gnu-ld --with-headers=$INCLUDE
make all
make install
cd ..



echo ===
echo BUILDING NEWLIB FOR $TARGET
echo ===
# newlib
mkdir newlib
cd newlib
../newlib-$NEWLIB_VER/configure --target=$TARGET --prefix=$PREFIX --nfp
make all
make install
cd ..


-Original Message-
From: Liu Fred-a18596 [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 19, 2002 8:58 PM
To: BREUVART Jean-Charles; linuxppc-embedded at lists.linuxppc.org
Subject: RE: pb compiling cross gcc, binutils, glibc and so on ...


 5. build gcc core 2.95.3 for powerpc cross compile, and install it in
 /opt/powerpc-linux/ :
   - cd /usr/src/gcc-2.95.3/
   - make clean
   - make distclean
   - CC=/usr/local/bin/gcc ./configure --target=powerpc-linux
 --enable-shared --enable-languages=c --with-newlib
 --prefix=/opt/powerpc-linux
   - add /opt/powerpc-linux at the end of $PATH, otherwise
 make doesn't
 find powerpc-linux-as, powerpc-linux-ld and so on
   - make

 Here is the trouble :

 choose-temp.c:29: stdio.h: Aucun fichier ou r?pertoire de ce type
 choose-temp.c:30: sys/types.h: Aucun fichier ou r?pertoire de ce type
 choose-temp.c:32: unistd.h: Aucun fichier ou r?pertoire de ce type
 choose-temp.c:35: stdlib.h: Aucun fichier ou r?pertoire de ce type
 choose-temp.c:38: sys/file.h: Aucun fichier ou r?pertoire de ce type

 there aren't any of those in /opt/powerpc-linux/ or its subdirs

It's true that there are no any of those files. They are in glibc which you
have not compiled yet.
Some useful tips at: http://www.mock.com/receiver/tools/


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





Walnut configuration (old problem)

2002-12-20 Thread Allen Curtis

 I've just start working with the Walnut board. I downloaded:
 1) linuxppc_2_4 with rsync
 2) linuxppc_2_4_devel with rsync
 3) linuxppc_2_4_devel with bk


make ARCH=ppc walnut_config


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





use bdi on board with ppcbug

2002-12-20 Thread Wolfgang Denk

In message 200212200829.CAA05221 at lists.linuxppc.org you wrote:

   I want to debug the kernel on the motorola lopec p011 board with bdi tools.
 And the first thing I must solve is to let the ppcbug go under the bdi 
 control.But  I don't know where the entry of ppcbug is,so I can't go the 
 ppcbug.Has anybody know that?Or,the ppcbug can not be run under this 
 circumstances?

Just type reset, followed by go.

Like any other boot loader, ppcbug will strat right  from  the  reset
vector.

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Eschew obfuscation.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





After Uncompresseing Linux..., what's next

2002-12-20 Thread Prakash kanthi

Folks,

I just wanted to provide more info on my env. I have
PPC405 based board with no network support forcing me
to use zImage.initrd.elf.

Can you suggest more on my problem described below? I
saw the memory values at 0x onwards after
uncompressing linux and they have changed. But when
the control jumps to 0x0, my board hangs. I see that
ESR is showing a value of 0x8000, meaning either
illegal instruction or Machine Check.

Can you tell what's going on? What happens next after
uncompressing? I am thinking it executes start_kernel
function which calls lock_kernel. Let me know if i am
wrong.

thanks,
Prakash




--- James Don JDon at spacebridge.com wrote:
 I just went thru this myself ... ;-)

 1.) Get a BDM/JTAG tool look halt the processor
 after you see  Now booting
 the kernel and look for valid asm at 0x0 ... make
 sure it mathes your
 start.s file ...

 2.) Veryfy you have your mem map from ppcboot
 matching requirements for the
 kernel i.e ram (physical=0x0, virtual=0xc000)
 and immr (phys 0xff00
 virtual 0xff00) ... I had my immr in ppc boot at
 0x0220 this screwed
 me for quite a while ... otherwise you have no
 printk ... the memory map is
 very important not to screw with some things depend
 on it (unless your
 careful) ...

 3.) verify you SMC1 (uart) is getting proper
 clocking config ... i.e
 bus-brg1 and brg1 is 16 times baud rate ...
 otherwise you have no printk

 4.) and always always keep in mind your RAM refesh
 could be wrong ...
 everyone will tell you this even when it has nothing
 to do with your problem
 ... try not to ignore them if you are still stuck
 ;-) But verifying step 1
 should prove your ok ...

 Best of luck,
 Jim


 -Original Message-
 From: Prakash kanthi [mailto:pkanthi at yahoo.com]
 Sent: Wednesday, December 18, 2002 7:14 PM
 To: LinuxPPC
 Subject: After Uncompresseing Linux..., what's next


 Hi there,

 I was trying to load linuxppc_2_4_devel onto my
 board.
 It goes through the board info read, UART init and
 Uncompressing the linux kernel. But after that, i do
 not see any messages and board hangs.

 Here is the UART output:
 
 OS Booting...

 loaded at: 0040 0060D1CC
 board data at: 0030 0044
 relocated to:  00405C24 00405C38
 zimage at: 00406290 004A08FF
 initrd at: 004A1000 006097CA
 avail ram: 0060E000 007F8000

 Linux/PPC load: console=ttyS0,9600 console=tty1
 ip=on
 root=/dev/xsysace/disc0/pa
 rt3 rw
 Uncompressing Linux...done.
 Now booting the kernel
 ---

 After the last line, it hangs. I get a feeling that,
 the uncompressing process is not writing in the
 memory
 starting from 0x and, after uncompressing,
 it
 is jumping into 0x and is not able to find
 anything.

 My questions are,
 1. How can i make sure that, the uncompressing
 process
 is going to start writing the data from 0x.

 2. How big a space this uncompressing process needs?
 And also how much overall memory is required for
 running linux. I just have 8MB SDRAM.

 3. What is the next step in the booting process?
 Which
 Device (eth, pci, ide, ???) Initialization?

 Your help is appreciated.

 thanks,
 Prakash




** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





E1/T1 on mpc8260.

2002-12-20 Thread Omanakuttan

Greetings,
We are developing a bridge which will convert 7 E1/T1 channels to
100Mbps ethernet using mpc8260 and Exar XRT84L38 Octal framer.

According the design, TDMs will be fed data from octal T1/E1 framer. I
will have to program the MCC to accept data from the TDMs and give it to
a pppd daemon.

If the TDMs are fed data from the framer (i.e. E1/T1's stripped of
signaling and channeling information), how many channels do I have to
program in the MCC?
Do I have to program one channel for each E1/T1 lines or 30 channels for
each E1 and 24 channels for each T1s? Or any of the approach is OK
provided I do not want the 64kbps granularity and ready to accept it as
a big stram of bytes (64 x 30 kbps)? if I do so, can I demultiplex it
using some other device?

if one E1 is accepted as one channel in MCC, then why is it stated that
it takes 128 channels of 64k each? (MPC8260UM.pdf,

The motorola manual uses the term `channel` both for E1 lines and the
thirty (or 32) 'channels' inside it. I am confused.
Any help is appreciated.

Thanks and regards,
Om.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





After Uncompresseing Linux..., what's next

2002-12-20 Thread Prakash kanthi

I found the correct exception guys. It means
Privileged Instruction Exception.

--- Prakash kanthi pkanthi at yahoo.com wrote:

 Folks,

 I just wanted to provide more info on my env. I have
 PPC405 based board with no network support forcing
 me
 to use zImage.initrd.elf.

 Can you suggest more on my problem described below?
 I
 saw the memory values at 0x onwards after
 uncompressing linux and they have changed. But when
 the control jumps to 0x0, my board hangs. I see that
 ESR is showing a value of 0x8000, meaning either
 illegal instruction or Machine Check.

 Can you tell what's going on? What happens next
 after
 uncompressing? I am thinking it executes
 start_kernel
 function which calls lock_kernel. Let me know if i
 am
 wrong.

 thanks,
 Prakash




 --- James Don JDon at spacebridge.com wrote:
  I just went thru this myself ... ;-)
 
  1.) Get a BDM/JTAG tool look halt the processor
  after you see  Now booting
  the kernel and look for valid asm at 0x0 ... make
  sure it mathes your
  start.s file ...
 
  2.) Veryfy you have your mem map from ppcboot
  matching requirements for the
  kernel i.e ram (physical=0x0, virtual=0xc000)
  and immr (phys 0xff00
  virtual 0xff00) ... I had my immr in ppc boot
 at
  0x0220 this screwed
  me for quite a while ... otherwise you have no
  printk ... the memory map is
  very important not to screw with some things
 depend
  on it (unless your
  careful) ...
 
  3.) verify you SMC1 (uart) is getting proper
  clocking config ... i.e
  bus-brg1 and brg1 is 16 times baud rate ...
  otherwise you have no printk
 
  4.) and always always keep in mind your RAM refesh
  could be wrong ...
  everyone will tell you this even when it has
 nothing
  to do with your problem
  ... try not to ignore them if you are still stuck
  ;-) But verifying step 1
  should prove your ok ...
 
  Best of luck,
  Jim
 
 
  -Original Message-
  From: Prakash kanthi [mailto:pkanthi at yahoo.com]
  Sent: Wednesday, December 18, 2002 7:14 PM
  To: LinuxPPC
  Subject: After Uncompresseing Linux..., what's
 next
 
 
  Hi there,
 
  I was trying to load linuxppc_2_4_devel onto my
  board.
  It goes through the board info read, UART init and
  Uncompressing the linux kernel. But after that, i
 do
  not see any messages and board hangs.
 
  Here is the UART output:
  
  OS Booting...
 
  loaded at: 0040 0060D1CC
  board data at: 0030 0044
  relocated to:  00405C24 00405C38
  zimage at: 00406290 004A08FF
  initrd at: 004A1000 006097CA
  avail ram: 0060E000 007F8000
 
  Linux/PPC load: console=ttyS0,9600 console=tty1
  ip=on
  root=/dev/xsysace/disc0/pa
  rt3 rw
  Uncompressing Linux...done.
  Now booting the kernel
  ---
 
  After the last line, it hangs. I get a feeling
 that,
  the uncompressing process is not writing in the
  memory
  starting from 0x and, after uncompressing,
  it
  is jumping into 0x and is not able to find
  anything.
 
  My questions are,
  1. How can i make sure that, the uncompressing
  process
  is going to start writing the data from
 0x.
 
  2. How big a space this uncompressing process
 needs?
  And also how much overall memory is required for
  running linux. I just have 8MB SDRAM.
 
  3. What is the next step in the booting process?
  Which
  Device (eth, pci, ide, ???) Initialization?
 
  Your help is appreciated.
 
  thanks,
  Prakash
 
 





** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





After Uncompresseing Linux..., what's next

2002-12-20 Thread Gary Thomas

On Fri, 2002-12-20 at 09:48, Prakash kanthi wrote:
 I do have xilinx tools and i am working with their V2P
 product. I completely understands what you are said.
 But the problem is, right after the uncompression and
 cpy to 0x, i loose total control because i
 don't have any clue what is getting executed.


What sort of things can you do with the Xilinx tools?  Is
there any way to set [hardware] breakpoints or single step?

 And also, i have my boot monitor code at 0x,
 before uncompress process overwrites it. I see that
 some of that code is getting executed after jump to
 0x0. I reason i am overwriting 0x0 is because, i only
 have 8MB RAM.


8M should be plenty of RAM.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





After Uncompresseing Linux..., what's next

2002-12-20 Thread Jim Potter

I'm not especially familiar with the 4xx cpus, but on the 74xx cpus the MSR
register has the privilege level bit, which determines if the processor can
execute both user- and supervisor-level instructions, or only user-level
instructions.

This needs to be setup by the bootloader to allow supervisor-level instructions
to be executed, else you'll see some errors.


 The early code needs to perform many privileged instructions;  make sure that
 you aren't restricting the cpu to only user instructions.

  I found the correct exception guys. It means
  Privileged Instruction Exception.
 
  --- Prakash kanthi pkanthi at yahoo.com wrote:
  
   Folks,
  
   I just wanted to provide more info on my env. I have
   PPC405 based board with no network support forcing
   me
   to use zImage.initrd.elf.
  
   Can you suggest more on my problem described below?
   I
   saw the memory values at 0x onwards after
   uncompressing linux and they have changed. But when
   the control jumps to 0x0, my board hangs. I see that
   ESR is showing a value of 0x8000, meaning either
   illegal instruction or Machine Check.
  
   Can you tell what's going on? What happens next
   after
   uncompressing? I am thinking it executes
   start_kernel
   function which calls lock_kernel. Let me know if i
   am
   wrong.
  
   thanks,
   Prakash
  
  
  
  
   --- James Don JDon at spacebridge.com wrote:
I just went thru this myself ... ;-)
   
1.) Get a BDM/JTAG tool look halt the processor
after you see  Now booting
the kernel and look for valid asm at 0x0 ... make
sure it mathes your
start.s file ...
   
2.) Veryfy you have your mem map from ppcboot
matching requirements for the
kernel i.e ram (physical=0x0, virtual=0xc000)
and immr (phys 0xff00
virtual 0xff00) ... I had my immr in ppc boot
   at
0x0220 this screwed
me for quite a while ... otherwise you have no
printk ... the memory map is
very important not to screw with some things
   depend
on it (unless your
careful) ...
   
3.) verify you SMC1 (uart) is getting proper
clocking config ... i.e
bus-brg1 and brg1 is 16 times baud rate ...
otherwise you have no printk
   
4.) and always always keep in mind your RAM refesh
could be wrong ...
everyone will tell you this even when it has
   nothing
to do with your problem
... try not to ignore them if you are still stuck
;-) But verifying step 1
should prove your ok ...
   
Best of luck,
Jim
   
   
-Original Message-
From: Prakash kanthi [mailto:pkanthi at yahoo.com]
Sent: Wednesday, December 18, 2002 7:14 PM
To: LinuxPPC
Subject: After Uncompresseing Linux..., what's
   next
   
   
Hi there,
   
I was trying to load linuxppc_2_4_devel onto my
board.
It goes through the board info read, UART init and
Uncompressing the linux kernel. But after that, i
   do
not see any messages and board hangs.
   
Here is the UART output:

OS Booting...
   
loaded at: 0040 0060D1CC
board data at: 0030 0044
relocated to:  00405C24 00405C38
zimage at: 00406290 004A08FF
initrd at: 004A1000 006097CA
avail ram: 0060E000 007F8000
   
Linux/PPC load: console=ttyS0,9600 console=tty1
ip=on
root=/dev/xsysace/disc0/pa
rt3 rw
Uncompressing Linux...done.
Now booting the kernel
---
   
After the last line, it hangs. I get a feeling
   that,
the uncompressing process is not writing in the
memory
starting from 0x and, after uncompressing,
it
is jumping into 0x and is not able to find
anything.
   
My questions are,
1. How can i make sure that, the uncompressing
process
is going to start writing the data from
   0x.
   
2. How big a space this uncompressing process
   needs?
And also how much overall memory is required for
running linux. I just have 8MB SDRAM.
   
3. What is the next step in the booting process?
Which
Device (eth, pci, ide, ???) Initialization?
   
Your help is appreciated.
   
thanks,
Prakash
   
   
  
  
  
 

 --
 Sincerely,

 Jim Potter
 45th Parallel Processing

   Firefighting: Bustin' ours, Savin' yours.


--
Sincerely,

Jim Potter
45th Parallel Processing

  Firefighting: Bustin' ours, Savin' yours.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





use bdi on board with ppcbug

2002-12-20 Thread Steven Blakeslee

Good point.

-Original Message-
From: Wolfgang Denk [mailto:[EMAIL PROTECTED]
Sent: Friday, December 20, 2002 12:11 PM
To: Steven Blakeslee
Cc: ??; linuxppc-embedded at lists.linuxppc.org
Subject: Re: use bdi on board with ppcbug


In message D73A25AA6E54D511AD74009027B1110F3C050D at ORION you wrote:
 Also, wouldn't the INIT section of the config script have to be empty?

This depends on the hardware. On many boards a minimal initialization
MUST be performed (like switching off the watchdog timer :-)

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Wish not to seem, but to be, the best.  - Aeschylus

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





use bdi on board with ppcbug

2002-12-20 Thread Dave Wilhardt

Wouldn't it be the PowerPC reset address - 0xFFF00100?

 wrote:

 hi!
   I want to debug the kernel on the motorola lopec p011 board with bdi tools.
 And the first thing I must solve is to let the ppcbug go under the bdi 
 control.But  I don't know where the entry of ppcbug is,so I can't go the 
 ppcbug.Has anybody know that?Or,the ppcbug can not be run under this 
 circumstances?

   Wait for your reply?
   Thanks in advance!

yujing
 yuj at 
 mail.ndsc.com.cn



** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





New invalidate/clean/flush_dcache functions

2002-12-20 Thread Joakim Tjernlund

How about adding new xxx_dcache_range() functions functions to PPC.
Below is my suggestion which is more logical and more efficient:


static inline void invalidate_dcache_region(void *adr, unsigned long len)
{
if(len == 0) return;
len = ((len-1)  LG_L1_CACHE_LINE_SIZE) +1;
do {
asm  (dcbi 0,%0 : : r (adr));
adr += L1_CACHE_LINE_SIZE;
} while(--len  0);
}

static inline void clean_dcache_region(void *adr, unsigned long len)
{
if(len == 0) return;
len = ((len-1)  LG_L1_CACHE_LINE_SIZE) +1;
do {
asm  (dcbst 0,%0 : : r (adr));
adr += L1_CACHE_LINE_SIZE;
} while(--len  0);
asm  (sync : : );
}

static inline void flush_dcache_region(void *adr, unsigned long len)
{
if(len == 0) return;
len = ((len-1)  LG_L1_CACHE_LINE_SIZE) +1;
do {
asm  (dcbf 0,%0 : : r (adr));
adr += L1_CACHE_LINE_SIZE;
} while(--len  0);
asm  (sync : : );
}

int *ptr1;
char *ptr2;
void *ptr3;

main()
{
unsigned long len1 = 1600;
unsigned long len2 = 900;
unsigned long len3 = 702;

invalidate_dcache_region(ptr1, len1);
clean_dcache_region(ptr2, len2);
flush_dcache_region(ptr3, len3);
}

/* Assembler output:
ppc_8xx-gcc -O2 -S inv_dcache.c -mregnames inv_dcache.c

.file   inv_dcache.c
gcc2_compiled.:
.section.text
.align 2
.globl main
.typemain, at function
main:
li %r0,100
mtctr %r0
lis %r9,ptr1 at ha
lwz %r9,ptr1 at l(%r9)
.L39:
dcbi 0,%r9
addi %r9,%r9,16
bdnz .L39
li %r0,57
mtctr %r0
lis %r9,ptr2 at ha
lwz %r9,ptr2 at l(%r9)
.L30:
dcbst 0,%r9
addi %r9,%r9,16
bdnz .L30
sync
li %r0,44
mtctr %r0
lis %r9,ptr3 at ha
lwz %r9,ptr3 at l(%r9)
.L36:
dcbf 0,%r9
addi %r9,%r9,16
bdnz .L36
sync
blr
.Lfe1:
.sizemain,.Lfe1-main
.comm   ptr1,4,4
.comm   ptr2,4,4
.comm   ptr3,4,4
.ident  GCC: (GNU) 2.95.3 20010315 (release/MontaVista)

*/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





use bdi on board with ppcbug

2002-12-20 Thread pat_etc

to see where your boot code starts:

at the BDI prompt the command:
reset halt  enter
followed by the command
info  enter

BDI responds with:

Target state  : debug mode
Debug entry cause : debug port nonm
maskable breakpoint
   Current PC: 0xfff00100

current pc is where your boot code starts
hope this helps
pat

- Original Message -
From: Wolfgang Denk [EMAIL PROTECTED]
Sent: Friday, December 20, 2002 1:09 PM
Subject: Re: use bdi on board with ppcbug


 In message 3E03565A.49119F4 at synergymicro.com you wrote:
 
  Wouldn't it be the PowerPC reset address - 0xFFF00100?

 0xFFF00100 is just one out of several possibilities, depending on CPU
 type and system configuration.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





Serious Problem: After Uncompresseing Linux..., what's next

2002-12-20 Thread Prakash kanthi

Hi Folks,

I think finally i have idea as to why boot process was
failing. After uncompressing linux image, the code
execution was aborting with an ESR value of
0x0800, which stands for ILLEGAL INSTRUCTION.
When i checked the instruction causing this, i figured
that, 'tlbia' (0x2384) is the culprit. tlbia is a
valid instruction in PPC405 instruction set.

I still don;t understand, how come it is getting
rejected. Am i missing anything? Can anyone please
throw some light on this?

thanks,
Prakash




--- Prakash kanthi pkanthi at yahoo.com wrote:

 Gary,

 I really appreciate your help. Here is what i am
 doing. Sorry it is little long. But was necessasry.

 1. I have a boot loader(xrom.elf) of size around
 400KB
 which basically have menu driven tests along with an
 option to jump to linux kernel(zImage.initrd.elf).

 2. xrom.elf is compiled to start at 0xfffc and
 jump to 0x to have rest of functionality.
 zImage.initrd.elf is compiled to start at
 0x0040.

 3. I load zImage.initrd.elf first and then xrom.elf
 (xilinx tool makes sure that they are loaded to
 corresponding locations based on ELF header).

 4. After loading both, i start running xrom.elf and
 it
 shows up a menu in my UART terminal. I jump to linux
 (0x0040).

 5. I see that linux is basically reading the board
 info, setting UART, prints some boot messages onto
 it
 and then performs uncompression (gunzip function
 takes
 the rest of linux image and puts the uncompressed
 code
 starting from 0x0).

 6. Up untill, everything is ok. After this, control
 jumps to 0x0 and starts executing.

 My problems are,

 a. Once the uncompression process is done, i am not
 sure if the image is copied to 0x0 (i do see value
 changes in memory starting from 0x0).
 b. As uncompression process is embedded into
 zImage.initrd.elf, i do not objdump does not tell me
 which function it is going to execute after
 uncompression.

 Please suggest.

 Thanks,
 Prakash





 --- Gary Thomas gary at chez-thomas.org wrote:
  On Fri, 2002-12-20 at 09:48, Prakash kanthi wrote:
   I do have xilinx tools and i am working with
 their
  V2P
   product. I completely understands what you are
  said.
   But the problem is, right after the
 uncompression
  and
   cpy to 0x, i loose total control because
 i
   don't have any clue what is getting executed.
  
 
  What sort of things can you do with the Xilinx
  tools?  Is
  there any way to set [hardware] breakpoints or
  single step?
 
   And also, i have my boot monitor code at
  0x,
   before uncompress process overwrites it. I see
  that
   some of that code is getting executed after jump
  to
   0x0. I reason i am overwriting 0x0 is because, i
  only
   have 8MB RAM.
  
 
  8M should be plenty of RAM.
 
 





** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





405LP - Beech with SSX firmware

2002-12-20 Thread Hollis Blanchard
Hi, this patch (copied from Arctic) allows Beech to boot with SSX
firmware. If there's a way to detect OpenBIOS vs PIBS (I've asked for
confirmation) then I think the Beech and Arctic ifdefs could be combined
in the file. There may not be though, and in the meantime this works.

Please apply to _2_4_devel.

-Hollis
--
PowerPC Linux
IBM Linux Technology Center
-- next part --
= arch/ppc/boot/simple/embed_config.c 1.20 vs edited =
--- 1.20/arch/ppc/boot/simple/embed_config.cSun Dec 15 20:02:08 2002
+++ edited/arch/ppc/boot/simple/embed_config.c  Wed Dec 18 15:53:18 2002
@@ -868,12 +868,33 @@
 #endif
 
 #ifdef CONFIG_BEECH
-static void
-get_board_info(bd_t **bdp)
+/* Several bootloaders have been used on Beech. We assume either
+ * SSX or OpenBIOS */
+
+#define SSX_BIOS_ADDR  0x
+#define SSX_BIOS_GET_BOARD_INFO 0
+
+struct ssx_bios_id {
+   unsigned int boot_branch;   /* Branch to bootcode */
+   char ssx_bios[8];   /* SSX BIOS (no \0) */
+   void (*bios_entry_point)(unsigned int, bd_t *); /* Call 
bios_entry_point(cmd, data) */
+};
+
+extern int memcmp(const void *s1, const void *s2, size_t n);
+
+static void get_board_info(bd_t **bdp)
 {
-   typedef void (*PFV)(bd_t *bd);
-   ((PFV)(*(unsigned long *)BOARD_INFO_VECTOR))(*bdp);
-   return;
+   struct ssx_bios_id *ssx = (struct ssx_bios_id *)SSX_BIOS_ADDR;
+
+   /* Check for SSX signature */
+
+   if (memcmp(ssx-ssx_bios, SSX BIOS, 8) == 0) {
+   ssx-bios_entry_point(SSX_BIOS_GET_BOARD_INFO, *bdp);
+   } else {
+   /* It's not SSX, so assume OpenBIOS */
+   typedef void (*PFV)(bd_t *bd);
+   ((PFV)(*(unsigned long *)BOARD_INFO_VECTOR))(*bdp);
+   }
 }
 
 void