pbl and debug_ll fixes
Subsystems (4)
cover pbl and debug_ll fixes
Antony Pavlov (4):
pbl: enable image verification for MIPS and RISC-V too
RISC-V: fix crash on start if CONFIG_IMAGE_COMPRESSION_NONE=y
ARM: bcm283x: fix compilation with debug_ll enabled
ARM: vexpress: make debug_ll work
arch/riscv/boot/start.c | 11 ++++++++--- include/mach/bcm283x/debug_ll.h | 2 ++ include/mach/vexpress/debug_ll.h | 12 +----------- pbl/Kconfig | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-)
Signature · 1 line
2.39.0
PATCH 1/4 pbl: enable image verification for MIPS and RISC-V too
--- pbl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
pbl/Kconfig +1 -1
@@ -54,7 +54,7 @@ config PBL_FULLY_PIC the code sections. config PBL_VERIFY_PIGGY - depends on ARM + depends on ARM || MIPS || RISCV bool "Verify barebox proper hash before decompression" if COMPILE_TEST config BOARD_GENERIC_DT
Signature · 1 line
2.39.0
PATCH 2/4 RISC-V: fix crash on start if CONFIG_IMAGE_COMPRESSION_NONE=y
In reply to Antony PavlovUse the same approach as ARM barebox uses.
See also 6c03bdf8f99 ("kbuild: pbl: use same compression algo for both barebox and DTB").
--- arch/riscv/boot/start.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
arch/riscv/boot/start.c +8 -3
@@ -35,7 +35,7 @@ static unsigned long barebox_boarddata_size;void *barebox_riscv_boot_dtb (void ) {void *dtb; -int ret; +int ret =0 ;struct barebox_boarddata_compressed_dtb *compressed_dtb;static void *boot_dtb;
@@ -58,8 +58,13 @@ void *barebox_riscv_boot_dtb(void)if (!dtb)return NULL ; - ret =uncompress (compressed_dtb->data, compressed_dtb->datalen, -NULL ,NULL , dtb,NULL ,NULL ); +if (IS_ENABLED (CONFIG_IMAGE_COMPRESSION_NONE )) +memcpy (dtb, compressed_dtb->data, + compressed_dtb->datalen_uncompressed); +else + ret =uncompress (compressed_dtb->data, compressed_dtb->datalen, +NULL ,NULL , dtb,NULL ,NULL ); +if (ret) {pr_err ("uncompressing dtb failed\n" );free (dtb);
Signature · 1 line
2.39.0
PATCH 3/4 ARM: bcm283x: fix compilation with debug_ll enabled
In reply to Antony PavlovHow to reproduce compilation error:
1. make multi_v7_defconfig
2. enable CONFIG_DEBUG_LL=y and CONFIG_DEBUG_RPI3_MINI_UART=y
3. make
...
include/mach/bcm283x/debug_ll.h: In function ‘debug_ll_init’:include/mach/bcm283x/debug_ll.h:56:41: error: implicit declaration of function ‘BIT’ [-Werror=imp
licit-function-declaration]
56 | #define BCM2836_AUX_CLOCK_EN_UART BIT(0) /* Bit 0 enables
the Miniuart */
| ^~~
--- include/mach/bcm283x/debug_ll.h | 2 ++ 1 file changed, 2 insertions(+)
include/mach/bcm283x/debug_ll.h +2 -0
@@ -52,6 +52,8 @@ static inline void debug_ll_write_reg(void __iomem *base, int reg, uint8_t val)writeb (val, base + (reg <<2 )); } +#include <linux/bits.h> +#define BCM2836_AUX_CLOCK_ENB 0x3f215004/* BCM2835 AUX Clock enable register */ #define BCM2836_AUX_CLOCK_EN_UART BIT(0)/* Bit 0 enables the Miniuart */
Signature · 1 line
2.39.0
PATCH 4/4 ARM: vexpress: make debug_ll work
In reply to Antony PavlovThe UART address from dtb is used.
--- include/mach/vexpress/debug_ll.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
include/mach/vexpress/debug_ll.h +1 -11
@@ -7,17 +7,7 @@#ifndef __MACH_VEXPRESS_DEBUG_LL_H__#define __MACH_VEXPRESS_DEBUG_LL_H__ -#include <linux/amba/serial.h> -#include <io.h> - -#define DEBUG_LL_PHYS_BASE 0x10000000 -#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000 - -#ifdef MP -#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE -#else -#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE_RS1 -#endif +#define DEBUG_LL_UART_ADDR 0x1c090000#include <debug_ll/pl011.h>
Signature · 1 line
2.39.0
Re: [PATCH 4/4] ARM: vexpress: make debug_ll work
On Fri, 7 Jun 2024 03:12:59 +0300
Antony Pavlov <[email protected]> wrote:
Hi All!
Please fix misspelling in the subject of the original patch message. I have missed final "s" in the word "works".
The subject should be "ARM: vexpress: make debug_ll works".
Quoted 33 lines
The UART address from dtb is used.
Signed-off-by Antony Pavlov <[email protected]>--- include/mach/vexpress/debug_ll.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)include/mach/vexpress/debug_ll.h +1
-11@@ -7,17 +7,7 @@#ifndef __MACH_VEXPRESS_DEBUG_LL_H__#define __MACH_VEXPRESS_DEBUG_LL_H__ -#include <linux/amba/serial.h> -#include <io.h> - -#define DEBUG_LL_PHYS_BASE 0x10000000 -#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000 - -#ifdef MP -#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE -#else -#define DEBUG_LL_UART_ADDR DEBUG_LL_PHYS_BASE_RS1 -#endif +#define DEBUG_LL_UART_ADDR 0x1c090000#include <debug_ll/pl011.h> Signature · 1 line
2.39.0
Signature · 2 lines
Best regards, Antony Pavlov
Re: [PATCH 4/4] ARM: vexpress: make debug_ll work
Quoted 9 lines · Antony Pavlov
On Fri, 7 Jun 2024 03:12:59 +0300
Antony Pavlov <[email protected]> wrote:Hi All!
Please fix misspelling in the subject of the original patch message. I have missed final "s" in the word "works".
The subject should be "ARM: vexpress: make
debug_llworks".
No, it shouldn't. The original spelling is fine.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Sascha Hauer
AppliedQuoted 6 lines · Antony Pavlov
Antony Pavlov (4):
pbl: enable image verification for MIPS and RISC-V too
RISC-V: fix crash on start ifCONFIG_IMAGE_COMPRESSION_NONE=y
ARM: bcm283x: fix compilation withdebug_llenabled
ARM: vexpress: makedebug_llwork
Quoted 7 lines
arch/riscv/boot/start.c| 11 ++++++++---include/mach/bcm283x/debug_ll.h | 2 ++ include/mach/vexpress/debug_ll.h | 12 +----------- pbl/Kconfig | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-)[...]
Applied, thanks!
[1/4] pbl: enable image verification for MIPS and RISC-V too
https://git.pengutronix.de/cgit/barebox/commit/?id=52268376496b (link may not be stable)
[2/4] RISC-V: fix crash on start if CONFIG_IMAGE_COMPRESSION_NONE=y
https://git.pengutronix.de/cgit/barebox/commit/?id=c66d877a7b3d (link may not be stable)
[3/4] ARM: bcm283x: fix compilation with debug_ll enabled
https://git.pengutronix.de/cgit/barebox/commit/?id=462373cde141 (link may not be stable)
[4/4] ARM: vexpress: make debug_ll work
https://git.pengutronix.de/cgit/barebox/commit/?id=3a154b29d16e (link may not be stable)
Best regards,
Signature · 1 line
Sascha Hauer <[email protected]>