From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Mon, 01 Sep 2014 13:01:38 +0200 Subject: [U-Boot] [PATCH v4 1/2] blackfin: convert blackfin board_f and board_r to use generic board init functions In-Reply-To: References: <1407395332-20363-1-git-send-email-sonic.adi@gmail.com> <54006FFB.10505@monstr.eu> Message-ID: <54045212.4030907@monstr.eu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/01/2014 04:52 AM, Sonic Zhang wrote: > Hi Michael, > > On Fri, Aug 29, 2014 at 8:20 PM, Michal Simek wrote: >> Hi Sonic >> >> On 08/07/2014 09:08 AM, Sonic Zhang wrote: >>> From: Sonic Zhang >>> >>> - move blackfin specific cpu init code from blackfin board.c to cpu.c >>> - remove blackfin specific board init code and invoke generic board_f fron cpu init entry >>> - rename section name bss_vma to bss_start in order to match the generic board init code >>> - add a fake relocate_code function to set up the new stack only >> >> I would like get more information about this change. >> I have spent some time on Microblaze to move to generic board >> and I need to use sort of the same approach. >> I will play with full reloc but as I see there will be a lot of additional >> code generated which increase u-boot footprint and brings nothing. >> >> That's why I would like to know why you have decided to use fake relocate_code >> function and what setup you are using before and "after" relocation (location of stack, gd, malloc >> areas, etc). > > The Blackfin u-boot start code has already done the relocation before > the generic board_init_f() is invoked. But, the new stack pointer can > not be set until all functions in init_sequence_f[] are done. So, the > last function in init_sequence_f[] relocate_code() is used to update > the stack point and jump to the generic board_init_f(). Blackfin > architecture defines global static gd and bd data and set the init > stack point to (CONFIG_SYS_MALLOC_BASE - 4). Ah ok. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: