[U-Boot-Users] Fw: cpu POST hang

Brandon Clarke bmclarke2001 at yahoo.com
Tue Jan 2 22:37:34 CET 2007

----- Original Message ----
From: Andy Fleming <afleming at gmail.com>
To: Brandon Clarke <bmclarke2001 at yahoo.com>
Sent: Sunday, December 31, 2006 1:18:47 PM
Subject: Re: [U-Boot-Users] cpu POST hang

> The first argument to the function is in r3.  It's the code you want
> to execute.  Rather, it's a pointer to a function which executes that
> code.  This instruction is used to branch to that function with op1
> and op2 as arguments.  By commenting it out, you have circumvented the
> function entirely, and written op1 to *res.

> If you are hanging,  it is because code is not set properly, 

Beyond setting the CFG_POST_CPU flag in uboot I was unaware of other code modifications that needed to be made.  I was kind of curious as to how general cpu post code could be created.  Does the cpu post code not support particular processors?  Can you elaborate on this further?

> or points to a function that never terminates.

cpu_post_exec_12 is the function that is being called (in the cpu_post_test_cmp function) and it's testing the "cmp" function of the cpu.  The code pointer (*code) contains this data:

unsigned long code[] =
            ASM_2C(test->cmd, test->cr, 3, 4),

test->cmd = OP_CMPW=0x7c000000 (which is the opcode for a cmp according to BookE)
test->cr=2=which is the register that will contain the result of the compare.

and 3, and 4 which are the registers (r3 and r4) which are supposed to contain the data to be compared.

Since the rest of the POST runs without a problem and, since the other cpu functions being tested also have an ASM_MFCR and an ASM_BLR function, I thought that the code causing the system to hang could be found in the ASM_2C definition.  In calculating the numbers for ASM_2C (opcode+res...etc.) the code looks like it should function fine.  Since this is the code that is supposed to be executed at the hanging branch I'm kind of confussed as to why it won't work.  Can anyone point me to other possibilities for this hang?



Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070102/bb6b19f2/attachment.htm 

More information about the U-Boot mailing list