ARM: allow DEBUG_UNCOMPRESS for omap2plus
PATCH 1/1 ARM: allow DEBUG_UNCOMPRESS for omap2plus
From: Stephen Warren <[email protected]>
DEBUG_UNCOMPRESS was previously disallowed for omap2plus due to omap2plus.S's use of .data, which is not allowed in the decompressor. Solve this by placing that data into .text when building the file into the decompressor. This relies on .text actually being writable in the decompressor, which it is in practice.
---
Note that I have build-tested this with omap2plus_defconfig, but not run-time tested it in any way.
--- arch/arm/Kconfig.debug | 2 +- arch/arm/include/debug/omap2plus.S | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
arch/arm/Kconfig.debug +1 -1
@@ -1046,7 +1046,7 @@ config DEBUG_UART_8250_FLOW_CONTROL config DEBUG_UNCOMPRESS bool depends on ARCH_MULTIPLATFORM - default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART + default y if DEBUG_LL help This option influences the normal decompressor output for multiplatform kernels. Normally, multiplatform kernels disable
arch/arm/include/debug/omap2plus.S +4 -0
@@ -58,11 +58,15 @@ #define UART_OFFSET(addr) ((addr) & 0x00ffffff) +#if !defined(ZIMAGE) .pushsection .data +#endif omap_uart_phys: .word 0 omap_uart_virt: .word 0 omap_uart_lsr: .word 0 +#if !defined(ZIMAGE) .popsection +#endif .macro addruart, rp, rv, tmp
Signature · 1 line
1.8.1.5
PATCH 1/1 ARM: allow DEBUG_UNCOMPRESS for omap2plus
Quoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
DEBUG_UNCOMPRESSwas previously disallowed for omap2plus due to omap2plus.S's use of .data, which is not allowed in the decompressor. Solve this by placing that data into .text when building the file into the decompressor. This relies on .text actually being writable in the decompressor, which it is in practice.
Unless you decide to use ZBOOT and flash the zImage.
PATCH 1/1 ARM: allow DEBUG_UNCOMPRESS for omap2plus
Quoted 10 lines · Russell King - ARM Linux
Quoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
DEBUG_UNCOMPRESSwas previously disallowed for omap2plus due to omap2plus.S's use of .data, which is not allowed in the decompressor. Solve this by placing that data into .text when building the file into the decompressor. This relies on .text actually being writable in the decompressor, which it is in practice.Unless you decide to use ZBOOT and flash the zImage.
I knew there had to be a catch:-)
I have no idea if ZBOOT is a use-case that's relevant to OMAP?
On Tegra at least (the same issue applies to the other patch I just sent), that use-case is almost impossible; even if the boot ROM directly booted a kernel, the boot ROM is hard-coded to copy whatever it's booting to SDRAM first, although I suppose if that was a boot-loader it could just jump back to a ROM location. That said, NOR flash is extremely rare on Tegra. So, I don't know if we care about this issue.
Is it reasonable to just say "If you use ZBOOT, don't enable DEBUG_UNCOMPRESS"? Perhaps these patches should not completely remove the !DEBUG_TEGRA_UART from config DEBUG_UNCOMPRESS, but instead say:
default y if DEBUG_LL && (!DEBUG_TEGRA_UART || !ZBOOT)?
PATCH 1/1 ARM: allow DEBUG_UNCOMPRESS for omap2plus
Quoted 23 lines · Stephen Warren
Quoted 10 lines · Russell King - ARM Linux
Quoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
DEBUG_UNCOMPRESSwas previously disallowed for omap2plus due to omap2plus.S's use of .data, which is not allowed in the decompressor. Solve this by placing that data into .text when building the file into the decompressor. This relies on .text actually being writable in the decompressor, which it is in practice.Unless you decide to use ZBOOT and flash the zImage.
I knew there had to be a catch:-)
I have no idea if ZBOOT is a use-case that's relevant to OMAP?
On Tegra at least (the same issue applies to the other patch I just sent), that use-case is almost impossible; even if the boot ROM directly booted a kernel, the boot ROM is hard-coded to copy whatever it's booting to SDRAM first, although I suppose if that was a boot-loader it could just jump back to a ROM location. That said, NOR flash is extremely rare on Tegra. So, I don't know if we care about this issue.
Quoted 5 lines
Is it reasonable to just say "If you use ZBOOT, don't enable
DEBUG_UNCOMPRESS"? Perhaps these patches should not completely remove the !DEBUG_TEGRA_UART from configDEBUG_UNCOMPRESS, but instead say:default y if
DEBUG_LL&& (!DEBUG_TEGRA_UART || !ZBOOT)?
I think we're best off removing the remaining uncompress code configured port detection features as the port properties are now defined in kconfig anyways. That simplifies the code quite a bit.
Regards,
Tony
PATCH 1/1 ARM: allow DEBUG_UNCOMPRESS for omap2plus
Quoted 28 lines · Tony Lindgren
Quoted 27 lines · Stephen Warren
Quoted 10 lines · Russell King - ARM Linux
Quoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
DEBUG_UNCOMPRESSwas previously disallowed for omap2plus due to omap2plus.S's use of .data, which is not allowed in the decompressor. Solve this by placing that data into .text when building the file into the decompressor. This relies on .text actually being writable in the decompressor, which it is in practice.Unless you decide to use ZBOOT and flash the zImage.
I knew there had to be a catch:-)
I have no idea if ZBOOT is a use-case that's relevant to OMAP?
On Tegra at least (the same issue applies to the other patch I just sent), that use-case is almost impossible; even if the boot ROM directly booted a kernel, the boot ROM is hard-coded to copy whatever it's booting to SDRAM first, although I suppose if that was a boot-loader it could just jump back to a ROM location. That said, NOR flash is extremely rare on Tegra. So, I don't know if we care about this issue.
Is it reasonable to just say "If you use ZBOOT, don't enable
DEBUG_UNCOMPRESS"? Perhaps these patches should not completely remove the !DEBUG_TEGRA_UART from configDEBUG_UNCOMPRESS, but instead say:
Quoted 5 lines
Quoted 1 line
default y if
DEBUG_LL&& (!DEBUG_TEGRA_UART || !ZBOOT)?I think we're best off removing the remaining uncompress code configured port detection features as the port properties are now defined in kconfig anyways. That simplifies the code quite a bit.
If you want to do that with OMAP, I'm happy to drop this patch.
For Tegra, automatic determination of the DEBUG_LL UART is rather useful, so I'm not going to give that up:-)
PATCH 1/1 ARM: allow DEBUG_UNCOMPRESS for omap2plus
Quoted 7 lines · Stephen Warren
Quoted 4 lines · Tony Lindgren
I think we're best off removing the remaining uncompress code configured port detection features as the port properties are now defined in kconfig anyways. That simplifies the code quite a bit.
If you want to do that with OMAP, I'm happy to drop this patch.
Yes on my list of things to do..
Quoted 2 lines
For Tegra, automatic determination of the
DEBUG_LLUART is rather useful, so I'm not going to give that up:-)
For omaps there's just too many options to try to detect anything.
It seems the best strategy seems to be to just init things later on so DEBUG_LL is only needed when booting breaks really early on during the boot process.
Regards,
Tony
PATCH 1/1 ARM: allow DEBUG_UNCOMPRESS for omap2plus
Quoted 3 lines · Tony Lindgren
It seems the best strategy seems to be to just init things later on so
DEBUG_LLis only needed when booting breaks really early on during the boot process.
... which is exactly the whole point and use case of DEBUG_LL. :)