public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
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: Mon, 25 Aug 2014 11:03:13 +0200	[thread overview]
Message-ID: <53FAFBD1.1020103@samsung.com> (raw)
In-Reply-To: <1408256217-3706-4-git-send-email-yamada.m@jp.panasonic.com>

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:
>
>    Location in Linux               -> Location in U-Boot
>
>    arch/arm/kernel/debug.S         -> arch/arm/lib/debug.S
>    arch/arm/include/debug/8250.S   -> arch/arm/include/debug/8250.S
>    include/uapi/linux/serial_reg.h -> include/linux/serial_reg.h
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> ---
>

> diff --git a/arch/arm/lib/debug.S b/arch/arm/lib/debug.S
> new file mode 100644
> index 0000000..14f7c3b
> --- /dev/null
> +++ b/arch/arm/lib/debug.S
> @@ -0,0 +1,138 @@
> +/*
> + *  linux/arch/arm/kernel/debug.S
> + *
> + *  Copyright (C) 1994-1999 Russell King
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + *  32-bit debugging code
> + */
> +#include <linux/linkage.h>
> +#include <asm/assembler.h>
> +
> +		.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.
U-boot uses (n)def CONFIG_SYS_DCACHE_OFF - for enable/disable the mmu in 
ARM.

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).

> +		.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?

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

  parent reply	other threads:[~2014-08-25  9:03 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 [this message]
2014-08-26  3:26     ` Masahiro Yamada
2014-08-27 14:27       ` Przemyslaw Marczak
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=53FAFBD1.1020103@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