diff --git a/arch/mips/cpu/u-boot.lds b/arch/mips/cpu/u-boot.lds index 9a4ebcd1515..133ea05df3d 100644 --- a/arch/mips/cpu/u-boot.lds +++ b/arch/mips/cpu/u-boot.lds @@ -37,7 +37,7 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } - . = ALIGN(4); + . = ALIGN(8); __image_copy_end = .; __init_end = .; @@ -56,7 +56,7 @@ SECTIONS . += CONFIG_MIPS_RELOCATION_TABLE_SIZE - 4; } - . = ALIGN(4); + . = ALIGN(8); _end = .; .bss __rel_start (OVERLAY) : { @@ -64,7 +64,7 @@ SECTIONS *(.sbss.*) *(.bss.*) *(COMMON) - . = ALIGN(4); + . = ALIGN(8); __bss_end = .; } diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi index 8a115c503dc..02b03894eaf 100644 --- a/arch/sandbox/dts/sandbox.dtsi +++ b/arch/sandbox/dts/sandbox.dtsi @@ -135,7 +135,7 @@ sandbox,emul = <&emul0>; bootph-pre-ram; }; - sandbox_pmic: sandbox_pmic { + sandbox_pmic: sandbox_pmic@40 { reg = <0x40>; }; @@ -143,9 +143,9 @@ reg = <0x41>; }; - i2c_emul: emul { + i2c_emul: emul@7f { bootph-pre-ram; - reg = <0xff>; + reg = <0x7f>; compatible = "sandbox,i2c-emul-parent"; emul_eeprom: emul-eeprom { compatible = "sandbox,i2c-eeprom"; diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 0b3fc505e53..cd53c170171 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -947,8 +947,8 @@ sandbox,emul = <&emul1>; }; - i2c_emul: emul { - reg = <0xff>; + i2c_emul: emul@7f { + reg = <0x7f>; compatible = "sandbox,i2c-emul-parent"; emul_eeprom: emul-eeprom { compatible = "sandbox,i2c-eeprom"; @@ -963,7 +963,7 @@ }; }; - sandbox_pmic: sandbox_pmic { + sandbox_pmic: sandbox_pmic@40 { reg = <0x40>; sandbox,emul = <&emul_pmic0>; }; @@ -1842,7 +1842,7 @@ pinctrl-0 = <&pinctrl_gpios>, <&pinctrl_i2s>; pinctrl-1 = <&pinctrl_spi>, <&pinctrl_i2c>; - pinctrl_gpios: gpios { + pinctrl_gpios: pins-gpios { gpio0 { pins = "P5"; function = "GPIO"; @@ -1866,7 +1866,7 @@ }; }; - pinctrl_i2c: i2c { + pinctrl_i2c: pins-i2c { groups { groups = "I2C_UART"; function = "I2C"; @@ -1878,12 +1878,12 @@ }; }; - pinctrl_i2s: i2s { + pinctrl_i2s: pins-i2s { groups = "SPI_I2S"; function = "I2S"; }; - pinctrl_spi: spi { + pinctrl_spi: pins-spi { groups = "SPI_I2S"; function = "SPI"; diff --git a/arch/xtensa/config.mk b/arch/xtensa/config.mk index 200b66f8504..75888720d4a 100644 --- a/arch/xtensa/config.mk +++ b/arch/xtensa/config.mk @@ -9,7 +9,7 @@ PLATFORM_CPPFLAGS += -D__XTENSA__ -mlongcalls -mforce-no-pic \ LDFLAGS_FINAL += --gc-sections ifeq ($(CONFIG_SYS_BIG_ENDIAN),y) -PLATFORM_CPPFLAGS += -B xtensa -O elf32-xtensa-be +PLATFORM_ELFFLAGS += -B xtensa -O elf32-xtensa-be else PLATFORM_ELFFLAGS += -B xtensa -O elf32-xtensa-le endif diff --git a/arch/xtensa/cpu/u-boot.lds b/arch/xtensa/cpu/u-boot.lds index 72e4b9a706e..6894d4c327b 100644 --- a/arch/xtensa/cpu/u-boot.lds +++ b/arch/xtensa/cpu/u-boot.lds @@ -78,7 +78,7 @@ SECTIONS SECTION_text(XTENSA_SYS_TEXT_ADDR, FOLLOWING(.DoubleExceptionVector.text)) SECTION_rodata(ALIGN(16), FOLLOWING(.text)) SECTION_u_boot_list(ALIGN(16), FOLLOWING(.rodata)) - SECTION_data(ALIGN(16), FOLLOWING(__u_boot_list)) + SECTION_data(ALIGN(16), FOLLOWINGDT(__u_boot_list)) __reloc_end = .; __init_end = .; diff --git a/arch/xtensa/include/asm/ldscript.h b/arch/xtensa/include/asm/ldscript.h index bcf0fd5a744..50d3b390405 100644 --- a/arch/xtensa/include/asm/ldscript.h +++ b/arch/xtensa/include/asm/ldscript.h @@ -21,6 +21,9 @@ #define FORCE_OUTPUT . = . #define FOLLOWING(sec) \ AT(((LOADADDR(sec) + SIZEOF(sec) + ALIGN_LMA-1)) & ~(ALIGN_LMA-1)) +#define ALIGN_LMA_DT 8 +#define FOLLOWINGDT(sec) \ + AT(((LOADADDR(sec) + SIZEOF(sec) + ALIGN_LMA_DT-1)) & ~(ALIGN_LMA_DT-1)) /* * Specify an output section that will be added to the ROM store table @@ -110,6 +113,7 @@ ___u_boot_list_start = ABSOLUTE(.); \ KEEP(*(SORT(__u_boot_list*))); \ ___u_boot_list_end = ABSOLUTE(.); \ + . = ALIGN(ALIGN_LMA_DT); \ } #define SECTION_data(_vma_, _lma_) \ @@ -130,6 +134,7 @@ *(.eh_frame) \ *(.dynamic) \ *(.gnu.version_d) \ + . = ALIGN(ALIGN_LMA_DT); \ _data_end = ABSOLUTE(.); \ } diff --git a/board/emulation/qemu-arm/qemu-arm.env b/board/emulation/qemu-arm/qemu-arm.env index fb4adef281e..f74f251712a 100644 --- a/board/emulation/qemu-arm/qemu-arm.env +++ b/board/emulation/qemu-arm/qemu-arm.env @@ -5,8 +5,6 @@ stdin=serial,usbkbd stdout=serial,vidconsole stderr=serial,vidconsole -fdt_high=0xffffffff -initrd_high=0xffffffff fdt_addr=0x40000000 scriptaddr=0x40200000 pxefile_addr_r=0x40300000 diff --git a/boot/image-fit.c b/boot/image-fit.c index 2f2d3e9304d..cccaa48f683 100644 --- a/boot/image-fit.c +++ b/boot/image-fit.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #ifdef CONFIG_DM_HASH @@ -36,6 +35,7 @@ DECLARE_GLOBAL_DATA_PTR; #include #include #include +#include #include #include @@ -2279,7 +2279,7 @@ int fit_image_load(struct bootm_headers *images, ulong addr, log_debug("decompressing image\n"); if (load == data) { - loadbuf = malloc(max_decomp_len); + loadbuf = memalign(8, max_decomp_len); load = map_to_sysmem(loadbuf); } else { loadbuf = map_sysmem(load, max_decomp_len); @@ -2291,6 +2291,11 @@ int fit_image_load(struct bootm_headers *images, ulong addr, return -ENOEXEC; } len = load_end - load; + } else if (load_op != FIT_LOAD_IGNORED && image_type == IH_TYPE_FLATDT && + ((uintptr_t)buf & 7)) { + loadbuf = memalign(8, len); + load = map_to_sysmem(loadbuf); + memcpy(loadbuf, buf, len); } else if (load != data) { log_debug("copying\n"); loadbuf = map_sysmem(load, len); diff --git a/test/dm/pmic.c b/test/dm/pmic.c index 70dd18f5df0..b163b8e315d 100644 --- a/test/dm/pmic.c +++ b/test/dm/pmic.c @@ -39,7 +39,7 @@ static inline int power_pmic_get(struct unit_test_state *uts, char *name) /* Test PMIC get method */ static int dm_test_power_pmic_get(struct unit_test_state *uts) { - power_pmic_get(uts, "sandbox_pmic"); + power_pmic_get(uts, "sandbox_pmic@40"); return 0; } @@ -57,7 +57,7 @@ DM_TEST(dm_test_power_pmic_mc34708_get, UTF_SCAN_FDT); /* Test PMIC I/O */ static int dm_test_power_pmic_io(struct unit_test_state *uts) { - const char *name = "sandbox_pmic"; + const char *name = "sandbox_pmic@40"; uint8_t out_buffer, in_buffer; struct udevice *dev; int reg_count, i; diff --git a/test/py/tests/test_extension.py b/test/py/tests/test_extension.py index 61223496054..6daab0c9782 100644 --- a/test/py/tests/test_extension.py +++ b/test/py/tests/test_extension.py @@ -38,7 +38,7 @@ def test_extension(ubman): assert('overlay1.dtbo' in output) ubman.run_command_list([ - 'setenv extension_overlay_addr %s' % (overlay_addr), + 'setenv extension_overlay_addr %x' % (overlay_addr), 'setenv extension_overlay_cmd \'host load hostfs - ${extension_overlay_addr} %s${extension_overlay_name}\'' % (os.path.join(ubman.config.build_dir, OVERLAY_DIR))]) output = ubman.run_command('extension apply 0')