public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/5] MX5:MX53: add initial support for MX53EVK board
Date: Thu, 16 Dec 2010 11:48:08 +0100	[thread overview]
Message-ID: <4D09EE68.4000506@free.fr> (raw)
In-Reply-To: <1292494665-25674-6-git-send-email-r64343@freescale.com>

Le 16/12/2010 11:17, Jason Liu a ?crit :

> diff --git a/arch/arm/cpu/armv7/u-boot.lds b/arch/arm/cpu/armv7/u-boot.lds
> index 5725c30..7b6ab66 100644
> --- a/arch/arm/cpu/armv7/u-boot.lds
> +++ b/arch/arm/cpu/armv7/u-boot.lds
> @@ -34,6 +34,7 @@ SECTIONS
>   	. = ALIGN(4);
>   	.text	:
>   	{
> +		*(.ivt)

NAK. This IVT looks suspiciously like an IPL or header for some 
bootloader to me. It should not be part of u-boot, but should be built 
separately then glued to u-boot.bin like is done for NAND bootings. 
U-boot LDS files for ARM should always start with the reset and 
exception vectors, i.e. start.o.

>   		arch/arm/cpu/armv7/start.o	(.text)
>   		*(.text)
>   	}

> diff --git a/board/freescale/mx53evk/ivt.S b/board/freescale/mx53evk/ivt.S
> new file mode 100755
> index 0000000..f7a176f
> --- /dev/null
> +++ b/board/freescale/mx53evk/ivt.S
> @@ -0,0 +1,289 @@
> +/*
> + * Copyright (C) 2010 Freescale Semiconductor, Inc.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * .word with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include<config.h>
> +
> +.section ".ivt"
> +
> +ivt_header:         .word 0x402000D1    /* Tag=0xD1, Len=0x0020, Ver=0x40 */
> +app_code_jump_v:    .word (0xF8006400 + (plugin_start - CONFIG_SYS_TEXT_BASE))
> +reserv1:            .word 0x0
> +dcd_ptr:            .word 0x0
> +boot_data_ptr:      .word (0xF8006400 + (boot_data - CONFIG_SYS_TEXT_BASE))
> +self_ptr:           .word (0xF8006400 + (ivt_header - CONFIG_SYS_TEXT_BASE))
> +app_code_csf:       .word 0x0
> +reserv2:            .word 0x0
> +boot_data:          .word 0xF8006000
> +image_len:          .word 2*1024
> +plugin:             .word 0x1
> +
> +/* Second IVT to give entry point into the bootloader copied to DDR */
> +ivt2_header:        .word 0x402000D1    /*Tag=0xD1, Len=0x0020, Ver=0x40 */
> +app2_code_jump_v:   .word _start        /*Entry point for the bootloader */
> +reserv3:            .word 0x0
> +dcd2_ptr:           .word 0x0
> +boot_data2_ptr:     .word boot_data2
> +self_ptr2:          .word ivt2_header
> +app_code_csf2:      .word 0x0
> +reserv4:            .word 0x0
> +boot_data2:         .word (CONFIG_SYS_TEXT_BASE - 0x400)
> +image_len2:         .word (_end - CONFIG_SYS_TEXT_BASE)
> +plugin2:            .word 0x0
> +
> +
> +/* Here starts the plugin code */
> +plugin_start:
> +	/* Save the return address and the function arguments */

The entry point of u-boot should be the reset vector. Obviously this is 
not a reset vector, and looks more like a hook that some ROM code 
expects to call as a subroutine. In any case, it should not be the entry 
code of u-boot.

Please consider refactoring this into two different binaries as NAND 
boot does.

Amicalement,
-- 
Albert.

  reply	other threads:[~2010-12-16 10:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16 10:17 [U-Boot] [PATCH 0/5] Add support for Freescale MX53 Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 1/5] MX5: Add initial support for MX53 Jason Liu
2010-12-16 12:27   ` Wolfgang Denk
2010-12-17  3:20     ` Jason Liu
2010-12-16 13:34   ` Stefano Babic
2010-12-17  3:18     ` Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 2/5] serial_mxc: add support for MX53 processor Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 3/5] fec_mxc: " Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 4/5] mxc_i2c: " Jason Liu
2010-12-16 10:37   ` Heiko Schocher
2010-12-17  3:28     ` Jason Liu
2010-12-16 10:17 ` [U-Boot] [PATCH 5/5] MX5:MX53: add initial support for MX53EVK board Jason Liu
2010-12-16 10:48   ` Albert ARIBAUD [this message]
2010-12-16 12:23     ` Wolfgang Denk
2010-12-16 13:19   ` Stefano Babic
2010-12-17  3:05     ` Jason Liu
2010-12-17  5:41       ` Wolfgang Denk
2010-12-17 10:20       ` Albert ARIBAUD
2010-12-17 13:05       ` Stefano Babic
2010-12-20  5:19         ` Jason Liu
2010-12-20  6:52           ` John Rigby
2010-12-22 13:40             ` Jason Liu
2010-12-27 10:03             ` Stefano Babic
2010-12-20  6:52           ` Albert ARIBAUD
2010-12-16 23:04   ` Wolfgang Denk
2010-12-17  3:04     ` Jason Liu
2010-12-17  5:36       ` Wolfgang Denk
2010-12-16 12:25 ` [U-Boot] [PATCH 0/5] Add support for Freescale MX53 Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D09EE68.4000506@free.fr \
    --to=albert.aribaud@free.fr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox