Re: [U-Boot] [PATCH v9 10/10] arm: bootm: fix sp detection at end of address range

2018-12-21 Thread Simon Goldschmidt
Am 21.12.2018 um 14:09 schrieb Frank Wunderlich: just a thought, that someone load a script from tftp (scr) which will be executed locally and imho can also contain mw-commands (like my one adding 0-characters). this can be modified from remote... Well, from a security point of view, you can'

Re: [U-Boot] [PATCH v9 10/10] arm: bootm: fix sp detection at end of address range

2018-12-21 Thread Frank Wunderlich
just a thought, that someone load a script from tftp (scr) which will be executed locally and imho can also contain mw-commands (like my one adding 0-characters). this can be modified from remote... i will not say that this have to be done, just a thought :) for loading from filesystem/fat with

Re: [U-Boot] [PATCH v9 10/10] arm: bootm: fix sp detection at end of address range

2018-12-21 Thread Simon Goldschmidt
Am Fr., 21. Dez. 2018, 13:28 hat Frank Wunderlich geschrieben: > tested now v9 with tftp > > U-Boot> bd > arch_number = 0x > boot_params = 0x8100 > DRAM bank = 0x > -> start= 0x8000 > -> size = 0x8000 > baudrate= 115200 bps > TLB addr= 0x > re

Re: [U-Boot] [PATCH v9 10/10] arm: bootm: fix sp detection at end of address range

2018-12-21 Thread Frank Wunderlich
tested now v9 with tftp U-Boot> bd arch_number = 0x boot_params = 0x8100 DRAM bank = 0x -> start= 0x8000 -> size = 0x8000 baudrate= 115200 bps TLB addr= 0x relocaddr = 0xFFF9B000 reloc off = 0x7E19B000 irq_sp = 0xFFB96FF0 sp start=

[U-Boot] [PATCH v9 10/10] arm: bootm: fix sp detection at end of address range

2018-12-19 Thread Simon Goldschmidt
This fixes 'arch_lmb_reserve()' for ARM that tries to detect in which DRAM bank 'sp' is in. This code failed if a bank was at the end of physical address range (i.e. size + length overflowed to 0). To fix this, calculate 'bank_end' as 'size + length - 1' so that such banks end at 0x, not