From mboxrd@z Thu Jan 1 00:00:00 1970 From: Przemyslaw Marczak Date: Mon, 25 Aug 2014 11:03:13 +0200 Subject: [U-Boot] [PATCH 3/4] arm: debug: import debug files from Linux 3.16 In-Reply-To: <1408256217-3706-4-git-send-email-yamada.m@jp.panasonic.com> References: <1408256217-3706-1-git-send-email-yamada.m@jp.panasonic.com> <1408256217-3706-4-git-send-email-yamada.m@jp.panasonic.com> Message-ID: <53FAFBD1.1020103@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > > 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 > +#include > + > + .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