diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | arch/arm/cpu/cache_64.c | 2 | ||||
-rw-r--r-- | arch/arm/cpu/entry_ll_64.S | 12 | ||||
-rw-r--r-- | arch/arm/lib64/armlinux.c | 14 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 15 | ||||
-rw-r--r-- | images/Makefile.imx | 4 | ||||
-rw-r--r-- | include/asm-generic/barebox.lds.h | 11 |
7 files changed, 49 insertions, 13 deletions
@@ -1,5 +1,5 @@ -VERSION = 2019 -PATCHLEVEL = 12 +VERSION = 2020 +PATCHLEVEL = 01 SUBLEVEL = 0 EXTRAVERSION = NAME = None diff --git a/arch/arm/cpu/cache_64.c b/arch/arm/cpu/cache_64.c index 45f01e8dc9..6e18d981a4 100644 --- a/arch/arm/cpu/cache_64.c +++ b/arch/arm/cpu/cache_64.c @@ -27,9 +27,11 @@ int arm_set_cache_functions(void) void arm_early_mmu_cache_flush(void) { v8_flush_dcache_all(); + v8_invalidate_icache_all(); } void arm_early_mmu_cache_invalidate(void) { + v8_invalidate_dcache_all(); v8_invalidate_icache_all(); } diff --git a/arch/arm/cpu/entry_ll_64.S b/arch/arm/cpu/entry_ll_64.S index 37e0cb66b5..fb8645e0a0 100644 --- a/arch/arm/cpu/entry_ll_64.S +++ b/arch/arm/cpu/entry_ll_64.S @@ -10,14 +10,16 @@ .section .text.__barebox_arm_entry ENTRY(__barebox_arm_entry) mov sp, x3 - /* - * arm_early_mmu_cache_invalidate is jsut a call to - * v8_invalidate_icache_all() which doesn't clobber x0, x1 or x2 - */ + mov x19, x0 + mov x20, x1 + mov x21, x2 bl arm_early_mmu_cache_invalidate + mov x0, x19 + mov x1, x20 + mov x2, x21 #if IS_ENABLED(CONFIG_PBL_IMAGE) b barebox_pbl_start #else b barebox_non_pbl_start #endif -ENDPROC(__barebox_arm_entry)
\ No newline at end of file +ENDPROC(__barebox_arm_entry) diff --git a/arch/arm/lib64/armlinux.c b/arch/arm/lib64/armlinux.c index afa56792fb..31bd987f10 100644 --- a/arch/arm/lib64/armlinux.c +++ b/arch/arm/lib64/armlinux.c @@ -37,6 +37,7 @@ static int do_bootm_linux(struct image_data *data) unsigned long x3); resource_size_t start, end; unsigned long text_offset, image_size, devicetree, kernel; + unsigned long image_end; int ret; void *fdt; @@ -53,7 +54,18 @@ static int do_bootm_linux(struct image_data *data) if (ret) goto out; - devicetree = ALIGN(kernel + image_size, PAGE_SIZE); + image_end = PAGE_ALIGN(kernel + image_size); + + if (bootm_has_initrd(data)) { + ret = bootm_load_initrd(data, image_end); + if (ret) + return ret; + + image_end += resource_size(data->initrd_res); + image_end = PAGE_ALIGN(image_end); + } + + devicetree = image_end; fdt = bootm_get_devicetree(data); if (IS_ERR(fdt)) { diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index f3be177ceb..417ae5df75 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -137,6 +137,15 @@ static struct descriptor { #define ehci_is_TDI() (ehci->flags & EHCI_HAS_TT) +static void memzero32(void *ptr, size_t size) +{ + uint32_t *ptr32 = ptr; + int i; + + for (i = 0; i < size / sizeof(uint32_t); i++) + ptr32[i] = 0x0; +} + static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec) { uint32_t result; @@ -237,7 +246,7 @@ static int ehci_prepare_qtd(struct device_d *dev, if (ret) return ret; } else { - memset(td->qt_buffer, 0, sizeof(td->qt_buffer)); + memzero32(td->qt_buffer, sizeof(td->qt_buffer)); } return 0; @@ -318,7 +327,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer, qh->qh_endpt2 = cpu_to_hc32(endpt); qh->qh_curtd = 0; qh->qt_token = 0; - memset(qh->qt_buffer, 0, sizeof(qh->qt_buffer)); + memzero32(qh->qt_buffer, sizeof(qh->qt_buffer)); tdp = &qh->qt_next; @@ -854,7 +863,7 @@ static int ehci_init(struct usb_host *host) */ ehci->periodic_schedules = 0; periodic = ehci->periodic_queue; - memset(periodic, 0, sizeof(*periodic)); + memzero32(periodic, sizeof(*periodic)); periodic->qh_link = cpu_to_hc32(QH_LINK_TERMINATE); periodic->qt_next = cpu_to_hc32(QT_NEXT_TERMINATE); periodic->qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE); diff --git a/images/Makefile.imx b/images/Makefile.imx index 53d4ac8202..e5558b1c60 100644 --- a/images/Makefile.imx +++ b/images/Makefile.imx @@ -378,12 +378,12 @@ image-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += barebox-nxp-imx8mq-evk.img pblb-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += start_zii_imx8mq_dev CFG_start_zii_imx8mq_dev.pblb.imximg = $(board)/zii-imx8mq-dev/flash-header-zii-imx8mq-dev.imxcfg -MAX_PBL_MEMORY_SIZE_start_zii_imx8mq_dev.pbl = 0x3f000 +MAX_PBL_MEMORY_SIZE_start_zii_imx8mq_dev = 0x3f000 FILE_barebox-zii-imx8mq-dev.img = start_zii_imx8mq_dev.pblb.imximg image-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += barebox-zii-imx8mq-dev.img pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX8MQ) += start_phytec_phycore_imx8mq CFG_start_phytec_phycore_imx8mq.pblb.imximg = $(board)/phytec-som-imx8mq/flash-header-phycore-imx8mq.imxcfg -MAX_PBL_MEMORY_SIZE_start_phytec_phycore_imx8mq.pbl = 0x3f000 +MAX_PBL_MEMORY_SIZE_start_phytec_phycore_imx8mq = 0x3f000 FILE_barebox-phytec-phycore-imx8mq.img = start_phytec_phycore_imx8mq.pblb.imximg image-$(CONFIG_MACH_PHYTEC_SOM_IMX8MQ) += barebox-phytec-phycore-imx8mq.img diff --git a/include/asm-generic/barebox.lds.h b/include/asm-generic/barebox.lds.h index 68b78a13a9..138e9405a1 100644 --- a/include/asm-generic/barebox.lds.h +++ b/include/asm-generic/barebox.lds.h @@ -16,6 +16,7 @@ #endif #define BAREBOX_INITCALLS \ + STRUCT_ALIGN(); \ __barebox_initcalls_start = .; \ KEEP(*(.initcall.0)) \ KEEP(*(.initcall.1)) \ @@ -35,6 +36,7 @@ __barebox_initcalls_end = .; #define BAREBOX_EXITCALLS \ + STRUCT_ALIGN(); \ __barebox_exitcalls_start = .; \ KEEP(*(.exitcall.0)) \ KEEP(*(.exitcall.1)) \ @@ -46,37 +48,44 @@ __barebox_exitcalls_end = .; #define BAREBOX_CMDS \ + STRUCT_ALIGN(); \ __barebox_cmd_start = .; \ KEEP(*(SORT_BY_NAME(.barebox_cmd*))) \ __barebox_cmd_end = .; #define BAREBOX_RATP_CMDS \ + STRUCT_ALIGN(); \ __barebox_ratp_cmd_start = .; \ KEEP(*(SORT_BY_NAME(.barebox_ratp_cmd*))) \ __barebox_ratp_cmd_end = .; #define BAREBOX_SYMS \ + STRUCT_ALIGN(); \ __usymtab_start = .; \ KEEP(*(__usymtab)) \ __usymtab_end = .; #define BAREBOX_MAGICVARS \ + STRUCT_ALIGN(); \ __barebox_magicvar_start = .; \ KEEP(*(SORT_BY_NAME(.barebox_magicvar*))) \ __barebox_magicvar_end = .; #define BAREBOX_CLK_TABLE \ + STRUCT_ALIGN(); \ __clk_of_table_start = .; \ KEEP(*(.__clk_of_table)); \ KEEP(*(.__clk_of_table_end)); \ __clk_of_table_end = .; #define BAREBOX_DTB \ + STRUCT_ALIGN(); \ __dtb_start = .; \ KEEP(*(.dtb.rodata.*)); \ __dtb_end = .; #define BAREBOX_IMD \ + STRUCT_ALIGN(); \ KEEP(*(.barebox_imd_start)) \ KEEP(*(.barebox_imd_1*)) \ *(.barebox_imd_0*) \ @@ -84,6 +93,7 @@ #ifdef CONFIG_PCI #define BAREBOX_PCI_FIXUP \ + STRUCT_ALIGN(); \ __start_pci_fixups_early = .; \ KEEP(*(.pci_fixup_early)) \ __end_pci_fixups_early = .; \ @@ -98,6 +108,7 @@ #endif #define BAREBOX_RSA_KEYS \ + STRUCT_ALIGN(); \ __rsa_keys_start = .; \ KEEP(*(.rsa_keys.rodata.*)); \ __rsa_keys_end = .; \ |