Re: [U-Boot] [PATCH] ARM: socfpga: Add boot0 hook to prevent SPL corruption

2016-11-18 Thread Anatolij Gustschin
On Wed, 16 Nov 2016 17:54:14 +0100 Marek Vasut ma...@denx.de wrote: ... > Add BOOT0 hook which reserves the area at offset 0x40..0x5f and > populates offset 0x50 with jump to the entry point. This way, the > preloader signature is stored in reserved space and can not corrupt > the SPL code. > > Si

Re: [U-Boot] [PATCH] ARM: socfpga: Add boot0 hook to prevent SPL corruption

2016-11-16 Thread Chin Liang See
On Rab, 2016-11-16 at 23:39 +0100, Marek Vasut wrote: > On 11/16/2016 08:27 PM, Dinh Nguyen wrote: > > > > > > > > On 11/16/2016 10:54 AM, Marek Vasut wrote: > > > > > > Valid Altera SoCFPGA preloader image must contain special data at > > > offsets 0x40, 0x44, 0x48 and valid instructions at ad

Re: [U-Boot] [PATCH] ARM: socfpga: Add boot0 hook to prevent SPL corruption

2016-11-16 Thread Marek Vasut
On 11/16/2016 08:27 PM, Dinh Nguyen wrote: > > > On 11/16/2016 10:54 AM, Marek Vasut wrote: >> Valid Altera SoCFPGA preloader image must contain special data at >> offsets 0x40, 0x44, 0x48 and valid instructions at address 0x4c or >> 0x50. These addresses are by default used by U-Boot's vector ta

Re: [U-Boot] [PATCH] ARM: socfpga: Add boot0 hook to prevent SPL corruption

2016-11-16 Thread Dinh Nguyen
On 11/16/2016 10:54 AM, Marek Vasut wrote: > Valid Altera SoCFPGA preloader image must contain special data at > offsets 0x40, 0x44, 0x48 and valid instructions at address 0x4c or > 0x50. These addresses are by default used by U-Boot's vector table > and a piece of reset handler, thus a valid pre

[U-Boot] [PATCH] ARM: socfpga: Add boot0 hook to prevent SPL corruption

2016-11-16 Thread Marek Vasut
Valid Altera SoCFPGA preloader image must contain special data at offsets 0x40, 0x44, 0x48 and valid instructions at address 0x4c or 0x50. These addresses are by default used by U-Boot's vector table and a piece of reset handler, thus a valid preloader corrupts those addresses slightly. While this