>> Any idea?
> 
> I haven't fooled with the ejtag stuff in urjtag, but I think you may
> be bumping up against MIPS addressing and the TLB.  It's not clear if
> you're supposed to provide a virtual address or a physical one with
> the detectflash command, in the old old openocd "jtag" code it used to
> depend on the bus driver.

This may not be related but I found out that with the trunk version of urjtag,
when ejtag_dma_bus_init() returns URJ_STATUS_FAIL, this is not taken into
account by the upper level layers.

So whenever an operation is attempt afterward, a null pointer is deferenced and
it segfault.

(Note: The root of the problem is a code block that had already been discussed:
> /* Wait until processor is in break */
>     ejctrl->in->data[JtagBrk] = 0;
>     do
>     {
>         urj_tap_chain_shift_data_registers (bus->chain, 1);
>         timeout--;
>         if (!timeout)
>             break;
>     }
>     while (ejctrl->out->data[BrkSt] == 1);

: Some boxes need BrkSt to 0, some to 1. The doc says this bit should turn to
1, but on by box, it never does, without adverse effect.

I'm still investigating that.


> 
> In MIPS virtual addresses the top 3 bits tell you what the rules are
> for the access.  0x1e000000 virtual would fall into the user space
> which requires a TLB lookup.  The cpu core inside the part will throw
> an TLB exception if there's not hit in the TLB (which is by default
> uninitialized).
> 
> 0xbe000000 is in the uncached, unmapped (no TLB) section called KSEG1.
>  In KSEG1 the physical address is the same as the virtual address with
> the top 3 bits forced to 0.  The MIPS boot address is in KSEG1 @
> 0xbfc00000

Interesting... That means we *can* in fact reprogram the flash whenever the
bootloader is really, really ruined ?

I have a box that have this problem: the flash is fully empty, and I can't
detect it at all.
I'll try with the above address...

Thanks !



> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> UrJTAG-development mailing list
> UrJTAG-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/urjtag-development
> 


-- 
People in the embedded space don't do prototypes. They hack something until it
works, then it's done.
---
Always code as if the person who will maintain your code is a maniac serial
killer that knows where you live

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
UrJTAG-development mailing list
UrJTAG-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to