Skip to content

Commit ae3c99a

Browse files
Stephen WarrenRussell King
authored andcommitted
ARM: 7806/1: allow DEBUG_UNCOMPRESS for Tegra
DEBUG_UNCOMPRESS was previously disallowed for Tegra due to tegra.S's use of global data that was not linked into the decompressor. Solve this by declaring this symbol in tegra.S when it is being built into the decompressor. For the kernel proper, leave the declaration in mach-tegra/common.c as explained in the comment. Signed-off-by: Stephen Warren <swarren@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent d2c215a commit ae3c99a

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

‎arch/arm/Kconfig.debug‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ config DEBUG_UNCOMPRESS
10391039
bool
10401040
depends on ARCH_MULTIPLATFORM
10411041
default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
1042-
!DEBUG_TEGRA_UART
1042+
(!DEBUG_TEGRA_UART || !ZBOOT_ROM)
10431043
help
10441044
This option influences the normal decompressor output for
10451045
multiplatform kernels. Normally, multiplatform kernels disable

‎arch/arm/include/debug/tegra.S‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,3 +221,32 @@
221221
1002:
222222
#endif
223223
.endm
224+
225+
/*
226+
* Storage for the state maintained by the macros above.
227+
*
228+
* In the kernel proper, this data is located in arch/arm/mach-tegra/common.c.
229+
* That's because this header is included from multiple files, and we only
230+
* want a single copy of the data. In particular, the UART probing code above
231+
* assumes it's running using physical addresses. This is true when this file
232+
* is included from head.o, but not when included from debug.o. So we need
233+
* to share the probe results between the two copies, rather than having
234+
* to re-run the probing again later.
235+
*
236+
* In the decompressor, we put the symbol/storage right here, since common.c
237+
* isn't included in the decompressor build. This symbol gets put in .text
238+
* even though it's really data, since .data is discarded from the
239+
* decompressor. Luckily, .text is writeable in the decompressor, unless
240+
* CONFIG_ZBOOT_ROM. That dependency is handled in arch/arm/Kconfig.debug.
241+
*/
242+
#if defined(ZIMAGE)
243+
tegra_uart_config:
244+
/* Debug UART initialization required */
245+
.word 1
246+
/* Debug UART physical address */
247+
.word 0
248+
/* Debug UART virtual address */
249+
.word 0
250+
/* Scratch space for debug macro */
251+
.word 0
252+
#endif

0 commit comments

Comments
 (0)