From: Dinh Nguyen <dinguyen@opensource.altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 00/35][RFC] arm: socfpga: Usability fixes
Date: Tue, 16 Sep 2014 17:29:54 -0500 [thread overview]
Message-ID: <5418B9E2.60008@opensource.altera.com> (raw)
In-Reply-To: <201409162355.22221.marex@denx.de>
On 09/16/2014 04:55 PM, Marek Vasut wrote:
> On Tuesday, September 16, 2014 at 11:29:45 PM, dinguyen wrote:
>> On Tue, 16 Sep 2014, Marek Vasut wrote:
>>> On Tuesday, September 16, 2014 at 06:28:52 PM, Dinh Nguyen wrote:
>>>> On 09/16/2014 08:18 AM, Pavel Machek wrote:
>>>>> Hi!
>>>>>
>>>>> On Mon 2014-09-15 13:05:53, Marek Vasut wrote:
>>>>>> This entire RFC series is the first stab at making SoCFPGA usable
>>>>>> with mainline U-Boot again. There are still some bits missing, but
>>>>>> in general, this allows me to use mainline U-Boot on my SoCFPGA
>>>>>> systems. The big missing part is the SPL generation, which still
>>>>>> needs a lot of additional work.
>>>>>>
>>>>>> This set contains patches for a few subsystems, bu the most part is
>>>>>> the SoCFPGA chip support.
>>>>>>
>>>>>> Most of the patches should be in good shape already, so I wonder if
>>>>>> the RFC tag is really necessary.
>>>>>
>>>>> Just... I earlier today I tested Marek's git tree based on this
>>>>> series, and it works well for me on board similar to sockit.
>>>>>
>>>>> So
>>>>>
>>>>> Tested-by: Pavel Machek <pavel@denx.de>
>>>>>
>>>>> Thanks and best regards,
>>>>>
>>>>>
> Pavel
>>>>
>>>> I applied all the patches to v2014.10-rc2, and I see that the watchdog
>>>> has been enabled and it's getting reset:
>>>>
>>>> U-Boot 2014.10-rc2-00139-g70e9e3e (Sep 16 2014 - 11:21:38)
>>>>
>>>> CPU: Altera SoCFPGA Platform
>>>> BOARD: Altera SoCFPGA Cyclone5 Board
>>>>
>>>> Watchdog enabled
>>>>
>>>> DRAM:
>>>> U-Boot SPL 2013.01.01-00019-g9cce15f (Jul 18 2013 - 13:05:43)
>>>> SDRAM : Initializing MMR registers
>>>> SDRAM : Calibrating PHY
>>>> SEQ.C: Preparing to start memory calibration
>>>> SEQ.C: CALIBRATION PASSED
>>>> ALTERA DWMMC: 0
>>>> reading u-boot.img
>>>> reading u-boot.img
>>>>
>>>>
>>>> U-Boot 2014.10-rc2-00139-g70e9e3e (Sep 16 2014 - 11:21:38)
>>>>
>>>> CPU: Altera SoCFPGA Platform
>>>> BOARD: Altera SoCFPGA Cyclone5 Board
>>>>
>>>> Watchdog enabled
>>>>
>>>> DRAM:
>>> This doesn't seem like a WDT problem. How much DRAM is there on that kit
>>> ? In
>>
>> The devkit has 1GB.
>
> Ah, thanks for this info!
>
>>> any case, try this:
>>>
>>> 1) Edit arch/arm/cpu/armv7/socfpga/misc.c
>>> 2) Locate call to get_ram_size()
>>> 3) Replace this function call with the size of your DRAM in bytes.
>>>
>>> (that is, make it "gd->ram_size = 128 * 1024 * 1024;" if you have
>>> 128MiB)
>>>
>>> I suspect get_ram_size() on socfpga is still broken in mainline and
>>> causes this crash you observe.
>>
>> Yes, tracked it down to get_ram_size(). I forced gd->ram_size to 1GB and
>> it works fine for me now. I'll try to spend some cycles to debug the
>> problem.
>
> Hmmmmm, how much DRAM can the SoCFPGA chip drive in total ?
All of our devkits have at least 1 GiB and I have heard there is a
variant with 2GiB in the wild. Spec says up to 4 GiB.
>
> Well, consider a theoretical SoCFPGA board with 128MiB of DRAM attached to it,
> what happens if I try to write at address of the 129th MiB (which is past the
> DRAM) ? Will this generate an DABT for the ARM core or will some kind of DRAM
> "mirroring" or "wraparound" happen such that I would write to the content of 1st
> MiB of the DRAM ?
We've encountered this issue downstream on a system with 1 GiB.
>
> If I would get DABT, then there is a rather easy fix for that, see
> arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c and mxs_mem_get_size() function. The
> function places an assembly return instruction into the DABT handler entry
> position (offset 0x14 in ARM vector table IIRC) and then runs the
> get_dram_size() . The assembly instruction only returns from the DABT handler
> right past the code where the DABT happened. For the get_ram_size(), the read
> from the unpopulated DRAM space contains zeroes and the function doesn't even
> realize the DABT happened. But it considers the DRAM invalid and thus this works
> correctly. That's how it detects the amount of DRAM.
>
> You might want to consider something similar if that's how it behaves on
> SoCFPGA.
This could be the issue. I think Chin Liang would know about this more
than me at this point. So I hope he can solve this quickly.
Seems odd that the get_ram_size is working on your DENX board and not
the devkit.
Dinh
next prev parent reply other threads:[~2014-09-16 22:29 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 11:05 [U-Boot] [PATCH 00/35][RFC] arm: socfpga: Usability fixes Marek Vasut
2014-09-15 11:05 ` [U-Boot] [PATCH 01/35] net: Remove unused CONFIG_DW_SEARCH_PHY from configs Marek Vasut
2014-09-15 15:34 ` Dinh Nguyen
2014-09-16 13:56 ` Marek Vasut
2014-09-15 11:05 ` [U-Boot] [PATCH 02/35] net: phy: Cleanup drivers/net/phy/micrel.c Marek Vasut
2014-09-15 11:05 ` [U-Boot] [PATCH 03/35] net: dwc: Fix cache alignment issues Marek Vasut
2014-09-15 15:40 ` Dinh Nguyen
2014-09-15 17:25 ` Marek Vasut
2014-09-15 11:05 ` [U-Boot] [PATCH 04/35] net: dwc: Make the cache handling less cryptic Marek Vasut
2014-09-16 13:10 ` Pavel Machek
2014-09-16 13:10 ` Pavel Machek
2014-09-16 13:11 ` Pavel Machek
2014-09-16 13:13 ` Pavel Machek
2014-09-16 13:13 ` Pavel Machek
2014-09-16 13:14 ` Pavel Machek
2014-09-16 13:16 ` Pavel Machek
2014-09-16 13:16 ` Pavel Machek
2014-09-16 18:10 ` Marek Vasut
2014-09-16 22:03 ` Dinh Nguyen
2014-09-16 22:12 ` Marek Vasut
2014-09-15 11:05 ` [U-Boot] [PATCH 05/35] mmc: dw_mmc: cleanups Marek Vasut
2014-09-15 16:00 ` Dinh Nguyen
2014-09-15 17:25 ` Marek Vasut
2014-09-15 11:05 ` [U-Boot] [PATCH 06/35] mmc: dw_mmc: Fix cache alignment issue Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 07/35] tools: socfpga: Add socfpga preloader signing to mkimage Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 08/35] arm: socfpga: Complete the list of base addresses Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 09/35] arm: socfpga: Clean up base address file Marek Vasut
2014-09-16 13:12 ` Pavel Machek
2014-09-15 11:06 ` [U-Boot] [PATCH 10/35] arm: socfpga: Add watchdog disable for socfpga Marek Vasut
2014-09-15 16:28 ` Dinh Nguyen
2014-09-16 13:58 ` Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 11/35] arm: socfpga: sysmgr: Clean up system manager Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 12/35] arm: socfpga: clock: Implant order into bit definitions Marek Vasut
2014-09-15 15:26 ` Wolfgang Denk
2014-09-15 21:21 ` Pavel Machek
2014-09-15 21:48 ` Marek Vasut
2014-09-16 8:18 ` Wolfgang Denk
2014-09-16 21:59 ` Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 13/35] arm: socfpga: clock: Drop nonsense inlining from clock manager code Marek Vasut
2014-09-15 19:25 ` Dinh Nguyen
2014-09-16 17:31 ` Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 14/35] arm: socfpga: clock: Add missing stubs into board file Marek Vasut
2014-09-15 19:27 ` Dinh Nguyen
2014-09-18 15:10 ` Pavel Machek
2014-09-15 11:06 ` [U-Boot] [PATCH 15/35] arm: socfpga: clock: Add code to read clock configuration Marek Vasut
2014-09-15 20:09 ` Dinh Nguyen
2014-09-16 18:09 ` Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 16/35] arm: socfpga: clock: Trim down code duplication Marek Vasut
2014-09-16 15:38 ` Dinh Nguyen
2014-09-18 15:12 ` Pavel Machek
2014-09-15 11:06 ` [U-Boot] [PATCH 17/35] arm: socfpga: mmc: Pick the clock from clock manager Marek Vasut
2014-09-16 15:52 ` Dinh Nguyen
2014-09-15 11:06 ` [U-Boot] [PATCH 18/35] arm: socfpga: timer: Pull the timer reload value from config file Marek Vasut
2014-09-15 21:25 ` Pavel Machek
2014-09-16 15:55 ` Dinh Nguyen
2014-09-15 11:06 ` [U-Boot] [PATCH 19/35] arm: socfpga: reset: Add EMAC reset functions Marek Vasut
2014-09-15 21:26 ` Pavel Machek
2014-09-15 11:06 ` [U-Boot] [PATCH 20/35] arm: socfpga: misc: Add proper ethernet initialization Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 21/35] arm: socfpga: misc: Add SD controller init Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 22/35] arm: socfpga: misc: Align print_cpuinfo() output Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 23/35] arm: socfpga: board: Correctly set ATAG position Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 24/35] arm: socfpga: board: Align checkboard() output Marek Vasut
2014-09-15 21:28 ` Pavel Machek
2014-09-15 11:06 ` [U-Boot] [PATCH 25/35] arm: socfpga: fpga: Add SoCFPGA FPGA programming interface Marek Vasut
2014-09-15 15:41 ` Wolfgang Denk
2014-09-16 18:18 ` Marek Vasut
2014-09-16 9:42 ` Michal Simek
2014-09-16 10:12 ` Marek Vasut
2014-09-16 10:33 ` Michal Simek
2014-09-16 20:15 ` Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 26/35] arm: socfpga: reset: Add function to reset FPGA bridges Marek Vasut
2014-09-15 21:31 ` Pavel Machek
2014-09-15 11:06 ` [U-Boot] [PATCH 27/35] arm: socfpga: sysmgr: Add FPGA bits into system manager Marek Vasut
2014-09-15 11:06 ` [U-Boot] [PATCH 28/35] arm: cache: Add support for write-allocate D-Cache Marek Vasut
2014-09-15 21:34 ` Pavel Machek
2014-09-15 11:06 ` [U-Boot] [PATCH 29/35] arm: socfpga: cache: Define cacheline size Marek Vasut
2014-09-15 21:35 ` Pavel Machek
2014-09-15 11:59 ` [U-Boot] [PATCH 30/35] arm: socfpga: cache: Enable D-Cache Marek Vasut
2014-09-15 21:39 ` Pavel Machek
2014-09-15 17:17 ` [U-Boot] [PATCH 31/35] arm: socfpga: cache: Enable PL310 L2 cache Marek Vasut
2014-09-15 17:17 ` [U-Boot] [PATCH 32/35] arm: socfpga: scu: Add SCU register file Marek Vasut
2014-09-15 17:17 ` [U-Boot] [PATCH 33/35] arm: socfpga: nic301: Add NIC-301 GPV " Marek Vasut
2014-09-15 17:17 ` [U-Boot] [PATCH 34/35] arm: socfpga: pl310: Map SDRAM to 0x0 Marek Vasut
2014-09-15 17:18 ` [U-Boot] [PATCH 35/35] arm: socfpga: nic301: Add NIC-301 configuration code Marek Vasut
2014-09-16 13:18 ` [U-Boot] [PATCH 00/35][RFC] arm: socfpga: Usability fixes Pavel Machek
2014-09-16 16:28 ` Dinh Nguyen
2014-09-16 20:43 ` Marek Vasut
2014-09-16 21:29 ` dinguyen
2014-09-16 21:55 ` Marek Vasut
2014-09-16 22:29 ` Dinh Nguyen [this message]
2014-09-16 23:52 ` Marek Vasut
2014-09-17 11:07 ` Chin Liang See
2014-09-17 12:35 ` Marek Vasut
2014-09-17 14:11 ` Wolfgang Denk
2014-09-19 9:44 ` Chin Liang See
2014-09-19 11:12 ` Marek Vasut
2014-09-19 12:06 ` Marek Vasut
2014-09-17 5:33 ` Wolfgang Denk
2014-09-16 21:35 ` dinguyen
2014-09-16 21:46 ` Marek Vasut
2014-09-16 22:20 ` Dinh Nguyen
2014-09-16 23:52 ` Marek Vasut
2014-09-18 15:19 ` Pavel Machek
2014-09-17 11:29 ` Chin Liang See
2014-09-17 11:52 ` Marek Vasut
2014-09-17 12:00 ` Chin Liang See
2014-09-17 12:39 ` Marek Vasut
2014-09-19 9:32 ` Chin Liang See
2014-09-19 10:36 ` Chin Liang See
2014-09-19 11:11 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5418B9E2.60008@opensource.altera.com \
--to=dinguyen@opensource.altera.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).