Blame view
tools/ublimage.h
1.95 KB
7816f2cf8 mkimage: add UBL ... |
1 2 3 4 5 6 7 8 |
/* * (C) Copyright 2011 * Heiko Schocher, DENX Software Engineering, hs@denx.de. * * Vased on: * (C) Copyright 2009 * Stefano Babic, DENX Software Engineering, sbabic@denx.de. * |
3765b3e7b Coding Style clea... |
9 |
* SPDX-License-Identifier: GPL-2.0+ |
7816f2cf8 mkimage: add UBL ... |
10 11 12 13 |
*/ #ifndef _UBLIMAGE_H_ #define _UBLIMAGE_H_ |
7816f2cf8 mkimage: add UBL ... |
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
enum ublimage_cmd { CMD_INVALID, CMD_BOOT_MODE, CMD_ENTRY, CMD_PAGE, CMD_ST_BLOCK, CMD_ST_PAGE, CMD_LD_ADDR }; enum ublimage_fld_types { CFG_INVALID = -1, CFG_COMMAND, CFG_REG_VALUE }; /* * from sprufg5a.pdf Table 110 * Used by RBL when doing NAND boot */ #define UBL_MAGIC_BASE (0xA1ACED00) /* Safe boot mode */ #define UBL_MAGIC_SAFE (0x00) /* DMA boot mode */ #define UBL_MAGIC_DMA (0x11) /* I Cache boot mode */ #define UBL_MAGIC_IC (0x22) /* Fast EMIF boot mode */ #define UBL_MAGIC_FAST (0x33) /* DMA + ICache boot mode */ #define UBL_MAGIC_DMA_IC (0x44) /* DMA + ICache + Fast EMIF boot mode */ #define UBL_MAGIC_DMA_IC_FAST (0x55) /* Define max UBL image size */ #define UBL_IMAGE_SIZE (0x00003800u) |
9f8765805 ublimage: NAND bl... |
50 |
/* one NAND block */ |
4dd834906 arm, davinci: add... |
51 |
#define UBL_BLOCK_SIZE 2048 |
9f8765805 ublimage: NAND bl... |
52 |
|
7816f2cf8 mkimage: add UBL ... |
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
/* from sprufg5a.pdf Table 109 */ struct ubl_header { uint32_t magic; /* Magic Number, see UBL_* defines */ uint32_t entry; /* entry point address for bootloader */ uint32_t pages; /* number of pages (size of bootloader) */ uint32_t block; /* * blocknumber where user bootloader is * present */ uint32_t page; /* * page number where user bootloader is * present. */ uint32_t pll_m; /* * PLL setting -Multiplier (only valid if * Magic Number indicates PLL enable). */ uint32_t pll_n; /* * PLL setting -Divider (only valid if * Magic Number indicates PLL enable). */ uint32_t emif; /* * fast EMIF setting (only valid if * Magic Number indicates fast EMIF boot). */ /* to fit in one nand block */ |
9f8765805 ublimage: NAND bl... |
79 |
unsigned char res[UBL_BLOCK_SIZE - 8 * 4]; |
7816f2cf8 mkimage: add UBL ... |
80 81 82 |
}; #endif /* _UBLIMAGE_H_ */ |