Re: [U-Boot-Users] s3c2440 -- serial_init

Hi Vishal,
I am stuck with the Kernel load address and entry point. It keeps on resetting. Output as shown below. My ram range is from 30000000 to 38000000.
U-Boot 1.3.2 (Apr 4 2008 - 18:02:03)
DRAM: 128 MB Flash: 32 MB Using default environment
In: serial Out: serial Err: serial Hit any key to stop autoboot: 0 ## Booting image at 34000000 ... Image Name: TIJU Linux-2.6.24.4 Image Image Type: ARM Linux Kernel Image (gzip compressed) Data Size: 4288104 Bytes = 4.1 MB Load Address: 36000000 Entry Point: 36000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK
Starting kernel ...
undefined instruction pc : [<3790e004>] lr : [<3101175c>] sp : 30fcfaf8 ip : 30fcffb8 fp : 00000000 r10: 00000001 r9 : 30fcfe98 r8 : 30fcffdc r7 : 31012e94 r6 : 34000040 r5 : 310194b4 r4 : 310194b1 r3 : 36000000 r2 : 30000100 r1 : 0000016a r0 : 00000000 Flags: nzCv IRQs off FIQs off Mode SVC_32 Resetting CPU ...
data abort pc : [<31010ca8>] lr : [<31010d40>] sp : 30fcfa88 ip : 3101afdc fp : 00000000 r10: 00000001 r9 : 30fcfe98 r8 : 30fcffdc r7 : 31012e94 r6 : 34000040 r5 : 0065ba3e r4 : 00036042 r3 : 3101afe0 r2 : 00036042 r1 : 00003707 r0 : 000036ff Flags: nzCv IRQs on FIQs on Mode SVC_32 Resetting CPU ...
What could be the problem?
Thanks, Tiju
----- Original Message ---- From: Vishal Oliyil Kunnil vishal.ok@gmail.com To: Tiju tj_jac@yahoo.co.in Sent: Friday, 4 April, 2008 1:42:30 PM Subject: Re: [U-Boot-Users] s3c2440 -- serial_init
Hi Tiju, Never used the controller either, but I suggest you try enabling the debug macro in the ethernet driver ... CONFIG_DM9000_DEBUG
-- snip -- #ifdef CONFIG_DM9000_DEBUG #define DM9000_DBG(fmt,args....) printf(fmt ,##args) #else /* */ #define DM9000_DBG(fmt,args...) #endif /* */ --snip-
Regards, Vishal On Fri, Apr 4, 2008 at 12:35 PM, Tiju tj_jac@yahoo.co.in wrote:
Hi Vishal,
No, the ethernet controller is outside the processor. We are using DM9000A. The link led does not glow when LAN cable is connected. Instead when we ping it glows, but does not ping correctly.
Thank You, Tiju
----- Original Message ---- From: Vishal Oliyil Kunnil vishal.ok@gmail.com To: Tiju tj_jac@yahoo.co.in
Sent: Thursday, 3 April, 2008 8:32:26 PM Subject: Re: [U-Boot-Users] s3c2440 -- serial_init
Is the ethrnet core inside the processor ? (never used the smcx ...) Does ping work ? Does the link LED glow when you plug in the LAN cable ?
Vishal
On Thu, Apr 3, 2008 at 7:05 PM, Tiju tj_jac@yahoo.co.in wrote:
Hi Vishal,
Thank You so much for your help. The u-boot is up and running from
yesterday
onwards. :) The network driver doesn't seem to work properly. Trying to figure it out. It says---
DPB2440 # tftpboot dm9000 i/o: 0x18000000, id: 0x90000a46 MAC: 00:e0:63:0e:56:78 could not establish link TFTP from server 192.168.100.6; our IP address is 192.168.100.110 Filename 'zImage'. Load address: 0x34000000 Loading: T T T #T T T T T T T Retry count exceeded; starting again TFTP from server 192.168..100.6; our IP address is 192.168.100.110 Filename 'zImage'. Load address: 0x34000000 Loading: T T #T T T T T T T T ....
Any idea what the problem is?
Regards, Tiju
----- Original Message ---- From: Vishal Oliyil Kunnil vishal.ok@gmail.com To: Tiju tj_jac@yahoo.co.in
Sent: Wednesday, 2 April, 2008 11:29:21 AM Subject: Re: [U-Boot-Users] s3c2440 -- serial_init
Hi Tiju, You should not write the image to RAM. U-boot should re-locate by itself. What is the debugger that you use ? Try putting a breakpoint at address of start_armboot() -> you can get the address by objdump -S u-boot.elf > u-boot.dump A memory dump should show contents of 0x0 anf 0x31000000 to be same. Also I suggest you use a stable release of u-boot and not U-Boot 1.3.2-00046-g23e20aa-dirty.
Regards, -Vishal
On Wed, Apr 2, 2008 at 8:58 AM, Tiju tj_jac@yahoo.co.in wrote:
Hi Vishal,
Thanks for the tips. After I compiling with TEXT_BASE=0x31000000 and commenting
- CONFIG_SKIP_LOWLEVEL_INIT
- CONFIG_SKIP_RELOCATE_UBOOT it does not work directly. After this I
just
wrote the same image to the NOR flash as well as the RAM (starting from 0x31000000) then on the u-boot the following appears.
U-Boot 1.3.2-00046-g23e20aa-dirty (Apr 1 2008 - 19:33:51)
DRAM: 64 MB *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial DPB2440 #
After this it hangs. ie. no input or output.
I think the initial problem to be taken care of is the relocation and
then
the serial. How do we go about these issues?
Thanks in advance. Tiju
----- Original Message ---- From: Vishal Oliyil Kunnil vishal.ok@gmail.com To: Tiju tj_jac@yahoo.co.in
Sent: Monday, 31 March, 2008 6:31:43 PM Subject: Re: [U-Boot-Users] s3c2440 -- serial_init
Tiju,
Read the documentation: ----- snip - README -----
- CONFIG_SKIP_LOWLEVEL_INIT
- CONFIG_SKIP_RELOCATE_UBOOT [ARM only] If these variables are defined, then certain low level initializations (like setting up the memory controller) are omitted and/or U-Boot does not relocate itself into RAM. Normally these variables MUST NOT be defined. The only exception is when U-Boot is loaded (to RAM) by some other boot loader or by a debugger which performs these intializations itself.
----- snip - README -------
I suggest you enable the RELOCATE and LOWLEVEL_INIT (by commenting the defines)
- u-boot AFAIK cannot run lke the XIP kernel off NOR Flash; inspite of
the fact the NOR flash can be directly read by the processor - unlike NAND. There is no noticeable performance hit or wastage of memory if you let u-boot relocate by itself.
TEXT_BASE=0x31000000 in my opinion is correct.
After relocating, a dump of flash contents and RAM (TEXT_BASE) contents should show you the same contents. If it does not - perhaps you have not configured the memory controller correctly. This can be verified by checking if you are able to write to RAM using the debugger after memory initializations (which is typically in LOWLEVEL_INIT, which you have skipped - I dont know if this is so for the s3c2440 ).
Regards, Vishal
On Mon, Mar 31, 2008 at 5:16 PM, Tiju tj_jac@yahoo.co.in wrote:
Thanks Vishal.. I compiled with TEXT_BASE=0x31000000 and for
start_armboot
jumps to 0x310004d0 but there are junk values present there.
By default these are enabled: #define CONFIG_SKIP_RELOCATE_UBOOT 1 #define CONFIG_SKIP_LOWLEVEL_INIT 1 so u-boot does not relocate.
Still now what should the value of TEXT_BASE be? I dont want to
relocate
u-boot because from NOR flash byte by byte read can be done.
Regards, Tiju
----- Original Message ---- From: Vishal Oliyil Kunnil vishal.ok@gmail.com To: Tiju tj_jac@yahoo.co.in
Sent: Monday, 31 March, 2008 2:58:12 PM Subject: Re: [U-Boot-Users] s3c2440 -- serial_init
TEXT_BASE is the address for which u-boot is linked for.If you take an objdump of u-boot elf, you will see that it links for address beginning with that specified by TEXT_BASE. Meaning, you link for the address thus specified. Typically the binary will be run from the reset vector of the processor, which is not necessarily TEXT_BASE : say 0x0 flash address. U-boot starts executing from the reset vector, relocates to RAM and since it is linked for TEXT_BASE, the ldr pc, _start_armboot will branch to the start_armboot which is in RAM. -------snip - start.S -------------- ldr pc, _start_armboot _start_armboot: .word start_armboot -------snip - start.S -------------- Regards, Vishal
On Mon, Mar 31, 2008 at 1:41 PM, Tiju tj_jac@yahoo.co.in wrote:
Hi Vishal,
What does TEXT_BASE mean? Is this the place where the UBOOT gets
relocated?
Thank You, Tiju
----- Original Message ---- From: "vishal.ok@gmail.com" vishal..ok@gmail.com To: Tiju tj_jac@yahoo.co.in Sent: Monday, 31 March, 2008 1:35:47 PM Subject: Re: [U-Boot-Users] s3c2440 -- serial_init
Hi Tiju,
Try with TEXT_BASE=0x31000000, and leave start.s untouched ! I think you have misinterpreted the meaning of TEXT_BASE.
Regards, Vishal
On 3/31/08, Tiju tj_jac@yahoo.co.in wrote:
Hi Michael,
I have verified all the RAM initializations in board/smdk2440/lowlevel_init.S and it seems to be fine. The other changes that I have done are
1.. In the board/smdk2440/config.mk file I changed TEXT_BASE =
0x33F80000
to
TEXT_BASE = 0x00000000 because I am booting from the NOR flash.
The
NOR
flash address range is 0x00000000 - 0x08000000. The RAM address
range
is
0x30000000 - 0x38000000.
If I compile it with TEXT_BASE = 0x33F80000 it does not run at
all!
- When I changed this I found that it has a clash with the stack
building
in cpu/arm920t/start.S. Therefore I changed it to .......... /* Set up the stack */ stack_setup: /* ldr r0, _TEXT_BASE */ /* upper 128 KiB: relocated uboot */ mov r0, #0x33 /* make stack at 33F8*/ mov r0, r0, lsl #24 mov r1, #0xF8 mov r1, r1, lsl #16 orr r0, r0, r1 ........
Would these be a problem for the memory initializations?
Thanks in advance Tiju
> Hi all > > I am trying to port u-boot to a s3c2440 samsung processor. > > I applied the smdk2440 boards patch (almost similar
architecture)
and
> trying to modify it for our board's requirement. But during the > serial_init it goes to the _serial_putc and then after certain
loops
> it goes to the hang function and hangs there. > > What could be the problem? Or am I doing some wrong
initializations?
> > Are you sure that the memory inizializzation is correct?
Regards Michael
5, 50, 500, 5000 - Store N number of mails in your inbox. Go to
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html
Get your domain and website for less than Rs.100/month*. Click
here.
Get your domain and website for less than Rs.100/month*.. Click here.
Bring your gang together - do your thing. Start your group.
Bring your gang together - do your thing. Start your group.
Get your domain and website for less than Rs.100/month*. Click here.
Share files, take polls, and make new friends - all under one roof. Go to http://in.promos.yahoo.com/groups/

On Fri, Apr 04, 2008 at 08:29:48PM +0530, Tiju wrote:
Hi Vishal,
I am stuck with the Kernel load address and entry point. It keeps on resetting. Output as shown below.
are you sure
1) your PLL's are configured correctly, i.e. * the memory bus doesn't exceed the maximum bus frequency allowed given your capacitive bus load (see samsung manual) * the core CPU speed doesn't exceed the max speed * the core CPU voltage is configued correct for the core CPU clock rate
2) Are you sure your linux kernel is compiled for the right ARM variant with no strange compiler flags?
I suggest running extensive memory testing routines (u-boot has memory testing built-in) before trying to boot the kernel, just to make sure the entire hardware and PLL / power config is stable at all.
Another interesting question would be to compare the memory contents at the program counter with the content it should have according to the uImage/zImage/vmlinux file of th kernel.
participants (2)
-
Harald Welte
-
Tiju