2 * (C) Copyright 2010, 2011
3 * NVIDIA Corporation <www.nvidia.com>
5 * SPDX-License-Identifier: GPL-2.0+
11 #define STRAP_OPT_A_RAM_CODE_SHIFT 4
12 #define STRAP_OPT_A_RAM_CODE_MASK (0xf << STRAP_OPT_A_RAM_CODE_SHIFT)
14 /* Defines the supported operating modes */
15 enum fuse_operating_mode {
20 /* Defines the CMAC-AES-128 hash length in 32 bit words. (128 bits = 4 words) */
25 /* Defines the storage for a hash value (128 bits) */
27 u32 hash[HASH_LENGTH];
31 * Defines the code header information for the boot rom.
33 * The code immediately follows the code header.
35 * Note that the code header needs to be 16 bytes aligned to preserve
36 * the alignment of relevant data for hash and decryption computations without
37 * requiring extra copies to temporary memory areas.
40 u32 length_insecure; /* length of the code header */
42 struct hash hash; /* hash of header+code, starts next field*/
43 struct hash random_aes_block; /* a data block to aid security. */
44 u32 length_secure; /* length of the code header */
45 u32 destination; /* destination address to put the wb code */
46 u32 entry_point; /* execution address of the wb code */
47 u32 code_length; /* length of the code */
51 * The warm boot code needs direct access to these registers since it runs in
52 * SRAM and cannot call other U-Boot code.
106 * TODO: This register is not documented in the TRM yet. We could move this
107 * into the EMC and give it a proper interface, but not while it is
112 u32 pllx_base_divm:5;
113 u32 pllx_base_divn:10;
114 u32 pllx_base_divp:3;
115 u32 pllx_misc_lfcon:4;
116 u32 pllx_misc_cpcon:4;
123 * Save warmboot memory settings for a later resume
125 * @return 0 if ok, -1 on error
127 int warmboot_save_sdram_params(void);
129 int warmboot_prepare_code(u32 seg_address, u32 seg_length);
130 int sign_data_block(u8 *source, u32 length, u8 *signature);
131 void wb_start(void); /* Start of WB assembly code */
132 void wb_end(void); /* End of WB assembly code */