From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] arm: debug: import debug files from Linux 3.16
Date: Wed, 27 Aug 2014 16:27:29 +0200 [thread overview]
Message-ID: <53FDEAD1.8080304@samsung.com> (raw)
In-Reply-To: <20140826122648.ED4A.AA925319@jp.panasonic.com>
Hello Masahiro,
On 08/26/2014 05:26 AM, Masahiro Yamada wrote:
> Hi Przemyslaw,
>
>
> On Mon, 25 Aug 2014 11:03:13 +0200
> Przemyslaw Marczak <p.marczak@samsung.com> wrote:
>
>> Hello Masahiro,
>> I tried to test this on Trats2(Exynos4412) with required files from the linux and the code doesn't build.
>>
>> On 08/17/2014 08:16 AM, Masahiro Yamada wrote:
>>> U-Boot does not have arch/arm/kernel, include/uapi directories,
>>> This commit copies files as follows:
>>>
>>> + .text
>>> +
>>> +/*
>>> + * Some debugging routines (useful if you've got MM problems and
>>> + * printk isn't working). For DEBUGGING ONLY!!! Do not leave
>>> + * references to these in a production kernel!
>>> + */
>>> +
>>> +#if !defined(CONFIG_DEBUG_SEMIHOSTING)
>>> +#include CONFIG_DEBUG_LL_INCLUDE
>>> +#endif
>>> +
>>> +#ifdef CONFIG_MMU
>>
>> This config: "CONFIG_MMU" is nowhere defined in the u-boot.
>
> Yes, CONFIG_MMU is never defined in U-Boot,
> therefore, the code inside #ifdef CONFIG_MMU ... #endif is never enabled.
>
>
>
>> U-boot uses (n)def CONFIG_SYS_DCACHE_OFF - for enable/disable the mmu in ARM.
>
> CONFIG_SYS_DCACHE_OFF has nothing to do with this debug function.
>
>
>> But when I do the change like this:
>> -#ifdef CONFIG_MMU
>> +#ifndef CONFIG_SYS_DCACHE_OFF
>>
>> Then I got the data abort, after use a printch(). But without this change the printch() function works fine (after the uart init).
>
> Please do not change this part.
> On U-Boot, virt addr is always the same as phys addr,
> so use the code for non CONFIG_MMU.
Ok, I see.
>
>
>
>>> + .macro addruart_current, rx, tmp1, tmp2
>>> + addruart \tmp1, \tmp2, \rx
>>> + mrc p15, 0, \rx, c1, c0
>>> + tst \rx, #1
>>> + moveq \rx, \tmp1
>>> + movne \rx, \tmp2
>>> + .endm
>>> +
>>> +#else /* !CONFIG_MMU */
>>> + .macro addruart_current, rx, tmp1, tmp2
>>> + addruart \rx, \tmp1
>> Generates build error:
>> This asm macro: "addruart" gets 3 arguments but in this place got only two. After fix - works fine.
>> It's strange, no one use this in the kernel before?
>
>
> I guess you imported arch/arm/include/debug/exynos.S
>
>
> In Linux, unfortunately, the number of arguments of this macro is different
> between CONFIG_MMU and non CONFIG_MMU.
>
> (Fox ex, addruart in arch/arm/include/debug/efm32.S in Linux gives only two arguments.)
>
>
>
>
>
> Could you modify as follows and try it again, please?
>
>
> --- a/arch/arm/lib/debug.S
> +++ b/arch/arm/lib/debug.S
> @@ -33,7 +33,7 @@
>
> #else /* !CONFIG_MMU */
> .macro addruart_current, rx, tmp1, tmp2
> - addruart \rx, \tmp1
> + addruart \rx, \tmp1, \tmp2
Yes, I fixed it by the same way before and it works fine with that change.
> .endm
>
> #endif /* CONFIG_MMU */
>
>
>
>
> If it works, I will post v2.
>
>
>
> Best Regards
> Masahiro Yamada
>
>
>> And moreover I think that functions declarations are welcome for this code.
>>
>> Best regards,
>> -- Przemyslaw Marczak
>> Samsung R&D Institute Poland
>> Samsung Electronics
>> p.marczak at samsung.com
Best Regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
next prev parent reply other threads:[~2014-08-27 14:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-17 6:16 [U-Boot] [PATCH 0/4] Introduce low-level debug for ARM architecture Masahiro Yamada
2014-08-17 6:16 ` [U-Boot] [PATCH 1/4] vexpress64: kconfig: consolidate CONFIG_TARGET_VEXPRESS_AEMV8A_SEMI Masahiro Yamada
2014-08-25 18:01 ` Steve Rae
2014-08-17 6:16 ` [U-Boot] [PATCH 2/4] kconfig: armv8: move CONFIG_ARM64 to Kconfig Masahiro Yamada
2014-08-17 6:16 ` [U-Boot] [PATCH 3/4] arm: debug: import debug files from Linux 3.16 Masahiro Yamada
2014-08-19 11:01 ` Stefan Roese
2014-08-20 13:53 ` Masahiro YAMADA
2014-08-25 9:03 ` Przemyslaw Marczak
2014-08-26 3:26 ` Masahiro Yamada
2014-08-27 14:27 ` Przemyslaw Marczak [this message]
2014-08-17 6:16 ` [U-Boot] [PATCH 4/4] arm: debug: add Kconfig entries for lowlevel debug Masahiro Yamada
2014-08-19 2:14 ` [U-Boot] [PATCH 0/4] Introduce low-level debug for ARM architecture York Sun
2014-08-19 7:45 ` Masahiro Yamada
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=53FDEAD1.8080304@samsung.com \
--to=p.marczak@samsung.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