Am 23.04.21 um 16:41 schrieb VR:
> Yes. Will do some more testing and submit a patch for the 4MB version of
> the board. Can I submit the patch here? I haven't used gerrit before.

It will be good if you'll try to make it with gerrit. There is always
first time ;)

>
>
>     On Thu, Apr 22, 2021 at 0:57, Oleksij Rempel
>     <li...@rempel-privat.de> wrote:
>     Hi
>
>     Am 22.04.21 um 00:50 schrieb VR:
>     > Sorry I made a mistake I posted the original
>     "board/linksys-wrt54gl.cfg" this is the modified one
>     > that worked without DMA:
>     > ----------------------------------------------------------------------
>     > #
>     > # Linksys WRT54GL v1.1
>     > #
>     >
>     > source [find ../../tcl/target/bcm5352e.cfg]
>     >
>     > set partition_list {
>     >     CFE        { Bootloader            0xbfc00000 0x00040000 }
>     >     firmware    { "Kernel+rootfs"        0xbfc40000 0x003b0000 }
>     >     nvram    { "Config space"        0xbfff0000 0x00010000 }
>     > }
>     >
>     > # External 4MB NOR Flash (Intel TE28F320C3BD90 or similar)
>     > set _FLASHNAME $_CHIPNAME.flash
>     > flash bank $_FLASHNAME cfi 0xbfc00000 0x00400000 2 2 $_TARGETNAME
>     > ----------------------------------------------------------------------
>
>     Thank you for testing! Can you send patches for this board?
>
>     >
>     > On Wednesday, April 21, 2021, 6:47:26 PM EDT, VR via OpenOCD-devel
>     > <openocd-devel@lists.sourceforge.net
>     <mailto:openocd-devel@lists.sourceforge.net>> wrote:
>     >
>     >
>     > Great! Yes that seems to work! Thanks.
>     >
>     > Might be worth changing the board cfg for wrt54gl to make this
>     work out of the box:
>     >
>     > Change CFI address in "board/linksys-wrt54gl.cfg" from 0x1c000000
>     to 0xbfc00000. Also update the
>     > partition addresses.
>     >
>     > $ sed -i -e 's/0x1c000000/0xbfc00000/' -e
>     's/0x1c040000/0xbfc40000/' -e 's/0x1c3f0000/0xbfff0000/'
>     > board/linksys-wrt54gl.cfg
>     >
>     > Modified "board/linksys-wrt54gl.cfg":
>     > ----------------------------------------------------------------------
>     > #
>     > # Linksys WRT54GL v1.1
>     > #
>     >
>     > source [find target/bcm5352e.cfg]
>     >
>     > set partition_list {
>     >     CFE        { Bootloader            0x1c000000 0x00040000 }
>     >     firmware    { "Kernel+rootfs"        0x1c040000 0x003b0000 }
>     >     nvram    { "Config space"        0x1c3f0000 0x00010000 }
>     > }
>     >
>     > # External 4MB NOR Flash (Intel TE28F320C3BD90 or similar)
>     > set _FLASHNAME $_CHIPNAME.flash
>     > flash bank $_FLASHNAME cfi 0x1c000000 0x00400000 2 2 $_TARGETNAME
>     > ----------------------------------------------------------------------
>     >
>     >
>     > On Wednesday, April 21, 2021, 12:52:08 AM EDT, Oleksij Rempel
>     <li...@rempel-privat.de <mailto:li...@rempel-privat.de>> wrote:
>     >
>     >
>     > Hi Vivek,
>     >
>     > Am 21.04.21 um 05:07 schrieb VR:
>     >> Hi Olesksij,
>     >>
>     >> Thank you for your message. I took a look at the discussion log
>     and it explains a lot. Could you
>     >> suggest a way I could determine what might be the location of the
>     CFI flash when not using DMA so
>     >> that I can test your suggestion. The following CFGs:
>     "scripts/board/linksys-wrt54gl.cfg" and
>     >> "scripts/tools/firmware-recovery.tcl" suggest that the flash is
>     located at 0x1c000000 for the
>     >> wrt54gl router but this only works for DMA. I did try a few other
>     addresses (0x1fc00000 and
>     >> 0x3fc00000) which didn't work.
>     >
>     > Please try: 0xbfc00000
>     >
>     >> Thank you,
>     >> Vivek
>     >>
>     >> On Tuesday, April 13, 2021, 12:46:58 AM EDT, Oleksij Rempel
>     <li...@rempel-privat.de <mailto:li...@rempel-privat.de>
>     > <mailto:li...@rempel-privat.de <mailto:li...@rempel-privat.de>>>
>     wrote:
>     >>
>     >>
>     >> Hi,
>     >>
>     >> Am 13.04.21 um 01:53 schrieb VR:
>     >>> Great this gives me a good starting point to explore the code to
>     create a patch. Let me see what I
>     >>> can put together.
>     >>>
>     >>> I'll let Olesksij comment on this comment: "DMA seems to be
>     broken in many ways. Don't trust it". I
>     >>> am assuming that there was a good reason to disable DMA. So I
>     think I agree with you that maybe
>     >>> -broken-ejtag-dma OR -force-dma is a good option and have DMA be
>     disabled by default.
>     >>
>     >> Here is the log of discussion related to this patch:
>     >> http://openocd.zylin.com/#/c/1936/
>     <http://openocd.zylin.com/#/c/1936/
>     ><http://openocd.zylin.com/#/c/1936/
>     <http://openocd.zylin.com/#/c/1936/>
>     >><http://openocd.zylin.com/#/c/1936/
>     <http://openocd.zylin.com/#/c/1936/
>     ><http://openocd.zylin.com/#/c/1936/
>     <http://openocd.zylin.com/#/c/1936/>>>
>     >>
>     >> Before trying to re enable the DMA, did you tried to use
>     different address for the CFI flash? The
>     >> DMA address is different to the CPU address.
>     >>
>     >>> Thanks
>     >>> Vivek
>     >>> On Monday, April 12, 2021, 7:33:19 PM EDT, Antonio Borneo
>     <borneo.anto...@gmail.com <mailto:borneo.anto...@gmail.com>
>     > <mailto:borneo.anto...@gmail.com <mailto:borneo.anto...@gmail.com>>
>     >> <mailto:borneo.anto...@gmail.com
>     <mailto:borneo.anto...@gmail.com> <mailto:borneo.anto...@gmail.com
>     <mailto:borneo.anto...@gmail.com>>>> wrote:
>     >>>
>     >>>
>     >>> On Tue, Apr 13, 2021 at 12:41 AM VR via OpenOCD-devel
>     >>> <openocd-devel@lists.sourceforge.net
>     <mailto:openocd-devel@lists.sourceforge.net>
>     <mailto:openocd-devel@lists.sourceforge.net
>     <mailto:openocd-devel@lists.sourceforge.net>>
>     > <mailto:openocd-devel@lists.sourceforge.net
>     <mailto:openocd-devel@lists.sourceforge.net>
>     <mailto:openocd-devel@lists.sourceforge.net
>     <mailto:openocd-devel@lists.sourceforge.net>>>
>     >> <mailto:openocd-devel@lists.sourceforge.net
>     <mailto:openocd-devel@lists.sourceforge.net>
>     <mailto:openocd-devel@lists.sourceforge.net
>     <mailto:openocd-devel@lists.sourceforge.net>>
>     > <mailto:openocd-devel@lists.sourceforge.net
>     <mailto:openocd-devel@lists.sourceforge.net>
>     <mailto:openocd-devel@lists.sourceforge.net
>     <mailto:openocd-devel@lists.sourceforge.net>>>>> wrote:
>     >>>>
>     >>>> Hello,
>     >>>>
>     >>>> I am working with a Broadcom BCM5352 (MIPS) target (its a
>     WRT54GL router) and was unable to get
>     >>> OpenOCD to detect flash memory.
>     >>>>
>     >>>> It turns out the fix was to undo this commit:
>     >>>
>     
> https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880>
>     >
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880>>
>     >>
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880>
>     >
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880>>>
>     >>>
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880>
>     >
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880>>
>     >>
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880>
>     >
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880
>     
> <https://sourceforge.net/p/openocd/code/ci/d2ddb53f7d3c6c5c3be1f6b41a796033599b1880
>     >>>>-->
>     >>> (mips_ejtag.c: disable DMA for all platforms: DMA seems to be
>     broken in many ways. Don't trust it)
>     >>>>
>     >>>> There is a comment in the source (mips32_dmaacc.c) which even
>     mentions "BCM5352 doesn't appear to
>     >>> support PRACC accesses". So I got things to work for my purposes
>     by editing the code.
>     >>>>
>     >>>> But... MY QUESTION --> I was wondering if it would be possible
>     to allow DMA access via
>     >>> command/switch instead of disabling it altogether for MIPS
>     devices. Hope someone can comment on
>     >>> this. I am willing to work on this to get it implemented.
>     >>>
>     >>> Hi,
>     >>>
>     >>> could it be a flag during 'target create' command? e.g. -force-nodma
>     >>> or -broken-ejtag-dma?
>     >>> Then revert the patch you mention and put in mips_m4k_read_memory()
>     >>> and mips_m4k_write_memory() a test based on both the flag and
>     >>> EJTAG_IMP_NODMA.
>     >>> You will also need to decide which config in tcl/target/ need the
>     >>> flag. Maybe the solution is to disable DMA for all the targets and
>     >>> enable it only where it works. This will be consistent with the
>     >>> current code.
>     >>>
>     >>> In case you decide to add such a flag, you can check how it is
>     >>> implemented for other targets, e.g. in cortex_m_target_create().
>     >>>
>     >>> Regards,
>     >>> Antonio
>     >>>
>     >>>
>     >>>>
>     >>>> Thanks!
>     >>>> Regards
>     >>
>     >>>> Vivek
>     >>
>     >>
>     >> --
>     >> Regards,
>
>     >
>     >>
>     >> Oleksij
>     >>
>     >
>     >
>     > --
>     > Regards,
>     > Oleksij
>
>
>     --
>     Regards,
>     Oleksij
>


--
Regards,
Oleksij

Reply via email to