qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 1 | #ifndef _ZAPPER_BOOT_H_ |
| 2 | #define _ZAPPER_BOOT_H_ |
| 3 | |
| 4 | #include <amlogic/zapper_boot_common.h> |
| 5 | |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 6 | /* define the reboot flag */ |
| 7 | #define REBOOT_FLAG_WARM (0x55) /* The process of automatically rebooting after a successful download update is called a warm reboot. */ |
| 8 | #define REBOOT_FLAG_COLD (0xAA) /* Other than the warm reboot, all other reboot scenarios are called cold reboot. */ |
| 9 | #define REBOOT_FLAG_FIRST (0xFF) |
| 10 | #define DOWNLOAD_MASK (0b00010000) |
| 11 | #define OTA_DOWNLOAD_INDICATOR (0b00010010) |
| 12 | #define USB_DOWNLOAD_INDICATOR (0b00010011) |
| 13 | |
| 14 | //---------------From irdeto-downloader START-----------// |
| 15 | |
| 16 | /* Typical size for module_info_header */ |
| 17 | #define AML_TYPICAL_MODULE_INFO_HEADER_SIZE (26) |
| 18 | /* Length of signed CCP CAM signature */ |
| 19 | #define AML_SIGNATURE_LENGTH (256) |
| 20 | /* Short size for module_info_header, applicable for BBCB, Loader Core, and Loader Partition. */ |
| 21 | #define AML_SHORT_MODULE_INFO_HEADER_SIZE (12) |
| 22 | |
| 23 | /* header size of boot,system,ccaconfig,casecure */ |
| 24 | #define AML_NORMAL_HEAD_SIZE (AML_TYPICAL_MODULE_INFO_HEADER_SIZE + 2 * AML_SIGNATURE_LENGTH) |
| 25 | /* boot header */ |
| 26 | #define BOOT_HEAD_OFFSET AML_SHORT_MODULE_INFO_HEADER_SIZE |
| 27 | /* system header */ |
| 28 | #define SYSTEM_HEAD_OFFSET (AML_SHORT_MODULE_INFO_HEADER_SIZE + AML_NORMAL_HEAD_SIZE) |
| 29 | /* CCA Config header */ |
| 30 | #define CCA_HEAD_OFFSET (AML_SHORT_MODULE_INFO_HEADER_SIZE + 3 * AML_NORMAL_HEAD_SIZE) |
| 31 | /* CASECURE header */ |
| 32 | #define CASECURE_HEAD_OFFSET (AML_SHORT_MODULE_INFO_HEADER_SIZE + 4 * AML_NORMAL_HEAD_SIZE) |
| 33 | |
| 34 | //---------------From irdeto-downloader END-----------// |
| 35 | |
| 36 | //---------------From FLASHMAP, CL:425841 START-----------// |
| 37 | #define BOOT_PARTITION_NAME "boot" |
| 38 | #define SYSTEM_PARTITION_NAME "system" |
| 39 | #define CASECURE_PARTITION_NAME "casecure" |
| 40 | #define CCACONFIG_PARTITION_NAME "ccaconfig" |
| 41 | #define CAVERIFY_PARTITION_NAME "caverify" |
| 42 | #define RESCUELIST_PARTITION_NAME "rescuelist" |
| 43 | |
| 44 | #define FACTORY_RESET_CADATA_PARTITION_NAME "cadata" |
| 45 | |
| 46 | #define BOOT_PARTITION_SIZE (12 * 1024 * 1024) |
| 47 | #define SYSTEM_PARTITION_SIZE (48 * 1024 * 1024) |
| 48 | #define CASECURE_PARTITION_SIZE (4 * 1024 * 1024) |
| 49 | #define CCACONFIG_PARTITION_SIZE (128 * 1024) |
| 50 | #define CAVERIFY_PARTITION_SIZE (128 * 1024) |
| 51 | #define RESCUELIST_PARTITION_SIZE (128 * 1024) |
| 52 | //---------------From FLASHMAP, CL:425841 END-----------// |
| 53 | |
| 54 | #define FACTORY_RESET_PS_INDEX_0 "cloaked_ca_0.dat" |
| 55 | #define FACTORY_RESET_PS_INDEX_15 "cloaked_ca_15.dat" |
| 56 | |
| 57 | typedef enum { |
| 58 | VERIFY_MODULE_BOOT, /* module-id, 0x20 */ |
| 59 | VERIFY_MODULE_SYSTEM, /* module-id, 0x21 */ |
| 60 | VERIFY_MODULE_CCACONFIG, /* module-id, 0x23 */ |
| 61 | VERIFY_MODULE_CASECURE, /* module-id, 0x24 */ |
| 62 | } VERIFY_MODULE_TYPE; |
| 63 | |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 64 | enum ADC_KEY_TYPE { |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 65 | NO_ADC_KEY_PRESS = 0, |
| 66 | ADC_KEY_A_PRESS, |
| 67 | ADC_KEY_B_PRESS, |
| 68 | ADC_KEY_C_PRESS, |
| 69 | UNKNOWN_KEY_PRESS, |
| 70 | ADC_DEVICE_ERROR, |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 71 | }; |
| 72 | |
| 73 | enum JUMP_RECOVERY_TYPE { |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 74 | NO_NEED_JUMP = 0, |
| 75 | USB_DETECT_JUMP, |
| 76 | OTA_DETECT_JUMP, |
| 77 | BOOT_CHECK_JUMP, |
| 78 | UNKNOWN_JUMP, |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 79 | }; |
| 80 | |
linyang.li | 958823a | 2024-04-08 16:55:43 +0800 | [diff] [blame] | 81 | enum RCU_COMBINATION_TYPE { |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 82 | RCU_COMBINATION_ADVANCED_TUNING_CODE_SCREEN = 0, |
| 83 | RCU_COMBINATION_ADVANCED_SETUP_SCREEN = 1, |
| 84 | RCU_COMBINATION_USB_UPGRADE = 2, |
| 85 | RCU_COMBINATION_MANUAL_FORCED_DOWNLOAD = 3, |
| 86 | RCU_COMBINATION_FACTORY_RESET = 4, |
| 87 | RCU_COMBINATION_MAX = 5, |
| 88 | }; |
| 89 | |
| 90 | /** |
| 91 | * Download MODE, Consistent with the definition in the downloader. |
| 92 | */ |
| 93 | enum DOWNLOAD_MODE_TYPE{ |
| 94 | DOWNLOAD_MODE_NORMAL = 0, |
| 95 | DOWNLOAD_MODE_RESCUE, |
| 96 | DOWNLOAD_MODE_MANUAL_FORCE, |
| 97 | DOWNLOAD_MODE_USB, |
| 98 | DOWNLOAD_MODE_TUNING_CODE, |
| 99 | DOWNLOAD_MODE_ADVANCE_SETUP, |
| 100 | DOWNLOAD_MODE_MAX |
linyang.li | 958823a | 2024-04-08 16:55:43 +0800 | [diff] [blame] | 101 | }; |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 102 | |
linyang.li | 1304a39 | 2024-04-20 16:36:22 +0800 | [diff] [blame] | 103 | typedef enum { |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 104 | LED_POWER_RED, /* The macro corresponds to the "Red" description of the Standby LED in the LDRS table */ |
| 105 | LED_POWER_GREEN, /* The macro corresponds to the "Green" description of the Standby LED in the LDRS table */ |
| 106 | LED_POWER_OFF, /* The macro corresponds to the "Off" description of the Standby LED in the LDRS table */ |
| 107 | LED_REMOTE_RED, /* The macro corresponds to the "Red" description of the Remote LED in the LDRS table */ |
| 108 | LED_REMOTE_OFF, /* The macro corresponds to the "Off" description of the Remote LED in the LDRS table */ |
| 109 | LED_ALERT_YELLOW, /* The macro corresponds to the "Yellow" description of the Alert LED in the LDRS table */ |
| 110 | LED_ALERT_OFF, /* The macro corresponds to the "Off" description of the Alert LED in the LDRS table */ |
linyang.li | 1304a39 | 2024-04-20 16:36:22 +0800 | [diff] [blame] | 111 | } led_display_type; |
| 112 | |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 113 | struct Zapper_boot_info { |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 114 | unsigned char loader_partition_header[LD_HEADER_LENGTH]; |
| 115 | unsigned char loader_partition[LD_LENGTH]; |
| 116 | unsigned char error_code[EC_LENGTH]; |
| 117 | unsigned char modify_flag; |
| 118 | unsigned char reboot_flag; |
| 119 | unsigned char download_mode; |
| 120 | unsigned char standby_flag; |
| 121 | unsigned char backupODU; |
| 122 | unsigned char share_crc[LD_SHARE_DATA_CRC_LENGTH]; |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 123 | |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 124 | unsigned char bbcb_header[BBCB_HEADER_LENGTH]; |
| 125 | unsigned char bbcb[BBCB_LENGTH]; |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 126 | |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 127 | unsigned char uk_header[UK_HEADER_LENGTH]; |
| 128 | unsigned char uk[UK_LENGTH]; |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 129 | |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 130 | unsigned char kernel_header[KERNEL_HEADER_LENGTH]; |
| 131 | unsigned char kernel[KERNEL_LENGTH]; |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 132 | }; |
| 133 | |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 134 | /* these structure is from irdeto-download spi */ |
| 135 | typedef enum |
| 136 | { |
| 137 | DMD_DOWNLINK_INJECTION, |
| 138 | DMD_DOWNLINK_CUSTOM, |
| 139 | DMD_DOWNLINK_Ku_LOW, |
| 140 | DMD_DOWNLINK_Ku_HIGH, |
| 141 | DMD_DOWNLINK_C, |
| 142 | DMD_DOWNLINK_C_LOW, |
| 143 | DMD_DOWNLINK_C_HIGH |
| 144 | } dmd_downlink_t; |
| 145 | |
| 146 | typedef enum |
| 147 | { |
| 148 | DMD_LNB_TONE_DEFAULT, |
| 149 | DMD_LNB_TONE_OFF, |
| 150 | DMD_LNB_TONE_22KHZ |
| 151 | } dmd_lnb_tone_state_t; |
| 152 | |
| 153 | typedef struct |
| 154 | { |
| 155 | unsigned int band_start; |
| 156 | unsigned int band_end; |
| 157 | unsigned int lo; |
| 158 | dmd_downlink_t downlink; |
| 159 | } dmd_satellite_band_t; |
| 160 | |
| 161 | typedef enum |
| 162 | { |
| 163 | DMD_DISEQC_DEFAULT, |
| 164 | DMD_DISEQC_PORTA, |
| 165 | DMD_DISEQC_PORTB, |
| 166 | DMD_DISEQC_PORTC, |
| 167 | DMD_DISEQC_PORTD, |
| 168 | DMD_DISEQC_ALL |
| 169 | } dmd_diseqc_port_t; |
| 170 | |
| 171 | typedef enum |
| 172 | { |
| 173 | DMD_LNB_VOLTAGE_OFF = 0, |
| 174 | DMD_LNB_VOLTAGE_14V = 1, |
| 175 | DMD_LNB_VOLTAGE_18V = 2 |
| 176 | } dmd_lnb_voltage_t; |
| 177 | |
| 178 | typedef enum |
| 179 | { |
| 180 | DMD_PLR_HORIZONTAL = 0x01, |
| 181 | DMD_PLR_VERTICAL = 0x02, |
| 182 | DMD_PLR_NONE = 0x03, |
| 183 | DMD_PLR_CIRCULAR_LEFT = 0x04, |
| 184 | DMD_PLR_CIRCULAR_RIGHT = 0x05 |
| 185 | } dmd_polarization_t; |
| 186 | |
| 187 | typedef enum |
| 188 | { |
| 189 | DMD_ROLLOFF_035 = 0x00, |
| 190 | DMD_ROLLOFF_025 = 0x01, |
| 191 | DMD_ROLLOFF_020 = 0x02, |
| 192 | DMD_ROLLOFF_015 = 0x03, |
| 193 | DMD_ROLLOFF_010 = 0x04, |
| 194 | DMD_ROLLOFF_005 = 0x05 |
| 195 | } dmd_rolloff_t; |
| 196 | |
| 197 | typedef enum |
| 198 | { |
| 199 | DMD_MODSYS_DVBS = 0x00, |
| 200 | DMD_MODSYS_DVBS2 = 0x01 |
| 201 | } dmd_modulation_system_t; |
| 202 | |
| 203 | typedef enum |
| 204 | { |
| 205 | DMD_FEC_NONE = 0x0000, |
| 206 | DMD_FEC_1_2 = 0x0001, |
| 207 | DMD_FEC_2_3 = 0x0002, |
| 208 | DMD_FEC_3_4 = 0x0004, |
| 209 | DMD_FEC_4_5 = 0x0008, |
| 210 | DMD_FEC_5_6 = 0x0010, |
| 211 | DMD_FEC_6_7 = 0x0020, |
| 212 | DMD_FEC_7_8 = 0x0040, |
| 213 | DMD_FEC_8_9 = 0x0080, |
| 214 | DMD_FEC_3_5 = 0x0100, |
| 215 | DMD_FEC_9_10 = 0x0200, |
| 216 | DMD_FEC_ALL = 0xFFFF |
| 217 | } dmd_fec_rate_t; |
| 218 | |
| 219 | typedef enum |
| 220 | { |
| 221 | DMD_FEC_OUTER_NONE = 0x00, |
| 222 | DMD_FEC_OUTER_NOT_DEFINED = 0x01, |
| 223 | DMD_FEC_OUTER_RS = 0x02 |
| 224 | } dmd_fec_rate_outer_t; |
| 225 | |
| 226 | typedef enum |
| 227 | { |
| 228 | DMD_MOD_NONE = 0x0000, |
| 229 | DMD_MOD_QPSK = 0x0001, |
| 230 | DMD_MOD_8PSK = 0x0002, |
| 231 | DMD_MOD_QAM = 0x0004, |
| 232 | DMD_MOD_4QAM = 0x0008, |
| 233 | DMD_MOD_16QAM = 0x0010, |
| 234 | DMD_MOD_32QAM = 0x0020, |
| 235 | DMD_MOD_64QAM = 0x0040, |
| 236 | DMD_MOD_128QAM = 0x0080, |
| 237 | DMD_MOD_256QAM = 0x0100, |
| 238 | DMD_MOD_BPSK = 0x0200, |
| 239 | DMD_MOD_ALL = 0xFFFF |
| 240 | } dmd_modulation_t; |
| 241 | |
| 242 | typedef enum |
| 243 | { |
| 244 | DMD_CONSTELLATION_NONE = 0x0000, |
| 245 | DMD_CONSTELLATION_QPSK = 0x0001, |
| 246 | DMD_CONSTELLATION_16QAM = 0x0002, |
| 247 | DMD_CONSTELLATION_64QAM = 0x0004, |
| 248 | DMD_CONSTELLATION_32QAM = 0x0008, |
| 249 | DMD_CONSTELLATION_128QAM = 0x0010, |
| 250 | DMD_CONSTELLATION_256QAM = 0x0020, |
| 251 | DMD_CONSTELLATION_1024QAM = 0x0040, |
| 252 | DMD_CONSTELLATION_ALL = 0xFFFF |
| 253 | } dmd_constellation_t; |
| 254 | |
| 255 | typedef enum |
| 256 | { |
| 257 | DMD_GUARD_INTERVAL_1_32 = 0x01, |
| 258 | DMD_GUARD_INTERVAL_1_16 = 0x02, |
| 259 | DMD_GUARD_INTERVAL_1_8 = 0x03, |
| 260 | DMD_GUARD_INTERVAL_1_4 = 0x04, |
| 261 | DMD_GUARD_INTERVAL_1_128 = 0x05, |
| 262 | DMD_GUARD_INTERVAL_19_128 = 0x06, |
| 263 | DMD_GUARD_INTERVAL_19_256 = 0x07 |
| 264 | } dmd_guard_interval_t; |
| 265 | |
| 266 | typedef enum |
| 267 | { |
| 268 | DMD_HIERARCHY_NONE = 0x01, |
| 269 | DMD_HIERARCHY_1 = 0x02, |
| 270 | DMD_HIERARCHY_2 = 0x03, |
| 271 | DMD_HIERARCHY_4 = 0x04 |
| 272 | } dmd_hierarchy_t; |
| 273 | |
| 274 | typedef enum |
| 275 | { |
| 276 | DMD_HIERARCHY_HP = 0x00, |
| 277 | DMD_HIERARCHY_LP = 0x01 |
| 278 | } dmd_hierarchy_hplp_t; |
| 279 | |
| 280 | typedef enum |
| 281 | { |
| 282 | DMD_PLP_COMMON, |
| 283 | DMD_PLP_DATA1, |
| 284 | DMD_PLP_DATA2 |
| 285 | } dmd_plp_type_t; |
| 286 | |
| 287 | typedef enum |
| 288 | { |
| 289 | TUNER_STATE_LOCKED, |
| 290 | TUNER_STATE_TIMEOUT, |
| 291 | TUNER_STATE_UNKNOWN |
| 292 | } dmd_tuner_event_t; |
| 293 | |
| 294 | typedef struct { |
| 295 | unsigned char version; //not unicable: 0, 1.x: 1(EN50494), 2.x: 2(EN50607) |
| 296 | unsigned short frequency_mhz; |
| 297 | unsigned char userband; |
| 298 | unsigned char bank; |
| 299 | unsigned char uncommitted; |
| 300 | unsigned char committed; |
| 301 | } dmd_unicable_param_t; |
| 302 | |
| 303 | typedef struct |
| 304 | { |
| 305 | unsigned int frequency; |
| 306 | unsigned int symbol_rate; |
| 307 | dmd_modulation_system_t modulation_system; |
| 308 | dmd_polarization_t polarization; |
| 309 | dmd_modulation_t modulation; |
| 310 | dmd_fec_rate_t fec_rate; |
| 311 | dmd_rolloff_t roll_off; |
| 312 | dmd_lnb_tone_state_t lnb_tone_state; |
| 313 | dmd_diseqc_port_t diseqc_port; |
| 314 | dmd_satellite_band_t band; |
| 315 | } dmd_satellite_desc_t; |
| 316 | |
| 317 | typedef struct |
| 318 | { |
| 319 | unsigned int frequency; /* frequency in KHz */ |
| 320 | dmd_fec_rate_t fec_rate; /* select FEC rate(s) */ |
| 321 | dmd_fec_rate_outer_t fec_rate_outer; /* select FEC outer */ |
| 322 | dmd_modulation_t modulation; /* select modulation scheme */ |
| 323 | unsigned int symbol_rate; /* symbol rate in KBAUD */ |
| 324 | } dmd_cable_desc_t; |
| 325 | |
| 326 | typedef enum |
| 327 | { |
| 328 | DMD_TRANSMISSION_2K = 0x01, |
| 329 | DMD_TRANSMISSION_8K = 0x02, |
| 330 | DMD_TRANSMISSION_4K = 0x03, |
| 331 | DMD_TRANSMISSION_1K = 0x04, |
| 332 | DMD_TRANSMISSION_16K = 0x05, |
| 333 | DMD_TRANSMISSION_32K = 0x06 |
| 334 | } dmd_transmission_mode_t; |
| 335 | |
| 336 | typedef enum |
| 337 | { |
| 338 | DMD_BANDWIDTH_8M = 0x01, |
| 339 | DMD_BANDWIDTH_7M = 0x02, |
| 340 | DMD_BANDWIDTH_6M = 0x03, |
| 341 | DMD_BANDWIDTH_5M = 0x04, |
| 342 | DMD_BANDWIDTH_10M = 0x05, |
| 343 | DMD_BANDWIDTH_17M = 0x06 |
| 344 | } dmd_bandwidth_t; |
| 345 | |
| 346 | typedef enum |
| 347 | { |
| 348 | DMD_DVBTYPE_DVBT, |
| 349 | DMD_DVBTYPE_DVBT2, |
| 350 | DMD_DVBTYPE_DTMB |
| 351 | } dmd_terrestrial_dvbtype_t; |
| 352 | |
| 353 | typedef struct |
| 354 | { |
| 355 | unsigned int frequency; |
| 356 | dmd_constellation_t constellation; |
| 357 | dmd_hierarchy_t hierarchy; |
| 358 | dmd_hierarchy_hplp_t hp_lp; |
| 359 | dmd_fec_rate_t HP_code_rate; |
| 360 | dmd_fec_rate_t LP_code_rate; |
| 361 | dmd_guard_interval_t guard_interval; |
| 362 | dmd_transmission_mode_t transmission_mode; |
| 363 | dmd_bandwidth_t bandwidth; |
| 364 | } dmd_terrestrial_dvbt_desc_t; |
| 365 | |
| 366 | typedef struct |
| 367 | { |
| 368 | unsigned int frequency; |
| 369 | unsigned int plp_id; |
| 370 | dmd_guard_interval_t guard_interval; |
| 371 | dmd_transmission_mode_t transmission_mode; |
| 372 | unsigned int T2_system_id; |
| 373 | dmd_bandwidth_t bandwidth; |
| 374 | } dmd_terrestrial_dvbt2_desc_t; |
| 375 | |
| 376 | typedef struct |
| 377 | { |
| 378 | unsigned int frequency; |
| 379 | dmd_bandwidth_t bandwidth; |
| 380 | } dmd_terrestrial_dtmb_desc_t; |
| 381 | |
| 382 | typedef struct |
| 383 | { |
| 384 | dmd_terrestrial_dvbtype_t dvb_type; |
| 385 | union { |
| 386 | dmd_terrestrial_dvbt_desc_t dvbt; |
| 387 | dmd_terrestrial_dvbt2_desc_t dvbt2; |
| 388 | dmd_terrestrial_dtmb_desc_t dtmb; |
| 389 | } desc; |
| 390 | } dmd_terrestrial_desc_t; |
| 391 | |
| 392 | typedef enum |
| 393 | { |
| 394 | DMD_SATELLITE = 0x0100, |
| 395 | DMD_CABLE = 0x0200, |
| 396 | DMD_TERRESTRIAL = 0x0300, |
| 397 | } dmd_device_type_t; |
| 398 | |
| 399 | typedef struct |
| 400 | { |
| 401 | dmd_device_type_t device_type; |
| 402 | union |
| 403 | { |
| 404 | dmd_satellite_desc_t satellite; |
| 405 | dmd_cable_desc_t cable; |
| 406 | dmd_terrestrial_desc_t terrestrial; |
| 407 | } delivery; |
| 408 | } dmd_delivery_t; |
| 409 | |
| 410 | /* SPI END */ |
| 411 | |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 412 | int Zapper_get_usb_download_request(void); |
| 413 | int Zapper_read_usb_file_name(char *file_name, int num); |
| 414 | |
| 415 | int Zapper_get_nand_hwconfig_partition_address(unsigned long long hwconfig_s, unsigned long long hwconfig_e); |
| 416 | int Zapper_get_nand_ldflag_partition_address(unsigned long long ldflag_s, unsigned long long ldflag_e); |
| 417 | int Zapper_get_nand_ldsec_partition_address(unsigned long long ldsec_s, unsigned long long ldsec_e); |
| 418 | int Zapper_get_nand_kernel_partition_address(unsigned long long kernel_s, unsigned long long kernel_e); |
| 419 | |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 420 | int Zapper_read_verify_module_partition(void); |
| 421 | void Zapper_free_verify_module_partition(void); |
| 422 | int Zapper_get_verify_module_header(VERIFY_MODULE_TYPE module, unsigned char **buf, unsigned int *len); |
| 423 | int Zapper_get_verify_module_payload(VERIFY_MODULE_TYPE module, unsigned char **buf, unsigned int *len); |
| 424 | int Zapper_get_rescuelist_module_payload(unsigned char *buf, unsigned int len); |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 425 | |
| 426 | int Zapper_get_nand_ldflag_partition_info(struct Zapper_boot_info *p_s_e_boot_info); |
| 427 | int Zapper_get_nand_hwconfig_partition_info(struct Zapper_boot_info *p_s_e_boot_info); |
| 428 | int Zapper_get_nand_ldsec_partition_info(struct Zapper_boot_info *p_s_e_boot_info); |
| 429 | int Zapper_get_nand_kernel_partition_info(struct Zapper_boot_info *p_s_e_boot_info); |
linyang.li | 1304a39 | 2024-04-20 16:36:22 +0800 | [diff] [blame] | 430 | unsigned char Zapper_get_nand_standby_flag(void); |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 431 | |
| 432 | int Zapper_set_nand_ldflag_partition_info(struct Zapper_boot_info *p_s_e_boot_info); |
linyang.li | e3b0a71 | 2024-05-16 16:48:25 +0800 | [diff] [blame] | 433 | int Zapper_nand_factory_reset(void); |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 434 | |
| 435 | int Zapper_get_key_info(unsigned char *key_index); |
linyang.li | 958823a | 2024-04-08 16:55:43 +0800 | [diff] [blame] | 436 | int Zapper_get_rcu_combination_type(unsigned char *type); |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 437 | |
| 438 | |
| 439 | int Zapper_get_jump_recovery_status(unsigned char* status); |
| 440 | int Zapper_set_jump_recovery_status(unsigned char status); |
| 441 | int Zapper_clear_jump_recovery_status(void); |
| 442 | |
linyang.li | 1304a39 | 2024-04-20 16:36:22 +0800 | [diff] [blame] | 443 | /* set led display type */ |
| 444 | void Zapper_led_set(led_display_type type); |
| 445 | |
| 446 | /* Illuminate the LED through the LED type */ |
| 447 | void Zapper_led_show(void); |
qi.wang | 720127e | 2023-11-15 21:40:13 +0800 | [diff] [blame] | 448 | |
| 449 | #endif |