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