blob: 29f37d3ba4ca0a7064f071f1a25d742965bdb91b [file] [log] [blame]
Stefan Bosch48397f12020-07-10 19:07:25 +02001/* SPDX-License-Identifier: GPL-2.0+
2 *
3 * NSIH (Nexell System Information Header) for FriendlyArm nanopi2 board
4 *
5 * The NSIH (first 512 Bytes of u-boot.bin) is necessary for the
6 * 2nd-Bootloader to get information like load address of U-Boot.
7 *
Simon Glass72cc5382022-10-20 18:22:39 -06008 * 0x400 must be added to CONFIG_TEXT_BASE to have the actual load and
Stefan Bosch48397f12020-07-10 19:07:25 +02009 * start address because 2nd-Bootloader loads with an offset of 0x400
10 * (NSIH + 0x200 bytes are not loaded into RAM).
11 *
12 * It has been tested / is working with the following 2nd-Bootloader:
13 * "BL1 by Nexell V1.0.0-gd551e13 [Built on 2018-01-25 16:58:29]"
14 *
15 * (C) Copyright 2020 Stefan Bosch <stefan_b@posteo.net>
16 */
17
18#ifndef __BOOT0_H
19#define __BOOT0_H
20
21 ARM_VECTORS
22 .space 0x30
23 .word (_end - _start) + 20 * 1024 /* 0x50: load size
24 * (bin + 20k for DTB) */
25 .space 0x4
Simon Glass72cc5382022-10-20 18:22:39 -060026 .word CONFIG_TEXT_BASE + 0x400 /* 0x58: load address */
Stefan Bosch48397f12020-07-10 19:07:25 +020027 .word 0x00000000
Simon Glass72cc5382022-10-20 18:22:39 -060028 .word CONFIG_TEXT_BASE + 0x400 /* 0x60: start address */
Stefan Bosch48397f12020-07-10 19:07:25 +020029 .space 0x198
30 .byte 'N' /* 0x1FC: "NSIH" signature */
31 .byte 'S'
32 .byte 'I'
33 .byte 'H'
34
35 /* The NSIH + 0x200 bytes are omitted by the 2nd-Bootloader */
36 .space 0x200
37_start:
38 ARM_VECTORS
39
40#endif /* __BOOT0_H */