--- /dev/null
+/*
+ * Copyright (c) 2016, Fuzhou Rockchip Electronics Co., Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+ .arch armv7-a
+ .fpu softvfp
+ .eabi_attribute 20, 1
+ .eabi_attribute 21, 1
+ .eabi_attribute 23, 3
+ .eabi_attribute 24, 1
+ .eabi_attribute 25, 1
+ .eabi_attribute 26, 2
+ .eabi_attribute 30, 4
+ .eabi_attribute 18, 4
+ .file "rk_ftl_arm_v7.S"
+ .text
+ .align 2
+ .type rknand_sys_storage_release, %function
+rknand_sys_storage_release:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r0, [r1, #124]
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ cmp r0, #0
+ beq .L2
+ mov r3, #0
+ str r3, [r1, #124]
+ bl kfree
+.L2:
+ mov r0, #0
+ ldmfd sp!, {r3, pc}
+ .fnend
+ .size rknand_sys_storage_release, .-rknand_sys_storage_release
+ .align 2
+ .type rknand_sys_storage_open, %function
+rknand_sys_storage_open:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L6
+ mov r2, #4096
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r4, r1
+ ldr r0, [r3, #48]
+ mov r1, #208
+ bl kmem_cache_alloc_trace
+ mov r3, #0
+ str r3, [r4, #124]
+ cmp r0, #0
+ bne .L4
+ ldr r0, .L6+4
+ bl printk
+ mvn r0, #11
+ ldmfd sp!, {r4, pc}
+.L4:
+ str r0, [r4, #124]
+ mov r0, r3
+ ldmfd sp!, {r4, pc}
+.L7:
+ .align 2
+.L6:
+ .word kmalloc_caches
+ .word .LC1
+ .fnend
+ .size rknand_sys_storage_open, .-rknand_sys_storage_open
+ .align 2
+ .global FlashMemCmp8
+ .type FlashMemCmp8, %function
+FlashMemCmp8:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L18
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ ldrb r3, [r3, #0] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L16
+ ldrb r3, [r1, #1] @ zero_extendqisi2
+ ldrb ip, [r0, #1] @ zero_extendqisi2
+ cmp ip, r3
+ movne r3, #0
+ bne .L16
+ b .L17
+.L13:
+ ldrb r4, [r0, r3] @ zero_extendqisi2
+ ldrb ip, [r1, r3] @ zero_extendqisi2
+ add r3, r3, #1
+ cmp r4, ip
+ beq .L16
+ mov r0, r3
+ ldmfd sp!, {r4, pc}
+.L16:
+ cmp r3, r2
+ bne .L13
+ mov r0, #0
+ ldmfd sp!, {r4, pc}
+.L17:
+ mov r0, #0
+ ldmfd sp!, {r4, pc}
+.L19:
+ .align 2
+.L18:
+ .word .LANCHOR0
+ .fnend
+ .size FlashMemCmp8, .-FlashMemCmp8
+ .align 2
+ .global FlashRsvdBlkChk
+ .type FlashRsvdBlkChk, %function
+FlashRsvdBlkChk:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L21
+ ldrb r2, [r3, #1] @ zero_extendqisi2
+ ldr r3, [r3, #4]
+ mul r3, r3, r2
+ cmp r1, r3
+ movcs r2, #0
+ movcc r2, #1
+ cmp r0, #0
+ movne r2, #0
+ eor r0, r2, #1
+ bx lr
+.L22:
+ .align 2
+.L21:
+ .word .LANCHOR0
+ .fnend
+ .size FlashRsvdBlkChk, .-FlashRsvdBlkChk
+ .align 2
+ .global FlashGetRandomizer
+ .type FlashGetRandomizer, %function
+FlashGetRandomizer:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ and r3, r1, #127
+ ldr r2, .L25
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r3, r3, asl #1
+ ldrh r4, [r2, r3]
+ ldr r3, .L25+4
+ ldrb r3, [r3, #8] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L24
+ bl FlashRsvdBlkChk
+ cmp r0, #0
+ orrne r4, r4, #-1073741824
+.L24:
+ mov r0, r4
+ ldmfd sp!, {r4, pc}
+.L26:
+ .align 2
+.L25:
+ .word .LANCHOR1
+ .word .LANCHOR0
+ .fnend
+ .size FlashGetRandomizer, .-FlashGetRandomizer
+ .align 2
+ .global FlashSetRandomizer
+ .type FlashSetRandomizer, %function
+FlashSetRandomizer:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r6, r0
+ ldr r3, .L33
+ mov r5, r1
+ ldr r2, [r3, #12]
+ mov r7, r3
+ cmp r2, #5
+ bls .L28
+ and r5, r1, #127
+ ldr r3, .L33+4
+ mov r5, r5, asl #1
+ ldrh r4, [r3, r5]
+ ldrb r3, [r7, #8] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L29
+ bl FlashRsvdBlkChk
+ cmp r0, #0
+ orrne r4, r4, #-1073741824
+.L29:
+ add r6, r7, r6, asl #3
+ b .L32
+.L28:
+ cmp r2, #4
+ ldmnefd sp!, {r3, r4, r5, r6, r7, pc}
+ and r2, r1, #127
+ ldr ip, .L33+4
+ ldrb r3, [r3, #8] @ zero_extendqisi2
+ mov r2, r2, asl #1
+ cmp r3, #0
+ ldrh r4, [ip, r2]
+ mov r4, r4, asl #8
+ beq .L31
+ bl FlashRsvdBlkChk
+ cmp r0, #0
+ movne r5, r5, asl #1
+ uxtbne r5, r5
+ orrne r5, r5, #1
+ orrne r4, r4, r5
+.L31:
+ ldr r3, .L33
+ add r6, r3, r6, asl #3
+.L32:
+ ldr r3, [r6, #16]
+ str r4, [r3, #336]
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L34:
+ .align 2
+.L33:
+ .word .LANCHOR0
+ .word .LANCHOR1
+ .fnend
+ .size FlashSetRandomizer, .-FlashSetRandomizer
+ .align 2
+ .global FlashReadCmd
+ .type FlashReadCmd, %function
+FlashReadCmd:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr ip, .L36
+ mov r2, r1, lsr #16
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ add ip, ip, r0, asl #3
+ ldrb r3, [ip, #20] @ zero_extendqisi2
+ ldr r4, [ip, #16]
+ mov ip, #0
+ add r3, r3, #8
+ add r3, r4, r3, asl #8
+ str ip, [r3, #8]
+ str ip, [r3, #4]
+ str ip, [r3, #4]
+ uxtb ip, r1
+ str ip, [r3, #4]
+ mov ip, r1, lsr #8
+ str ip, [r3, #4]
+ str r2, [r3, #4]
+ mov r2, #48
+ str r2, [r3, #8]
+ ldmfd sp!, {r4, lr}
+ b FlashSetRandomizer
+.L37:
+ .align 2
+.L36:
+ .word .LANCHOR0
+ .fnend
+ .size FlashReadCmd, .-FlashReadCmd
+ .align 2
+ .global FlashReadDpDataOutCmd
+ .type FlashReadDpDataOutCmd, %function
+FlashReadDpDataOutCmd:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r2, .L42
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ add ip, r2, r0, asl #3
+ ldrb r2, [r2, #64] @ zero_extendqisi2
+ ldrb r3, [ip, #20] @ zero_extendqisi2
+ ldr r4, [ip, #16]
+ cmp r2, #1
+ add r3, r3, #8
+ mov r2, #0
+ add r3, r4, r3, asl #8
+ bne .L39
+ mov ip, #6
+ str ip, [r3, #8]
+ str r2, [r3, #4]
+ str r2, [r3, #4]
+ uxtb r2, r1
+ str r2, [r3, #4]
+ mov r2, r1, lsr #8
+ str r2, [r3, #4]
+ mov r2, r1, lsr #16
+ b .L41
+.L39:
+ str r2, [r3, #8]
+ uxtb ip, r1
+ str r2, [r3, #4]
+ str r2, [r3, #4]
+ str ip, [r3, #4]
+ mov ip, r1, lsr #8
+ str ip, [r3, #4]
+ mov ip, r1, lsr #16
+ str ip, [r3, #4]
+ mov ip, #5
+ str ip, [r3, #8]
+ str r2, [r3, #4]
+.L41:
+ str r2, [r3, #4]
+ mov r2, #224
+ str r2, [r3, #8]
+ ldmfd sp!, {r4, lr}
+ b FlashSetRandomizer
+.L43:
+ .align 2
+.L42:
+ .word .LANCHOR0
+ .fnend
+ .size FlashReadDpDataOutCmd, .-FlashReadDpDataOutCmd
+ .align 2
+ .global flash_enter_slc_mode
+ .type flash_enter_slc_mode, %function
+flash_enter_slc_mode:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L46
+ ldrb r2, [r3, #80] @ zero_extendqisi2
+ cmp r2, #0
+ bxeq lr
+ add r0, r3, r0, asl #3
+ ldrb r3, [r0, #20] @ zero_extendqisi2
+ ldr r2, [r0, #16]
+ add r3, r3, #8
+ add r3, r2, r3, asl #8
+ mov r2, #218
+ str r2, [r3, #8]
+ bx lr
+.L47:
+ .align 2
+.L46:
+ .word .LANCHOR0
+ .fnend
+ .size flash_enter_slc_mode, .-flash_enter_slc_mode
+ .align 2
+ .global flash_exit_slc_mode
+ .type flash_exit_slc_mode, %function
+flash_exit_slc_mode:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L50
+ ldrb r2, [r3, #80] @ zero_extendqisi2
+ cmp r2, #0
+ bxeq lr
+ add r0, r3, r0, asl #3
+ ldrb r3, [r0, #20] @ zero_extendqisi2
+ ldr r2, [r0, #16]
+ add r3, r3, #8
+ add r3, r2, r3, asl #8
+ mov r2, #223
+ str r2, [r3, #8]
+ bx lr
+.L51:
+ .align 2
+.L50:
+ .word .LANCHOR0
+ .fnend
+ .size flash_exit_slc_mode, .-flash_exit_slc_mode
+ .align 2
+ .global FlashProgFirstCmd
+ .type FlashProgFirstCmd, %function
+FlashProgFirstCmd:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr ip, .L53
+ mov r2, r1, lsr #16
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ add ip, ip, r0, asl #3
+ ldrb r3, [ip, #20] @ zero_extendqisi2
+ ldr r4, [ip, #16]
+ mov ip, #128
+ add r3, r3, #8
+ add r3, r4, r3, asl #8
+ str ip, [r3, #8]
+ mov ip, #0
+ str ip, [r3, #4]
+ str ip, [r3, #4]
+ uxtb ip, r1
+ str ip, [r3, #4]
+ mov ip, r1, lsr #8
+ str ip, [r3, #4]
+ str r2, [r3, #4]
+ ldmfd sp!, {r4, lr}
+ b FlashSetRandomizer
+.L54:
+ .align 2
+.L53:
+ .word .LANCHOR0
+ .fnend
+ .size FlashProgFirstCmd, .-FlashProgFirstCmd
+ .align 2
+ .global FlashEraseCmd
+ .type FlashEraseCmd, %function
+FlashEraseCmd:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L57
+ cmp r2, #0
+ add r0, r3, r0, asl #3
+ ldr ip, [r0, #16]
+ ldrb r0, [r0, #20] @ zero_extendqisi2
+ add r0, r0, #8
+ add r0, ip, r0, asl #8
+ beq .L56
+ ldr r3, [r3, #4]
+ mov r2, #96
+ str r2, [r0, #8]
+ uxtb r2, r1
+ str r2, [r0, #4]
+ mov r2, r1, lsr #8
+ str r2, [r0, #4]
+ mov r2, r1, lsr #16
+ add r1, r1, r3
+ str r2, [r0, #4]
+.L56:
+ mov r3, #96
+ str r3, [r0, #8]
+ uxtb r3, r1
+ str r3, [r0, #4]
+ mov r3, r1, lsr #8
+ mov r1, r1, lsr #16
+ str r3, [r0, #4]
+ mov r3, #208
+ str r1, [r0, #4]
+ str r3, [r0, #8]
+ bx lr
+.L58:
+ .align 2
+.L57:
+ .word .LANCHOR0
+ .fnend
+ .size FlashEraseCmd, .-FlashEraseCmd
+ .align 2
+ .global FlashProgDpSecondCmd
+ .type FlashProgDpSecondCmd, %function
+FlashProgDpSecondCmd:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr ip, .L60
+ mov r2, r1, lsr #16
+ stmfd sp!, {r4, r5, lr}
+ .save {r4, r5, lr}
+ add r4, ip, r0, asl #3
+ ldrb ip, [ip, #59] @ zero_extendqisi2
+ ldrb r3, [r4, #20] @ zero_extendqisi2
+ ldr r5, [r4, #16]
+ add r3, r3, #8
+ add r3, r5, r3, asl #8
+ str ip, [r3, #8]
+ mov ip, #0
+ str ip, [r3, #4]
+ str ip, [r3, #4]
+ uxtb ip, r1
+ str ip, [r3, #4]
+ mov ip, r1, lsr #8
+ str ip, [r3, #4]
+ str r2, [r3, #4]
+ ldmfd sp!, {r4, r5, lr}
+ b FlashSetRandomizer
+.L61:
+ .align 2
+.L60:
+ .word .LANCHOR0
+ .fnend
+ .size FlashProgDpSecondCmd, .-FlashProgDpSecondCmd
+ .align 2
+ .global FlashProgSecondCmd
+ .type FlashProgSecondCmd, %function
+FlashProgSecondCmd:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L63
+ add r3, r3, r0, asl #3
+ ldr r2, [r3, #16]
+ ldrb r3, [r3, #20] @ zero_extendqisi2
+ add r3, r3, #8
+ add r3, r2, r3, asl #8
+ mov r2, #16
+ str r2, [r3, #8]
+ bx lr
+.L64:
+ .align 2
+.L63:
+ .word .LANCHOR0
+ .fnend
+ .size FlashProgSecondCmd, .-FlashProgSecondCmd
+ .align 2
+ .global FlashProgDpFirstCmd
+ .type FlashProgDpFirstCmd, %function
+FlashProgDpFirstCmd:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L66
+ add r0, r3, r0, asl #3
+ ldrb r3, [r3, #58] @ zero_extendqisi2
+ ldrb r2, [r0, #20] @ zero_extendqisi2
+ ldr r1, [r0, #16]
+ add r2, r2, #8
+ add r2, r1, r2, asl #8
+ str r3, [r2, #8]
+ bx lr
+.L67:
+ .align 2
+.L66:
+ .word .LANCHOR0
+ .fnend
+ .size FlashProgDpFirstCmd, .-FlashProgDpFirstCmd
+ .align 2
+ .global JSHash
+ .type JSHash, %function
+JSHash:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ mov r3, r0
+ mov r2, #0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ ldr r0, .L71
+ b .L69
+.L70:
+ mov ip, r0, asl #5
+ ldrb r4, [r3, r2] @ zero_extendqisi2
+ add ip, ip, r0, lsr #2
+ add r2, r2, #1
+ add ip, ip, r4
+ eor r0, r0, ip
+.L69:
+ cmp r2, r1
+ bne .L70
+ ldmfd sp!, {r4, pc}
+.L72:
+ .align 2
+.L71:
+ .word 1204201446
+ .fnend
+ .size JSHash, .-JSHash
+ .align 2
+ .global FlashLoadIdbInfo
+ .type FlashLoadIdbInfo, %function
+FlashLoadIdbInfo:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ mov r0, #0
+ bx lr
+ .fnend
+ .size FlashLoadIdbInfo, .-FlashLoadIdbInfo
+ .align 2
+ .global FlashPrintInfo
+ .type FlashPrintInfo, %function
+FlashPrintInfo:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ bx lr
+ .fnend
+ .size FlashPrintInfo, .-FlashPrintInfo
+ .align 2
+ .global FlashReadIdbData
+ .type FlashReadIdbData, %function
+FlashReadIdbData:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ mov r2, #2048
+ ldr r1, .L76
+ bl memcpy
+ mov r0, #0
+ ldmfd sp!, {r3, pc}
+.L77:
+ .align 2
+.L76:
+ .word .LANCHOR0+84
+ .fnend
+ .size FlashReadIdbData, .-FlashReadIdbData
+ .align 2
+ .global FlashLoadPhyInfoInRam
+ .type FlashLoadPhyInfoInRam, %function
+FlashLoadPhyInfoInRam:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r4, #0
+ ldr r6, .L90
+.L82:
+ add r5, r6, r4, asl #5
+ ldr r1, .L90+4
+ add r0, r5, #1
+ ldrb r2, [r6, r4, asl #5] @ zero_extendqisi2
+ bl FlashMemCmp8
+ subs r1, r0, #0
+ bne .L79
+ cmp r5, #0
+ ldrneb r2, [r5, #22] @ zero_extendqisi2
+ ldrne r3, .L90+8
+ bne .L84
+ b .L89
+.L79:
+ add r4, r4, #1
+ cmp r4, #72
+ bne .L82
+ mvn r0, #0
+ ldmfd sp!, {r4, r5, r6, pc}
+.L84:
+ ldrb r0, [r3, r1, asl #5] @ zero_extendqisi2
+ cmp r0, r2
+ beq .L83
+ add r1, r1, #1
+ cmp r1, #4
+ bne .L84
+.L83:
+ ldr r3, .L90+8
+ mov r2, #32
+ ldr r0, .L90+12
+ add r1, r3, r1, asl #5
+ bl memcpy
+ ldr r0, .L90+16
+ mov r1, r5
+ mov r2, #32
+ bl memcpy
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, pc}
+.L89:
+ mvn r0, #0
+ ldmfd sp!, {r4, r5, r6, pc}
+.L91:
+ .align 2
+.L90:
+ .word .LANCHOR1+256
+ .word .LANCHOR0+2132
+ .word .LANCHOR1+2560
+ .word .LANCHOR0+48
+ .word .LANCHOR1+2688
+ .fnend
+ .size FlashLoadPhyInfoInRam, .-FlashLoadPhyInfoInRam
+ .align 2
+ .global FlashSuspend
+ .type FlashSuspend, %function
+FlashSuspend:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L93
+ mov r0, #0
+ ldr r2, [r3, #2164]
+ ldr r1, [r2, #0]
+ str r1, [r3, #2168]
+ ldr r1, [r2, #4]
+ str r1, [r3, #2172]
+ ldr r1, [r2, #8]
+ str r1, [r3, #2176]
+ ldr r1, [r2, #12]
+ str r1, [r3, #2180]
+ ldr r1, [r2, #304]
+ str r1, [r3, #2184]
+ ldr r1, [r2, #308]
+ str r1, [r3, #2188]
+ ldr r1, [r2, #336]
+ ldr r2, [r2, #344]
+ str r1, [r3, #2192]
+ str r2, [r3, #2196]
+ bx lr
+.L94:
+ .align 2
+.L93:
+ .word .LANCHOR0
+ .fnend
+ .size FlashSuspend, .-FlashSuspend
+ .global __aeabi_uidiv
+ .align 2
+ .global LogAddr2PhyAddr
+ .type LogAddr2PhyAddr, %function
+LogAddr2PhyAddr:
+ .fnstart
+ @ args = 4, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov fp, r3
+ ldr r3, .L100
+ mov r5, r1
+ mov r6, r2
+ movw r1, #2214
+ movw r2, #2212
+ ldr r8, [r0, #4]
+ ldrh r2, [r3, r2]
+ mov r4, r0
+ ldrh sl, [r3, r1]
+ bic r8, r8, #-2147483648
+ ldrh r7, [r3, #4]
+ ubfx r9, r8, #10, #16
+ ldrb r3, [r3, #0] @ zero_extendqisi2
+ mov r8, r8, asl #22
+ mul sl, sl, r2
+ cmp r3, #1
+ moveq r7, r7, asl #1
+ mov r0, r9
+ mov r8, r8, lsr #22
+ uxtheq r7, r7
+ uxth sl, sl
+ mov r1, sl
+ bl __aeabi_uidiv
+ cmp r5, #1
+ ldr r3, .L100
+ uxth r0, r0
+ mls sl, sl, r0, r9
+ uxth sl, sl
+ bne .L97
+ ldrb r2, [r3, #80] @ zero_extendqisi2
+ cmp r2, #0
+ addeq r8, r3, r8, asl #1
+ movweq r2, #2228
+ ldreqh r8, [r8, r2]
+.L97:
+ add r3, r3, r0, asl #2
+ ldr r3, [r3, #2740]
+ mla r7, r7, sl, r3
+ ldrb r3, [sp, #40] @ zero_extendqisi2
+ cmp r3, #1
+ add r8, r7, r8
+ str r8, [r6, #0]
+ str r0, [fp, #0]
+ bls .L99
+ ldr r0, [r4, #4]
+ ldr r3, [r4, #40]
+ add r0, r0, #1024
+ rsb r3, r3, r0
+ rsbs r0, r3, #0
+ adc r0, r0, r3
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L99:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L101:
+ .align 2
+.L100:
+ .word .LANCHOR0
+ .fnend
+ .size LogAddr2PhyAddr, .-LogAddr2PhyAddr
+ .align 2
+ .global FlashScheduleEnSet
+ .type FlashScheduleEnSet, %function
+FlashScheduleEnSet:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L103
+ ldr r2, [r3, #2772]
+ str r0, [r3, #2772]
+ mov r0, r2
+ bx lr
+.L104:
+ .align 2
+.L103:
+ .word .LANCHOR0
+ .fnend
+ .size FlashScheduleEnSet, .-FlashScheduleEnSet
+ .align 2
+ .global FlashGetPageSize
+ .type FlashGetPageSize, %function
+FlashGetPageSize:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L106
+ ldr r3, [r3, #2776]
+ ldrb r0, [r3, #9] @ zero_extendqisi2
+ bx lr
+.L107:
+ .align 2
+.L106:
+ .word .LANCHOR0
+ .fnend
+ .size FlashGetPageSize, .-FlashGetPageSize
+ .align 2
+ .global NandcReadDontCaseBusyEn
+ .type NandcReadDontCaseBusyEn, %function
+NandcReadDontCaseBusyEn:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ bx lr
+ .fnend
+ .size NandcReadDontCaseBusyEn, .-NandcReadDontCaseBusyEn
+ .align 2
+ .global NandcGetChipIf
+ .type NandcGetChipIf, %function
+NandcGetChipIf:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L110
+ add r3, r3, r0, asl #3
+ ldrb r0, [r3, #20] @ zero_extendqisi2
+ ldr r2, [r3, #16]
+ add r0, r0, #8
+ add r0, r2, r0, asl #8
+ bx lr
+.L111:
+ .align 2
+.L110:
+ .word .LANCHOR0
+ .fnend
+ .size NandcGetChipIf, .-NandcGetChipIf
+ .align 2
+ .global NandcSetDdrPara
+ .type NandcSetDdrPara, %function
+NandcSetDdrPara:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L113
+ mov r2, r0, asl #8
+ orr r2, r2, r0, asl #16
+ orr r2, r2, #1
+ ldr r3, [r3, #2164]
+ str r2, [r3, #304]
+ bx lr
+.L114:
+ .align 2
+.L113:
+ .word .LANCHOR0
+ .fnend
+ .size NandcSetDdrPara, .-NandcSetDdrPara
+ .align 2
+ .global NandcSetDdrDiv
+ .type NandcSetDdrDiv, %function
+NandcSetDdrDiv:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L116
+ orr r0, r0, #16640
+ ldr r3, [r3, #2164]
+ str r0, [r3, #344]
+ bx lr
+.L117:
+ .align 2
+.L116:
+ .word .LANCHOR0
+ .fnend
+ .size NandcSetDdrDiv, .-NandcSetDdrDiv
+ .align 2
+ .global NandcSetDdrMode
+ .type NandcSetDdrMode, %function
+NandcSetDdrMode:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L120
+ cmp r0, #0
+ ldr r2, [r3, #2164]
+ ldr r3, [r2, #0]
+ bfc r3, #13, #1
+ orrne r3, r3, #253952
+ str r3, [r2, #0]
+ bx lr
+.L121:
+ .align 2
+.L120:
+ .word .LANCHOR0
+ .fnend
+ .size NandcSetDdrMode, .-NandcSetDdrMode
+ .align 2
+ .global NandcSetMode
+ .type NandcSetMode, %function
+NandcSetMode:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L126
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ ldr r3, [r3, #2164]
+ ldr r4, [r3, #0]
+ ands r3, r0, #6
+ bfieq r4, r3, #13, #1
+ beq .L125
+ orr r4, r4, #24576
+ tst r0, #4
+ bfc r4, #15, #1
+ mov r0, #0
+ orr r4, r4, #196608
+ orrne r4, r4, #32768
+ bl rknand_get_clk_rate
+ ldr r3, .L126
+ movw r2, #8322
+ ldr r3, [r3, #2164]
+ str r2, [r3, #344]
+ ldr r2, .L126+4
+ str r2, [r3, #304]
+ mov r2, #38
+ str r2, [r3, #308]
+ mov r2, #39
+ str r2, [r3, #308]
+.L125:
+ ldr r3, .L126
+ mov r0, #0
+ ldr r3, [r3, #2164]
+ str r4, [r3, #0]
+ ldmfd sp!, {r4, pc}
+.L127:
+ .align 2
+.L126:
+ .word .LANCHOR0
+ .word 1052675
+ .fnend
+ .size NandcSetMode, .-NandcSetMode
+ .align 2
+ .global NandcFlashCsDebug
+ .type NandcFlashCsDebug, %function
+NandcFlashCsDebug:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L129
+ ldr r3, [r3, #16]
+ ldr r2, [r3, #0]
+ bfi r2, r0, #0, #8
+ str r2, [r3, #0]
+ bx lr
+.L130:
+ .align 2
+.L129:
+ .word .LANCHOR0
+ .fnend
+ .size NandcFlashCsDebug, .-NandcFlashCsDebug
+ .align 2
+ .global NandcFlashCs
+ .type NandcFlashCs, %function
+NandcFlashCs:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L132
+ add r3, r3, r0, asl #3
+ mov r0, #1
+ ldr r2, [r3, #16]
+ ldrb r1, [r3, #20] @ zero_extendqisi2
+ ldr r3, [r2, #0]
+ mov r1, r0, asl r1
+ bfi r3, r1, #0, #8
+ str r3, [r2, #0]
+ bx lr
+.L133:
+ .align 2
+.L132:
+ .word .LANCHOR0
+ .fnend
+ .size NandcFlashCs, .-NandcFlashCs
+ .align 2
+ .global NandcFlashDeCs
+ .type NandcFlashDeCs, %function
+NandcFlashDeCs:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L135
+ add r3, r3, r0, asl #3
+ ldr r2, [r3, #16]
+ ldr r3, [r2, #0]
+ bfc r3, #0, #8
+ bfc r3, #17, #1
+ str r3, [r2, #0]
+ bx lr
+.L136:
+ .align 2
+.L135:
+ .word .LANCHOR0
+ .fnend
+ .size NandcFlashDeCs, .-NandcFlashDeCs
+ .align 2
+ .global NandcDelayns
+ .type NandcDelayns, %function
+NandcDelayns:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ .pad #8
+ sub sp, sp, #8
+ mov r0, r0, lsr #4
+ str r0, [sp, #4]
+.L138:
+ ldr r0, [sp, #4]
+ cmp r0, #0
+ sub r3, r0, #1
+ str r3, [sp, #4]
+ bne .L138
+ add sp, sp, #8
+ bx lr
+ .fnend
+ .size NandcDelayns, .-NandcDelayns
+ .align 2
+ .global FlashReadStatusEN
+ .type FlashReadStatusEN, %function
+FlashReadStatusEN:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ ldr r3, .L149
+ add r0, r3, r0, asl #3
+ ldr ip, [r3, #2776]
+ ldrb r5, [r0, #20] @ zero_extendqisi2
+ ldr r4, [r0, #16]
+ ldrb ip, [ip, #8] @ zero_extendqisi2
+ add r5, r5, #8
+ cmp ip, #2
+ add r0, r4, r5, asl #8
+ movne r3, #112
+ strne r3, [r0, #8]
+ bne .L145
+ cmp r2, #0
+ ldreqb r2, [r3, #61] @ zero_extendqisi2
+ ldrneb r2, [r3, #62] @ zero_extendqisi2
+ str r2, [r0, #8]
+ ldrb r3, [r3, #63] @ zero_extendqisi2
+ cmp r3, #0
+ movne r3, #0
+ ldrne r2, .L149
+ bne .L144
+ b .L145
+.L146:
+ mov ip, r3, asl #3
+ add r3, r3, #1
+ mov ip, r1, lsr ip
+ uxtb ip, ip
+ str ip, [r0, #4]
+.L144:
+ ldrb ip, [r2, #63] @ zero_extendqisi2
+ cmp r3, ip
+ bcc .L146
+.L145:
+ mov r0, #80
+ bl NandcDelayns
+ ldr r0, [r4, r5, asl #8]
+ uxtb r0, r0
+ ldmfd sp!, {r3, r4, r5, pc}
+.L150:
+ .align 2
+.L149:
+ .word .LANCHOR0
+ .fnend
+ .size FlashReadStatusEN, .-FlashReadStatusEN
+ .align 2
+ .global FlashWaitReadyEN
+ .type FlashWaitReadyEN, %function
+FlashWaitReadyEN:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r6, r0
+ mov r5, r1
+ mov r4, r2
+.L155:
+ mov r0, r6
+ mov r1, r5
+ mov r2, r4
+ bl FlashReadStatusEN
+ cmp r0, #255
+ beq .L155
+ tst r0, #64
+ beq .L155
+ ldmfd sp!, {r4, r5, r6, pc}
+ .fnend
+ .size FlashWaitReadyEN, .-FlashWaitReadyEN
+ .align 2
+ .global FlashWaitCmdDone
+ .type FlashWaitCmdDone, %function
+FlashWaitCmdDone:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L159
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ add r4, r3, r0, asl #4
+ ldrb r5, [r3, r0, asl #4] @ zero_extendqisi2
+ mov r6, r0
+ ldr r3, [r4, #8]
+ cmp r3, #0
+ beq .L157
+ mov r0, r5
+ bl NandcFlashCs
+ ldr r3, .L159+4
+ ldr r1, [r4, #4]
+ mov r0, r5
+ add r6, r3, r6, asl #2
+ ldr r2, [r6, #2740]
+ adds r2, r2, #0
+ movne r2, #1
+ bl FlashWaitReadyEN
+ mov r6, r0
+ mov r0, r5
+ bl NandcFlashDeCs
+ ldr r3, [r4, #8]
+ ands r6, r6, #1
+ mvnne r6, #0
+ str r6, [r3, #0]
+ ldr r2, [r4, #12]
+ mov r3, #0
+ str r3, [r4, #8]
+ cmp r2, r3
+ strne r6, [r2, #0]
+ strne r3, [r4, #12]
+.L157:
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, pc}
+.L160:
+ .align 2
+.L159:
+ .word .LANCHOR0+2780
+ .word .LANCHOR0
+ .fnend
+ .size FlashWaitCmdDone, .-FlashWaitCmdDone
+ .align 2
+ .global HynixSetRRPara
+ .type HynixSetRRPara, %function
+HynixSetRRPara:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, lr}
+ mov sl, r3
+ ldr r3, .L166
+ mov r6, r2
+ mov r4, r0
+ mov r5, r1
+ mov r7, #0
+ ldr r2, [r3, #2776]
+ ldrb r2, [r2, #19] @ zero_extendqisi2
+ cmp r2, #6
+ addeq r9, r3, #2928
+ addne r2, r3, #2928
+ add r3, r3, r0, asl #3
+ addne r9, sl, r0, asl #3
+ addeq r9, r9, r0, asl #6
+ ldrb r8, [r3, #20] @ zero_extendqisi2
+ addne r9, r2, r9, asl #3
+ ldr r2, [r3, #16]
+ addeq r9, r9, sl, asl #2
+ add r8, r8, #8
+ add r8, r2, r8, asl #8
+ bl NandcFlashCs
+ mov r3, #54
+ str r3, [r8, #8]
+ b .L164
+.L165:
+ ldrb r3, [r6, r7] @ zero_extendqisi2
+ mov r0, #200
+ str r3, [r8, #4]
+ bl NandcDelayns
+ ldrb r3, [r9, r7] @ zero_extendqisi2
+ add r7, r7, #1
+ str r3, [r8, #0]
+.L164:
+ uxtb r3, r7
+ cmp r3, r5
+ bcc .L165
+ mov r3, #22
+ mov r0, r4
+ str r3, [r8, #8]
+ bl NandcFlashDeCs
+ ldr r3, .L166
+ add r4, r3, r4
+ strb sl, [r4, #3760]
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L167:
+ .align 2
+.L166:
+ .word .LANCHOR0
+ .fnend
+ .size HynixSetRRPara, .-HynixSetRRPara
+ .align 2
+ .global FlashSetReadRetryDefault
+ .type FlashSetReadRetryDefault, %function
+FlashSetReadRetryDefault:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ ldr r6, .L173
+ ldr r3, [r6, #2776]
+ ldrb r3, [r3, #19] @ zero_extendqisi2
+ sub r3, r3, #1
+ uxtb r3, r3
+ cmp r3, #5
+ ldmhifd sp!, {r4, r5, r6, pc}
+ ldr r5, .L173+4
+ mov r4, #0
+.L171:
+ ldrb r3, [r5, r4, asl #3] @ zero_extendqisi2
+ uxtb r0, r4
+ cmp r3, #173
+ bne .L170
+ ldrb r1, [r6, #2909] @ zero_extendqisi2
+ mov r3, #0
+ ldr r2, .L173+8
+ bl HynixSetRRPara
+.L170:
+ add r4, r4, #1
+ cmp r4, #4
+ bne .L171
+ ldmfd sp!, {r4, r5, r6, pc}
+.L174:
+ .align 2
+.L173:
+ .word .LANCHOR0
+ .word .LANCHOR0+2132
+ .word .LANCHOR0+2912
+ .fnend
+ .size FlashSetReadRetryDefault, .-FlashSetReadRetryDefault
+ .align 2
+ .global SamsungSetRRPara
+ .type SamsungSetRRPara, %function
+SamsungSetRRPara:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ .save {r3, r4, r5, r6, r7, r8, sl, lr}
+ mov r4, r0
+ ldr r3, .L178
+ mov r5, #0
+ ldr sl, .L178+4
+ mov r8, #161
+ add r1, r3, r1, asl #2
+ add r6, r1, #3
+ mov r7, r3
+ b .L176
+.L177:
+ str r8, [r4, #8]
+ mov r3, #0
+ str r3, [r4, #0]
+ mov r0, #300
+ ldrsb r3, [r5, r7]
+ add r5, r5, #1
+ str r3, [r4, #0]
+ ldrsb r3, [r6, #1]!
+ str r3, [r4, #0]
+ bl NandcDelayns
+.L176:
+ ldrb r3, [sl, #3764] @ zero_extendqisi2
+ cmp r5, r3
+ bcc .L177
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, pc}
+.L179:
+ .align 2
+.L178:
+ .word .LANCHOR1+2720
+ .word .LANCHOR0
+ .fnend
+ .size SamsungSetRRPara, .-SamsungSetRRPara
+ .align 2
+ .global ToshibaSetRRPara
+ .type ToshibaSetRRPara, %function
+ToshibaSetRRPara:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ .save {r3, r4, r5, r6, r7, r8, sl, lr}
+ add r6, r1, #1
+ ldr r3, .L187
+ mov r4, r0
+ add r6, r6, r6, asl #2
+ mov r5, #0
+ add r2, r3, #45
+ sub sl, r3, #2784
+ add r7, r3, r6
+ ldr r8, .L187+4
+ add r6, r2, r6
+ add sl, sl, r1
+ b .L181
+.L185:
+ mov r3, #85
+ str r3, [r4, #8]
+ ldr r3, .L187
+ mov r0, #200
+ ldrsb r3, [r5, r3]
+ str r3, [r4, #4]
+ bl NandcDelayns
+ ldrb r3, [r8, #3765] @ zero_extendqisi2
+ cmp r3, #34
+ ldreqsb r3, [r7, #0]
+ beq .L186
+ cmp r3, #35
+ addne r3, sl, #2912
+ addne r3, r3, #12
+ ldreqsb r3, [r6, #0]
+ ldrnesb r3, [r3, #0]
+.L186:
+ add r5, r5, #1
+ add r7, r7, #1
+ add r6, r6, #1
+ str r3, [r4, #0]
+.L181:
+ ldrb r3, [r8, #3764] @ zero_extendqisi2
+ cmp r5, r3
+ bcc .L185
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, pc}
+.L188:
+ .align 2
+.L187:
+ .word .LANCHOR1+2784
+ .word .LANCHOR0
+ .fnend
+ .size ToshibaSetRRPara, .-ToshibaSetRRPara
+ .align 2
+ .global FlashReadStatus
+ .type FlashReadStatus, %function
+FlashReadStatus:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r2, #112
+ ldr r3, .L190
+ add r3, r3, r0, asl #3
+ mov r0, #80
+ ldrb r5, [r3, #20] @ zero_extendqisi2
+ ldr r4, [r3, #16]
+ add r5, r5, #8
+ add r3, r4, r5, asl #8
+ str r2, [r3, #8]
+ bl NandcDelayns
+ ldr r0, [r4, r5, asl #8]
+ ldmfd sp!, {r3, r4, r5, pc}
+.L191:
+ .align 2
+.L190:
+ .word .LANCHOR0
+ .fnend
+ .size FlashReadStatus, .-FlashReadStatus
+ .align 2
+ .global NandcWaitFlashReady
+ .type NandcWaitFlashReady, %function
+NandcWaitFlashReady:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L197
+ stmfd sp!, {r0, r1, r2, r4, r5, lr}
+ .save {r0, r1, r2, r4, r5, lr}
+ add r3, r3, r0, asl #3
+ ldr r4, .L197+4
+ ldr r5, [r3, #16]
+.L194:
+ mov r0, #100
+ bl NandcDelayns
+ ldr r3, [r5, #0]
+ str r3, [sp, #4]
+ ldr r3, [sp, #4]
+ tst r3, #512
+ bne .L195
+ subs r4, r4, #1
+ bne .L194
+ mvn r0, #0
+ b .L193
+.L195:
+ mov r0, #0
+.L193:
+ ldmfd sp!, {r1, r2, r3, r4, r5, pc}
+.L198:
+ .align 2
+.L197:
+ .word .LANCHOR0
+ .word 100000
+ .fnend
+ .size NandcWaitFlashReady, .-NandcWaitFlashReady
+ .align 2
+ .global FlashEraseSLc2KBlocks
+ .type FlashEraseSLc2KBlocks, %function
+FlashEraseSLc2KBlocks:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, sl, lr}
+ .save {r4, r5, r6, r7, r8, sl, lr}
+ mov r6, #0
+ .pad #20
+ sub sp, sp, #20
+ mov r8, r1
+ mov r4, r0
+ mov r7, r6
+ ldr r5, .L207
+ b .L200
+.L206:
+ add r3, r6, r8
+ add r2, sp, #8
+ mov r0, r4
+ mov r1, #0
+ uxtb r3, r3
+ str r3, [sp, #0]
+ add r3, sp, #12
+ bl LogAddr2PhyAddr
+ ldr r3, [sp, #12]
+ ldrb r2, [r5, #3766] @ zero_extendqisi2
+ cmp r3, r2
+ mvncs r3, #0
+ strcs r3, [r4, #0]
+ bcs .L202
+ add r2, r5, r3
+ add r3, r5, r3, asl #4
+ ldrb sl, [r2, #3768] @ zero_extendqisi2
+ strb sl, [r3, #2780]
+ mov r0, sl
+ bl NandcWaitFlashReady
+ mov r0, sl
+ bl NandcFlashCs
+ mov r2, #0
+ ldr r1, [sp, #8]
+ mov r0, sl
+ bl FlashEraseCmd
+ mov r0, sl
+ bl NandcWaitFlashReady
+ ldr r1, [sp, #8]
+ mov r0, sl
+ bl FlashReadStatus
+ ldr r3, [sp, #8]
+ mov r2, #0
+ ands r0, r0, #1
+ mvnne r0, #0
+ str r0, [r4, #0]
+ ldr r1, [r5, #4]
+ mov r0, sl
+ add r1, r1, r3
+ bl FlashEraseCmd
+ mov r0, sl
+ bl NandcWaitFlashReady
+ mov r0, sl
+ ldr r1, [sp, #8]
+ bl FlashReadStatus
+ tst r0, #1
+ mvnne r3, #0
+ strne r3, [r4, #0]
+ ldr r3, [r4, #0]
+ cmn r3, #1
+ bne .L205
+ ldr r0, .L207+4
+ ldr r1, [sp, #8]
+ bl printk
+.L205:
+ mov r0, sl
+ bl NandcFlashDeCs
+.L202:
+ sub r6, r6, #1
+ add r7, r7, #1
+ add r4, r4, #36
+ uxtb r6, r6
+.L200:
+ cmp r7, r8
+ bne .L206
+ mov r0, #0
+ add sp, sp, #20
+ ldmfd sp!, {r4, r5, r6, r7, r8, sl, pc}
+.L208:
+ .align 2
+.L207:
+ .word .LANCHOR0
+ .word .LC2
+ .fnend
+ .size FlashEraseSLc2KBlocks, .-FlashEraseSLc2KBlocks
+ .align 2
+ .global SandiskSetRRPara
+ .type SandiskSetRRPara, %function
+SandiskSetRRPara:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r3, #239
+ mov r4, r0
+ str r3, [r0, #8]
+ mov r3, #17
+ str r3, [r0, #4]
+ mov r0, #200
+ mov r5, r1
+ bl NandcDelayns
+ ldr r1, .L215
+ add r3, r5, r5, asl #2
+ mvn r6, #4
+ add r0, r1, r3
+ add r1, r1, #45
+ add r1, r1, r3
+ mov r2, #0
+ ldr ip, .L215+4
+ mul r5, r6, r5
+ b .L210
+.L213:
+ ldrb r6, [ip, #3765] @ zero_extendqisi2
+ add r2, r2, #1
+ cmp r6, #67
+ addeq r6, r0, r5
+ addne r6, r1, r5
+ add r6, r6, r3
+ add r0, r0, #1
+ add r1, r1, #1
+ ldrsb r6, [r6, #5]
+ str r6, [r4, #0]
+.L210:
+ ldrb r6, [ip, #3764] @ zero_extendqisi2
+ cmp r2, r6
+ bcc .L213
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, lr}
+ b NandcWaitFlashReady
+.L216:
+ .align 2
+.L215:
+ .word .LANCHOR1+2784
+ .word .LANCHOR0
+ .fnend
+ .size SandiskSetRRPara, .-SandiskSetRRPara
+ .align 2
+ .global SandiskProgTestBadBlock
+ .type SandiskProgTestBadBlock, %function
+SandiskProgTestBadBlock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L218
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ add r3, r3, r0, asl #3
+ ldrb r6, [r3, #20] @ zero_extendqisi2
+ ldr r5, [r3, #16]
+ mov r3, #162
+ add r6, r6, #8
+ add r4, r5, r6, asl #8
+ str r3, [r4, #8]
+ mov r3, #128
+ str r3, [r4, #8]
+ mov r3, #0
+ str r3, [r4, #4]
+ str r3, [r4, #4]
+ uxtb r3, r1
+ str r3, [r4, #4]
+ mov r3, r1, lsr #8
+ mov r1, r1, lsr #16
+ str r3, [r4, #4]
+ str r1, [r4, #4]
+ mov r3, #16
+ str r3, [r4, #8]
+ bl NandcWaitFlashReady
+ mov r3, #112
+ mov r0, #80
+ str r3, [r4, #8]
+ bl NandcDelayns
+ ldr r0, [r5, r6, asl #8]
+ and r0, r0, #1
+ ldmfd sp!, {r4, r5, r6, pc}
+.L219:
+ .align 2
+.L218:
+ .word .LANCHOR0
+ .fnend
+ .size SandiskProgTestBadBlock, .-SandiskProgTestBadBlock
+ .align 2
+ .global FlashReadSpare
+ .type FlashReadSpare, %function
+FlashReadSpare:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L221
+ mov ip, #0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r6, r2
+ ldrb r2, [r3, #2697] @ zero_extendqisi2
+ ldr r3, .L221+4
+ add r3, r3, r0, asl #3
+ mov r2, r2, asl #9
+ ldrb r5, [r3, #20] @ zero_extendqisi2
+ ldr r4, [r3, #16]
+ add r5, r5, #8
+ add r3, r4, r5, asl #8
+ str ip, [r3, #8]
+ str r2, [r3, #4]
+ mov r2, r2, lsr #8
+ str r2, [r3, #4]
+ uxtb r2, r1
+ str r2, [r3, #4]
+ mov r2, r1, lsr #8
+ mov r1, r1, lsr #16
+ str r2, [r3, #4]
+ str r1, [r3, #4]
+ mov r2, #48
+ str r2, [r3, #8]
+ bl NandcWaitFlashReady
+ ldr r3, [r4, r5, asl #8]
+ strb r3, [r6, #0]
+ ldmfd sp!, {r4, r5, r6, pc}
+.L222:
+ .align 2
+.L221:
+ .word .LANCHOR1
+ .word .LANCHOR0
+ .fnend
+ .size FlashReadSpare, .-FlashReadSpare
+ .align 2
+ .global FlashEraseBlock
+ .type FlashEraseBlock, %function
+FlashEraseBlock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r4, r0
+ mov r5, r1
+ mov r6, r2
+ bl NandcWaitFlashReady
+ mov r0, r4
+ bl NandcFlashCs
+ mov r2, r6
+ mov r1, r5
+ mov r0, r4
+ bl FlashEraseCmd
+ mov r0, r4
+ bl NandcWaitFlashReady
+ mov r1, r5
+ mov r0, r4
+ bl FlashReadStatus
+ mov r5, r0
+ mov r0, r4
+ bl NandcFlashDeCs
+ and r0, r5, #1
+ ldmfd sp!, {r4, r5, r6, pc}
+ .fnend
+ .size FlashEraseBlock, .-FlashEraseBlock
+ .align 2
+ .global FlashReset
+ .type FlashReset, %function
+FlashReset:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r4, r0
+ ldr r3, .L225
+ add r3, r3, r0, asl #3
+ ldrb r5, [r3, #20] @ zero_extendqisi2
+ ldr r2, [r3, #16]
+ add r5, r5, #8
+ add r5, r2, r5, asl #8
+ bl NandcFlashCs
+ mov r3, #255
+ mov r0, r4
+ str r3, [r5, #8]
+ bl NandcWaitFlashReady
+ mov r0, r4
+ ldmfd sp!, {r3, r4, r5, lr}
+ b NandcFlashDeCs
+.L226:
+ .align 2
+.L225:
+ .word .LANCHOR0
+ .fnend
+ .size FlashReset, .-FlashReset
+ .align 2
+ .type FlashReadIDRaw, %function
+FlashReadIDRaw:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr}
+ .save {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr}
+ mov r5, r1
+ mov r4, r0
+ bl FlashReset
+ ldr r3, .L229
+ mov r0, r4
+ add r3, r3, r4, asl #3
+ ldrb r7, [r3, #20] @ zero_extendqisi2
+ ldr r6, [r3, #16]
+ bl NandcFlashCs
+ add r7, r7, #8
+ mov r3, #144
+ mov r0, #200
+ add r8, r6, r7, asl #8
+ str r3, [r8, #8]
+ mov r3, #0
+ str r3, [r8, #4]
+ bl NandcDelayns
+ ldr r3, [r6, r7, asl #8]
+ mov r0, r4
+ strb r3, [r5, #0]
+ ldr r3, [r6, r7, asl #8]
+ strb r3, [r5, #1]
+ ldr r3, [r6, r7, asl #8]
+ strb r3, [r5, #2]
+ ldr r3, [r6, r7, asl #8]
+ strb r3, [r5, #3]
+ ldr r3, [r6, r7, asl #8]
+ strb r3, [r5, #4]
+ ldr r3, [r6, r7, asl #8]
+ strb r3, [r5, #5]
+ ldr r3, [r6, r7, asl #8]
+ strb r3, [r5, #6]
+ ldr r3, [r6, r7, asl #8]
+ strb r3, [r5, #7]
+ bl NandcFlashDeCs
+ ldrb r2, [r5, #0] @ zero_extendqisi2
+ sub r3, r2, #1
+ uxtb r3, r3
+ cmp r3, #253
+ bhi .L227
+ ldrb r1, [r5, #2] @ zero_extendqisi2
+ ldrb r3, [r5, #1] @ zero_extendqisi2
+ ldr r0, .L229+4
+ str r1, [sp, #0]
+ ldrb r1, [r5, #3] @ zero_extendqisi2
+ str r1, [sp, #4]
+ ldrb r1, [r5, #4] @ zero_extendqisi2
+ str r1, [sp, #8]
+ ldrb r1, [r5, #5] @ zero_extendqisi2
+ str r1, [sp, #12]
+ add r1, r4, #1
+ bl printk
+.L227:
+ ldmfd sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc}
+.L230:
+ .align 2
+.L229:
+ .word .LANCHOR0
+ .word .LC3
+ .fnend
+ .size FlashReadIDRaw, .-FlashReadIDRaw
+ .align 2
+ .global FlashSetInterfaceMode
+ .type FlashSetInterfaceMode, %function
+FlashSetInterfaceMode:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r4, #0
+ ldr r9, .L245
+ mov r7, #239
+ ldr sl, .L245+4
+ mov r1, r4
+ sub r8, r9, #16
+ mov r6, #128
+ mov r5, #1
+.L241:
+ mov r2, r9
+ ldrb lr, [r4, sl] @ zero_extendqisi2
+ ldr r3, [r2, r4]!
+ cmp lr, #152
+ cmpne lr, #69
+ ldrb r2, [r2, #4] @ zero_extendqisi2
+ add r2, r2, #8
+ add ip, r3, r2, asl #8
+ beq .L232
+ cmp lr, #173
+ cmpne lr, #44
+ bne .L233
+.L232:
+ cmp r0, #1
+ ldrb fp, [r8, #3776] @ zero_extendqisi2
+ bne .L234
+ tst fp, #1
+ beq .L233
+ cmp lr, #173
+ str r7, [ip, #8]
+ streq r0, [ip, #4]
+ beq .L244
+ cmp lr, #44
+ streq r0, [ip, #4]
+ strne r6, [ip, #4]
+ moveq ip, #5
+ strne r0, [r3, r2, asl #8]
+ bne .L239
+ b .L243
+.L234:
+ tst fp, #4
+ beq .L233
+ cmp lr, #173
+ str r7, [ip, #8]
+ streq r5, [ip, #4]
+ moveq ip, #32
+ beq .L243
+ cmp lr, #44
+ strne r6, [ip, #4]
+ bne .L244
+ str r5, [ip, #4]
+ mov ip, #35
+.L243:
+ str ip, [r3, r2, asl #8]
+ b .L239
+.L244:
+ str r1, [r3, r2, asl #8]
+.L239:
+ str r1, [r3, r2, asl #8]
+ str r1, [r3, r2, asl #8]
+ str r1, [r3, r2, asl #8]
+.L233:
+ add r4, r4, #8
+ cmp r4, #32
+ bne .L241
+ mov r0, #0
+ bl NandcWaitFlashReady
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L246:
+ .align 2
+.L245:
+ .word .LANCHOR0+16
+ .word .LANCHOR0+2132
+ .fnend
+ .size FlashSetInterfaceMode, .-FlashSetInterfaceMode
+ .align 2
+ .global FlashDeInit
+ .type FlashDeInit, %function
+FlashDeInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r0, #0
+ ldr r4, .L249
+ bl NandcWaitFlashReady
+ bl FlashSetReadRetryDefault
+ ldrb r3, [r4, #3777] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L248
+ ldrb r3, [r4, #3776] @ zero_extendqisi2
+ tst r3, #1
+ beq .L248
+ mov r0, #1
+ bl FlashSetInterfaceMode
+ mov r0, #1
+ bl NandcSetMode
+ mov r3, #0
+ strb r3, [r4, #3777]
+.L248:
+ ldr r3, [r4, #16]
+ mov r0, #0
+ str r0, [r3, #336]
+ ldmfd sp!, {r4, pc}
+.L250:
+ .align 2
+.L249:
+ .word .LANCHOR0
+ .fnend
+ .size FlashDeInit, .-FlashDeInit
+ .align 2
+ .global FlashReadDpCmd
+ .type FlashReadDpCmd, %function
+FlashReadDpCmd:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L255
+ stmfd sp!, {r4, r5, r6, r7, r8, lr}
+ .save {r4, r5, r6, r7, r8, lr}
+ mov r7, r2
+ add r2, r3, r0, asl #3
+ mov r5, r1
+ mov r4, r0
+ ldrb r6, [r2, #20] @ zero_extendqisi2
+ ldr r1, [r2, #16]
+ ldrb r2, [r3, #64] @ zero_extendqisi2
+ add r6, r6, #8
+ cmp r2, #1
+ ldrb r2, [r3, #56] @ zero_extendqisi2
+ add r6, r1, r6, asl #8
+ str r2, [r6, #8]
+ bne .L252
+ mov r8, #0
+ uxtb r2, r5
+ str r8, [r6, #4]
+ str r8, [r6, #4]
+ str r2, [r6, #4]
+ mov r2, r5, lsr #8
+ str r2, [r6, #4]
+ mov r2, r5, lsr #16
+ str r2, [r6, #4]
+ ldrb r3, [r3, #57] @ zero_extendqisi2
+ str r3, [r6, #8]
+ bl NandcWaitFlashReady
+ str r8, [r6, #8]
+ str r8, [r6, #4]
+ str r8, [r6, #4]
+ b .L254
+.L252:
+ uxtb r2, r5
+ str r2, [r6, #4]
+ mov r2, r5, lsr #8
+ str r2, [r6, #4]
+ mov r2, r5, lsr #16
+ str r2, [r6, #4]
+ ldrb r3, [r3, #57] @ zero_extendqisi2
+ str r3, [r6, #8]
+.L254:
+ uxtb r3, r7
+ mov r0, r4
+ str r3, [r6, #4]
+ mov r1, r5
+ mov r3, r7, lsr #8
+ mov r7, r7, lsr #16
+ str r3, [r6, #4]
+ mov r3, #48
+ str r7, [r6, #4]
+ str r3, [r6, #8]
+ ldmfd sp!, {r4, r5, r6, r7, r8, lr}
+ b FlashSetRandomizer
+.L256:
+ .align 2
+.L255:
+ .word .LANCHOR0
+ .fnend
+ .size FlashReadDpCmd, .-FlashReadDpCmd
+ .align 2
+ .global HynixGetReadRetryDefault
+ .type HynixGetReadRetryDefault, %function
+HynixGetReadRetryDefault:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 64
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L316
+ mvn r2, #83
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r4, r0
+ cmp r4, #2
+ strb r0, [r3, #2908]
+ strb r2, [r3, #2912]
+ mvn r0, #82
+ mvn r1, #81
+ mvn r2, #80
+ .pad #68
+ sub sp, sp, #68
+ strb r0, [r3, #2913]
+ strb r1, [r3, #2914]
+ strb r2, [r3, #2915]
+ bne .L258
+ mvn r2, #88
+ strb r2, [r3, #2912]
+ ldr r3, .L316+4
+ mvn r2, #8
+ strb r2, [r3, #2949]
+ b .L297
+.L258:
+ cmp r4, #3
+ bne .L260
+ mvn r2, #79
+ strb r2, [r3, #2912]
+ mvn r2, #78
+ strb r2, [r3, #2913]
+ mvn r2, #77
+ strb r2, [r3, #2914]
+ mvn r2, #76
+ strb r2, [r3, #2915]
+ mvn r2, #75
+ strb r2, [r3, #2916]
+ mvn r2, #74
+ strb r2, [r3, #2917]
+ mvn r2, #73
+ strb r2, [r3, #2918]
+ mvn r2, #72
+ b .L312
+.L260:
+ cmp r4, #4
+ bne .L261
+ mvn ip, #51
+ strb r0, [r3, #2917]
+ strb ip, [r3, #2912]
+ mvn ip, #64
+ strb r1, [r3, #2918]
+ strb ip, [r3, #2913]
+ mvn ip, #85
+ strb ip, [r3, #2914]
+ mvn ip, #84
+ strb ip, [r3, #2915]
+ mvn ip, #50
+ strb ip, [r3, #2916]
+.L312:
+ mov r6, #8
+ strb r2, [r3, #2919]
+ mov r5, r6
+ b .L259
+.L261:
+ cmp r4, #5
+ bne .L262
+ mov r2, #56
+ mov r6, #8
+ strb r2, [r3, #2912]
+ mov r2, #57
+ strb r2, [r3, #2913]
+ mov r2, #58
+ strb r2, [r3, #2914]
+ mov r2, #59
+ strb r2, [r3, #2915]
+ b .L311
+.L262:
+ cmp r4, #6
+ bne .L297
+ mov r2, #14
+ mov r6, #12
+ strb r2, [r3, #2912]
+ mov r2, #15
+ strb r2, [r3, #2913]
+ mov r2, #16
+ strb r2, [r3, #2914]
+ mov r2, #17
+ strb r2, [r3, #2915]
+ b .L311
+.L297:
+ mov r6, #7
+.L311:
+ mov r5, #4
+.L259:
+ sub r3, r4, #1
+ cmp r3, #1
+ bhi .L310
+ b .L315
+.L269:
+ add r1, r2, r8
+ add r4, r2, #2928
+ ldr fp, .L316+8
+ mov r7, #0
+ ldrb r1, [r1, #3768] @ zero_extendqisi2
+ mov r5, #55
+ add r2, r2, r1, asl #3
+ add r4, r4, r1, asl #6
+ ldrb sl, [r2, #20] @ zero_extendqisi2
+ ldr r1, [r2, #16]
+ add sl, sl, #8
+ add sl, r1, sl, asl #8
+.L265:
+ add r2, fp, r7
+ str r5, [sl, #8]
+ mov r0, #80
+ ldrb r2, [r2, #4] @ zero_extendqisi2
+ str r2, [sl, #4]
+ str r3, [sp, #8]
+ bl NandcDelayns
+ ldr r2, [sl, #0]
+ strb r2, [r4, r7]
+ add r7, r7, #1
+ ldr r3, [sp, #8]
+ uxtb r2, r7
+ cmp r2, r6
+ bcc .L265
+ mov r2, #0
+ b .L266
+.L267:
+ ldrb r7, [r0, r1, asl #2] @ zero_extendqisi2
+ ldrb r5, [r4, r2] @ zero_extendqisi2
+ add r5, r7, r5
+ strb r5, [ip, r1, asl #3]
+ add r1, r1, #1
+ cmp r1, #7
+ bne .L267
+ add r2, r2, #1
+ cmp r2, #4
+ beq .L268
+.L266:
+ mov r1, #1
+ add ip, r4, r2
+ add r0, r2, r9
+ b .L267
+.L268:
+ add r8, r8, #1
+ mov r2, #0
+ strb r2, [r4, #16]
+ strb r2, [r4, #24]
+ uxtb r8, r8
+ strb r2, [r4, #32]
+ strb r2, [r4, #40]
+ strb r2, [r4, #48]
+ strb r2, [r4, #41]
+ strb r2, [r4, #49]
+ b .L263
+.L315:
+ ldr r9, .L316+12
+ mov r3, r6
+ mov r8, #0
+ mov r6, r5
+.L263:
+ ldr r2, .L316
+ ldrb r1, [r2, #3766] @ zero_extendqisi2
+ cmp r1, r8
+ bhi .L269
+ mov r5, r6
+ mov r6, r3
+ b .L270
+.L310:
+ sub r3, r4, #3
+ cmp r3, #3
+ bhi .L270
+ mul r3, r6, r5
+ ldr r8, .L316
+ str r6, [sp, #44]
+ mov r2, r3, asr #2
+ mov r3, r3, asl #4
+ str r3, [sp, #52]
+ mov r3, #0
+ str r2, [sp, #24]
+ mov r7, r3
+ str r3, [sp, #12]
+ b .L271
+.L296:
+ ldr ip, [sp, #12]
+ ldr r1, .L316+16
+ add r3, r8, ip
+ ldrb r6, [r3, #3768] @ zero_extendqisi2
+ add r3, r8, r6, asl #3
+ mov r0, r6
+ add r1, r1, r6, asl #6
+ str r1, [sp, #48]
+ ldrb fp, [r3, #20] @ zero_extendqisi2
+ ldr r9, [r3, #16]
+ mov r3, #255
+ add fp, fp, #8
+ add sl, r9, fp, asl #8
+ str r3, [sl, #8]
+ str r3, [sp, #8]
+ bl NandcWaitFlashReady
+ cmp r4, #4
+ mov r2, #54
+ str r2, [sl, #8]
+ ldr r3, [sp, #8]
+ streq r3, [sl, #4]
+ moveq r3, #64
+ streq r3, [r9, fp, asl #8]
+ moveq r3, #204
+ beq .L313
+.L272:
+ sub r3, r4, #5
+ cmp r3, #1
+ ldrls r2, .L316+8
+ ldrlsb r3, [r2, #4] @ zero_extendqisi2
+ strls r3, [sl, #4]
+ movls r3, #82
+ bls .L314
+.L274:
+ mov r3, #174
+ str r3, [sl, #4]
+ mov r3, #176
+ str r7, [r9, fp, asl #8]
+.L313:
+ str r3, [sl, #4]
+ mov r3, #77
+.L314:
+ cmp r4, #6
+ str r3, [r9, fp, asl #8]
+ mov r0, r6
+ mov r3, #22
+ str r3, [sl, #8]
+ mov r3, #23
+ str r3, [sl, #8]
+ mov r3, #4
+ str r3, [sl, #8]
+ mov r3, #25
+ str r3, [sl, #8]
+ moveq r3, #31
+ str r7, [sl, #8]
+ str r7, [sl, #4]
+ str r7, [sl, #4]
+ streq r3, [sl, #4]
+ mov r3, #2
+ strne r7, [sl, #4]
+ str r3, [sl, #4]
+ mov r3, #48
+ str r7, [sl, #4]
+ str r3, [sl, #8]
+ bl NandcWaitFlashReady
+ sub r3, r4, #5
+ cmp r3, #1
+ str r3, [sp, #28]
+ mov r3, #0
+ movls r2, #16
+ movhi r2, #2
+.L278:
+ add r3, r3, #1
+ ldr r1, [sl, #0]
+ uxtb r3, r3
+ cmp r3, r2
+ bcc .L278
+ ldr ip, [r8, #3780]
+ mov r3, #0
+ str ip, [sp, #32]
+.L279:
+ ldr r2, [sl, #0]
+ ldr lr, [sp, #32]
+ strb r2, [lr, r3]
+ add r3, r3, #1
+ ldr r2, [sp, #52]
+ cmp r3, r2
+ blt .L279
+ ldr r3, [sp, #24]
+ mov ip, r3, asl #2
+ mov lr, r3, asl #3
+ ldr r3, .L316
+ str ip, [sp, #40]
+ ldr r1, [r3, #3780]
+ mov r3, #8
+ add r1, r1, ip
+.L281:
+ mov r2, #0
+ mov r0, r2
+.L280:
+ ldr ip, [r1, r2]
+ add r0, r0, #1
+ mvn ip, ip
+ str ip, [r1, r2]
+ ldr ip, [sp, #24]
+ add r2, r2, #4
+ cmp r0, ip
+ blt .L280
+ subs r3, r3, #1
+ add r1, r1, lr
+ bne .L281
+ str r3, [sp, #20]
+ str r5, [sp, #60]
+ b .L282
+.L286:
+ mov lr, #1
+ mov r0, #0
+ mov ip, lr, asl r2
+ mov lr, r0
+ mov r5, #16
+ str r3, [sp, #0]
+ str r5, [sp, #16]
+.L284:
+ ldr r3, [sp, #56]
+ ldr r3, [r3, r0]
+ and r5, ip, r3
+ ldr r3, [sp, #16]
+ cmp r5, ip
+ ldr r5, [sp, #40]
+ addeq lr, lr, #1
+ subs r3, r3, #1
+ add r0, r0, r5
+ str r3, [sp, #16]
+ bne .L284
+ cmp lr, #8
+ add r2, r2, #1
+ orrhi r1, r1, ip
+ cmp r2, #32
+ ldr r3, [sp, #0]
+ bne .L286
+ ldr ip, [sp, #20]
+ ldr r2, [sp, #24]
+ add ip, ip, #1
+ ldr r5, [sp, #36]
+ cmp ip, r2
+ str ip, [sp, #20]
+ str r1, [r5, r3]
+ add r3, r3, #4
+ bge .L287
+.L282:
+ ldr r5, [r8, #3780]
+ mov r1, #0
+ mov r2, r1
+ add ip, r5, r3
+ str ip, [sp, #56]
+ str r5, [sp, #36]
+ b .L286
+.L287:
+ cmp r4, #6
+ ldr r5, [sp, #60]
+ ldr r1, [sp, #48]
+ mov r2, #0
+ moveq lr, #4
+ movne lr, #8
+ cmp r5, #0
+ str lr, [sp, #20]
+ subne r3, r5, #1
+ moveq r0, #1
+ streq r0, [sp, #16]
+ uxtbne r3, r3
+ ldr r0, [sp, #32]
+ addne r3, r3, #1
+ strne r3, [sp, #16]
+ b .L291
+.L292:
+ ldrb lr, [ip], #1 @ zero_extendqisi2
+ strb lr, [r1, r3]
+ add r3, r3, #1
+ uxtb lr, r3
+ cmp lr, r5
+ bcc .L292
+ ldr r3, [sp, #16]
+ add r2, r2, #1
+ ldr ip, [sp, #20]
+ add r0, r0, r3
+ ldr r3, [sp, #44]
+ add r1, r1, ip
+ cmp r2, r3
+ bge .L293
+.L291:
+ mov ip, r0
+ mov r3, #0
+ b .L292
+.L293:
+ mov r3, #255
+ mov r0, r6
+ str r3, [sl, #8]
+ bl NandcWaitFlashReady
+ ldr ip, [sp, #28]
+ cmp ip, #1
+ movhi r3, #56
+ strhi r3, [sl, #8]
+ bhi .L295
+ ldr lr, .L316+8
+ mov r3, #54
+ str r3, [sl, #8]
+ mvn r1, #0
+ ldr r0, [sp, #12]
+ ldrb r3, [lr, #4] @ zero_extendqisi2
+ str r3, [sl, #4]
+ mov r3, #22
+ str r7, [r9, fp, asl #8]
+ str r3, [sl, #8]
+ bl FlashReadCmd
+.L295:
+ mov r0, r6
+ bl NandcWaitFlashReady
+ ldr r2, [sp, #12]
+ add r3, r2, #1
+ uxtb r3, r3
+ str r3, [sp, #12]
+.L271:
+ ldrb r3, [r8, #3766] @ zero_extendqisi2
+ ldr ip, [sp, #12]
+ cmp r3, ip
+ bhi .L296
+ ldr r6, [sp, #44]
+.L270:
+ ldr r3, .L316
+ strb r5, [r3, #2909]
+ strb r6, [r3, #2910]
+ add sp, sp, #68
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L317:
+ .align 2
+.L316:
+ .word .LANCHOR0
+ .word .LANCHOR1
+ .word .LANCHOR0+2908
+ .word .LANCHOR1+2932
+ .word .LANCHOR0+2928
+ .fnend
+ .size HynixGetReadRetryDefault, .-HynixGetReadRetryDefault
+ .align 2
+ .global FlashGetReadRetryDefault
+ .type FlashGetReadRetryDefault, %function
+FlashGetReadRetryDefault:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ subs r3, r0, #0
+ ldmeqfd sp!, {r3, pc}
+ sub r2, r3, #1
+ cmp r2, #5
+ bhi .L320
+ ldmfd sp!, {r3, lr}
+ b HynixGetReadRetryDefault
+.L320:
+ cmp r3, #49
+ bne .L321
+ ldr r0, .L327
+ mov r2, #64
+ ldr r1, .L327+4
+ strb r3, [r0, #2908]
+ mov r3, #4
+ strb r3, [r0, #2909]
+ mov r3, #15
+ strb r3, [r0, #2910]
+ add r0, r0, #2912
+ b .L325
+.L321:
+ cmp r3, #33
+ cmpne r3, #65
+ beq .L322
+ cmp r3, #66
+ bne .L323
+.L322:
+ ldr r0, .L327
+ strb r3, [r0, #2908]
+ mov r3, #4
+ b .L326
+.L323:
+ cmp r3, #34
+ cmpne r3, #67
+ bne .L324
+ ldr r0, .L327
+ strb r3, [r0, #2908]
+ mov r3, #5
+.L326:
+ strb r3, [r0, #2909]
+ mov r2, #45
+ mov r3, #7
+ ldr r1, .L327+8
+ strb r3, [r0, #2910]
+ add r0, r0, #2912
+ b .L325
+.L324:
+ cmp r3, #35
+ cmpne r3, #68
+ ldmnefd sp!, {r3, pc}
+ ldr r0, .L327
+ mov r2, #95
+ ldr r1, .L327+12
+ strb r3, [r0, #2908]
+ mov r3, #5
+ strb r3, [r0, #2909]
+ mov r3, #17
+ strb r3, [r0, #2910]
+ add r0, r0, #2912
+.L325:
+ bl memcpy
+ ldmfd sp!, {r3, pc}
+.L328:
+ .align 2
+.L327:
+ .word .LANCHOR0
+ .word .LANCHOR1+2720
+ .word .LANCHOR1+2784
+ .word .LANCHOR1+2829
+ .fnend
+ .size FlashGetReadRetryDefault, .-FlashGetReadRetryDefault
+ .align 2
+ .global NandcRandmzSel
+ .type NandcRandmzSel, %function
+NandcRandmzSel:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L330
+ add r3, r3, r0, asl #3
+ ldr r3, [r3, #16]
+ str r1, [r3, #336]
+ bx lr
+.L331:
+ .align 2
+.L330:
+ .word .LANCHOR0
+ .fnend
+ .size NandcRandmzSel, .-NandcRandmzSel
+ .global __aeabi_idiv
+ .align 2
+ .global NandcTimeCfg
+ .type NandcTimeCfg, %function
+NandcTimeCfg:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r4, r0
+ mov r0, #0
+ bl rknand_get_clk_rate
+ ldr r1, .L342
+ bl __aeabi_idiv
+ ldr r3, .L342+4
+ ldr r3, [r3, #2164]
+ cmp r0, #250
+ movwgt r2, #8354
+ bgt .L340
+ cmp r0, #220
+ bgt .L341
+.L335:
+ cmp r0, #185
+ movwgt r2, #4226
+ bgt .L340
+ cmp r0, #160
+ movwgt r2, #4194
+ bgt .L340
+ cmp r4, #35
+ movwls r2, #4193
+ bls .L340
+ cmp r4, #99
+ movwls r2, #4225
+ bls .L340
+.L341:
+ movw r2, #8322
+.L340:
+ str r2, [r3, #4]
+ ldmfd sp!, {r4, pc}
+.L343:
+ .align 2
+.L342:
+ .word 1000000
+ .word .LANCHOR0
+ .fnend
+ .size NandcTimeCfg, .-NandcTimeCfg
+ .align 2
+ .global NandcInit
+ .type NandcInit, %function
+NandcInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r5, #0
+ ldr r4, .L345
+ mov r3, #1
+ str r0, [r4, #2164]
+ str r0, [r4, #16]
+ str r3, [r4, #28]
+ mov r3, #2
+ str r0, [r4, #24]
+ str r3, [r4, #36]
+ mov r3, #3
+ str r0, [r4, #32]
+ str r0, [r4, #40]
+ str r5, [r4, #20]
+ str r3, [r4, #44]
+ ldr r3, [r0, #0]
+ and r3, r3, #253952
+ ubfx r2, r3, #13, #1
+ str r2, [r4, #3784]
+ ldr r2, [r0, #352]
+ and r3, r3, #245760
+ orr r3, r3, #256
+ ubfx r2, r2, #16, #4
+ str r2, [r4, #12]
+ ldr r2, [r0, #352]
+ str r2, [r4, #3788]
+ str r3, [r0, #0]
+ mov r0, #40
+ ldr r3, [r4, #2164]
+ str r5, [r3, #336]
+ bl NandcTimeCfg
+ ldr r3, [r4, #2164]
+ movw r2, #8322
+ mov r0, #36864
+ str r2, [r3, #344]
+ ldr r2, .L345+4
+ str r2, [r3, #304]
+ bl ftl_malloc
+ str r5, [r4, #3820]
+ str r5, [r4, #3828]
+ str r0, [r4, #3792]
+ str r0, [r4, #3796]
+ add r0, r0, #32768
+ str r0, [r4, #3800]
+ ldmfd sp!, {r3, r4, r5, pc}
+.L346:
+ .align 2
+.L345:
+ .word .LANCHOR0
+ .word 1579009
+ .fnend
+ .size NandcInit, .-NandcInit
+ .align 2
+ .global FlashTimingCfg
+ .type FlashTimingCfg, %function
+FlashTimingCfg:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ sub r3, r0, #4160
+ movw r2, #4225
+ sub r3, r3, #33
+ cmp r0, r2
+ cmpne r3, #1
+ bls .L348
+ movw r3, #4226
+ movw r2, #8322
+ cmp r0, r3
+ cmpne r0, r2
+ bne .L349
+.L348:
+ ldr r3, .L350
+ ldr r3, [r3, #2164]
+ str r0, [r3, #4]
+.L349:
+ ldr r3, .L350+4
+ ldrb r0, [r3, #2709] @ zero_extendqisi2
+ b NandcTimeCfg
+.L351:
+ .align 2
+.L350:
+ .word .LANCHOR0
+ .word .LANCHOR1
+ .fnend
+ .size FlashTimingCfg, .-FlashTimingCfg
+ .align 2
+ .global NandcGetTimeCfg
+ .type NandcGetTimeCfg, %function
+NandcGetTimeCfg:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr ip, .L353
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ ldr r4, [ip, #2164]
+ ldr r4, [r4, #4]
+ str r4, [r0, #0]
+ ldr r0, [ip, #2164]
+ ldr r0, [r0, #0]
+ str r0, [r1, #0]
+ ldr r1, [ip, #2164]
+ ldr r1, [r1, #304]
+ str r1, [r2, #0]
+ ldr r2, [ip, #2164]
+ ldr r0, [r2, #308]
+ ldr r1, [r2, #344]
+ uxtb r2, r0
+ orr r2, r2, r1, asl #16
+ str r2, [r3, #0]
+ ldmfd sp!, {r4, pc}
+.L354:
+ .align 2
+.L353:
+ .word .LANCHOR0
+ .fnend
+ .size NandcGetTimeCfg, .-NandcGetTimeCfg
+ .align 2
+ .global NandcBchSel
+ .type NandcBchSel, %function
+NandcBchSel:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L360
+ mov r1, #1
+ ldr r2, [r3, #2164]
+ str r0, [r3, #3832]
+ mov r3, #0
+ str r1, [r2, #8]
+ mov r1, #16
+ cmp r0, r1
+ bfi r3, r1, #8, #8
+ bfc r3, #18, #1
+ beq .L359
+.L356:
+ cmp r0, #24
+ orreq r3, r3, #16
+ beq .L357
+ cmp r0, #40
+ orr r3, r3, #262144
+ orr r3, r3, #16
+ bne .L357
+.L359:
+ bfc r3, #4, #1
+.L357:
+ orr r3, r3, #1
+ str r3, [r2, #12]
+ bx lr
+.L361:
+ .align 2
+.L360:
+ .word .LANCHOR0
+ .fnend
+ .size NandcBchSel, .-NandcBchSel
+ .align 2
+ .global FlashBchSel
+ .type FlashBchSel, %function
+FlashBchSel:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L363
+ strb r0, [r3, #3836]
+ b NandcBchSel
+.L364:
+ .align 2
+.L363:
+ .word .LANCHOR0
+ .fnend
+ .size FlashBchSel, .-FlashBchSel
+ .align 2
+ .global FlashResume
+ .type FlashResume, %function
+FlashResume:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r4, #0
+ ldr r3, .L370
+ ldr r5, .L370+4
+ ldr r2, [r3, #2164]
+ ldr r1, [r3, #2168]
+ str r1, [r2, #0]
+ ldr r1, [r3, #2172]
+ ldr r2, [r3, #2164]
+ str r1, [r2, #4]
+ ldr r1, [r3, #2176]
+ str r1, [r2, #8]
+ ldr r1, [r3, #2180]
+ str r1, [r2, #12]
+ ldr r1, [r3, #2184]
+ str r1, [r2, #304]
+ ldr r1, [r3, #2188]
+ str r1, [r2, #308]
+ ldr r1, [r3, #2192]
+ ldr r3, [r3, #2196]
+ str r1, [r2, #336]
+ str r3, [r2, #344]
+.L367:
+ ldrb r3, [r5, r4, asl #3] @ zero_extendqisi2
+ sub r3, r3, #1
+ uxtb r3, r3
+ cmp r3, #253
+ bhi .L366
+ uxtb r0, r4
+ bl FlashReset
+.L366:
+ add r4, r4, #1
+ cmp r4, #4
+ bne .L367
+ ldr r4, .L370
+ ldrb r3, [r4, #3777] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L368
+ mov r0, #1
+ bl NandcSetMode
+ ldrb r0, [r4, #3776] @ zero_extendqisi2
+ bl FlashSetInterfaceMode
+ ldrb r0, [r4, #3776] @ zero_extendqisi2
+ bl NandcSetMode
+ ldrb r0, [r4, #2185] @ zero_extendqisi2
+ bl NandcSetDdrPara
+.L368:
+ ldr r3, .L370
+ ldr r3, [r3, #2776]
+ ldrb r0, [r3, #20] @ zero_extendqisi2
+ bl FlashBchSel
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, pc}
+.L371:
+ .align 2
+.L370:
+ .word .LANCHOR0
+ .word .LANCHOR0+2132
+ .fnend
+ .size FlashResume, .-FlashResume
+ .align 2
+ .global NandCIrqEnable
+ .type NandCIrqEnable, %function
+NandCIrqEnable:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, [r0, #368]
+ mov r2, #1
+ mov r2, r2, asl r1
+ orr r3, r2, r3
+ str r3, [r0, #368]
+ ldr r3, [r0, #364]
+ orr r2, r2, r3
+ str r2, [r0, #364]
+ bx lr
+ .fnend
+ .size NandCIrqEnable, .-NandCIrqEnable
+ .align 2
+ .global NandCIrqDisable
+ .type NandCIrqDisable, %function
+NandCIrqDisable:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, [r0, #368]
+ mov r2, #1
+ mov r2, r2, asl r1
+ orr r3, r2, r3
+ str r3, [r0, #368]
+ ldr r3, [r0, #364]
+ bic r2, r3, r2
+ str r2, [r0, #364]
+ bx lr
+ .fnend
+ .size NandCIrqDisable, .-NandCIrqDisable
+ .align 2
+ .global rk_nandc_get_irq_status
+ .type rk_nandc_get_irq_status, %function
+rk_nandc_get_irq_status:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r0, [r0, #372]
+ bx lr
+ .fnend
+ .size rk_nandc_get_irq_status, .-rk_nandc_get_irq_status
+ .align 2
+ .global rk_nandc_flash_ready
+ .type rk_nandc_flash_ready, %function
+rk_nandc_flash_ready:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ mov r1, #1
+ b NandCIrqDisable
+ .fnend
+ .size rk_nandc_flash_ready, .-rk_nandc_flash_ready
+ .align 2
+ .global NandcIqrWaitFlashReady
+ .type NandcIqrWaitFlashReady, %function
+NandcIqrWaitFlashReady:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r4, r0
+ bl rk_nandc_rb_irq_flag_init
+ mov r0, r4
+ mov r1, #1
+ bl NandCIrqEnable
+ ldr r3, [r4, #0]
+ mov r0, r4
+ ubfx r3, r3, #8, #8
+ and r3, r3, #2
+ uxtb r3, r3
+ cmp r3, #0
+ bne .L377
+ ldmfd sp!, {r4, lr}
+ b wait_for_nand_flash_ready
+.L377:
+ mov r1, #1
+ ldmfd sp!, {r4, lr}
+ b NandCIrqDisable
+ .fnend
+ .size NandcIqrWaitFlashReady, .-NandcIqrWaitFlashReady
+ .align 2
+ .global FlashEraseBlocks
+ .type FlashEraseBlocks, %function
+FlashEraseBlocks:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #28
+ sub sp, sp, #28
+ ldr r5, .L393
+ mov r6, r0
+ str r1, [sp, #12]
+ mov r7, r2
+ ldrb r4, [r5, #0] @ zero_extendqisi2
+ cmp r4, #0
+ moveq r9, r5
+ beq .L379
+ mov r1, r2
+ bl FlashEraseSLc2KBlocks
+ b .L380
+.L387:
+ mov r8, #36
+ rsb r3, r4, r7
+ mul r8, r8, r4
+ uxtb r3, r3
+ mov r1, #0
+ str r3, [sp, #0]
+ add r2, sp, #16
+ add r3, sp, #20
+ add fp, r6, r8
+ mov r0, fp
+ bl LogAddr2PhyAddr
+ ldrb r3, [r5, #3766] @ zero_extendqisi2
+ mov sl, r0
+ ldr r0, [sp, #20]
+ cmp r0, r3
+ mvncs r3, #0
+ strcs r3, [r6, r8]
+ bcs .L382
+ ldrb r3, [r5, #3837] @ zero_extendqisi2
+ cmp r3, #0
+ add r3, r9, r0, asl #4
+ ldr r3, [r3, #2788]
+ moveq sl, #0
+ cmp r3, #0
+ beq .L384
+ uxtb r0, r0
+ bl FlashWaitCmdDone
+.L384:
+ ldr r2, [sp, #20]
+ mov r1, #0
+ cmp sl, #0
+ add r3, r5, r2, asl #4
+ movne r0, #36
+ str r1, [r3, #2792]
+ ldr r1, [sp, #16]
+ str fp, [r3, #2788]
+ str r1, [r3, #2784]
+ addne r1, r4, #1
+ mlane r1, r0, r1, r6
+ strne r1, [r3, #2792]
+ add r3, r9, r2
+ add r2, r9, r2, asl #4
+ ldrb r8, [r3, #3768] @ zero_extendqisi2
+ strb r8, [r2, #2780]
+ mov r0, r8
+ bl NandcFlashCs
+ ldr r3, [sp, #12]
+ cmp r3, #1
+ bne .L386
+ ldrb r3, [r5, #80] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L386
+ mov r0, r8
+ bl flash_enter_slc_mode
+.L386:
+ ldr r3, [sp, #20]
+ mov r0, r8
+ ldr r1, [sp, #16]
+ add r4, r4, sl
+ add r3, r5, r3, asl #2
+ ldr r2, [r3, #2740]
+ adds r2, r2, #0
+ movne r2, #1
+ bl FlashWaitReadyEN
+ mov r0, r8
+ ldr r1, [sp, #16]
+ mov r2, sl
+ bl FlashEraseCmd
+ mov r0, r8
+ bl NandcFlashDeCs
+.L382:
+ add r4, r4, #1
+.L379:
+ cmp r4, r7
+ bcc .L387
+ ldr r5, .L393
+ mov r4, #0
+ ldr r6, .L393+4
+ ldr r0, [r5, #2164]
+ bl NandcIqrWaitFlashReady
+ b .L388
+.L390:
+ uxtb r0, r4
+ bl FlashWaitCmdDone
+ ldr r3, [sp, #12]
+ cmp r3, #1
+ bne .L389
+ ldrb r3, [r5, #80] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L389
+ ldrb r0, [r6, r4, asl #4] @ zero_extendqisi2
+ bl flash_exit_slc_mode
+.L389:
+ add r4, r4, #1
+.L388:
+ ldrb r3, [r5, #3766] @ zero_extendqisi2
+ cmp r4, r3
+ bcc .L390
+ mov r0, #0
+.L380:
+ add sp, sp, #28
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L394:
+ .align 2
+.L393:
+ .word .LANCHOR0
+ .word .LANCHOR0+2780
+ .fnend
+ .size FlashEraseBlocks, .-FlashEraseBlocks
+ .align 2
+ .global rk_nandc_flash_xfer_completed
+ .type rk_nandc_flash_xfer_completed, %function
+rk_nandc_flash_xfer_completed:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ mov r1, #0
+ b NandCIrqDisable
+ .fnend
+ .size rk_nandc_flash_xfer_completed, .-rk_nandc_flash_xfer_completed
+ .align 2
+ .global NandcSendDumpDataStart
+ .type NandcSendDumpDataStart, %function
+NandcSendDumpDataStart:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r2, [r0, #16]
+ .pad #8
+ sub sp, sp, #8
+ ldr r3, .L397
+ str r2, [sp, #4]
+ ldr r2, [sp, #4]
+ bfc r2, #2, #1
+ str r2, [sp, #4]
+ ldr r2, [sp, #4]
+ str r2, [r0, #16]
+ str r3, [r0, #8]
+ orr r3, r3, #4
+ str r3, [r0, #8]
+ add sp, sp, #8
+ bx lr
+.L398:
+ .align 2
+.L397:
+ .word 538969130
+ .fnend
+ .size NandcSendDumpDataStart, .-NandcSendDumpDataStart
+ .align 2
+ .global NandcSendDumpDataDone
+ .type NandcSendDumpDataDone, %function
+NandcSendDumpDataDone:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ .pad #8
+ sub sp, sp, #8
+.L400:
+ ldr r3, [r0, #8]
+ str r3, [sp, #4]
+ ldr r3, [sp, #4]
+ tst r3, #1048576
+ beq .L400
+ add sp, sp, #8
+ bx lr
+ .fnend
+ .size NandcSendDumpDataDone, .-NandcSendDumpDataDone
+ .align 2
+ .global NandcXferStart
+ .type NandcXferStart, %function
+NandcXferStart:
+ .fnstart
+ @ args = 8, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r8, r2
+ ldr r2, .L415
+ mov ip, #16
+ mov r6, r1
+ mov r4, #0
+ add r0, r2, r0, asl #3
+ .pad #20
+ sub sp, sp, #20
+ ldr r5, [r0, #16]
+ ldrb r0, [r0, #20] @ zero_extendqisi2
+ ldr r9, [sp, #56]
+ ldr r7, [r5, #12]
+ ldr r1, [sp, #60]
+ bfi r7, ip, #8, #8
+ bfi r7, r4, #3, #1
+ bfi r4, r6, #1, #1
+ orr r4, r4, #8
+ bfi r7, r0, #5, #3
+ mov r0, #1
+ bfi r4, r0, #5, #2
+ orr r4, r4, #536870912
+ mov r3, r3, lsr r0
+ orr r4, r4, #1024
+ bfi r4, r3, #4, #1
+ ldr r3, [r2, #12]
+ cmp r3, #3
+ bls .L403
+ ldr r3, [r5, #16]
+ cmp r9, #0
+ cmpeq r1, #0
+ str r3, [sp, #12]
+ ldr r3, [sp, #12]
+ bfc r3, #2, #1
+ str r3, [sp, #12]
+ beq .L404
+ cmp r6, #0
+ beq .L405
+ ldr r3, [r2, #3832]
+ mov ip, r1
+ cmp r3, #24
+ movhi r3, #128
+ movls r3, #64
+ str r3, [sp, #0]
+ mov r3, r8, lsr r0
+ str r3, [sp, #4]
+ mov r3, #0
+ mov r0, r3
+ b .L407
+.L410:
+ cmp r1, #0
+ mov lr, r3, lsr #2
+ add r0, r0, #1
+ ldrneh fp, [ip, #2]
+ mvneq fp, #0
+ ldrneh sl, [ip], #4
+ ldreq sl, [r2, #3800]
+ orrne sl, sl, fp, asl #16
+ ldrne fp, [r2, #3800]
+ streq fp, [sl, lr, asl #2]
+ strne sl, [fp, lr, asl #2]
+ ldr lr, [sp, #0]
+ add r3, r3, lr
+.L407:
+ ldr sl, [sp, #4]
+ cmp r0, sl
+ bcc .L410
+.L405:
+ mov r0, r5
+ add r8, r8, #1
+ bl rk_nandc_xfer_irq_flag_init
+ mov r0, r5
+ mov r1, #0
+ mov r8, r8, asr #1
+ bl NandCIrqEnable
+ bfi r4, r8, #22, #6
+ ldr r8, .L415
+ cmp r9, #0
+ ubfx sl, r4, #22, #5
+ mov r2, r6
+ movne r0, r9
+ ldreq r0, [r8, #3796]
+ mov r1, sl, asl #10
+ ldr r3, [r8, #3800]
+ str r3, [r8, #3808]
+ str r0, [r8, #3804]
+ bl rknand_dma_map_single
+ mov r2, r6
+ mov r1, sl, asl #7
+ str r0, [r8, #3812]
+ ldr r0, [r8, #3808]
+ bl rknand_dma_map_single
+ mov r3, #1
+ str r3, [r8, #3820]
+ mov r2, #16
+ ldr r3, [r8, #3812]
+ tst r9, #3
+ str r0, [r8, #3816]
+ str r3, [r5, #20]
+ ldr r3, [r8, #3816]
+ str r3, [r5, #24]
+ mov r3, #0
+ str r3, [sp, #12]
+ ldr r3, [sp, #12]
+ bfi r3, r2, #9, #5
+ str r3, [sp, #12]
+ ldr r3, [sp, #12]
+ moveq r2, #2
+ orr r3, r3, #448
+ str r3, [sp, #12]
+ ldreq r3, [sp, #12]
+ bfieq r3, r2, #3, #3
+ streq r3, [sp, #12]
+ rsbs r6, r6, #1
+ ldr r3, [sp, #12]
+ movcc r6, #0
+ orr r3, r3, #4
+ str r3, [sp, #12]
+ ldr r3, [sp, #12]
+ bfi r3, r6, #1, #1
+ str r3, [sp, #12]
+ ldr r3, [sp, #12]
+ orr r3, r3, #1
+ str r3, [sp, #12]
+.L404:
+ ldr r3, [sp, #12]
+ str r3, [r5, #16]
+.L403:
+ str r7, [r5, #12]
+ str r4, [r5, #8]
+ orr r4, r4, #4
+ str r4, [r5, #8]
+ add sp, sp, #20
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L416:
+ .align 2
+.L415:
+ .word .LANCHOR0
+ .fnend
+ .size NandcXferStart, .-NandcXferStart
+ .align 2
+ .global NandcCopy1KB
+ .type NandcCopy1KB, %function
+NandcCopy1KB:
+ .fnstart
+ @ args = 4, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ cmp r1, #1
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r5, r2
+ add r2, r0, #4096
+ mov r4, r0
+ ldr r6, [sp, #16]
+ add r2, r2, r5, asl #9
+ bne .L418
+ cmp r3, #0
+ beq .L419
+ mov r0, r2
+ mov r1, r3
+ mov r2, #1024
+ bl memcpy
+.L419:
+ cmp r6, #0
+ ldmeqfd sp!, {r4, r5, r6, pc}
+ ldrb r3, [r6, #2] @ zero_extendqisi2
+ mov r5, r5, lsr #1
+ ldrb r2, [r6, #1] @ zero_extendqisi2
+ mov r3, r3, asl #16
+ orr r3, r3, r2, asl #8
+ ldrb r2, [r6, #0] @ zero_extendqisi2
+ orr r3, r3, r2
+ ldrb r2, [r6, #3] @ zero_extendqisi2
+ orr r3, r3, r2, asl #24
+ mov r2, #48
+ mul r5, r2, r5
+ mov r5, r5, asr #2
+ add r5, r5, #128
+ str r3, [r4, r5, asl #2]
+ ldmfd sp!, {r4, r5, r6, pc}
+.L418:
+ cmp r3, #0
+ beq .L421
+ mov r1, r2
+ mov r0, r3
+ mov r2, #1024
+ bl memcpy
+.L421:
+ cmp r6, #0
+ ldmeqfd sp!, {r4, r5, r6, pc}
+ mov r5, r5, lsr #1
+ mov r3, #48
+ mul r5, r3, r5
+ mov r5, r5, asr #2
+ add r5, r5, #128
+ ldr r3, [r4, r5, asl #2]
+ mov r2, r3, lsr #8
+ strb r3, [r6, #0]
+ strb r2, [r6, #1]
+ mov r2, r3, lsr #16
+ mov r3, r3, lsr #24
+ strb r2, [r6, #2]
+ strb r3, [r6, #3]
+ ldmfd sp!, {r4, r5, r6, pc}
+ .fnend
+ .size NandcCopy1KB, .-NandcCopy1KB
+ .align 2
+ .global Ftl_log2
+ .type Ftl_log2, %function
+Ftl_log2:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ mov r2, #1
+ mov r3, #0
+ b .L423
+.L424:
+ add r3, r3, #1
+ mov r2, r2, asl #1
+ uxth r3, r3
+.L423:
+ cmp r2, r0
+ bls .L424
+ sub r3, r3, #1
+ uxth r0, r3
+ bx lr
+ .fnend
+ .size Ftl_log2, .-Ftl_log2
+ .align 2
+ .global FtlPrintInfo
+ .type FtlPrintInfo, %function
+FtlPrintInfo:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ bx lr
+ .fnend
+ .size FtlPrintInfo, .-FtlPrintInfo
+ .align 2
+ .global FtlSysBlkNumInit
+ .type FtlSysBlkNumInit, %function
+FtlSysBlkNumInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L429
+ movw r2, #3844
+ cmp r0, #23
+ movw r1, #3854
+ ldrh r2, [r3, r2]
+ movls r0, #24
+ ldrh r1, [r3, r1]
+ str r0, [r3, #3840]
+ mul r2, r2, r0
+ rsb r0, r0, r1
+ movw r1, #3852
+ strh r0, [r3, r1] @ movhi
+ mov r0, #0
+ ldr r1, [r3, #3860]
+ str r2, [r3, #3848]
+ rsb r2, r2, r1
+ str r2, [r3, #3856]
+ bx lr
+.L430:
+ .align 2
+.L429:
+ .word .LANCHOR0
+ .fnend
+ .size FtlSysBlkNumInit, .-FtlSysBlkNumInit
+ .align 2
+ .global FtlConstantsInit
+ .type FtlConstantsInit, %function
+FtlConstantsInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ movw r2, #3864
+ ldr r3, .L444
+ mov r4, r0
+ ldrh lr, [r0, #8]
+ ldrh r1, [r0, #10]
+ ldrh r0, [r0, #12]
+ strh lr, [r3, r2] @ movhi
+ add r2, r2, #2
+ ldrh r6, [r4, #14]
+ strh r1, [r3, r2] @ movhi
+ add r2, r2, #2
+ strh r0, [r3, r2] @ movhi
+ movw r2, #3854
+ strh r6, [r3, r2] @ movhi
+ mov r3, #0
+ ldr r2, .L444+4
+.L432:
+ strb r3, [r3, r2]
+ add r3, r3, #1
+ cmp r3, #32
+ bne .L432
+ ldrh r2, [r4, #14]
+ ldrh r3, [r4, #20]
+ cmp r3, r2, lsr #8
+ bcs .L433
+ ldr r2, .L444+4
+ sub ip, r1, #1
+ uxtb r7, r0
+ mov r3, #0
+ rsb sl, r0, r2
+ str sl, [sp, #0]
+ mla ip, r0, ip, r2
+ mov r8, r7, asl #1
+ uxtb r8, r8
+ str ip, [sp, #4]
+ b .L434
+.L435:
+ strb ip, [r9, r2]
+ add fp, ip, r7
+ add ip, ip, r8
+ add r5, r5, #1
+ strb fp, [sl, r2]
+ uxtb ip, ip
+.L437:
+ cmp r5, r1
+ add r2, r2, r0
+ bcc .L435
+ add r3, r3, #1
+.L434:
+ cmp r3, r0
+ bcs .L436
+ ldr fp, [sp, #0]
+ mov r2, #0
+ uxtb ip, r3
+ mov r5, r2
+ add r9, fp, r3
+ ldr fp, [sp, #4]
+ add sl, fp, r3
+ b .L437
+.L436:
+ ldr r3, .L444
+ movw r2, #3866
+ mov r1, r1, asl #1
+ mov r6, r6, lsr #1
+ strh r1, [r3, r2] @ movhi
+ movw r2, #3854
+ strh r6, [r3, r2] @ movhi
+.L433:
+ ldr r3, .L444
+ movw r2, #3902
+ cmp lr, #1
+ mov r1, #5
+ mov ip, #0
+ ldr r8, .L444
+ strh r1, [r3, r2] @ movhi
+ mov r1, #3904
+ streqh lr, [r3, r2] @ movhi
+ movw r2, #3906
+ strh ip, [r3, r1] @ movhi
+ mov r1, #4352
+ strh r1, [r3, r2] @ movhi
+ ldrb r3, [r3, #0] @ zero_extendqisi2
+ cmp r3, #0
+ ldrne r3, .L444
+ movne r1, #384
+ strneh r1, [r3, r2] @ movhi
+ movw r3, #3866
+ ldrh r5, [r8, r3]
+ movw r3, #3844
+ mul r5, r5, r0
+ uxth r5, r5
+ strh r5, [r8, r3] @ movhi
+ add r3, r3, #10
+ ldrh r6, [r8, r3]
+ add r3, r3, #54
+ mul r0, r0, r6
+ uxth r0, r0
+ strh r0, [r8, r3] @ movhi
+ bl Ftl_log2
+ ldrh r9, [r4, #16]
+ movw r3, #3910
+ ldrh fp, [r4, #18]
+ ldrh sl, [r4, #20]
+ mul r2, r9, r5
+ strh r0, [r8, r3] @ movhi
+ add r3, r3, #2
+ mov r0, sl
+ strh r9, [r8, r3] @ movhi
+ add r3, r3, #2
+ strh fp, [r8, r3] @ movhi
+ add r3, r3, #2
+ strh r2, [r8, r3] @ movhi
+ add r3, r3, #2
+ strh sl, [r8, r3] @ movhi
+ bl Ftl_log2
+ mov r3, #3920
+ movw r2, #3922
+ cmp r6, #1024
+ mul r1, fp, sl
+ strh r0, [r8, r3] @ movhi
+ mov r3, sl, asl #9
+ mov r7, r0
+ uxth r3, r3
+ strh r3, [r8, r2] @ movhi
+ add r2, r2, #2
+ mov r3, r3, lsr #8
+ strh r3, [r8, r2] @ movhi
+ movw r3, #3926
+ ldrh r2, [r4, #26]
+ mov r4, r8
+ strh r2, [r8, r3] @ movhi
+ uxtbhi r2, r6
+ mul r3, r6, r5
+ str r3, [r8, #3860]
+ movhi r3, #3904
+ strhih r2, [r8, r3] @ movhi
+ mov r3, #3904
+ ldrh r3, [r8, r3]
+ rsb r3, r3, r6
+ mov r6, r6, asl #6
+ mul r3, r3, r5
+ mul r3, sl, r3
+ mul r9, r9, r3
+ movw r3, #3906
+ mov r9, r9, asr #11
+ str r9, [r8, #3928]
+ ldrh r8, [r8, r3]
+ mov r0, r8, asl #3
+ mov r8, r8, asr r7
+ bl __aeabi_idiv
+ add r7, r7, #9
+ movw r3, #3932
+ mov r6, r6, asr r7
+ add r8, r8, #2
+ uxth r6, r6
+ uxth r0, r0
+ strh r0, [r4, r3] @ movhi
+ cmp r0, #4
+ ldr r4, .L444
+ ldrls r2, .L444
+ movls r1, #4
+ strlsh r1, [r2, r3] @ movhi
+ movw r3, #3934
+ strh r8, [r4, r3] @ movhi
+ mov r3, #3936
+ strh r6, [r4, r3] @ movhi
+ mov r1, r5
+ mul r3, r5, r6
+ add r6, r6, #8
+ str r3, [r4, #3940]
+ movw r3, #3932
+ ldrh r0, [r4, r3]
+ bl __aeabi_uidiv
+ cmp r5, #1
+ uxtah r6, r6, r0
+ str r6, [r4, #3840]
+ addeq r6, r6, #4
+ streq r6, [r4, #3840]
+ ldr r0, [r4, #3840]
+ uxth r0, r0
+ bl FtlSysBlkNumInit
+ ldr r3, [r4, #3840]
+ ldr r2, [r4, #3856]
+ mov r0, #2048
+ str r3, [r4, #3944]
+ movw r3, #3912
+ ldrh r3, [r4, r3]
+ mov r2, r2, asl #2
+ mul r2, r3, r2
+ mov r3, #3920
+ ldrh r3, [r4, r3]
+ add r3, r3, #9
+ mov r2, r2, lsr r3
+ movw r3, #3948
+ add r2, r2, #2
+ strh r2, [r4, r3] @ movhi
+ movw r3, #3918
+ ldrh r1, [r4, r3]
+ bl __aeabi_idiv
+ movw r3, #3950
+ strh r0, [r4, r3] @ movhi
+ mov r0, #0
+ str r0, [r4, #3952]
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L445:
+ .align 2
+.L444:
+ .word .LANCHOR0
+ .word .LANCHOR0+3870
+ .fnend
+ .size FtlConstantsInit, .-FtlConstantsInit
+ .align 2
+ .global IsBlkInVendorPart
+ .type IsBlkInVendorPart, %function
+IsBlkInVendorPart:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L453
+ movw r2, #3956
+ ldrh r2, [r3, r2]
+ cmp r2, #0
+ beq .L451
+ movw r2, #3932
+ ldrh r1, [r3, r2]
+ ldr r2, [r3, #3960]
+ mov r3, #0
+ b .L448
+.L450:
+ ldrh ip, [r2], #2
+ cmp ip, r0
+ beq .L452
+ add r3, r3, #1
+ uxth r3, r3
+.L448:
+ cmp r3, r1
+ bne .L450
+ mov r0, #0
+ bx lr
+.L452:
+ mov r0, #1
+ bx lr
+.L451:
+ mov r0, r2
+ bx lr
+.L454:
+ .align 2
+.L453:
+ .word .LANCHOR0
+ .fnend
+ .size IsBlkInVendorPart, .-IsBlkInVendorPart
+ .align 2
+ .global FtlCacheMetchLpa
+ .type FtlCacheMetchLpa, %function
+FtlCacheMetchLpa:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r2, .L463
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ ldr r3, [r2, #3964]
+ cmp r3, #0
+ beq .L460
+ ldr ip, [r2, #3968]
+ mov r2, #0
+.L459:
+ ldr r4, [ip, #16]
+ cmp r4, r0
+ bcc .L457
+ cmp r4, r1
+ bls .L461
+.L457:
+ add r2, r2, #1
+ add ip, ip, #36
+ cmp r2, r3
+ bne .L459
+ mov r0, #0
+ ldmfd sp!, {r4, pc}
+.L461:
+ mov r0, #1
+ ldmfd sp!, {r4, pc}
+.L460:
+ mov r0, r3
+ ldmfd sp!, {r4, pc}
+.L464:
+ .align 2
+.L463:
+ .word .LANCHOR0
+ .fnend
+ .size FtlCacheMetchLpa, .-FtlCacheMetchLpa
+ .align 2
+ .global FtlGetCap
+ .type FtlGetCap, %function
+FtlGetCap:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L466
+ ldr r0, [r3, #3952]
+ bx lr
+.L467:
+ .align 2
+.L466:
+ .word .LANCHOR0
+ .fnend
+ .size FtlGetCap, .-FtlGetCap
+ .align 2
+ .global FtlGetCapacity
+ .type FtlGetCapacity, %function
+FtlGetCapacity:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L469
+ ldr r0, [r3, #3952]
+ bx lr
+.L470:
+ .align 2
+.L469:
+ .word .LANCHOR0
+ .fnend
+ .size FtlGetCapacity, .-FtlGetCapacity
+ .align 2
+ .global FtlGetLpn
+ .type FtlGetLpn, %function
+FtlGetLpn:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L472
+ ldr r0, [r3, #3972]
+ bx lr
+.L473:
+ .align 2
+.L472:
+ .word .LANCHOR0
+ .fnend
+ .size FtlGetLpn, .-FtlGetLpn
+ .align 2
+ .global FtlGetCurEraseBlock
+ .type FtlGetCurEraseBlock, %function
+FtlGetCurEraseBlock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L475
+ movw r2, #3844
+ ldrh r2, [r3, r2]
+ ldr r0, [r3, #3976]
+ mul r0, r0, r2
+ bx lr
+.L476:
+ .align 2
+.L475:
+ .word .LANCHOR0
+ .fnend
+ .size FtlGetCurEraseBlock, .-FtlGetCurEraseBlock
+ .align 2
+ .global FtlGetAllBlockNum
+ .type FtlGetAllBlockNum, %function
+FtlGetAllBlockNum:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L478
+ movw r1, #3844
+ movw r2, #3854
+ ldrh r2, [r3, r2]
+ ldrh r0, [r3, r1]
+ mul r0, r0, r2
+ bx lr
+.L479:
+ .align 2
+.L478:
+ .word .LANCHOR0
+ .fnend
+ .size FtlGetAllBlockNum, .-FtlGetAllBlockNum
+ .align 2
+ .global FtlBbmMapBadBlock
+ .type FtlBbmMapBadBlock, %function
+FtlBbmMapBadBlock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r4, r5, r6, lr}
+ .save {r0, r1, r4, r5, r6, lr}
+ movw r3, #3908
+ ldr r4, .L481
+ mov r5, r0
+ ldrh r6, [r4, r3]
+ mov r1, r6
+ bl __aeabi_uidiv
+ uxth r2, r0
+ mls r3, r6, r2, r5
+ add r1, r4, r2, asl #2
+ mov r6, #1
+ ldr r0, [r1, #4008]
+ uxth r3, r3
+ and r1, r3, #31
+ mov ip, r3, lsr #5
+ ldr lr, [r0, ip, asl #2]
+ orr r1, lr, r6, asl r1
+ str r1, [r0, ip, asl #2]
+ str r1, [sp, #0]
+ mov r1, r5
+ ldr r0, .L481+4
+ bl printk
+ movw r3, #3986
+ ldrh r2, [r4, r3]
+ mov r0, #0
+ add r2, r2, r6
+ strh r2, [r4, r3] @ movhi
+ ldmfd sp!, {r2, r3, r4, r5, r6, pc}
+.L482:
+ .align 2
+.L481:
+ .word .LANCHOR0
+ .word .LC4
+ .fnend
+ .size FtlBbmMapBadBlock, .-FtlBbmMapBadBlock
+ .global __aeabi_uidivmod
+ .align 2
+ .global FtlBbmIsBadBlock
+ .type FtlBbmIsBadBlock, %function
+FtlBbmIsBadBlock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ movw r3, #3908
+ ldr r5, .L484
+ mov r7, r0
+ ldrh r6, [r5, r3]
+ mov r1, r6
+ bl __aeabi_uidivmod
+ mov r0, r7
+ uxth r4, r1
+ mov r1, r6
+ bl __aeabi_uidiv
+ mov r2, r4, lsr #5
+ and r4, r4, #31
+ uxth r0, r0
+ add r5, r5, r0, asl #2
+ ldr r3, [r5, #4008]
+ ldr r0, [r3, r2, asl #2]
+ mov r0, r0, lsr r4
+ and r0, r0, #1
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L485:
+ .align 2
+.L484:
+ .word .LANCHOR0
+ .fnend
+ .size FtlBbmIsBadBlock, .-FtlBbmIsBadBlock
+ .align 2
+ .global FtlBbtInfoPrint
+ .type FtlBbtInfoPrint, %function
+FtlBbtInfoPrint:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ bx lr
+ .fnend
+ .size FtlBbtInfoPrint, .-FtlBbtInfoPrint
+ .align 2
+ .global FtlBbtCalcTotleCnt
+ .type FtlBbtCalcTotleCnt, %function
+FtlBbtCalcTotleCnt:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, lr}
+ .save {r4, r5, r6, r7, r8, lr}
+ mov r4, #0
+ mov r5, r4
+ ldr r6, .L491
+ movw r8, #3908
+ movw r7, #3866
+ b .L488
+.L490:
+ mov r0, r5
+ add r5, r5, #1
+ bl FtlBbmIsBadBlock
+ uxth r5, r5
+ cmp r0, #0
+ addne r4, r4, #1
+ uxthne r4, r4
+.L488:
+ ldrh r3, [r6, r8]
+ ldrh r2, [r6, r7]
+ mul r3, r2, r3
+ cmp r5, r3
+ blt .L490
+ mov r0, r4
+ ldmfd sp!, {r4, r5, r6, r7, r8, pc}
+.L492:
+ .align 2
+.L491:
+ .word .LANCHOR0
+ .fnend
+ .size FtlBbtCalcTotleCnt, .-FtlBbtCalcTotleCnt
+ .align 2
+ .global V2P_block
+ .type V2P_block, %function
+V2P_block:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ movw r3, #3868
+ ldr r5, .L494
+ mov r7, r1
+ mov r6, r0
+ ldrh r4, [r5, r3]
+ mov r1, r4
+ bl __aeabi_uidiv
+ movw r3, #3908
+ ldrh r5, [r5, r3]
+ mov r1, r4
+ mul r7, r4, r7
+ mla r5, r5, r0, r7
+ mov r0, r6
+ bl __aeabi_uidivmod
+ add r1, r5, r1
+ uxth r0, r1
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L495:
+ .align 2
+.L494:
+ .word .LANCHOR0
+ .fnend
+ .size V2P_block, .-V2P_block
+ .align 2
+ .global P2V_plane
+ .type P2V_plane, %function
+P2V_plane:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L497
+ movw r2, #3868
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r6, r0
+ ldrh r4, [r3, r2]
+ add r2, r2, #40
+ ldrh r1, [r3, r2]
+ bl __aeabi_uidiv
+ mov r1, r4
+ mul r5, r0, r4
+ mov r0, r6
+ bl __aeabi_uidivmod
+ add r1, r5, r1
+ uxth r0, r1
+ ldmfd sp!, {r4, r5, r6, pc}
+.L498:
+ .align 2
+.L497:
+ .word .LANCHOR0
+ .fnend
+ .size P2V_plane, .-P2V_plane
+ .align 2
+ .global P2V_block_in_plane
+ .type P2V_block_in_plane, %function
+P2V_block_in_plane:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ movw r3, #3908
+ ldr r4, .L500
+ ldrh r1, [r4, r3]
+ bl __aeabi_uidivmod
+ movw r3, #3868
+ uxth r0, r1
+ ldrh r1, [r4, r3]
+ bl __aeabi_uidiv
+ uxth r0, r0
+ ldmfd sp!, {r4, pc}
+.L501:
+ .align 2
+.L500:
+ .word .LANCHOR0
+ .fnend
+ .size P2V_block_in_plane, .-P2V_block_in_plane
+ .align 2
+ .global ftl_cmp_data_ver
+ .type ftl_cmp_data_ver, %function
+ftl_cmp_data_ver:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ cmp r0, r1
+ bls .L503
+ rsb r0, r1, r0
+ cmp r0, #-2147483648
+ movhi r0, #0
+ movls r0, #1
+ bx lr
+.L503:
+ rsb r0, r0, r1
+ cmp r0, #-2147483648
+ movls r0, #0
+ movhi r0, #1
+ bx lr
+ .fnend
+ .size ftl_cmp_data_ver, .-ftl_cmp_data_ver
+ .align 2
+ .global FtlFreeSysBlkQueueEmpty
+ .type FtlFreeSysBlkQueueEmpty, %function
+FtlFreeSysBlkQueueEmpty:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r2, .L506
+ movw r3, #4046
+ ldrh r0, [r2, r3]
+ rsbs r0, r0, #1
+ movcc r0, #0
+ bx lr
+.L507:
+ .align 2
+.L506:
+ .word .LANCHOR0
+ .fnend
+ .size FtlFreeSysBlkQueueEmpty, .-FtlFreeSysBlkQueueEmpty
+ .align 2
+ .global FtlFreeSysBlkQueueFull
+ .type FtlFreeSysBlkQueueFull, %function
+FtlFreeSysBlkQueueFull:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r2, .L509
+ movw r3, #4046
+ ldrh r0, [r2, r3]
+ sub r2, r0, #1024
+ rsbs r0, r2, #0
+ adc r0, r0, r2
+ bx lr
+.L510:
+ .align 2
+.L509:
+ .word .LANCHOR0
+ .fnend
+ .size FtlFreeSysBlkQueueFull, .-FtlFreeSysBlkQueueFull
+ .align 2
+ .global FtlFreeSysBlkQueueIn
+ .type FtlFreeSysBlkQueueIn, %function
+FtlFreeSysBlkQueueIn:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r2, .L514
+ movw r3, #4046
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r5, r0
+ ldrh r3, [r2, r3]
+ cmp r3, #1024
+ ldmeqfd sp!, {r4, r5, r6, pc}
+ cmp r1, #0
+ beq .L513
+ bl P2V_block_in_plane
+ ldr r4, .L514+4
+ mov r1, #1
+ mov r3, r5, asl #10
+ mov r2, r1
+ mov r6, r0
+ ldr r0, [r4, #-2088]
+ mov r6, r6, asl #1
+ str r3, [r0, #4]
+ bl FlashEraseBlocks
+ ldr r3, [r4, #-2084]
+ ldrh r2, [r3, r6]
+ add r2, r2, #1
+ strh r2, [r3, r6] @ movhi
+ ldr r3, [r4, #-2080]
+ add r3, r3, #1
+ str r3, [r4, #-2080]
+.L513:
+ ldr r3, .L514
+ movw r2, #4046
+ movw r0, #4040
+ ldrh r1, [r3, r2]
+ add r1, r1, #1
+ strh r1, [r3, r2] @ movhi
+ movw r2, #4044
+ ldrh r1, [r3, r2]
+ add ip, r1, #4
+ add r1, r1, #1
+ bic r1, r1, #64512
+ add ip, r3, ip, asl #1
+ strh r5, [ip, r0] @ movhi
+ strh r1, [r3, r2] @ movhi
+ ldmfd sp!, {r4, r5, r6, pc}
+.L515:
+ .align 2
+.L514:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size FtlFreeSysBlkQueueIn, .-FtlFreeSysBlkQueueIn
+ .align 2
+ .global FtlFreeSysBLkSort
+ .type FtlFreeSysBLkSort, %function
+FtlFreeSysBLkSort:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, lr}
+ mov r4, #0
+ ldr r5, .L526
+ movw r8, #4046
+ movw r7, #4042
+ ldr r6, .L526+4
+ b .L517
+.L518:
+ ldrh r3, [r5, r7]
+ add r3, r4, r3
+ add r3, r5, r3, asl #1
+ add r3, r3, #4048
+ ldrh r0, [r3, #0]
+ bl P2V_block_in_plane
+ ldr r2, [r6, #-2084]
+ ldr r3, [r6, #-2076]
+ mov r0, r0, asl #1
+ ldrh r2, [r2, r0]
+ str r2, [r3, r4, asl #2]
+ add r4, r4, #1
+ uxth r4, r4
+.L517:
+ ldrh r3, [r5, r8]
+ cmp r3, r4
+ bhi .L518
+ mov r3, #0
+ ldr ip, .L526
+ movw r8, #4046
+ ldr r4, .L526+4
+ movw r7, #4042
+ b .L519
+.L524:
+ add r6, r3, #1
+ ldr r1, [r4, #-2076]
+ mov r2, r3
+ uxth r6, r6
+ mov r0, r6
+ b .L520
+.L522:
+ ldr r9, [r1, r2, asl #2]
+ ldr sl, [r1, r0, asl #2]
+ cmp r9, sl
+ movhi r2, r0
+ add r0, r0, #1
+ uxth r0, r0
+.L520:
+ cmp r0, r5
+ bcc .L522
+ cmp r3, r2
+ beq .L523
+ ldr r5, [r1, r3, asl #2]
+ ldr r0, [r1, r2, asl #2]
+ str r5, [r1, r2, asl #2]
+ ldr r1, [r4, #-2076]
+ str r0, [r1, r3, asl #2]
+ ldrh r1, [ip, r7]
+ add r2, r1, r2
+ add r3, r1, r3
+ add r2, ip, r2, asl #1
+ add r3, ip, r3, asl #1
+ add r2, r2, #4048
+ add r3, r3, #4048
+ ldrh r0, [r2, #0]
+ ldrh r1, [r3, #0]
+ strh r1, [r2, #0] @ movhi
+ strh r0, [r3, #0] @ movhi
+.L523:
+ mov r3, r6
+.L519:
+ ldrh r5, [ip, r8]
+ sub r2, r5, #1
+ cmp r3, r2
+ blt .L524
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L527:
+ .align 2
+.L526:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size FtlFreeSysBLkSort, .-FtlFreeSysBLkSort
+ .align 2
+ .global IsInFreeQueue
+ .type IsInFreeQueue, %function
+IsInFreeQueue:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r2, .L534
+ movw r3, #4046
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ ldrh r1, [r2, r3]
+ cmp r1, #1024
+ beq .L532
+ movw r3, #4042
+ ldrh ip, [r2, r3]
+ mov r3, #0
+ b .L530
+.L531:
+ add r4, r3, ip
+ mov r4, r4, asl #22
+ add r4, r2, r4, lsr #21
+ add r4, r4, #4048
+ ldrh r4, [r4, #0]
+ cmp r4, r0
+ beq .L533
+ add r3, r3, #1
+.L530:
+ cmp r3, r1
+ bcc .L531
+.L532:
+ mov r0, #0
+ ldmfd sp!, {r4, pc}
+.L533:
+ mov r0, #1
+ ldmfd sp!, {r4, pc}
+.L535:
+ .align 2
+.L534:
+ .word .LANCHOR0
+ .fnend
+ .size IsInFreeQueue, .-IsInFreeQueue
+ .align 2
+ .global FtlFreeSysBlkQueueOut
+ .type FtlFreeSysBlkQueueOut, %function
+FtlFreeSysBlkQueueOut:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L539
+ stmfd sp!, {r4, r5, lr}
+ .save {r4, r5, lr}
+ movw r4, #4046
+ ldrh r2, [r3, r4]
+ cmp r2, #0
+ beq .L538
+ movw r1, #4042
+ movw r0, #4040
+ ldrh ip, [r3, r1]
+ sub r2, r2, #1
+ add r5, ip, #4
+ add ip, ip, #1
+ bic ip, ip, #64512
+ add r5, r3, r5, asl #1
+ ldrh r0, [r5, r0]
+ strh r2, [r3, r4] @ movhi
+ strh ip, [r3, r1] @ movhi
+ ldmfd sp!, {r4, r5, pc}
+.L538:
+ mov r0, r2
+ ldmfd sp!, {r4, r5, pc}
+.L540:
+ .align 2
+.L539:
+ .word .LANCHOR0
+ .fnend
+ .size FtlFreeSysBlkQueueOut, .-FtlFreeSysBlkQueueOut
+ .align 2
+ .global insert_data_list
+ .type insert_data_list, %function
+insert_data_list:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ movw r3, #65535
+ cmp r0, r3
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ beq .L542
+ ldr r1, .L556
+ mov ip, #6
+ mul ip, ip, r0
+ mvn r6, #0
+ ldr r4, [r1, #-2072]
+ mov r8, r1
+ add r2, r4, ip
+ strh r6, [r2, #2] @ movhi
+ strh r6, [r4, ip] @ movhi
+ ldr r3, [r1, #-2068]
+ cmp r3, #0
+ beq .L555
+.L543:
+ ldr r7, [r1, #-2064]
+ mov sl, r0, asl #1
+ ldrh r1, [r2, #4]
+ ldr r9, .L556+4
+ ldrh r5, [r7, sl]
+ cmp r1, #0
+ ldr fp, [r8, #-2084]
+ mulne r6, r1, r5
+ ldr r5, [r8, #-2072]
+ add sl, fp, sl
+ str sl, [sp, #4]
+ rsb r1, r5, r3
+ mov r1, r1, asr #1
+ mul r1, r9, r1
+ uxth r1, r1
+.L550:
+ mov r9, r1, asl #1
+ ldrh r8, [r3, #4]
+ ldrh sl, [r7, r9]
+ cmp r8, #0
+ mvneq r8, #0
+ mulne r8, r8, sl
+ cmp r8, r6
+ bne .L546
+ ldrh sl, [fp, r9]
+ ldr r9, [sp, #4]
+ ldrh r8, [r9, #0]
+ cmp sl, r8
+ bcc .L548
+ b .L547
+.L546:
+ bhi .L547
+.L548:
+ ldrh r8, [r3, #0]
+ movw sl, #65535
+ cmp r8, sl
+ streqh r1, [r2, #2] @ movhi
+ streqh r0, [r3, #0] @ movhi
+ ldreq r3, .L556
+ streq r2, [r3, #-2060]
+ beq .L542
+.L549:
+ mov r1, #6
+ mla r3, r1, r8, r5
+ mov r1, r8
+ b .L550
+.L547:
+ strh r1, [r4, ip] @ movhi
+ ldrh r1, [r3, #2]
+ strh r1, [r2, #2] @ movhi
+ ldr r1, .L556
+ ldr ip, [r1, #-2068]
+ cmp r3, ip
+ bne .L551
+ strh r0, [r3, #2] @ movhi
+.L555:
+ str r2, [r1, #-2068]
+ b .L542
+.L551:
+ ldrh r2, [r3, #2]
+ mov ip, #6
+ ldr r1, [r1, #-2072]
+ mul r2, ip, r2
+ strh r0, [r1, r2] @ movhi
+ strh r0, [r3, #2] @ movhi
+.L542:
+ mov r0, #0
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L557:
+ .align 2
+.L556:
+ .word .LANCHOR2
+ .word -1431655765
+ .fnend
+ .size insert_data_list, .-insert_data_list
+ .align 2
+ .global INSERT_DATA_LIST
+ .type INSERT_DATA_LIST, %function
+INSERT_DATA_LIST:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ bl insert_data_list
+ ldr r2, .L559
+ ldr r3, .L559+4
+ ldrh r1, [r2, r3]
+ add r1, r1, #1
+ strh r1, [r2, r3] @ movhi
+ ldmfd sp!, {r3, pc}
+.L560:
+ .align 2
+.L559:
+ .word .LANCHOR2
+ .word -2056
+ .fnend
+ .size INSERT_DATA_LIST, .-INSERT_DATA_LIST
+ .align 2
+ .global insert_free_list
+ .type insert_free_list, %function
+insert_free_list:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, lr}
+ movw r6, #65535
+ cmp r0, r6
+ beq .L562
+ ldr r1, .L569
+ mov r5, #6
+ mul ip, r5, r0
+ mvn r3, #0
+ ldr r4, [r1, #-2072]
+ add r2, r4, ip
+ strh r3, [r2, #2] @ movhi
+ strh r3, [r4, ip] @ movhi
+ ldr r3, [r1, #-2052]
+ cmp r3, #0
+ beq .L568
+.L563:
+ ldr sl, [r1, #-2072]
+ mov r8, r0, asl #1
+ ldr r7, [r1, #-2084]
+ rsb r1, sl, r3
+ ldr r9, .L569+4
+ mov r1, r1, asr #1
+ ldrh r8, [r7, r8]
+ mul r1, r9, r1
+ mov r9, r5
+ uxth r1, r1
+.L566:
+ mov r5, r1, asl #1
+ ldrh r5, [r7, r5]
+ cmp r5, r8
+ bcs .L564
+ ldrh r5, [r3, #0]
+ cmp r5, r6
+ streqh r1, [r2, #2] @ movhi
+ streqh r0, [r3, #0] @ movhi
+ beq .L562
+.L565:
+ mla r3, r9, r5, sl
+ mov r1, r5
+ b .L566
+.L564:
+ ldrh r5, [r3, #2]
+ strh r5, [r2, #2] @ movhi
+ strh r1, [r4, ip] @ movhi
+ ldr r1, .L569
+ ldr ip, [r1, #-2052]
+ cmp r3, ip
+ bne .L567
+ strh r0, [r3, #2] @ movhi
+.L568:
+ str r2, [r1, #-2052]
+ b .L562
+.L567:
+ ldrh r2, [r3, #2]
+ mov ip, #6
+ ldr r1, [r1, #-2072]
+ mul r2, ip, r2
+ strh r0, [r1, r2] @ movhi
+ strh r0, [r3, #2] @ movhi
+.L562:
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L570:
+ .align 2
+.L569:
+ .word .LANCHOR2
+ .word -1431655765
+ .fnend
+ .size insert_free_list, .-insert_free_list
+ .align 2
+ .global INSERT_FREE_LIST
+ .type INSERT_FREE_LIST, %function
+INSERT_FREE_LIST:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ bl insert_free_list
+ ldr r2, .L572
+ ldr r3, .L572+4
+ ldrh r1, [r2, r3]
+ add r1, r1, #1
+ strh r1, [r2, r3] @ movhi
+ ldmfd sp!, {r3, pc}
+.L573:
+ .align 2
+.L572:
+ .word .LANCHOR2
+ .word -2048
+ .fnend
+ .size INSERT_FREE_LIST, .-INSERT_FREE_LIST
+ .align 2
+ .global List_remove_node
+ .type List_remove_node, %function
+List_remove_node:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr ip, .L579
+ mov r2, #6
+ mul r1, r2, r1
+ ldr r3, [ip, #-2072]
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ add r4, r3, r1
+ ldr r5, [r0, #0]
+ movw r6, #65535
+ cmp r4, r5
+ ldrh r5, [r3, r1]
+ bne .L575
+ cmp r5, r6
+ mlane r2, r2, r5, r3
+ moveq r2, #0
+ streq r2, [r0, #0]
+ strne r2, [r0, #0]
+ mvnne r0, #0
+ strneh r0, [r2, #2] @ movhi
+ b .L577
+.L575:
+ cmp r5, r6
+ ldrh r0, [r4, #2]
+ mlane r5, r2, r5, r3
+ muleq r2, r2, r0
+ mvneq r0, #0
+ strneh r0, [r5, #2] @ movhi
+ ldrneh r6, [r4, #2]
+ ldrneh r5, [r3, r1]
+ ldrne r0, [ip, #-2072]
+ mulne r2, r2, r6
+ streqh r0, [r3, r2] @ movhi
+ strneh r5, [r0, r2] @ movhi
+.L577:
+ mvn r2, #0
+ mov r0, #0
+ strh r2, [r3, r1] @ movhi
+ strh r2, [r4, #2] @ movhi
+ ldmfd sp!, {r4, r5, r6, pc}
+.L580:
+ .align 2
+.L579:
+ .word .LANCHOR2
+ .fnend
+ .size List_remove_node, .-List_remove_node
+ .align 2
+ .global List_pop_index_node
+ .type List_pop_index_node, %function
+List_pop_index_node:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ ldr r3, [r0, #0]
+ cmp r3, #0
+ beq .L586
+ ldr r2, .L587
+ movw lr, #65535
+ mov ip, #6
+ ldr r4, [r2, #-2072]
+ b .L583
+.L585:
+ mla r3, ip, r2, r4
+ sub r1, r1, #1
+ uxth r1, r1
+.L583:
+ cmp r1, #0
+ beq .L584
+ ldrh r2, [r3, #0]
+ cmp r2, lr
+ bne .L585
+.L584:
+ rsb r4, r4, r3
+ ldr r3, .L587+4
+ mov r4, r4, asr #1
+ mul r4, r3, r4
+ uxth r4, r4
+ mov r1, r4
+ bl List_remove_node
+ mov r0, r4
+ ldmfd sp!, {r4, pc}
+.L586:
+ movw r0, #65535
+ ldmfd sp!, {r4, pc}
+.L588:
+ .align 2
+.L587:
+ .word .LANCHOR2
+ .word -1431655765
+ .fnend
+ .size List_pop_index_node, .-List_pop_index_node
+ .align 2
+ .global List_pop_head_node
+ .type List_pop_head_node, %function
+List_pop_head_node:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ mov r1, #0
+ b List_pop_index_node
+ .fnend
+ .size List_pop_head_node, .-List_pop_head_node
+ .align 2
+ .global List_get_gc_head_node
+ .type List_get_gc_head_node, %function
+List_get_gc_head_node:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r2, .L596
+ ldr r3, [r2, #-2068]
+ cmp r3, #0
+ beq .L595
+ ldr r2, [r2, #-2072]
+ movw r1, #65535
+ mov ip, #6
+ b .L592
+.L594:
+ mla r3, ip, r3, r2
+ sub r0, r0, #1
+ uxth r0, r0
+.L592:
+ cmp r0, #0
+ beq .L593
+ ldrh r3, [r3, #0]
+ cmp r3, r1
+ bne .L594
+ mov r0, r1
+ bx lr
+.L593:
+ rsb r3, r2, r3
+ ldr r0, .L596+4
+ mov r3, r3, asr #1
+ mul r0, r0, r3
+ uxth r0, r0
+ bx lr
+.L595:
+ movw r0, #65535
+ bx lr
+.L597:
+ .align 2
+.L596:
+ .word .LANCHOR2
+ .word -1431655765
+ .fnend
+ .size List_get_gc_head_node, .-List_get_gc_head_node
+ .align 2
+ .global List_update_data_list
+ .type List_update_data_list, %function
+List_update_data_list:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r5, r0
+ ldr r4, .L604
+ ldr r3, .L604+4
+ ldrh r3, [r4, r3]
+ cmp r3, r0
+ beq .L599
+ ldr r3, .L604+8
+ ldrh r3, [r4, r3]
+ cmp r3, r0
+ beq .L599
+ ldr r3, .L604+12
+ ldrh r3, [r4, r3]
+ cmp r3, r0
+ beq .L599
+ ldr r3, [r4, #-2072]
+ mov ip, #6
+ ldr r2, [r4, #-2068]
+ mla r1, ip, r0, r3
+ cmp r1, r2
+ beq .L599
+ ldrh r6, [r1, #4]
+ mov r2, r5, asl #1
+ ldrh r1, [r1, #2]
+ ldr r0, [r4, #-2064]
+ mla r1, ip, r1, r3
+ ldr ip, .L604+16
+ ldrh r2, [r0, r2]
+ muls r2, r6, r2
+ mvneq r2, #0
+ rsb r3, r3, r1
+ mov r3, r3, asr #1
+ ldrh r1, [r1, #4]
+ mul r3, ip, r3
+ uxth r3, r3
+ mov r3, r3, asl #1
+ ldrh r3, [r0, r3]
+ muls r3, r1, r3
+ mvneq r3, #0
+ cmp r2, r3
+ bcs .L599
+ ldr r0, .L604+20
+ mov r1, r5
+ bl List_remove_node
+ ldr r3, .L604+24
+ mov r0, r5
+ ldrh r2, [r4, r3]
+ sub r2, r2, #1
+ strh r2, [r4, r3] @ movhi
+ bl INSERT_DATA_LIST
+.L599:
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, pc}
+.L605:
+ .align 2
+.L604:
+ .word .LANCHOR2
+ .word -2044
+ .word -1996
+ .word -1948
+ .word -1431655765
+ .word .LANCHOR2-2068
+ .word -2056
+ .fnend
+ .size List_update_data_list, .-List_update_data_list
+ .align 2
+ .global ftl_map_blk_alloc_new_blk
+ .type ftl_map_blk_alloc_new_blk, %function
+ftl_map_blk_alloc_new_blk:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r4, r0
+ ldrh r2, [r0, #10]
+ mov r5, #0
+ ldr r3, [r0, #12]
+ b .L607
+.L610:
+ mov r7, r3
+ add r3, r3, #2
+ ldrh r6, [r7, #0]
+ cmp r6, #0
+ bne .L608
+ bl FtlFreeSysBlkQueueOut
+ cmp r0, #0
+ strh r0, [r7, #0] @ movhi
+ beq .L609
+ ldr r3, [r4, #28]
+ strh r6, [r4, #2] @ movhi
+ add r3, r3, #1
+ str r3, [r4, #28]
+ ldrh r3, [r4, #8]
+ strh r5, [r4, #0] @ movhi
+ add r3, r3, #1
+ strh r3, [r4, #8] @ movhi
+ b .L609
+.L608:
+ add r5, r5, #1
+ uxth r5, r5
+.L607:
+ cmp r5, r2
+ bne .L610
+.L609:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+ .fnend
+ .size ftl_map_blk_alloc_new_blk, .-ftl_map_blk_alloc_new_blk
+ .align 2
+ .global select_l2p_ram_region
+ .type select_l2p_ram_region, %function
+select_l2p_ram_region:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r2, .L623
+ movw r3, #3950
+ stmfd sp!, {r4, r5, r6, r7, lr}
+ .save {r4, r5, r6, r7, lr}
+ movw r1, #65535
+ ldrh r3, [r2, r3]
+ ldr r2, .L623+4
+ ldr ip, [r2, #-1900]
+ mov r2, #0
+ mov r0, r2
+ b .L612
+.L614:
+ add r2, r2, #12
+ add r4, ip, r2
+ ldrh r4, [r4, #-12]
+ cmp r4, r1
+ ldmeqfd sp!, {r4, r5, r6, r7, pc}
+ add r0, r0, #1
+ uxth r0, r0
+.L612:
+ cmp r0, r3
+ bne .L614
+ mov r1, #0
+ mov r0, r3
+ mov r5, #-2147483648
+ mov r2, r1
+ b .L615
+.L617:
+ add r4, ip, r1
+ ldr r4, [r4, #4]
+ cmp r4, #0
+ blt .L616
+ cmp r4, r5
+ movcc r5, r4
+ movcc r0, r2
+.L616:
+ add r2, r2, #1
+ add r1, r1, #12
+ uxth r2, r2
+.L615:
+ cmp r2, r3
+ bne .L617
+ cmp r0, r3
+ ldmccfd sp!, {r4, r5, r6, r7, pc}
+ ldr r2, .L623+8
+ mov r0, r3
+ ldr r1, .L623+4
+ mvn r4, #0
+ ldrh r6, [r1, r2]
+ mov r2, #0
+ mov r1, r2
+ b .L618
+.L620:
+ add r5, ip, r2
+ ldr r5, [r5, #4]
+ cmp r5, r4
+ bcs .L619
+ ldrh r7, [ip, r2]
+ cmp r7, r6
+ movne r4, r5
+ movne r0, r1
+.L619:
+ add r1, r1, #1
+ add r2, r2, #12
+ uxth r1, r1
+.L618:
+ cmp r1, r3
+ bne .L620
+ ldmfd sp!, {r4, r5, r6, r7, pc}
+.L624:
+ .align 2
+.L623:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -1896
+ .fnend
+ .size select_l2p_ram_region, .-select_l2p_ram_region
+ .align 2
+ .global FtlUpdateVaildLpn
+ .type FtlUpdateVaildLpn, %function
+FtlUpdateVaildLpn:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L631
+ ldr r2, .L631+4
+ stmfd sp!, {r4, r5, lr}
+ .save {r4, r5, lr}
+ ldrh r1, [r2, r3]
+ cmp r1, #4
+ add ip, r1, #1
+ mov r1, r3
+ strh ip, [r2, r3] @ movhi
+ bhi .L626
+ cmp r0, #0
+ ldmeqfd sp!, {r4, r5, pc}
+.L626:
+ ldr r0, .L631+8
+ mov r3, #0
+ strh r3, [r2, r1] @ movhi
+ movw r1, #3852
+ str r3, [r2, #-1892]
+ movw ip, #65535
+ ldrh r4, [r0, r1]
+ ldr r1, [r2, #-2064]
+ ldr r2, .L631+4
+ b .L628
+.L630:
+ ldrh r0, [r1], #2
+ add r3, r3, #1
+ cmp r0, ip
+ uxth r3, r3
+ ldrne r5, [r2, #-1892]
+ addne r0, r0, r5
+ strne r0, [r2, #-1892]
+.L628:
+ cmp r3, r4
+ bne .L630
+ ldmfd sp!, {r4, r5, pc}
+.L632:
+ .align 2
+.L631:
+ .word -1894
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .fnend
+ .size FtlUpdateVaildLpn, .-FtlUpdateVaildLpn
+ .align 2
+ .global ftl_set_blk_mode
+ .type ftl_set_blk_mode, %function
+ftl_set_blk_mode:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L637
+ mov r2, r0, lsr #5
+ cmp r1, #0
+ and r0, r0, #31
+ uxth r2, r2
+ mov ip, #1
+ ldr r3, [r3, #-1888]
+ ldr r1, [r3, r2, asl #2]
+ orrne r0, r1, ip, asl r0
+ biceq r0, r1, ip, asl r0
+ str r0, [r3, r2, asl #2]
+ bx lr
+.L638:
+ .align 2
+.L637:
+ .word .LANCHOR2
+ .fnend
+ .size ftl_set_blk_mode, .-ftl_set_blk_mode
+ .align 2
+ .global ftl_get_blk_mode
+ .type ftl_get_blk_mode, %function
+ftl_get_blk_mode:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L640
+ mov r2, r0, lsr #5
+ and r0, r0, #31
+ ldr r3, [r3, #-1888]
+ ldr r3, [r3, r2, asl #2]
+ mov r0, r3, lsr r0
+ and r0, r0, #1
+ bx lr
+.L641:
+ .align 2
+.L640:
+ .word .LANCHOR2
+ .fnend
+ .size ftl_get_blk_mode, .-ftl_get_blk_mode
+ .align 2
+ .global ftl_sb_update_avl_pages
+ .type ftl_sb_update_avl_pages, %function
+ftl_sb_update_avl_pages:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr ip, .L649
+ mov r3, #0
+ strh r3, [r0, #4] @ movhi
+ movw r3, #3844
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ ldrh r3, [ip, r3]
+ movw ip, #65535
+ b .L643
+.L645:
+ add r4, r0, r2, asl #1
+ add r2, r2, #1
+ ldrh r4, [r4, #16]
+ uxth r2, r2
+ cmp r4, ip
+ ldrneh r4, [r0, #4]
+ addne r4, r4, #1
+ strneh r4, [r0, #4] @ movhi
+.L643:
+ cmp r2, r3
+ bcc .L645
+ ldr ip, .L649
+ movw r2, #3912
+ movw r4, #65535
+ mvn r1, r1
+ ldrh r5, [ip, r2]
+ mov ip, r0
+ mov r2, #0
+ b .L646
+.L648:
+ ldrh r6, [ip, #16]
+ add r2, r2, #1
+ add ip, ip, #2
+ cmp r6, r4
+ uxth r2, r2
+ ldrneh r6, [r0, #4]
+ addne r6, r5, r6
+ addne r6, r6, r1
+ strneh r6, [r0, #4] @ movhi
+.L646:
+ cmp r2, r3
+ bne .L648
+ ldmfd sp!, {r4, r5, r6, pc}
+.L650:
+ .align 2
+.L649:
+ .word .LANCHOR0
+ .fnend
+ .size ftl_sb_update_avl_pages, .-ftl_sb_update_avl_pages
+ .align 2
+ .global make_superblock
+ .type make_superblock, %function
+make_superblock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, lr}
+ mov r4, r0
+ mov r5, #0
+ ldr r6, .L656
+ strh r5, [r0, #4] @ movhi
+ movw r8, #3844
+ strb r5, [r4, #7]
+ mvn r7, #0
+ b .L652
+.L654:
+ add r3, r6, r5
+ ldrh r1, [r4, #0]
+ add sl, r5, #8
+ add r5, r5, #1
+ ldrb r0, [r3, #3870] @ zero_extendqisi2
+ bl V2P_block
+ mov sl, sl, asl #1
+ uxth r5, r5
+ strh r7, [r4, sl] @ movhi
+ mov r9, r0
+ bl FtlBbmIsBadBlock
+ cmp r0, #0
+ streqh r9, [r4, sl] @ movhi
+ ldreqb r3, [r4, #7] @ zero_extendqisi2
+ addeq r3, r3, #1
+ streqb r3, [r4, #7]
+.L652:
+ ldrh r3, [r6, r8]
+ cmp r3, r5
+ bhi .L654
+ ldr r1, .L656
+ movw r2, #3912
+ ldrb r3, [r4, #7] @ zero_extendqisi2
+ ldrh r2, [r1, r2]
+ mul r3, r2, r3
+ strh r3, [r4, #4] @ movhi
+ mov r3, #0
+ strb r3, [r4, #9]
+ ldr r3, .L656+4
+ ldr r2, [r3, #-1884]
+ cmp r2, #0
+ beq .L655
+ ldrh r1, [r4, #0]
+ ldr r2, [r3, #-2084]
+ mov r3, r1, asl #1
+ ldrh r3, [r2, r3]
+ cmp r3, #59
+ movls r3, #1
+ strlsb r3, [r4, #9]
+.L655:
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L657:
+ .align 2
+.L656:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size make_superblock, .-make_superblock
+ .align 2
+ .global update_multiplier_value
+ .type update_multiplier_value, %function
+update_multiplier_value:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ .save {r3, r4, r5, r6, r7, r8, sl, lr}
+ mov r4, #0
+ mov r7, r0
+ mov r5, r4
+ ldr r6, .L663
+ movw sl, #3844
+ movw r8, #3912
+ b .L659
+.L661:
+ add r3, r6, r5
+ mov r1, r7
+ add r5, r5, #1
+ ldrb r0, [r3, #3870] @ zero_extendqisi2
+ bl V2P_block
+ uxth r5, r5
+ bl FtlBbmIsBadBlock
+ cmp r0, #0
+ ldreqh r3, [r6, r8]
+ addeq r4, r4, r3
+ uxtheq r4, r4
+.L659:
+ ldrh r3, [r6, sl]
+ cmp r3, r5
+ bhi .L661
+ cmp r4, #0
+ beq .L662
+ mov r1, r4
+ mov r0, #32768
+ bl __aeabi_idiv
+ uxth r4, r0
+.L662:
+ ldr r3, .L663+4
+ mov r2, #6
+ mov r0, #0
+ ldr r3, [r3, #-2072]
+ mla r7, r2, r7, r3
+ strh r4, [r7, #4] @ movhi
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, pc}
+.L664:
+ .align 2
+.L663:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size update_multiplier_value, .-update_multiplier_value
+ .align 2
+ .global GetFreeBlockMinEraseCount
+ .type GetFreeBlockMinEraseCount, %function
+GetFreeBlockMinEraseCount:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L668
+ ldr r0, [r3, #-2052]
+ cmp r0, #0
+ bxeq lr
+ ldr r2, [r3, #-2072]
+ rsb r0, r2, r0
+ ldr r2, .L668+4
+ mov r0, r0, asr #1
+ mul r0, r2, r0
+ ldr r2, [r3, #-2084]
+ uxth r0, r0
+ mov r3, r0, asl #1
+ ldrh r0, [r2, r3]
+ bx lr
+.L669:
+ .align 2
+.L668:
+ .word .LANCHOR2
+ .word -1431655765
+ .fnend
+ .size GetFreeBlockMinEraseCount, .-GetFreeBlockMinEraseCount
+ .align 2
+ .global GetFreeBlockMaxEraseCount
+ .type GetFreeBlockMaxEraseCount, %function
+GetFreeBlockMaxEraseCount:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r2, .L677
+ stmfd sp!, {r4, r5, lr}
+ .save {r4, r5, lr}
+ ldr r3, [r2, #-2052]
+ cmp r3, #0
+ beq .L676
+ ldr r1, .L677+4
+ mov ip, #7
+ mov r5, #6
+ movw r4, #65535
+ ldrh r1, [r2, r1]
+ mul r1, ip, r1
+ mov r1, r1, asr #3
+ cmp r0, r1
+ uxthgt r0, r1
+ ldr r1, [r2, #-2072]
+ ldr r2, .L677+8
+ rsb r3, r1, r3
+ mov r3, r3, asr #1
+ mul r3, r2, r3
+ mov r2, #0
+ uxth r3, r3
+ b .L673
+.L675:
+ mul ip, r5, r3
+ ldrh ip, [r1, ip]
+ cmp ip, r4
+ beq .L674
+ add r2, r2, #1
+ mov r3, ip
+ uxth r2, r2
+.L673:
+ cmp r2, r0
+ bne .L675
+.L674:
+ ldr r2, .L677
+ mov r3, r3, asl #1
+ ldr r2, [r2, #-2084]
+ ldrh r0, [r2, r3]
+ ldmfd sp!, {r4, r5, pc}
+.L676:
+ mov r0, r3
+ ldmfd sp!, {r4, r5, pc}
+.L678:
+ .align 2
+.L677:
+ .word .LANCHOR2
+ .word -2048
+ .word -1431655765
+ .fnend
+ .size GetFreeBlockMaxEraseCount, .-GetFreeBlockMaxEraseCount
+ .align 2
+ .global FtlPrintInfo2buf
+ .type FtlPrintInfo2buf, %function
+FtlPrintInfo2buf:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, lr}
+ mov r8, r0
+ ldr r6, .L689
+ add r5, r8, #12
+ .pad #32
+ sub sp, sp, #32
+ ldr r1, .L689+4
+ bl strcpy
+ mov r0, r5
+ ldr r1, .L689+8
+ ldr r2, [r6, #2200]
+ bl sprintf
+ ldr r1, .L689+12
+ ldr r2, [r6, #3928]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+16
+ ldr r3, [r3, #2960]
+ cmp r3, #1
+ add r5, r5, r0
+ bne .L685
+.L680:
+ add r0, sp, #16
+ add r1, sp, #20
+ add r2, sp, #24
+ add r3, sp, #28
+ bl NandcGetTimeCfg
+ ldr r3, [sp, #24]
+ ldr r2, [sp, #16]
+ mov r0, r5
+ ldr r1, .L689+20
+ str r3, [sp, #0]
+ ldr r3, [sp, #28]
+ ldr r4, .L689+24
+ ldr r7, .L689+28
+ str r3, [sp, #4]
+ ldr r3, [sp, #20]
+ bl sprintf
+ ldr r1, .L689+32
+ add r5, r5, r0
+ mov r0, r5
+ add r5, r5, #10
+ bl strcpy
+ ldr r2, [r6, #3972]
+ mov r0, r5
+ ldr r1, .L689+36
+ bl sprintf
+ ldr r1, .L689+40
+ ldr r2, [r4, #-1892]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+44
+ ldr r2, [r4, #-1880]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+48
+ ldr r2, [r4, #-1876]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+52
+ ldr r2, [r4, #-1872]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+56
+ ldr r2, [r4, #-1868]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+60
+ ldr r2, [r4, #-1864]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+64
+ ldr r2, [r4, #-1860]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r2, [r4, #-1856]
+ ldr r1, .L689+68
+ mov r2, r2, lsr #11
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r2, [r4, #-1852]
+ ldr r1, .L689+72
+ mov r2, r2, lsr #11
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+76
+ ldr r2, [r4, #-1848]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+80
+ ldr r2, [r4, #-1844]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ add r5, r5, r0
+ bl FtlBbtCalcTotleCnt
+ movw r2, #3986
+ ldr r1, .L689+84
+ ldrh r2, [r6, r2]
+ mov r3, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+88
+ ldrh r2, [r4, r7]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+92
+ ldr r2, [r4, #-1840]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+96
+ ldr r2, [r4, #-1836]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+100
+ ldr r2, [r4, #-1832]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+104
+ ldr r2, [r4, #-2080]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+108
+ ldr r2, [r4, #-1828]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+112
+ ldr r2, [r4, #-1824]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+116
+ ldr r1, .L689+120
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+124
+ ldr r1, .L689+128
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r2, [r6, #3952]
+ ldr r1, .L689+132
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r2, [r6, #3944]
+ ldr r1, .L689+136
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r2, [r6, #3840]
+ ldr r1, .L689+140
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ movw r3, #4046
+ ldrh r2, [r6, r3]
+ ldr r1, .L689+144
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ movw r3, #3852
+ ldrh r2, [r6, r3]
+ ldr r1, .L689+148
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+152
+ ldr r1, .L689+156
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r2, [r6, #3856]
+ ldr r1, .L689+160
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+164
+ ldr r1, .L689+168
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ movw r3, #3980
+ ldrh r2, [r6, r3]
+ ldr r1, .L689+172
+ ldr r6, .L689+176
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+180
+ ldr r1, .L689+184
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+188
+ ldrb r2, [r4, #-2038] @ zero_extendqisi2
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldrh r2, [r4, r6]
+ ldr r1, .L689+192
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+196
+ ldrb r2, [r4, #-2036] @ zero_extendqisi2
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+200
+ ldr r1, .L689+204
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldrh r3, [r4, r6]
+ ldr r2, [r4, #-2064]
+ add r6, r6, #48
+ ldr r1, .L689+208
+ mov r3, r3, asl #1
+ ldrh r2, [r2, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+212
+ ldr r1, .L689+216
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+220
+ ldrb r2, [r4, #-1990] @ zero_extendqisi2
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldrh r2, [r4, r6]
+ ldr r1, .L689+224
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+228
+ ldrb r2, [r4, #-1988] @ zero_extendqisi2
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+232
+ ldr r1, .L689+236
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldrh r3, [r4, r6]
+ ldr r2, [r4, #-2064]
+ add r6, r6, #240
+ ldr r1, .L689+240
+ mov r3, r3, asl #1
+ ldrh r2, [r2, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+244
+ ldr r1, .L689+248
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+252
+ ldrb r2, [r4, #-1942] @ zero_extendqisi2
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+256
+ ldr r1, .L689+260
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+264
+ ldrb r2, [r4, #-1940] @ zero_extendqisi2
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+268
+ ldr r1, .L689+272
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+276
+ ldr r1, .L689+280
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+284
+ ldrb r2, [r4, #-1750] @ zero_extendqisi2
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+288
+ ldrh r2, [r4, r6]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+292
+ ldrb r2, [r4, #-1748] @ zero_extendqisi2
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+296
+ ldr r1, .L689+300
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, [r4, #-1620]
+ ldr r3, [r4, #-1884]
+ ldr r2, [r4, #-1708]
+ str r1, [sp, #0]
+ ldr r1, [r4, #-1628]
+ orr r2, r3, r2, asl #8
+ str r1, [sp, #4]
+ ldr r1, .L689+304
+ ldr r3, [r4, #-1624]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+308
+ ldr r2, [r4, #-1632]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+312
+ ldr r2, [r4, #-1608]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+316
+ ldr r1, .L689+320
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+324
+ ldr r1, .L689+328
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r1, .L689+332
+ ldr r2, [r4, #-1188]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ ldr r3, .L689+336
+ ldr r1, .L689+340
+ ldrh r2, [r4, r3]
+ add r5, r5, r0
+ mov r0, r5
+ bl sprintf
+ add r5, r5, r0
+ bl GetFreeBlockMinEraseCount
+ ldr r1, .L689+344
+ mov r2, r0
+ mov r0, r5
+ bl sprintf
+ add r5, r5, r0
+ ldrh r0, [r4, r7]
+ bl GetFreeBlockMaxEraseCount
+ ldr r1, .L689+348
+ mov r2, r0
+ mov r0, r5
+ bl sprintf
+ ldrh r3, [r4, r6]
+ movw r2, #65535
+ cmp r3, r2
+ add r5, r5, r0
+ beq .L682
+ ldr r2, [r4, #-2064]
+ mov r3, r3, asl #1
+ mov r0, r5
+ ldr r1, .L689+352
+ ldrh r2, [r2, r3]
+ bl sprintf
+ add r5, r5, r0
+.L682:
+ mov r0, #0
+ ldr r4, .L689+24
+ bl List_get_gc_head_node
+ mov r6, #0
+ movw sl, #65535
+ mov r9, #6
+ uxth r3, r0
+.L684:
+ cmp r3, sl
+ beq .L683
+ ldr r1, [r4, #-2064]
+ mov r2, r3, asl #1
+ mul r7, r9, r3
+ mov r0, r5
+ ldrh r1, [r1, r2]
+ str r1, [sp, #0]
+ ldr r1, [r4, #-2072]
+ add r1, r1, r7
+ ldrh r1, [r1, #4]
+ str r1, [sp, #4]
+ ldr r1, [r4, #-2084]
+ ldrh r2, [r1, r2]
+ ldr r1, .L689+356
+ str r2, [sp, #8]
+ mov r2, r6
+ bl sprintf
+ add r6, r6, #1
+ ldr r3, [r4, #-2072]
+ cmp r6, #16
+ ldrh r3, [r3, r7]
+ add r5, r5, r0
+ bne .L684
+.L683:
+ ldr r6, .L689+24
+ mov r4, #0
+ movw sl, #65535
+ mov r9, #6
+ ldr r2, [r6, #-2052]
+ ldr r3, [r6, #-2072]
+ rsb r3, r3, r2
+ ldr r2, .L689+360
+ mov r3, r3, asr #1
+ mul r3, r2, r3
+ uxth r3, r3
+.L686:
+ cmp r3, sl
+ beq .L685
+ mul r7, r9, r3
+ ldr r2, [r6, #-2072]
+ mov r0, r5
+ add r2, r2, r7
+ ldrh r2, [r2, #4]
+ str r2, [sp, #0]
+ mov r2, r3, asl #1
+ ldr r1, [r6, #-2084]
+ ldrh r2, [r1, r2]
+ ldr r1, .L689+364
+ str r2, [sp, #4]
+ mov r2, r4
+ bl sprintf
+ add r4, r4, #1
+ ldr r3, [r6, #-2072]
+ cmp r4, #4
+ ldrh r3, [r3, r7]
+ add r5, r5, r0
+ bne .L686
+.L685:
+ rsb r0, r8, r5
+ add sp, sp, #32
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L690:
+ .align 2
+.L689:
+ .word .LANCHOR0
+ .word .LC5
+ .word .LC6
+ .word .LC7
+ .word .LANCHOR1
+ .word .LC8
+ .word .LANCHOR2
+ .word -2048
+ .word .LC9
+ .word .LC10
+ .word .LC11
+ .word .LC12
+ .word .LC13
+ .word .LC14
+ .word .LC15
+ .word .LC16
+ .word .LC17
+ .word .LC18
+ .word .LC19
+ .word .LC20
+ .word .LC21
+ .word .LC22
+ .word .LC23
+ .word .LC24
+ .word .LC25
+ .word .LC26
+ .word .LC27
+ .word .LC28
+ .word .LC29
+ .word -1790
+ .word .LC30
+ .word -1792
+ .word .LC31
+ .word .LC32
+ .word .LC33
+ .word .LC34
+ .word .LC35
+ .word .LC36
+ .word -1772
+ .word .LC37
+ .word .LC38
+ .word -1768
+ .word .LC39
+ .word .LC40
+ .word -2044
+ .word -2042
+ .word .LC41
+ .word .LC42
+ .word .LC43
+ .word .LC44
+ .word -2040
+ .word .LC45
+ .word .LC46
+ .word -1994
+ .word .LC47
+ .word .LC48
+ .word .LC49
+ .word .LC50
+ .word -1992
+ .word .LC51
+ .word .LC52
+ .word -1946
+ .word .LC53
+ .word .LC54
+ .word -1948
+ .word .LC55
+ .word .LC56
+ .word -1944
+ .word .LC57
+ .word -1754
+ .word .LC58
+ .word .LC59
+ .word .LC60
+ .word .LC61
+ .word -1752
+ .word .LC62
+ .word .LC63
+ .word .LC64
+ .word .LC65
+ .word -1192
+ .word .LC66
+ .word -1190
+ .word .LC67
+ .word .LC68
+ .word -1184
+ .word .LC69
+ .word .LC70
+ .word .LC71
+ .word .LC72
+ .word .LC73
+ .word -1431655765
+ .word .LC74
+ .fnend
+ .size FtlPrintInfo2buf, .-FtlPrintInfo2buf
+ .align 2
+ .global rknand_proc_ftlread
+ .type rknand_proc_ftlread, %function
+rknand_proc_ftlread:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r4, r0
+ ldr r1, .L692
+ ldr r2, .L692+4
+ bl sprintf
+ add r5, r4, r0
+ mov r0, r5
+ bl FtlPrintInfo2buf
+ add r0, r5, r0
+ rsb r0, r4, r0
+ ldmfd sp!, {r3, r4, r5, pc}
+.L693:
+ .align 2
+.L692:
+ .word .LC75
+ .word .LC76
+ .fnend
+ .size rknand_proc_ftlread, .-rknand_proc_ftlread
+ .align 2
+ .global GetSwlReplaceBlock
+ .type GetSwlReplaceBlock, %function
+GetSwlReplaceBlock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L721
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #20
+ sub sp, sp, #20
+ ldr r1, [r3, #-1832]
+ ldr r2, [r3, #-1824]
+ cmp r1, r2
+ bcs .L695
+ ldr r0, .L721+4
+ movw r1, #3852
+ mov r2, #0
+ str r2, [r3, #-1840]
+ ldrh r1, [r0, r1]
+ ldr r0, [r3, #-2084]
+ b .L696
+.L697:
+ ldrh lr, [r0], #2
+ add r2, r2, #1
+ ldr ip, [r3, #-1840]
+ add ip, lr, ip
+ str ip, [r3, #-1840]
+.L696:
+ cmp r2, r1
+ ldr r4, .L721
+ bcc .L697
+ ldr r5, [r4, #-1840]
+ mov r0, r5
+ bl __aeabi_uidiv
+ ldr r2, .L721+4
+ movw r3, #3902
+ ldrh r1, [r2, r3]
+ str r0, [r4, #-1832]
+ ldr r0, [r4, #-1836]
+ rsb r0, r0, r5
+ bl __aeabi_uidiv
+ str r0, [r4, #-1840]
+ b .L698
+.L695:
+ ldr r2, [r3, #-1828]
+ cmp r1, r2
+ bls .L698
+ add r2, r2, #1
+ ldr r4, .L721+4
+ str r2, [r3, #-1828]
+ movw ip, #3852
+ mov r2, #0
+ b .L699
+.L700:
+ ldr r0, [r3, #-2084]
+ mov r1, r2, asl #1
+ add r2, r2, #1
+ ldrh r5, [r0, r1]
+ add r5, r5, #1
+ strh r5, [r0, r1] @ movhi
+.L699:
+ ldrh r1, [r4, ip]
+ cmp r2, r1
+ bcc .L700
+.L698:
+ ldr r3, .L721
+ ldr r6, [r3, #-1824]
+ ldr r5, [r3, #-1832]
+ add r2, r6, #256
+ cmp r2, r5
+ mov r2, r3
+ bls .L701
+ ldr r1, [r3, #-1828]
+ add r0, r6, #768
+ cmp r0, r1
+ bls .L701
+ ldr r3, [r3, #-1884]
+ cmp r3, #0
+ beq .L719
+ cmp r6, #30
+ bhi .L719
+.L701:
+ ldr r3, .L721+8
+ ldrh r0, [r2, r3]
+ add r0, r0, r0, asl #1
+ ubfx r0, r0, #2, #16
+ bl GetFreeBlockMaxEraseCount
+ add r3, r6, #64
+ cmp r0, r3
+ mov r8, r0
+ bcs .L703
+ cmp r6, #30
+ bhi .L719
+.L703:
+ ldr r2, .L721
+ ldr r3, [r2, #-2068]
+ cmp r3, #0
+ beq .L719
+ movw r7, #65535
+ ldr r1, [r2, #-2072]
+ mov r4, r7
+ ldr r2, [r2, #-2084]
+ mov sl, r7
+ ldr ip, .L721+12
+ mov fp, #6
+ b .L704
+.L707:
+ ldrh r9, [r3, #4]
+ cmp r9, #0
+ beq .L705
+ rsb r3, r1, r3
+ mov r3, r3, asr #1
+ mul r3, ip, r3
+ uxth r3, r3
+ mov r9, r3, asl #1
+ ldrh r9, [r2, r9]
+ cmp r9, r6
+ bls .L716
+ cmp r9, r7
+ movcc r7, r9
+ movcc r4, r3
+.L705:
+ mla r3, fp, r0, r1
+.L704:
+ ldrh r0, [r3, #0]
+ cmp r0, sl
+ bne .L707
+ b .L706
+.L716:
+ mov r4, r3
+.L706:
+ movw r3, #65535
+ cmp r4, r3
+ beq .L702
+ mov sl, r4, asl #1
+ ldr fp, .L721
+ ldrh r9, [r2, sl]
+ cmp r9, r6
+ bls .L708
+ bl GetFreeBlockMinEraseCount
+ cmp r0, r6
+ strhi r7, [fp, #-1824]
+.L708:
+ cmp r9, #29
+ ldr r2, [fp, #-1884]
+ movhi r3, #0
+ movls r3, #1
+ cmp r2, #0
+ moveq r3, #0
+ cmp r3, #0
+ beq .L709
+ add r3, r9, #10
+ cmp r3, r5
+ bls .L710
+ ldr r2, .L721+4
+ movw r3, #3902
+ ldrh r3, [r2, r3]
+ cmp r3, r9
+ bls .L709
+.L710:
+ ldr r6, .L721
+ ldr r3, .L721+16
+ ldrh r3, [r6, r3]
+ cmp r3, #64
+ bls .L709
+ ldr r3, [r6, #-2084]
+ mov r1, r4
+ ldr r0, .L721+20
+ ldrh r2, [r3, sl]
+ bl printk
+ b .L720
+.L709:
+ cmp r9, r5
+ bcs .L719
+ add r3, r9, #128
+ cmp r8, r3
+ ble .L719
+ add r3, r9, #256
+ ldr r6, .L721
+ cmp r3, r5
+ bcc .L711
+ ldr r3, [r6, #-1828]
+ add r9, r9, #768
+ cmp r9, r3
+ bcs .L719
+.L711:
+ ldr r3, [r6, #-2064]
+ mov r1, r4
+ ldr r0, .L721+24
+ mov r2, r5
+ ldrh r3, [r3, sl]
+ str r3, [sp, #0]
+ ldr r3, [r6, #-2084]
+ ldrh r3, [r3, sl]
+ stmib sp, {r3, r8}
+ ldr r3, [r6, #-1828]
+ bl printk
+.L720:
+ mov r3, #1
+ str r3, [r6, #-1180]
+ b .L702
+.L719:
+ movw r4, #65535
+.L702:
+ mov r0, r4
+ add sp, sp, #20
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L722:
+ .align 2
+.L721:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .word -2048
+ .word -1431655765
+ .word -2056
+ .word .LC77
+ .word .LC78
+ .fnend
+ .size GetSwlReplaceBlock, .-GetSwlReplaceBlock
+ .align 2
+ .global free_data_superblock
+ .type free_data_superblock, %function
+free_data_superblock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ movw r2, #65535
+ cmp r0, r2
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ beq .L724
+ ldr r2, .L725
+ mov r3, r0, asl #1
+ mov r1, #0
+ ldr r2, [r2, #-2064]
+ strh r1, [r2, r3] @ movhi
+ bl INSERT_FREE_LIST
+.L724:
+ mov r0, #0
+ ldmfd sp!, {r3, pc}
+.L726:
+ .align 2
+.L725:
+ .word .LANCHOR2
+ .fnend
+ .size free_data_superblock, .-free_data_superblock
+ .align 2
+ .global FtlGcBufInit
+ .type FtlGcBufInit, %function
+FtlGcBufInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r2, .L735
+ mov r3, #0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ movw sl, #3844
+ str r3, [r2, #-1176]
+ mov r8, #12
+ ldr r0, .L735+4
+ mov r7, #1
+ movw r6, #3922
+ movw fp, #3924
+ b .L728
+.L729:
+ mul r1, r8, r3
+ ldr r4, [r2, #-1172]
+ add ip, r4, r1
+ str r7, [ip, #8]
+ ldrh ip, [r0, r6]
+ mul ip, ip, r3
+ add r5, ip, #3
+ cmp ip, #0
+ movlt ip, r5
+ ldr r5, [r2, #-1168]
+ bic ip, ip, #3
+ add ip, r5, ip
+ str ip, [r4, r1]
+ ldrh ip, [r0, fp]
+ ldr r9, [r2, #-1172]
+ mul ip, ip, r3
+ add r4, r9, r1
+ add r5, ip, #3
+ cmp ip, #0
+ movlt ip, r5
+ ldr r5, [r2, #-1164]
+ bic ip, ip, #3
+ add ip, r5, ip
+ str ip, [r4, #4]
+ ldr ip, [r2, #-1160]
+ mov r5, #36
+ ldr r1, [r9, r1]
+ mla ip, r5, r3, ip
+ add r3, r3, #1
+ uxth r3, r3
+ str r1, [ip, #8]
+ ldr r1, [r4, #4]
+ str r1, [ip, #12]
+.L728:
+ ldrh r1, [r0, sl]
+ cmp r3, r1
+ bcc .L729
+ b .L734
+.L731:
+ mul r2, r8, r1
+ ldr r4, [r3, #-1172]
+ add r0, r4, r2
+ str r7, [r0, #8]
+ ldrh r0, [ip, r6]
+ mul r0, r0, r1
+ add sl, r0, #3
+ cmp r0, #0
+ movlt r0, sl
+ ldr sl, [r3, #-1168]
+ bic r0, r0, #3
+ add r0, sl, r0
+ str r0, [r4, r2]
+ ldr r0, [r3, #-1172]
+ add r0, r0, r2
+ ldrh r2, [ip, r5]
+ mul r2, r2, r1
+ add r1, r1, #1
+ uxth r1, r1
+ add r4, r2, #3
+ cmp r2, #0
+ movlt r2, r4
+ ldr r4, [r3, #-1164]
+ bic r2, r2, #3
+ add r2, r4, r2
+ str r2, [r0, #4]
+ b .L733
+.L734:
+ ldr r3, .L735
+ mov r8, #12
+ ldr ip, .L735+4
+ mov r7, #0
+ movw r6, #3922
+ movw r5, #3924
+.L733:
+ ldr r2, [r3, #-1156]
+ cmp r1, r2
+ bcc .L731
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L736:
+ .align 2
+.L735:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .fnend
+ .size FtlGcBufInit, .-FtlGcBufInit
+ .align 2
+ .global FtlGcBufFree
+ .type FtlGcBufFree, %function
+FtlGcBufFree:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L744
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r5, #36
+ ldr r6, [r3, #-1156]
+ mov fp, #12
+ ldr ip, [r3, #-1172]
+ mov r3, #0
+ mov r4, r3
+ b .L738
+.L741:
+ mul sl, fp, r2
+ add r8, ip, sl
+ ldr r9, [ip, sl]
+ ldr sl, [r7, #8]
+ cmp r9, sl
+ streq r4, [r8, #8]
+ beq .L740
+.L739:
+ add r2, r2, #1
+ uxth r2, r2
+.L743:
+ cmp r2, r6
+ bcc .L741
+.L740:
+ add r3, r3, #1
+ uxth r3, r3
+.L738:
+ cmp r3, r1
+ ldmcsfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+ mla r7, r5, r3, r0
+ mov r2, #0
+ b .L743
+.L745:
+ .align 2
+.L744:
+ .word .LANCHOR2
+ .fnend
+ .size FtlGcBufFree, .-FtlGcBufFree
+ .align 2
+ .global FtlGcBufAlloc
+ .type FtlGcBufAlloc, %function
+FtlGcBufAlloc:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L753
+ stmfd sp!, {r4, r5, r6, r7, r8, sl, lr}
+ .save {r4, r5, r6, r7, r8, sl, lr}
+ mov r6, #12
+ ldr r8, [r3, #-1156]
+ mov r5, #1
+ ldr r7, [r3, #-1172]
+ mov r4, #36
+ mov r3, #0
+ b .L747
+.L750:
+ mla ip, r6, r2, r7
+ ldr sl, [ip, #8]
+ cmp sl, #0
+ bne .L748
+ mla r2, r4, r3, r0
+ ldr sl, [ip, #0]
+ str r5, [ip, #8]
+ str sl, [r2, #8]
+ ldr ip, [ip, #4]
+ str ip, [r2, #12]
+ b .L749
+.L748:
+ add r2, r2, #1
+ uxth r2, r2
+ b .L751
+.L752:
+ mov r2, #0
+.L751:
+ cmp r2, r8
+ bcc .L750
+.L749:
+ add r3, r3, #1
+ uxth r3, r3
+.L747:
+ cmp r3, r1
+ bcc .L752
+ ldmfd sp!, {r4, r5, r6, r7, r8, sl, pc}
+.L754:
+ .align 2
+.L753:
+ .word .LANCHOR2
+ .fnend
+ .size FtlGcBufAlloc, .-FtlGcBufAlloc
+ .align 2
+ .global IsBlkInGcList
+ .type IsBlkInGcList, %function
+IsBlkInGcList:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L760
+ ldr r2, .L760+4
+ ldrh r1, [r3, r2]
+ ldr r2, [r3, #-1148]
+ mov r3, #0
+ b .L756
+.L758:
+ ldrh ip, [r2], #2
+ cmp ip, r0
+ beq .L759
+ add r3, r3, #1
+ uxth r3, r3
+.L756:
+ cmp r3, r1
+ bne .L758
+ mov r0, #0
+ bx lr
+.L759:
+ mov r0, #1
+ bx lr
+.L761:
+ .align 2
+.L760:
+ .word .LANCHOR2
+ .word -1152
+ .fnend
+ .size IsBlkInGcList, .-IsBlkInGcList
+ .align 2
+ .global FtlGcUpdatePage
+ .type FtlGcUpdatePage, %function
+FtlGcUpdatePage:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r4, r0
+ ubfx r0, r0, #10, #16
+ mov r5, r1
+ mov r6, r2
+ bl P2V_block_in_plane
+ ldr r3, .L766
+ ldr r2, .L766+4
+ ldrh ip, [r3, r2]
+ ldr r2, [r3, #-1148]
+ mov r3, #0
+ mov r1, r2
+ b .L763
+.L765:
+ ldrh r7, [r1], #2
+ cmp r7, r0
+ beq .L764
+ add r3, r3, #1
+ uxth r3, r3
+.L763:
+ cmp r3, ip
+ bne .L765
+ mov r3, r3, asl #1
+ strh r0, [r2, r3] @ movhi
+ ldr r2, .L766
+ ldr r3, .L766+4
+ ldrh r1, [r2, r3]
+ add r1, r1, #1
+ strh r1, [r2, r3] @ movhi
+.L764:
+ ldr r3, .L766
+ mov r0, #12
+ ldr r2, .L766+8
+ ldrh r1, [r3, r2]
+ mul r1, r0, r1
+ ldr r0, [r3, #-1144]
+ add ip, r0, r1
+ stmib ip, {r5, r6}
+ str r4, [r0, r1]
+ ldrh r1, [r3, r2]
+ add r1, r1, #1
+ strh r1, [r3, r2] @ movhi
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L767:
+ .align 2
+.L766:
+ .word .LANCHOR2
+ .word -1152
+ .word -1140
+ .fnend
+ .size FtlGcUpdatePage, .-FtlGcUpdatePage
+ .align 2
+ .global FtlGcRefreshBlock
+ .type FtlGcRefreshBlock, %function
+FtlGcRefreshBlock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r4, r0
+ mov r1, r4
+ ldr r0, .L772
+ bl printk
+ ldr r3, .L772+4
+ ldr r2, .L772+8
+ movw r1, #65535
+ ldrh r0, [r3, r2]
+ cmp r0, r1
+ beq .L771
+.L769:
+ ldr r2, .L772+12
+ ldrh r0, [r3, r2]
+ cmp r0, r1
+ bne .L770
+.L771:
+ strh r4, [r3, r2] @ movhi
+.L770:
+ mov r0, #0
+ ldmfd sp!, {r4, pc}
+.L773:
+ .align 2
+.L772:
+ .word .LC79
+ .word .LANCHOR2
+ .word -1138
+ .word -1136
+ .fnend
+ .size FtlGcRefreshBlock, .-FtlGcRefreshBlock
+ .align 2
+ .global FtlGcMarkBadPhyBlk
+ .type FtlGcMarkBadPhyBlk, %function
+FtlGcMarkBadPhyBlk:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r4, r0
+ bl P2V_block_in_plane
+ ldr r5, .L779
+ mov r2, r4
+ ldr r7, .L779+4
+ ldrh r1, [r5, r7]
+ mov r6, r0
+ ldr r0, .L779+8
+ bl printk
+ mov r0, r6
+ bl FtlGcRefreshBlock
+ ldr r3, [r5, #-1884]
+ cmp r3, #0
+ beq .L775
+ ldr r3, [r5, #-2084]
+ mov r6, r6, asl #1
+ ldrh r2, [r3, r6]
+ cmp r2, #29
+ subhi r2, r2, #30
+ strhih r2, [r3, r6] @ movhi
+.L775:
+ ldrh r1, [r5, r7]
+ mov r3, #0
+ ldr r2, .L779+12
+ b .L776
+.L778:
+ ldrh r0, [r2, #2]!
+ cmp r0, r4
+ beq .L777
+ add r3, r3, #1
+ uxth r3, r3
+.L776:
+ cmp r3, r1
+ bne .L778
+ cmp r3, #15
+ bhi .L777
+ ldr r2, .L779
+ ldr r1, .L779+16
+ add r0, r2, r3, asl #1
+ add r3, r3, #1
+ strh r4, [r0, r1] @ movhi
+ sub r1, r1, #2
+ strh r3, [r2, r1] @ movhi
+.L777:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L780:
+ .align 2
+.L779:
+ .word .LANCHOR2
+ .word -1134
+ .word .LC80
+ .word .LANCHOR2-1134
+ .word -1132
+ .fnend
+ .size FtlGcMarkBadPhyBlk, .-FtlGcMarkBadPhyBlk
+ .align 2
+ .global FtlGcReFreshBadBlk
+ .type FtlGcReFreshBadBlk, %function
+FtlGcReFreshBadBlk:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ ldr r2, .L784
+ ldr r3, .L784+4
+ ldrh r2, [r3, r2]
+ cmp r2, #0
+ beq .L782
+ ldr r1, .L784+8
+ ldrh r0, [r3, r1]
+ movw r1, #65535
+ cmp r0, r1
+ bne .L782
+ ldr r4, .L784+12
+ ldr r5, .L784+4
+ ldrh r1, [r3, r4]
+ cmp r1, r2
+ movcs r2, #0
+ strcsh r2, [r3, r4] @ movhi
+ ldrh r2, [r5, r4]
+ ldr r3, .L784+16
+ add r2, r5, r2, asl #1
+ ldrh r0, [r2, r3]
+ bl P2V_block_in_plane
+ bl FtlGcRefreshBlock
+ ldrh r3, [r5, r4]
+ add r3, r3, #1
+ strh r3, [r5, r4] @ movhi
+.L782:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, pc}
+.L785:
+ .align 2
+.L784:
+ .word -1134
+ .word .LANCHOR2
+ .word -1138
+ .word -1098
+ .word -1132
+ .fnend
+ .size FtlGcReFreshBadBlk, .-FtlGcReFreshBadBlk
+ .align 2
+ .global ftl_memset
+ .type ftl_memset, %function
+ftl_memset:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ cmp r2, #0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r4, r0
+ beq .L787
+ bl memset
+.L787:
+ mov r0, r4
+ ldmfd sp!, {r4, pc}
+ .fnend
+ .size ftl_memset, .-ftl_memset
+ .align 2
+ .global FtlGcPageVarInit
+ .type FtlGcPageVarInit, %function
+FtlGcPageVarInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r3, #0
+ ldr r4, .L789
+ movw r5, #3916
+ ldr r2, .L789+4
+ mov r1, #255
+ ldr r6, .L789+8
+ ldr r0, [r4, #-1148]
+ strh r3, [r4, r2] @ movhi
+ add r2, r2, #12
+ strh r3, [r4, r2] @ movhi
+ ldrh r2, [r6, r5]
+ mov r2, r2, asl #1
+ bl ftl_memset
+ ldrh r3, [r6, r5]
+ mov r2, #12
+ ldr r0, [r4, #-1144]
+ mov r1, #255
+ mul r2, r2, r3
+ bl ftl_memset
+ ldmfd sp!, {r4, r5, r6, lr}
+ b FtlGcBufInit
+.L790:
+ .align 2
+.L789:
+ .word .LANCHOR2
+ .word -1152
+ .word .LANCHOR0
+ .fnend
+ .size FtlGcPageVarInit, .-FtlGcPageVarInit
+ .align 2
+ .global SupperBlkListInit
+ .type SupperBlkListInit, %function
+SupperBlkListInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ movw r3, #3854
+ ldr r7, .L800
+ mov r2, #6
+ ldr r4, .L800+4
+ mov r1, #0
+ mov r6, #0
+ ldrh r3, [r7, r3]
+ mov sl, r6
+ ldr r0, [r4, #-2072]
+ mul r2, r2, r3
+ bl ftl_memset
+ ldr r3, .L800+8
+ str r6, [r4, #-2052]
+ str r6, [r4, #-2068]
+ strh r6, [r4, r3] @ movhi
+ add r3, r3, #8
+ str r6, [r4, #-2060]
+ strh r6, [r4, r3] @ movhi
+ mov r4, r6
+ b .L792
+.L794:
+ add r3, r7, r8
+ mov r1, r4
+ add r8, r8, #1
+ ldrb r0, [r3, #3870] @ zero_extendqisi2
+ bl V2P_block
+ uxth r8, r8
+ bl FtlBbmIsBadBlock
+ cmp r0, #0
+ ldreqh r3, [r7, r9]
+ addeq r5, r5, r3
+ uxtheq r5, r5
+ b .L798
+.L799:
+ mov r5, #0
+ movw fp, #3844
+ mov r8, r5
+ movw r9, #3912
+.L798:
+ ldrh r3, [r7, fp]
+ cmp r3, r8
+ bhi .L794
+ cmp r5, #0
+ beq .L795
+ mov r1, r5
+ mov r0, #32768
+ bl __aeabi_idiv
+ uxth r5, r0
+.L795:
+ ldr r3, .L800+4
+ mov r1, #6
+ ldr r2, [r3, #-2072]
+ mla r2, r1, r4, r2
+ strh r5, [r2, #4] @ movhi
+ ldr r2, .L800+12
+ ldrh r2, [r3, r2]
+ cmp r2, r4
+ beq .L796
+ ldr r2, .L800+16
+ ldrh r2, [r3, r2]
+ cmp r2, r4
+ beq .L796
+ ldr r2, .L800+20
+ ldrh r2, [r3, r2]
+ cmp r2, r4
+ beq .L796
+ ldr r2, [r3, #-2064]
+ mov r3, r4, asl #1
+ ldrh r3, [r2, r3]
+ cmp r3, #0
+ bne .L797
+ add r6, r6, #1
+ mov r0, r4
+ uxth r6, r6
+ bl INSERT_FREE_LIST
+ b .L796
+.L797:
+ add sl, sl, #1
+ mov r0, r4
+ uxth sl, sl
+ bl INSERT_DATA_LIST
+.L796:
+ add r4, r4, #1
+ uxth r4, r4
+.L792:
+ movw r2, #3852
+ ldrh r3, [r7, r2]
+ cmp r3, r4
+ bhi .L799
+ ldr r3, .L800+4
+ mov r0, #0
+ ldr r2, .L800+8
+ strh sl, [r3, r2] @ movhi
+ add r2, r2, #8
+ strh r6, [r3, r2] @ movhi
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L801:
+ .align 2
+.L800:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -2056
+ .word -2044
+ .word -1996
+ .word -1948
+ .fnend
+ .size SupperBlkListInit, .-SupperBlkListInit
+ .align 2
+ .global FtlL2PDataInit
+ .type FtlL2PDataInit, %function
+FtlL2PDataInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ .save {r3, r4, r5, r6, r7, r8, sl, lr}
+ mov r1, #0
+ ldr r4, .L805
+ movw r6, #3922
+ ldr r5, .L805+4
+ movw r7, #3950
+ mov r8, #12
+ ldr r2, [r4, #3940]
+ ldr r0, [r5, #-1096]
+ mov r2, r2, asl #1
+ bl ftl_memset
+ ldrh r3, [r4, r6]
+ ldrh r2, [r4, r7]
+ mov r1, #255
+ ldr r0, [r5, #-1092]
+ mul r2, r2, r3
+ bl ftl_memset
+ mov r2, #0
+ mov ip, r2
+ mvn r0, #0
+ b .L803
+.L804:
+ mul r3, r8, r2
+ ldr r1, [r5, #-1900]
+ add sl, r1, r3
+ str ip, [sl, #4]
+ strh r0, [r1, r3] @ movhi
+ ldr r1, [r5, #-1900]
+ ldr sl, [r5, #-1092]
+ add r3, r1, r3
+ ldrh r1, [r4, r6]
+ mul r1, r2, r1
+ add r2, r2, #1
+ uxth r2, r2
+ bic r1, r1, #3
+ add r1, sl, r1
+ str r1, [r3, #8]
+.L803:
+ ldrh r3, [r4, r7]
+ ldr r1, .L805
+ cmp r3, r2
+ ldr r3, .L805+4
+ bhi .L804
+ ldr r0, .L805+8
+ mvn r2, #0
+ strh r2, [r3, r0] @ movhi
+ ldr r0, .L805+12
+ strh r2, [r3, r0] @ movhi
+ ldr r0, [r1, #3940]
+ ldr r2, .L805+16
+ strh r0, [r3, r2] @ movhi
+ sub r2, r2, #6
+ ldr r0, .L805+20
+ strh r0, [r3, r2] @ movhi
+ add r2, r2, #36
+ ldrh r0, [r3, r2]
+ sub r2, r2, #32
+ strh r0, [r3, r2] @ movhi
+ movw r2, #3948
+ ldrh r1, [r1, r2]
+ ldr r2, .L805+24
+ strh r1, [r3, r2] @ movhi
+ ldr r2, [r3, #-1044]
+ str r2, [r3, #-1076]
+ ldr r2, [r3, #-1040]
+ str r2, [r3, #-1072]
+ ldr r2, [r3, #-1096]
+ str r2, [r3, #-1068]
+ ldr r2, [r3, #-1036]
+ str r2, [r3, #-1064]
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, pc}
+.L806:
+ .align 2
+.L805:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -1086
+ .word -1088
+ .word -1078
+ .word -3902
+ .word -1082
+ .fnend
+ .size FtlL2PDataInit, .-FtlL2PDataInit
+ .align 2
+ .global ftl_free_no_use_map_blk
+ .type ftl_free_no_use_map_blk, %function
+ftl_free_no_use_map_blk:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r4, r0
+ ldrh r2, [r0, #10]
+ mov r1, #0
+ ldr r5, [r0, #20]
+ ldr r6, [r0, #12]
+ ldr r7, [r0, #24]
+ mov r2, r2, asl #1
+ mov r0, r5
+ bl ftl_memset
+ mov r3, #0
+ b .L808
+.L812:
+ ldr r0, [r7, r3, asl #2]
+ mov r2, #0
+ ubfx r0, r0, #10, #16
+ b .L809
+.L811:
+ mov r1, r2, asl #1
+ add r2, r2, #1
+ ldrh ip, [r6, r1]
+ uxth r2, r2
+ cmp ip, r0
+ ldreqh ip, [r5, r1]
+ addeq ip, ip, #1
+ streqh ip, [r5, r1] @ movhi
+.L809:
+ ldrh r1, [r4, #10]
+ cmp r1, r2
+ bhi .L811
+ add r3, r3, #1
+ uxth r3, r3
+.L808:
+ ldrh r2, [r4, #6]
+ cmp r2, r3
+ bhi .L812
+ mov sl, #0
+ ldrh fp, [r5, #0]
+ mov r7, sl
+ ldr r3, .L818
+ movw r2, #3914
+ b .L813
+.L817:
+ ldrh r1, [r4, #0]
+ cmp r1, r7
+ bne .L814
+ ldrh r0, [r4, #2]
+ ldrh r1, [r3, r2]
+ cmp r0, r1
+ movcc r0, r7, asl #1
+ strcch r1, [r5, r0] @ movhi
+.L814:
+ mov r9, r7, asl #1
+ ldrh r8, [r5, r9]
+ cmp fp, r8
+ movhi sl, r7
+ movhi fp, r8
+ cmp r8, #0
+ bne .L816
+ ldrh r0, [r6, r9]
+ cmp r0, #0
+ beq .L816
+ mov r1, #1
+ stmia sp, {r2, r3}
+ bl FtlFreeSysBlkQueueIn
+ strh r8, [r6, r9] @ movhi
+ ldmia sp, {r2, r3}
+ ldrh r1, [r4, #8]
+ sub r1, r1, #1
+ strh r1, [r4, #8] @ movhi
+.L816:
+ add r7, r7, #1
+ uxth r7, r7
+.L813:
+ ldrh r1, [r4, #10]
+ cmp r1, r7
+ bhi .L817
+ mov r0, sl
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L819:
+ .align 2
+.L818:
+ .word .LANCHOR0
+ .fnend
+ .size ftl_free_no_use_map_blk, .-ftl_free_no_use_map_blk
+ .align 2
+ .global FtlFreeSysBlkQueueInit
+ .type FtlFreeSysBlkQueueInit, %function
+FtlFreeSysBlkQueueInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L821
+ movw r2, #4042
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r4, #0
+ strh r4, [r3, r2] @ movhi
+ add r2, r2, #2
+ mov r1, r4
+ strh r4, [r3, r2] @ movhi
+ add r2, r2, #2
+ strh r4, [r3, r2] @ movhi
+ movw r2, #4040
+ strh r0, [r3, r2] @ movhi
+ add r0, r3, #4048
+ mov r2, #2048
+ bl ftl_memset
+ mov r0, r4
+ ldmfd sp!, {r4, pc}
+.L822:
+ .align 2
+.L821:
+ .word .LANCHOR0
+ .fnend
+ .size FtlFreeSysBlkQueueInit, .-FtlFreeSysBlkQueueInit
+ .align 2
+ .global FtlBbtMemInit
+ .type FtlBbtMemInit, %function
+FtlBbtMemInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L824
+ movw r2, #3980
+ mvn r1, #0
+ ldr r0, .L824+4
+ strh r1, [r3, r2] @ movhi
+ add r2, r2, #6
+ mov r1, #0
+ strh r1, [r3, r2] @ movhi
+ mov r1, #255
+ mov r2, #16
+ b ftl_memset
+.L825:
+ .align 2
+.L824:
+ .word .LANCHOR0
+ .word .LANCHOR0+3992
+ .fnend
+ .size FtlBbtMemInit, .-FtlBbtMemInit
+ .align 2
+ .global FtlBbt2Bitmap
+ .type FtlBbt2Bitmap, %function
+FtlBbt2Bitmap:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L830
+ ldr r2, .L830+4
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r5, r0
+ ldrh r2, [r2, r3]
+ mov r0, r1
+ mov r4, r1
+ mov r1, #0
+ mov r2, r2, asl #2
+ bl ftl_memset
+ mov r3, #0
+ movw ip, #65535
+ mov r0, #1
+.L828:
+ ldrh r2, [r5, r3]
+ cmp r2, ip
+ ldmeqfd sp!, {r4, r5, r6, pc}
+ mov r1, r2, lsr #5
+ add r3, r3, #2
+ cmp r3, #1024
+ and r2, r2, #31
+ ldr r6, [r4, r1, asl #2]
+ orr r2, r6, r0, asl r2
+ str r2, [r4, r1, asl #2]
+ bne .L828
+ ldmfd sp!, {r4, r5, r6, pc}
+.L831:
+ .align 2
+.L830:
+ .word -1032
+ .word .LANCHOR2
+ .fnend
+ .size FtlBbt2Bitmap, .-FtlBbt2Bitmap
+ .align 2
+ .global FtlVariablesInit
+ .type FtlVariablesInit, %function
+FtlVariablesInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mvn r3, #0
+ ldr r5, .L833
+ mov r4, #0
+ ldr r2, .L833+4
+ mov r1, r4
+ ldr r6, .L833+8
+ movw r7, #3854
+ str r3, [r5, #-1012]
+ strh r3, [r5, r2] @ movhi
+ movw r3, #3956
+ strh r4, [r6, r3] @ movhi
+ movw r3, #3932
+ ldrh r2, [r6, r3]
+ ldr r0, [r6, #3960]
+ str r4, [r5, #-1028]
+ mov r2, r2, asl #1
+ str r4, [r5, #-1020]
+ str r4, [r5, #-1016]
+ str r4, [r5, #-1884]
+ bl ftl_memset
+ ldrh r2, [r6, r7]
+ mov r1, r4
+ ldr r0, [r5, #-2084]
+ mov r2, r2, asl #1
+ bl ftl_memset
+ ldrh r2, [r6, r7]
+ mov r1, r4
+ ldr r0, [r5, #-1008]
+ mov r2, r2, asl #1
+ bl ftl_memset
+ mov r1, r4
+ mov r2, #48
+ ldr r0, .L833+12
+ bl ftl_memset
+ mov r1, r4
+ mov r2, #512
+ ldr r0, .L833+16
+ bl ftl_memset
+ bl FtlGcBufInit
+ bl FtlL2PDataInit
+ mov r0, r4
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L834:
+ .align 2
+.L833:
+ .word .LANCHOR2
+ .word -1024
+ .word .LANCHOR0
+ .word .LANCHOR2-1820
+ .word .LANCHOR2-1704
+ .fnend
+ .size FtlVariablesInit, .-FtlVariablesInit
+ .align 2
+ .global FtlMemInit
+ .type FtlMemInit, %function
+FtlMemInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, lr}
+ movw r3, #65535
+ ldr r4, .L866
+ mov r6, #0
+ ldr r2, .L866+4
+ mov r0, #1024
+ ldr r5, .L866+8
+ mov r7, #12
+ str r3, [r4, #-996]
+ mvn r3, #0
+ strh r3, [r4, r2] @ movhi
+ add r2, r2, #2
+ str r6, [r4, #-1004]
+ movw sl, #3844
+ strh r3, [r4, r2] @ movhi
+ mov r2, #32
+ ldr r3, .L866+12
+ mov r8, #36
+ str r6, [r4, #-1708]
+ str r6, [r4, #-1848]
+ strh r2, [r4, r3] @ movhi
+ add r3, r3, #2
+ mov r2, #128
+ str r6, [r4, #-1844]
+ strh r2, [r4, r3] @ movhi
+ add r3, r3, #6
+ str r6, [r4, #-1860]
+ strh r6, [r4, r3] @ movhi
+ add r3, r3, #50
+ str r6, [r4, #-1872]
+ strh r6, [r4, r3] @ movhi
+ add r3, r3, #36
+ str r6, [r4, #-1876]
+ strh r6, [r4, r3] @ movhi
+ movw r3, #3918
+ ldrh r1, [r5, r3]
+ str r6, [r4, #-1868]
+ str r6, [r4, #-1864]
+ str r6, [r4, #-1880]
+ str r6, [r4, #-1840]
+ str r6, [r4, #-1836]
+ str r6, [r4, #-2080]
+ str r6, [r4, #-1828]
+ str r6, [r4, #-1824]
+ str r6, [r4, #-1000]
+ str r6, [r4, #-1180]
+ str r6, [r4, #-992]
+ str r6, [r4, #-1188]
+ str r6, [r5, #3976]
+ bl __aeabi_idiv
+ movw r3, #3844
+ ldrh r3, [r5, r3]
+ str r6, [r5, #3964]
+ movw r6, #3916
+ mov r3, r3, asl #2
+ cmp r0, r3
+ str r0, [r4, #-988]
+ ldrh r0, [r5, r6]
+ strhi r3, [r4, #-988]
+ ldr r4, .L866
+ mov r0, r0, asl #1
+ bl ftl_malloc
+ str r0, [r4, #-1148]
+ ldrh r0, [r5, r6]
+ mul r0, r7, r0
+ bl ftl_malloc
+ ldrh r6, [r5, sl]
+ mul r6, r8, r6
+ mov r9, r6, asl #3
+ str r0, [r4, #-1144]
+ mov r0, r9
+ bl ftl_malloc
+ str r0, [r4, #-984]
+ mov r0, r6
+ bl ftl_malloc
+ str r0, [r4, #-980]
+ mov r0, r9
+ bl ftl_malloc
+ str r0, [r4, #-976]
+ mov r0, r6
+ bl ftl_malloc
+ str r0, [r4, #-2088]
+ mov r0, r6
+ bl ftl_malloc
+ str r0, [r4, #-1160]
+ ldr r0, [r4, #-988]
+ mul r0, r8, r0
+ bl ftl_malloc
+ movw r8, #3922
+ ldrh r3, [r5, sl]
+ ldrh r6, [r5, r8]
+ mov r3, r3, asl #1
+ add r3, r3, #1
+ str r3, [r4, #-1156]
+ str r0, [r5, #3968]
+ mov r0, r6
+ bl ftl_malloc
+ str r0, [r4, #-2076]
+ mov r0, r6
+ bl ftl_malloc
+ str r0, [r4, #-972]
+ mov r0, r6
+ bl ftl_malloc
+ str r0, [r4, #-968]
+ ldr r0, [r4, #-1156]
+ mul r0, r0, r6
+ bl ftl_malloc
+ str r0, [r4, #-1168]
+ ldr r0, [r4, #-988]
+ mul r0, r0, r6
+ bl ftl_malloc
+ str r0, [r4, #-964]
+ mov r0, r6
+ bl ftl_malloc
+ str r0, [r4, #-960]
+ mov r0, r6
+ bl ftl_malloc
+ movw r6, #3924
+ str r0, [r4, #-956]
+ ldr r0, [r4, #-1156]
+ mul r0, r7, r0
+ bl ftl_malloc
+ ldrh r3, [r5, r6]
+ ldrh sl, [r5, sl]
+ mul sl, sl, r3
+ str r0, [r4, #-1172]
+ mov r0, sl
+ bl ftl_malloc
+ str r0, [r4, #-952]
+ mov r0, sl, asl #3
+ bl ftl_malloc
+ ldrh r3, [r5, r6]
+ ldr sl, .L866+16
+ str r0, [r4, #-948]
+ ldr r0, [r4, #-1156]
+ mul r0, r0, r3
+ bl ftl_malloc
+ ldrh r3, [r5, r6]
+ movw r6, #3854
+ str r0, [r4, #-1164]
+ ldr r0, [r4, #-988]
+ mul r0, r0, r3
+ bl ftl_malloc
+ str r0, [r4, #-944]
+ ldrh r0, [r5, r6]
+ mov r0, r0, asl #1
+ uxth r0, r0
+ strh r0, [r4, sl] @ movhi
+ bl ftl_malloc
+ str r0, [r4, #-1008]
+ ldrh r0, [r4, sl]
+ add r0, r0, #544
+ add r0, r0, #3
+ mov r0, r0, lsr #9
+ strh r0, [r4, sl] @ movhi
+ mov r0, r0, asl #9
+ bl ftl_malloc
+ ldrh sl, [r5, r6]
+ mov sl, sl, asl #1
+ str r0, [r4, #-936]
+ add r0, r0, #32
+ str r0, [r4, #-2084]
+ mov r0, sl
+ bl ftl_malloc
+ str r0, [r4, #-932]
+ mov r0, sl
+ bl ftl_malloc
+ ldr sl, [r5, #3940]
+ mov sl, sl, asl #1
+ str r0, [r4, #-2064]
+ mov r0, sl
+ bl ftl_malloc
+ str r0, [r4, #-1044]
+ mov r0, sl
+ bl ftl_malloc
+ movw sl, #3932
+ str r0, [r4, #-1096]
+ ldrh r0, [r5, r6]
+ mov r0, r0, lsr #3
+ add r0, r0, #4
+ bl ftl_malloc
+ str r0, [r4, #-1888]
+ ldrh r0, [r5, sl]
+ mov r0, r0, asl #1
+ bl ftl_malloc
+ str r0, [r5, #3960]
+ ldrh r0, [r5, sl]
+ mov r0, r0, asl #1
+ bl ftl_malloc
+ str r0, [r4, #-928]
+ ldrh r0, [r5, sl]
+ add sl, sl, #2
+ mov r0, r0, asl #2
+ bl ftl_malloc
+ str r0, [r4, #-924]
+ ldrh r0, [r5, sl]
+ mov r0, r0, asl #2
+ bl ftl_malloc
+ ldrh r2, [r5, sl]
+ mov r1, #0
+ add sl, sl, #16
+ mov r2, r2, asl #2
+ str r0, [r4, #-920]
+ bl ftl_memset
+ movw r3, #3948
+ ldrh r0, [r5, r3]
+ mov r0, r0, asl #2
+ bl ftl_malloc
+ str r0, [r4, #-1036]
+ ldr r0, [r5, #3940]
+ mov r0, r0, asl #2
+ bl ftl_malloc
+ str r0, [r4, #-1040]
+ ldrh r0, [r5, sl]
+ mul r0, r7, r0
+ bl ftl_malloc
+ ldrh r3, [r5, sl]
+ movw r7, #3866
+ str r0, [r4, #-1900]
+ ldrh r0, [r5, r8]
+ mul r0, r0, r3
+ bl ftl_malloc
+ ldrh r3, [r5, r6]
+ ldr r6, .L866+20
+ str r0, [r4, #-1092]
+ mov r0, #6
+ mul r0, r0, r3
+ bl ftl_malloc
+ movw r3, #3908
+ ldrh r3, [r5, r3]
+ ldrh r2, [r5, r7]
+ add r3, r3, #31
+ mov r3, r3, lsr #5
+ strh r3, [r4, r6] @ movhi
+ mul r3, r2, r3
+ str r0, [r4, #-2072]
+ mov r0, r3, asl #2
+ bl ftl_malloc
+ ldrh r1, [r4, r6]
+ mov r3, #1
+ ldr ip, .L866+8
+ mov r1, r1, asl #2
+ mov r2, r1
+ str r0, [r5, #4008]
+ ldrh r5, [r5, r7]
+ ldr r0, .L866+24
+ b .L837
+.L838:
+ ldr r4, [ip, #4008]
+ add r3, r3, #1
+ add r4, r4, r2
+ add r2, r2, r1
+ str r4, [r0, #4]!
+.L837:
+ cmp r3, r5
+ bcc .L838
+ ldr r0, .L866+28
+ mov r2, #0
+ mov r1, r2
+ add r0, r0, r3, asl #2
+ b .L839
+.L840:
+ add ip, r0, r2
+ add r3, r3, #1
+ add r2, r2, #4
+ str r1, [ip, #28]
+.L839:
+ cmp r3, #7
+ bls .L840
+ ldr r3, .L866
+ ldr r2, [r3, #-1044]
+ cmp r2, #0
+ beq .L865
+.L841:
+ ldr r2, [r3, #-1096]
+ cmp r2, #0
+ beq .L865
+.L843:
+ ldr r2, [r3, #-1036]
+ cmp r2, #0
+ beq .L865
+.L844:
+ ldr r2, [r3, #-1040]
+ cmp r2, #0
+ beq .L865
+.L845:
+ ldr r2, [r3, #-1900]
+ cmp r2, #0
+ beq .L865
+.L846:
+ ldr r2, [r3, #-1092]
+ cmp r2, #0
+ beq .L865
+.L847:
+ ldr r2, [r3, #-2072]
+ cmp r2, #0
+ beq .L865
+.L848:
+ ldr r2, .L866+8
+ ldr r2, [r2, #4008]
+ cmp r2, #0
+ beq .L865
+.L849:
+ ldr r3, [r3, #-2064]
+ cmp r3, #0
+ beq .L865
+.L850:
+ ldr r3, .L866
+ ldr r2, [r3, #-1148]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-1144]
+ cmp r2, #0
+ beq .L865
+.L852:
+ ldr r2, [r3, #-984]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-976]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-2088]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-1160]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-980]
+ cmp r2, #0
+ beq .L865
+.L854:
+ ldr r2, [r3, #-2076]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-972]
+ cmp r2, #0
+ beq .L865
+ ldr r3, [r3, #-968]
+ cmp r3, #0
+ beq .L865
+ ldr r3, .L866
+ ldr r2, [r3, #-1168]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-960]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-956]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-1172]
+ cmp r2, #0
+ beq .L865
+.L856:
+ ldr r2, [r3, #-952]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-948]
+ cmp r2, #0
+ beq .L865
+ ldr r2, [r3, #-1164]
+ cmp r2, #0
+ beq .L865
+.L858:
+ ldr r2, [r3, #-2084]
+ cmp r2, #0
+ beq .L865
+ ldr r3, [r3, #-1008]
+ cmp r3, #0
+ beq .L865
+.L860:
+ ldr r3, .L866+8
+ ldr r3, [r3, #3960]
+ cmp r3, #0
+ beq .L865
+.L861:
+ ldr r3, .L866
+ ldr r2, [r3, #-928]
+ cmp r2, #0
+ beq .L865
+.L862:
+ ldr r2, [r3, #-924]
+ cmp r2, #0
+ beq .L865
+.L863:
+ ldr r3, [r3, #-920]
+ cmp r3, #0
+ bne .L864
+.L865:
+ ldr r0, .L866+32
+ ldr r1, .L866+36
+ bl printk
+ mvn r0, #0
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L864:
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L867:
+ .align 2
+.L866:
+ .word .LANCHOR2
+ .word -1138
+ .word .LANCHOR0
+ .word -1192
+ .word -940
+ .word -1032
+ .word .LANCHOR0+4008
+ .word .LANCHOR0+3980
+ .word .LC81
+ .word .LANCHOR3
+ .fnend
+ .size FtlMemInit, .-FtlMemInit
+ .align 2
+ .global ReadFlashInfo
+ .type ReadFlashInfo, %function
+ReadFlashInfo:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r1, #0
+ mov r2, #11
+ mov r4, r0
+ bl ftl_memset
+ ldr r3, .L871
+ ldr r1, [r3, #2776]
+ ldr r0, [r3, #4]
+ ldrb r2, [r1, #9] @ zero_extendqisi2
+ mul r2, r0, r2
+ mov r0, #0
+ uxth r2, r2
+ strb r2, [r4, #4]
+ mov ip, r2, lsr #8
+ strb ip, [r4, #5]
+ ldrb ip, [r3, #3836] @ zero_extendqisi2
+ strb ip, [r4, #7]
+ ldrb ip, [r1, #13] @ zero_extendqisi2
+ mul r2, r2, ip
+ ldrh ip, [r1, #14]
+ ldrb r1, [r1, #8] @ zero_extendqisi2
+ mul r2, ip, r2
+ mul r2, r1, r2
+ ubfx r1, r2, #8, #8
+ strb r1, [r4, #1]
+ ubfx r1, r2, #16, #8
+ strb r1, [r4, #2]
+ strb r2, [r4, #0]
+ mov r2, r2, lsr #24
+ strb r2, [r4, #3]
+ ldr r2, [r3, #2776]
+ ldrb ip, [r3, #3766] @ zero_extendqisi2
+ mov r3, r0
+ ldrb r1, [r2, #9] @ zero_extendqisi2
+ strb r1, [r4, #6]
+ mov r1, #32
+ strb r1, [r4, #8]
+ ldrb r2, [r2, #7] @ zero_extendqisi2
+ ldr r1, .L871+4
+ strb r0, [r4, #10]
+ strb r2, [r4, #9]
+ mov r2, #1
+ b .L869
+.L870:
+ ldrb r5, [r3, r1] @ zero_extendqisi2
+ add r3, r3, #1
+ ldrb r0, [r4, #10] @ zero_extendqisi2
+ orr r0, r0, r2, asl r5
+ strb r0, [r4, #10]
+.L869:
+ uxtb r0, r3
+ cmp r0, ip
+ bcc .L870
+ ldmfd sp!, {r3, r4, r5, pc}
+.L872:
+ .align 2
+.L871:
+ .word .LANCHOR0
+ .word .LANCHOR0+3768
+ .fnend
+ .size ReadFlashInfo, .-ReadFlashInfo
+ .align 2
+ .global FlashDieInfoInit
+ .type FlashDieInfoInit, %function
+FlashDieInfoInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r1, .L885
+ mov r2, #0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ .save {r3, r4, r5, r6, r7, r8, sl, lr}
+ ldr r3, .L885+4
+ strb r2, [r1, #-916]
+ ldr r1, .L885+8
+ strb r2, [r3, #3766]
+ movw r2, #2698
+ ldrh r2, [r1, r2]
+ cmp r2, #256
+ str r2, [r3, #4]
+ movhi r2, #512
+ bhi .L884
+ cmp r2, #128
+ bls .L875
+ mov r2, #256
+.L884:
+ str r2, [r3, #4]
+.L875:
+ mov r1, #0
+ mov r2, #8
+ ldr r0, .L885+12
+ mov r6, #0
+ bl ftl_memset
+ mov r1, #0
+ mov r2, #32
+ ldr r0, .L885+16
+ bl ftl_memset
+ ldr r0, .L885+20
+ mov r1, #0
+ mov r2, #128
+ bl ftl_memset
+ ldr r7, .L885+24
+ ldr r5, .L885+4
+ mov r8, r7
+.L877:
+ ldr r4, [r5, #2776]
+ mov r1, r8
+ add r0, r4, #1
+ ldrb r2, [r4, #0] @ zero_extendqisi2
+ bl FlashMemCmp8
+ cmp r0, #0
+ bne .L876
+ ldrb r3, [r5, #3766] @ zero_extendqisi2
+ add r2, r5, r3, asl #2
+ str r0, [r2, #2740]
+ add r2, r5, r3
+ add r3, r3, #1
+ strb r3, [r5, #3766]
+ strb r6, [r2, #3768]
+.L876:
+ add r6, r6, #1
+ add r8, r8, #8
+ cmp r6, #4
+ bne .L877
+ ldr r5, .L885+4
+ ldr r3, .L885
+ ldrb r2, [r5, #3766] @ zero_extendqisi2
+ strb r2, [r3, #-916]
+ ldrb r3, [r4, #8] @ zero_extendqisi2
+ cmp r3, #2
+ bne .L878
+ add sl, r4, #1
+ mov r6, #0
+ mov r8, r5
+.L881:
+ mov r0, sl
+ mov r1, r7
+ ldrb r2, [r4, #0] @ zero_extendqisi2
+ bl FlashMemCmp8
+ cmp r0, #0
+ bne .L879
+ ldrb r1, [r4, #13] @ zero_extendqisi2
+ ldr r0, [r5, #4]
+ ldrb r3, [r5, #3766] @ zero_extendqisi2
+ mul r0, r0, r1
+ ldrh r1, [r4, #14]
+ add r2, r5, r3, asl #2
+ and r1, r1, #65280
+ mul r1, r1, r0
+ str r1, [r2, #2740]
+ ldrb r0, [r4, #23] @ zero_extendqisi2
+ cmp r0, #0
+ movne r1, r1, asl #1
+ strne r1, [r2, #2740]
+ add r2, r8, r3
+ add r3, r3, #1
+ strb r3, [r8, #3766]
+ strb r6, [r2, #3768]
+.L879:
+ add r6, r6, #1
+ add r7, r7, #8
+ cmp r6, #4
+ bne .L881
+.L878:
+ ldr r3, .L885+4
+ ldrb r1, [r4, #13] @ zero_extendqisi2
+ ldr r2, .L885
+ ldrb r3, [r3, #3766] @ zero_extendqisi2
+ mul r1, r1, r3
+ ldrh r3, [r4, #14]
+ mul r1, r3, r1
+ ldr r3, .L885+28
+ strh r1, [r2, r3] @ movhi
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, pc}
+.L886:
+ .align 2
+.L885:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .word .LANCHOR1
+ .word .LANCHOR0+3768
+ .word .LANCHOR0+2740
+ .word .LANCHOR0+2780
+ .word .LANCHOR0+2132
+ .word -914
+ .fnend
+ .size FlashDieInfoInit, .-FlashDieInfoInit
+ .align 2
+ .global BuildFlashLsbPageTable
+ .type BuildFlashLsbPageTable, %function
+BuildFlashLsbPageTable:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ cmp r0, #0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r4, r1
+ bne .L888
+ ldr r3, .L927
+.L889:
+ strh r0, [r3, #2]! @ movhi
+ add r0, r0, #1
+ uxth r0, r0
+ cmp r0, #256
+ bne .L889
+ b .L890
+.L888:
+ cmp r0, #1
+ bne .L891
+ ldr r0, .L927+4
+ mov r2, #0
+ mov r3, r2
+.L894:
+ uxth r1, r3
+ cmp r1, #3
+ bls .L892
+ tst r3, #1
+ moveq r1, #2
+ movne r1, #3
+ rsb r1, r1, r2
+ uxth r1, r1
+.L892:
+ add r3, r3, #1
+ strh r1, [r2, r0] @ movhi
+ cmp r3, #256
+ add r2, r2, #2
+ bne .L894
+ b .L890
+.L891:
+ cmp r0, #2
+ bne .L895
+ mov r3, #0
+ ldr r0, .L927
+ movw r2, #65535
+ mov r1, r3
+ b .L926
+.L898:
+ cmp r3, #1
+ movls r1, r3
+ movhi r1, r2
+.L926:
+ add r3, r3, #1
+ add r2, r2, #2
+ strh r1, [r0, #2]! @ movhi
+ uxth r3, r3
+ uxth r2, r2
+ cmp r3, #256
+ bne .L898
+ b .L890
+.L895:
+ cmp r0, #3
+ bne .L899
+ ldr r0, .L927+4
+ mov r2, #0
+ mov r3, r2
+.L902:
+ uxth r1, r3
+ cmp r1, #5
+ bls .L900
+ tst r3, #1
+ moveq r1, #4
+ movne r1, #5
+ rsb r1, r1, r2
+ uxth r1, r1
+.L900:
+ add r3, r3, #1
+ strh r1, [r2, r0] @ movhi
+ cmp r3, #256
+ add r2, r2, #2
+ bne .L902
+ b .L890
+.L899:
+ cmp r0, #4
+ mov r2, #0
+ bne .L903
+ ldr r3, .L927+8
+ movw r1, #2228
+ strh r2, [r3, r1] @ movhi
+ movw r2, #2230
+ mov r1, #1
+ strh r1, [r3, r2] @ movhi
+ mov r1, #2
+ add r2, r2, r1
+ strh r1, [r3, r2] @ movhi
+ add r2, r2, #2
+ mov r1, #3
+ strh r1, [r3, r2] @ movhi
+ add r2, r2, #2
+ mov r1, #5
+ strh r0, [r3, r2] @ movhi
+ add r2, r2, #2
+ ldr r0, .L927+12
+ strh r1, [r3, r2] @ movhi
+ mov r2, #2240
+ mov r1, #7
+ strh r1, [r3, r2] @ movhi
+ add r2, r2, #2
+ mov r1, #8
+ strh r1, [r3, r2] @ movhi
+ mov r2, #16
+ mov r3, r1
+.L905:
+ tst r3, #1
+ add r3, r3, #1
+ moveq r1, #6
+ movne r1, #7
+ cmp r3, #256
+ rsb r1, r1, r2
+ add r2, r2, #2
+ strh r1, [r0, #2]! @ movhi
+ uxth r2, r2
+ bne .L905
+ b .L890
+.L903:
+ cmp r0, #5
+ bne .L906
+ ldr r1, .L927
+ mov r3, r2
+.L907:
+ strh r3, [r1, #2]! @ movhi
+ add r3, r3, #1
+ uxth r3, r3
+ cmp r3, #16
+ bne .L907
+ ldr r2, .L927+16
+.L908:
+ strh r3, [r2, #2]! @ movhi
+ add r3, r3, #2
+ uxth r3, r3
+ cmp r3, #496
+ bne .L908
+ b .L890
+.L906:
+ cmp r0, #6
+ bne .L890
+ ldr r0, .L927
+ mov r3, r2
+.L911:
+ uxth r1, r3
+ cmp r1, #5
+ bls .L909
+ tst r3, #1
+ moveq r1, #10
+ movne r1, #12
+ rsb r1, r1, r2
+ uxth r1, r1
+.L909:
+ add r3, r3, #1
+ add r2, r2, #3
+ cmp r3, #256
+ strh r1, [r0, #2]! @ movhi
+ uxth r2, r2
+ bne .L911
+.L890:
+ mov r2, #1024
+ ldr r0, .L927+20
+ mov r1, #255
+ uxth r4, r4
+ bl ftl_memset
+ ldr r2, .L927
+ mov r3, #0
+ ldr r0, .L927+24
+ b .L912
+.L913:
+ ldrh r1, [r2, #2]!
+ add r3, r3, #1
+ uxth r3, r3
+ add ip, r0, r1, asl #1
+ sub ip, ip, #912
+ strh r1, [ip, #0] @ movhi
+.L912:
+ cmp r3, r4
+ bcc .L913
+ ldmfd sp!, {r4, pc}
+.L928:
+ .align 2
+.L927:
+ .word .LANCHOR0+2226
+ .word .LANCHOR0+2228
+ .word .LANCHOR0
+ .word .LANCHOR0+2242
+ .word .LANCHOR0+2258
+ .word .LANCHOR2-912
+ .word .LANCHOR2
+ .fnend
+ .size BuildFlashLsbPageTable, .-BuildFlashLsbPageTable
+ .align 2
+ .global ftl_memcpy
+ .type ftl_memcpy, %function
+ftl_memcpy:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ b memcpy
+ .fnend
+ .size ftl_memcpy, .-ftl_memcpy
+ .align 2
+ .global ftl_memcmp
+ .type ftl_memcmp, %function
+ftl_memcmp:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ b memcmp
+ .fnend
+ .size ftl_memcmp, .-ftl_memcmp
+ .align 2
+ .global FlashSramLoadStore
+ .type FlashSramLoadStore, %function
+FlashSramLoadStore:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ cmp r2, #0
+ ldr r4, .L934
+ mov ip, r0
+ mov r2, r3
+ ldr r4, [r4, #112]
+ add r4, r4, #4096
+ add r1, r4, r1
+ movne r0, r1
+ movne r1, ip
+ ldmfd sp!, {r4, lr}
+ b memcpy
+.L935:
+ .align 2
+.L934:
+ .word .LANCHOR2
+ .fnend
+ .size FlashSramLoadStore, .-FlashSramLoadStore
+ .align 2
+ .global FlashCs123Init
+ .type FlashCs123Init, %function
+FlashCs123Init:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ bx lr
+ .fnend
+ .size FlashCs123Init, .-FlashCs123Init
+ .align 2
+ .global rk_nand_de_init
+ .type rk_nand_de_init, %function
+rk_nand_de_init:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ b FlashDeInit
+ .fnend
+ .size rk_nand_de_init, .-rk_nand_de_init
+ .align 2
+ .global rk_nand_suspend
+ .type rk_nand_suspend, %function
+rk_nand_suspend:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ b FlashSuspend
+ .fnend
+ .size rk_nand_suspend, .-rk_nand_suspend
+ .align 2
+ .global rk_nand_resume
+ .type rk_nand_resume, %function
+rk_nand_resume:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ b FlashResume
+ .fnend
+ .size rk_nand_resume, .-rk_nand_resume
+ .align 2
+ .global rk_ftl_get_capacity
+ .type rk_ftl_get_capacity, %function
+rk_ftl_get_capacity:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L941
+ ldr r0, [r3, #3952]
+ bx lr
+.L942:
+ .align 2
+.L941:
+ .word .LANCHOR0
+ .fnend
+ .size rk_ftl_get_capacity, .-rk_ftl_get_capacity
+ .align 2
+ .global rknand_print_hex
+ .type rknand_print_hex, %function
+rknand_print_hex:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ .save {r3, r4, r5, r6, r7, r8, sl, lr}
+ mov r8, #0
+ mov r6, r0
+ mov r4, r1
+ mov r5, r2
+ mov sl, r3
+ mov r7, r8
+ b .L944
+.L950:
+ cmp r8, #0
+ bne .L945
+ ldr r0, .L952
+ mov r1, r6
+ mov r2, r7
+ bl printk
+.L945:
+ cmp r5, #4
+ ldreq r0, .L952+4
+ ldreq r1, [r4, r7, asl #2]
+ beq .L951
+ cmp r5, #2
+ moveq r3, r7, asl #1
+ ldreq r0, .L952+4
+ ldreqsh r1, [r4, r3]
+ ldrne r0, .L952+4
+ ldrneb r1, [r4, r7] @ zero_extendqisi2
+.L951:
+ add r8, r8, #1
+ bl printk
+ cmp r8, #15
+ bls .L949
+ ldr r0, .L952+8
+ mov r8, #0
+ ldr r1, .L952+12
+ bl printk
+.L949:
+ add r7, r7, #1
+.L944:
+ cmp r7, sl
+ bne .L950
+ ldr r0, .L952+8
+ ldr r1, .L952+12
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ b printk
+.L953:
+ .align 2
+.L952:
+ .word .LC82
+ .word .LC83
+ .word .LC75
+ .word .LC84
+ .fnend
+ .size rknand_print_hex, .-rknand_print_hex
+ .align 2
+ .global NandcXferComp
+ .type NandcXferComp, %function
+NandcXferComp:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r4, r5, r6, lr}
+ .save {r0, r1, r4, r5, r6, lr}
+ ldr r6, .L977
+ add r0, r6, r0, asl #3
+ ldr r3, [r6, #12]
+ ldr r4, [r0, #16]
+ cmp r3, #3
+ bls .L971
+ ldr r3, [r4, #16]
+ tst r3, #4
+ beq .L971
+ mov r0, r4
+ bl wait_for_nandc_xfer_completed
+ ldr r5, [r4, #16]
+ ldr r3, [r4, #8]
+ ands r5, r5, #2
+ str r3, [sp, #0]
+ movne r5, #0
+ bne .L975
+ b .L976
+.L961:
+ ldr r3, [r6, #12]
+ cmp r3, #5
+ bls .L958
+ ldr r3, [r4, #0]
+ str r3, [sp, #4]
+ ldr r3, [sp, #4]
+ tst r3, #8192
+ beq .L958
+ ldr r3, [sp, #4]
+ tst r3, #131072
+ bne .L959
+.L958:
+ add r5, r5, #1
+ bic r3, r5, #-16777216
+ cmp r3, #0
+ bne .L975
+ ldr r2, [r4, #28]
+ mov r1, r5
+ ldr r3, [sp, #0]
+ ubfx r2, r2, #16, #5
+ ldr r0, .L977+4
+ ubfx r3, r3, #22, #6
+ bl printk
+ ldr r0, .L977+8
+ mov r1, r4
+ mov r2, #4
+ mov r3, #512
+ bl rknand_print_hex
+.L975:
+ ldr r2, [r4, #28]
+ ldr r3, [sp, #0]
+ ubfx r2, r2, #16, #5
+ ubfx r3, r3, #22, #6
+ cmp r2, r3
+ blt .L961
+.L959:
+ ldr r4, .L977
+ ldr r3, [r4, #3820]
+ cmp r3, #0
+ beq .L962
+ ldr r1, [sp, #0]
+ mov r2, #0
+ ldr r0, [r4, #3812]
+ ubfx r1, r1, #22, #5
+ mov r1, r1, asl #10
+ bl rknand_dma_unmap_single
+ ldr r1, [sp, #0]
+ ldr r0, [r4, #3816]
+ mov r2, #0
+ ubfx r1, r1, #22, #5
+ mov r1, r1, asl #7
+ bl rknand_dma_unmap_single
+ b .L962
+.L965:
+ ldr r3, [r4, #8]
+ add r5, r5, #1
+ str r3, [sp, #0]
+ bic r3, r5, #-16777216
+ cmp r3, #0
+ bne .L976
+ ldr r2, [sp, #0]
+ mov r1, r5
+ ldr r3, [r4, #28]
+ ldr r0, .L977+12
+ ubfx r3, r3, #16, #5
+ bl printk
+ ldr r0, .L977+8
+ mov r1, r4
+ mov r2, #4
+ mov r3, #512
+ bl rknand_print_hex
+.L976:
+ ldr r3, [sp, #0]
+ tst r3, #1048576
+ beq .L965
+ ldr r6, .L977
+ ldr r3, [r6, #3828]
+ cmp r3, #0
+ beq .L966
+ mov r0, r4
+ bl NandcSendDumpDataStart
+.L966:
+ ldr r3, [r6, #3820]
+ ldr r5, .L977
+ cmp r3, #0
+ beq .L967
+ ldr r1, [sp, #0]
+ mov r2, #1
+ ldr r0, [r5, #3812]
+ ubfx r1, r1, #22, #5
+ mov r1, r1, asl #10
+ bl rknand_dma_unmap_single
+ ldr r1, [sp, #0]
+ ldr r0, [r5, #3816]
+ mov r2, #1
+ ubfx r1, r1, #22, #5
+ mov r1, r1, asl #7
+ bl rknand_dma_unmap_single
+.L967:
+ ldr r3, .L977
+ ldr r3, [r3, #3828]
+ cmp r3, #0
+ beq .L962
+ mov r0, r4
+ bl NandcSendDumpDataDone
+.L962:
+ ldr r3, .L977
+ mov r2, #0
+ str r2, [r3, #3820]
+ b .L954
+.L971:
+ ldr r3, [r4, #8]
+ str r3, [sp, #0]
+ ldr r3, [sp, #0]
+ tst r3, #1048576
+ beq .L971
+.L954:
+ ldmfd sp!, {r2, r3, r4, r5, r6, pc}
+.L978:
+ .align 2
+.L977:
+ .word .LANCHOR0
+ .word .LC85
+ .word .LC86
+ .word .LC87
+ .fnend
+ .size NandcXferComp, .-NandcXferComp
+ .align 2
+ .global NandcXferData
+ .type NandcXferData, %function
+NandcXferData:
+ .fnstart
+ @ args = 4, pretend = 0, frame = 80
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r4, r3
+ mov r9, r3
+ ldr r3, .L1017
+ .pad #92
+ sub sp, sp, #92
+ tst r4, #63
+ add r3, r3, r0, asl #3
+ mov r7, r0
+ mov fp, r1
+ mov sl, r2
+ ldr r5, [sp, #128]
+ ldr r6, [r3, #16]
+ bne .L980
+ cmp r5, #0
+ bne .L981
+ add r0, sp, #24
+ mov r1, #255
+ mov r2, #64
+ add r5, sp, #24
+ bl ftl_memset
+.L981:
+ mov r0, r7
+ mov r1, fp
+ mov r2, sl
+ mov r3, #0
+ stmia sp, {r4, r5}
+ bl NandcXferStart
+ mov r0, r7
+ bl NandcXferComp
+ cmp fp, #0
+ movne r4, #0
+ bne .L982
+ ldr r1, .L1017
+ mov r0, sl, lsr #1
+ mov r3, fp
+ mov r2, fp
+ ldr ip, [r1, #3832]
+ mov r4, r1
+ cmp ip, #24
+ movhi ip, #128
+ movls ip, #64
+ b .L984
+.L985:
+ ldr r1, [r4, #3800]
+ mov r3, r3, lsr #2
+ add r2, r2, #1
+ ldr r3, [r1, r3, asl #2]
+ mov r1, r3, lsr #8
+ strb r3, [r5, #0]
+ strb r1, [r5, #1]
+ mov r1, r3, lsr #16
+ mov r3, r3, lsr #24
+ strb r1, [r5, #2]
+ strb r3, [r5, #3]
+ add r5, r5, #4
+ mov r3, r7
+.L984:
+ cmp r2, r0
+ add r7, r3, ip
+ ldr r1, .L1017
+ bcc .L985
+ mov r3, #0
+ ldr r0, [r1, #3832]
+ mov sl, sl, lsr #2
+ ldr r1, [r1, #12]
+ mov r4, r3
+ b .L986
+.L992:
+ add r2, r3, #8
+ ldr r2, [r6, r2, asl #2]
+ str r2, [sp, #20]
+ ldr r2, [sp, #20]
+ tst r2, #4
+ bne .L1007
+ ldr r2, [sp, #20]
+ ands r2, r2, #32768
+ bne .L1007
+ cmp r1, #5
+ bls .L988
+ ldr r7, [sp, #20]
+ ldr ip, [sp, #20]
+ ldr r5, [sp, #20]
+ ubfx r7, r7, #3, #5
+ ldr r2, [sp, #20]
+ ubfx ip, ip, #27, #1
+ ubfx r5, r5, #16, #5
+ ubfx r2, r2, #29, #1
+ orr ip, r7, ip, asl #5
+ orr r2, r5, r2, asl #5
+ cmp ip, r2
+ ldr ip, [sp, #20]
+ ldrhi r2, [sp, #20]
+ ubfxhi ip, ip, #3, #5
+ ldrls r2, [sp, #20]
+ ubfxls ip, ip, #16, #5
+ ubfxhi r2, r2, #27, #1
+ ubfxls r2, r2, #29, #1
+ b .L1015
+.L988:
+ cmp r1, #3
+ bls .L990
+ ldr r7, [sp, #20]
+ ldr ip, [sp, #20]
+ ldr r5, [sp, #20]
+ ubfx r7, r7, #3, #5
+ ldr r2, [sp, #20]
+ ubfx ip, ip, #28, #1
+ ubfx r5, r5, #16, #5
+ ubfx r2, r2, #30, #1
+ orr ip, r7, ip, asl #5
+ orr r2, r5, r2, asl #5
+ cmp ip, r2
+ ldr ip, [sp, #20]
+ ldrhi r2, [sp, #20]
+ ubfxhi ip, ip, #3, #5
+ ldrls r2, [sp, #20]
+ ubfxls ip, ip, #16, #5
+ ubfxhi r2, r2, #28, #1
+ ubfxls r2, r2, #30, #1
+.L1015:
+ orr r2, ip, r2, asl #5
+.L990:
+ cmp r4, r2
+ movcc r4, r2
+ b .L987
+.L1007:
+ mvn r4, #0
+.L987:
+ add r3, r3, #1
+.L986:
+ cmp r3, sl
+ bcs .L982
+ cmp r0, #0
+ bne .L992
+.L982:
+ mov r3, #0
+ str r3, [r6, #16]
+ b .L993
+.L980:
+ cmp r1, #1
+ mov r8, #0
+ bne .L1013
+ b .L994
+.L997:
+ cmp r5, #0
+ and r4, r8, #3
+ mov r0, r6
+ mov r1, #1
+ movne r3, #2
+ moveq r3, #0
+ mla r3, r8, r3, r5
+ mov r2, r4
+ add r8, r8, #2
+ str r3, [sp, #0]
+ mov r3, r9
+ bl NandcCopy1KB
+ mov r3, #0
+ mov r0, r7
+ str r3, [sp, #0]
+ str r3, [sp, #4]
+ mov r1, #1
+ mov r2, #2
+ mov r3, r4
+ bl NandcXferStart
+ mov r0, r7
+ bl NandcXferComp
+ add r9, r9, #1024
+.L994:
+ cmp r8, sl
+ bcc .L997
+ mov r4, #0
+ b .L993
+.L1013:
+ mov r1, r8
+ mov r2, #2
+ mov r3, r8
+ str r8, [sp, #0]
+ str r8, [sp, #4]
+ mov r4, r8
+ bl NandcXferStart
+ str fp, [sp, #12]
+ mov ip, r8
+ mov fp, r6
+ mov r6, r5
+ b .L1016
+.L1002:
+ mov r0, r7
+ bl NandcXferComp
+ ldr r3, [fp, #32]
+ add ip, r5, #2
+ cmp ip, sl
+ str r3, [sp, #20]
+ bcs .L999
+ mov r3, #0
+ mov r0, r7
+ str r3, [sp, #0]
+ mov r1, r3
+ str r3, [sp, #4]
+ mov r2, #2
+ and r3, ip, #3
+ str ip, [sp, #8]
+ bl NandcXferStart
+ ldr ip, [sp, #8]
+.L999:
+ ldr r3, [sp, #20]
+ tst r3, #4
+ mvnne r4, #0
+ bne .L1000
+ ldr r2, [sp, #20]
+ ldr r3, [sp, #20]
+ ubfx r2, r2, #3, #5
+ ubfx r3, r3, #27, #1
+ orr r3, r2, r3, asl #5
+ cmp r4, r3
+ movcc r4, r3
+.L1000:
+ cmp r6, #0
+ and r2, r8, #3
+ mov r0, fp
+ mov r1, #0
+ movne r3, #2
+ moveq r3, #0
+ mla r5, r5, r3, r6
+ mov r3, r9
+ str ip, [sp, #8]
+ add r8, r8, #2
+ add r9, r9, #1024
+ str r5, [sp, #0]
+ bl NandcCopy1KB
+ ldr ip, [sp, #8]
+.L1016:
+ cmp ip, sl
+ mov r5, ip
+ bcc .L1002
+ mov r6, fp
+ ldr fp, [sp, #12]
+.L993:
+ ldr r3, .L1017
+ rsbs fp, fp, #1
+ movcc fp, #0
+ ldr r3, [r3, #12]
+ cmp r3, #5
+ movls fp, #0
+ cmp fp, #0
+ beq .L1003
+ ldr r3, [r6, #0]
+ and r2, r3, #139264
+ cmp r2, #139264
+ orreq r3, r3, #131072
+ streq r3, [r6, #0]
+ mvneq r4, #0
+.L1003:
+ mov r0, r4
+ add sp, sp, #92
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1018:
+ .align 2
+.L1017:
+ .word .LANCHOR0
+ .fnend
+ .size NandcXferData, .-NandcXferData
+ .align 2
+ .global FlashProgPage
+ .type FlashProgPage, %function
+FlashProgPage:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r4, r5, r6, r7, r8, lr}
+ .save {r0, r1, r4, r5, r6, r7, r8, lr}
+ mov r8, r3
+ ldr r3, .L1022
+ subs r4, r0, #0
+ mov r5, r1
+ mov r6, r2
+ ldrb r7, [r3, #2697] @ zero_extendqisi2
+ bne .L1020
+ ldr r3, .L1022+4
+ ldrb r2, [r3, #1] @ zero_extendqisi2
+ ldr r1, [r3, #4]
+ mul r2, r1, r2
+ cmp r5, r2
+ bcs .L1020
+ ldrb r3, [r3, #0] @ zero_extendqisi2
+ cmp r3, #0
+ subeq r7, r7, #2
+ movne r7, #4
+.L1020:
+ mov r0, r4
+ bl NandcWaitFlashReady
+ mov r0, r4
+ bl NandcFlashCs
+ mov r0, r4
+ mov r1, r5
+ bl FlashProgFirstCmd
+ uxtb r2, r7
+ mov r3, r6
+ mov r0, r4
+ mov r1, #1
+ str r8, [sp, #0]
+ bl NandcXferData
+ mov r1, r5
+ mov r0, r4
+ bl FlashProgSecondCmd
+ mov r0, r4
+ bl NandcWaitFlashReady
+ mov r1, r5
+ mov r0, r4
+ bl FlashReadStatus
+ mov r5, r0
+ mov r0, r4
+ bl NandcFlashDeCs
+ and r0, r5, #1
+ ldmfd sp!, {r2, r3, r4, r5, r6, r7, r8, pc}
+.L1023:
+ .align 2
+.L1022:
+ .word .LANCHOR1
+ .word .LANCHOR0
+ .fnend
+ .size FlashProgPage, .-FlashProgPage
+ .align 2
+ .global FlashPageProgMsbFFData
+ .type FlashPageProgMsbFFData, %function
+FlashPageProgMsbFFData:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 24
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r8, r2
+ ldr r2, .L1035
+ .pad #28
+ sub sp, sp, #28
+ mov r6, r0
+ str r1, [sp, #12]
+ ldrb r1, [r2, #80] @ zero_extendqisi2
+ ldr r3, [r2, #2776]
+ cmp r1, #0
+ ldrb r3, [r3, #19] @ zero_extendqisi2
+ beq .L1025
+ ldr r1, [r2, #3788]
+ ldr r2, .L1035+4
+ cmp r1, r2
+ beq .L1024
+.L1025:
+ sub r2, r3, #5
+ uxtb r2, r2
+ cmp r3, #68
+ cmpne r2, #1
+ bls .L1028
+ cmp r3, #35
+ cmpne r3, #17
+ beq .L1028
+ cmp r3, #18
+ cmpne r3, #19
+ beq .L1028
+ b .L1024
+.L1033:
+ add r3, sl, r8, asl #1
+ sub r3, r3, #912
+ ldrh r2, [r3, #0]
+ movw r3, #65535
+ cmp r2, r3
+ bne .L1024
+ mov r1, #255
+ ldr r0, [sl, #116]
+ mov r2, #32768
+ bl ftl_memset
+ ldr r1, [sp, #20]
+ cmp r1, #1
+ bhi .L1029
+ ldr r3, .L1035+8
+ ldr r2, [r3, #2964]
+ cmp r2, #0
+ beq .L1030
+ ldr r1, [sp, #16]
+ mov r0, r6
+ mov fp, #0
+ ldrb r4, [r1, #20] @ zero_extendqisi2
+ ldr r5, [r1, #16]
+ add r4, r4, #8
+ str r2, [sp, #8]
+ str r3, [sp, #4]
+ bl NandcFlashCs
+ add r7, r5, r4, asl #8
+ mov r1, #239
+ mov r0, r6
+ str r1, [r7, #8]
+ mov r1, #146
+ str r1, [r7, #4]
+ str fp, [r5, r4, asl #8]
+ str fp, [r5, r4, asl #8]
+ str fp, [r5, r4, asl #8]
+ str fp, [r5, r4, asl #8]
+ bl NandcFlashDeCs
+ ldr r2, [sp, #8]
+ cmp r2, #1
+ bne .L1031
+ mov r0, r6
+ bl NandcFlashCs
+ mov r2, #238
+ mov r0, #2000
+ str r2, [r7, #8]
+ mov r2, #146
+ str r2, [r7, #4]
+ bl NandcDelayns
+ ldr r2, [r5, r4, asl #8]
+ mov r0, r6
+ str r2, [sp, #8]
+ bl NandcFlashDeCs
+ ldr r2, [sp, #8]
+ ldr r3, [sp, #4]
+ tst r2, #255
+ moveq r2, #2
+ streq r2, [r3, #2964]
+.L1032:
+ strne fp, [r3, #2964]
+ bne .L1024
+.L1031:
+ ldr r3, [sp, #12]
+ mov r0, r6
+ ldr r2, [sl, #116]
+ add r1, r8, r3
+ mov r3, #0
+ bl FlashProgPage
+ mov r0, r6
+ bl NandcFlashCs
+ mov r3, #239
+ mov r0, r6
+ str r3, [r7, #8]
+ mov r3, #146
+ str r3, [r7, #4]
+ mov r3, #1
+ str r3, [r5, r4, asl #8]
+ mov r3, #0
+ str r3, [r5, r4, asl #8]
+ str r3, [r5, r4, asl #8]
+ str r3, [r5, r4, asl #8]
+ bl NandcFlashDeCs
+ b .L1030
+.L1029:
+ ldr r2, [sp, #12]
+ mov r0, r6
+ mov r3, #0
+ add r1, r8, r2
+ ldr r2, [sl, #116]
+ bl FlashProgPage
+.L1030:
+ add r8, r8, #1
+ uxth r8, r8
+ b .L1034
+.L1028:
+ ldr sl, .L1035+12
+ sub r3, r3, #17
+ ldr r9, .L1035
+ uxtb r3, r3
+ str r3, [sp, #20]
+ add r3, r9, r6, asl #3
+ str r3, [sp, #16]
+.L1034:
+ ldr r3, [r9, #2776]
+ ldrh r3, [r3, #10]
+ cmp r3, r8
+ bhi .L1033
+.L1024:
+ add sp, sp, #28
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1036:
+ .align 2
+.L1035:
+ .word .LANCHOR0
+ .word 1446522928
+ .word .LANCHOR1
+ .word .LANCHOR2
+ .fnend
+ .size FlashPageProgMsbFFData, .-FlashPageProgMsbFFData
+ .align 2
+ .global FlashReadRawPage
+ .type FlashReadRawPage, %function
+FlashReadRawPage:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r4, r5, r6, r7, r8, lr}
+ .save {r0, r1, r4, r5, r6, r7, r8, lr}
+ mov r8, r3
+ ldr r3, .L1040
+ subs r4, r0, #0
+ mov r6, r1
+ mov r5, r2
+ ldrb r7, [r3, #2697] @ zero_extendqisi2
+ bne .L1038
+ ldr r3, .L1040+4
+ ldrb r2, [r3, #1] @ zero_extendqisi2
+ ldr r3, [r3, #4]
+ mul r3, r3, r2
+ cmp r1, r3
+ movcc r7, #4
+.L1038:
+ mov r0, r4
+ bl NandcWaitFlashReady
+ mov r0, r4
+ bl NandcFlashCs
+ mov r1, r6
+ mov r0, r4
+ bl FlashReadCmd
+ mov r0, r4
+ bl NandcWaitFlashReady
+ mov r3, r5
+ mov r1, #0
+ mov r2, r7
+ mov r0, r4
+ str r8, [sp, #0]
+ bl NandcXferData
+ mov r5, r0
+ mov r0, r4
+ bl NandcFlashDeCs
+ mov r0, r5
+ ldmfd sp!, {r2, r3, r4, r5, r6, r7, r8, pc}
+.L1041:
+ .align 2
+.L1040:
+ .word .LANCHOR1
+ .word .LANCHOR0
+ .fnend
+ .size FlashReadRawPage, .-FlashReadRawPage
+ .align 2
+ .global HynixReadRetrial
+ .type HynixReadRetrial, %function
+HynixReadRetrial:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r7, r3
+ ldr fp, .L1053
+ mov r6, r0
+ str r1, [sp, #4]
+ mov sl, r2
+ add r3, fp, r0
+ mov r8, #0
+ ldrb r9, [fp, #2910] @ zero_extendqisi2
+ mvn r4, #0
+ ldrb r5, [r3, #2920] @ zero_extendqisi2
+ bl NandcWaitFlashReady
+ mov ip, fp
+ b .L1043
+.L1048:
+ add r5, r5, #1
+ ldrb r1, [fp, #2909] @ zero_extendqisi2
+ mov r0, r6
+ ldr r2, .L1053+4
+ uxtb r5, r5
+ str ip, [sp, #0]
+ cmp r5, r9
+ movcs r5, #0
+ mov r3, r5
+ bl HynixSetRRPara
+ mov r0, r6
+ ldr r1, [sp, #4]
+ mov r2, sl
+ mov r3, r7
+ bl FlashReadRawPage
+ ldr ip, [sp, #0]
+ cmn r0, #1
+ beq .L1045
+ ldrb r3, [ip, #3836] @ zero_extendqisi2
+ cmn r4, #1
+ moveq r4, r0
+ add r3, r3, r3, asl #1
+ cmp r0, r3, lsr #2
+ bcc .L1052
+ mov r7, #0
+ mov sl, r7
+.L1045:
+ add r8, r8, #1
+.L1043:
+ cmp r8, r9
+ bcc .L1048
+ b .L1047
+.L1052:
+ mov r4, r0
+.L1047:
+ ldr r3, .L1053
+ adds r0, r4, #1
+ add r6, r3, r6
+ movne r0, #1
+ ldrb r3, [r3, #3836] @ zero_extendqisi2
+ strb r5, [r6, #2920]
+ add r3, r3, r3, asl #1
+ cmp r4, r3, lsr #2
+ movcc r0, #0
+ andcs r0, r0, #1
+ cmp r0, #0
+ moveq r0, r4
+ movne r0, #256
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1054:
+ .align 2
+.L1053:
+ .word .LANCHOR0
+ .word .LANCHOR0+2912
+ .fnend
+ .size HynixReadRetrial, .-HynixReadRetrial
+ .align 2
+ .global MicronReadRetrial
+ .type MicronReadRetrial, %function
+MicronReadRetrial:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #20
+ sub sp, sp, #20
+ mov fp, r2
+ mov r9, r3
+ str r1, [sp, #12]
+ mov sl, #0
+ str r0, [sp, #8]
+ bl NandcWaitFlashReady
+ ldr r1, [sp, #8]
+ mvn r5, #0
+ ldr r3, .L1067
+ ldr ip, .L1067+4
+ add r2, r3, r1, asl #3
+ ldrb r7, [r2, #20] @ zero_extendqisi2
+ ldr r6, [r2, #16]
+ add r7, r7, #8
+ mov r8, r6
+ add r4, r6, r7, asl #8
+ b .L1066
+.L1060:
+ mov r2, #239
+ mov r3, #137
+ str r2, [r4, #8]
+ mov r0, #200
+ str r3, [r4, #4]
+ mov r6, #0
+ str ip, [sp, #4]
+ add sl, sl, #1
+ bl NandcDelayns
+ str sl, [r4, #0]
+ ldr r0, [sp, #8]
+ mov r2, fp
+ str r6, [r4, #0]
+ mov r3, r9
+ str r6, [r4, #0]
+ ldr r1, [sp, #12]
+ str r6, [r4, #0]
+ bl FlashReadRawPage
+ ldr ip, [sp, #4]
+ cmn r0, #1
+ beq .L1066
+ ldr r1, .L1067
+ cmn r5, #1
+ moveq r5, r0
+ ldrb r3, [r1, #3836] @ zero_extendqisi2
+ add r3, r3, r3, asl #1
+ cmp r0, r3, lsr #2
+ bcc .L1063
+ mov r9, r6
+ mov fp, r6
+.L1066:
+ ldrb r3, [ip, #120] @ zero_extendqisi2
+ cmp sl, r3
+ bcc .L1060
+ mov r6, r8
+ b .L1059
+.L1063:
+ mov r6, r8
+ mov r5, r0
+.L1059:
+ mov r3, #239
+ mov r0, #200
+ str r3, [r4, #8]
+ mov r3, #137
+ str r3, [r4, #4]
+ bl NandcDelayns
+ mov r3, #0
+ str r3, [r6, r7, asl #8]
+ adds r0, r5, #1
+ str r3, [r6, r7, asl #8]
+ str r3, [r6, r7, asl #8]
+ movne r0, #1
+ str r3, [r6, r7, asl #8]
+ ldr r3, .L1067
+ ldrb r3, [r3, #3836] @ zero_extendqisi2
+ add r3, r3, r3, asl #1
+ cmp r5, r3, lsr #2
+ movcc r0, #0
+ andcs r0, r0, #1
+ cmp r0, #0
+ moveq r0, r5
+ movne r0, #256
+ add sp, sp, #20
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1068:
+ .align 2
+.L1067:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size MicronReadRetrial, .-MicronReadRetrial
+ .align 2
+ .global SamsungReadRetrial
+ .type SamsungReadRetrial, %function
+SamsungReadRetrial:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r8, r0
+ mov r7, r2
+ mov r6, r3
+ mov r9, r1
+ bl NandcWaitFlashReady
+ ldr ip, .L1078
+ mov r5, #1
+ mvn r4, #0
+ ldr fp, .L1078+4
+ add r3, ip, r8, asl #3
+ ldrb sl, [r3, #20] @ zero_extendqisi2
+ ldr r2, [r3, #16]
+ add sl, sl, #8
+ add sl, r2, sl, asl #8
+ b .L1070
+.L1074:
+ mov r0, sl
+ uxtb r1, r5
+ str ip, [sp, #4]
+ bl SamsungSetRRPara
+ mov r0, r8
+ mov r1, r9
+ mov r2, r7
+ mov r3, r6
+ bl FlashReadRawPage
+ ldr ip, [sp, #4]
+ cmn r0, #1
+ beq .L1071
+ ldrb r3, [ip, #3836] @ zero_extendqisi2
+ cmn r4, #1
+ moveq r4, r0
+ add r3, r3, r3, asl #1
+ cmp r0, r3, lsr #2
+ bcc .L1077
+ mov r6, #0
+ mov r7, r6
+.L1071:
+ add r5, r5, #1
+.L1070:
+ ldrb r3, [fp, #120] @ zero_extendqisi2
+ add r3, r3, #1
+ cmp r5, r3
+ bcc .L1074
+ b .L1073
+.L1077:
+ mov r4, r0
+.L1073:
+ mov r0, sl
+ mov r1, #0
+ bl SamsungSetRRPara
+ ldr r3, .L1078
+ adds r0, r4, #1
+ ldrb r3, [r3, #3836] @ zero_extendqisi2
+ movne r0, #1
+ add r3, r3, r3, asl #1
+ cmp r4, r3, lsr #2
+ movcc r0, #0
+ andcs r0, r0, #1
+ cmp r0, #0
+ moveq r0, r4
+ movne r0, #256
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1079:
+ .align 2
+.L1078:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size SamsungReadRetrial, .-SamsungReadRetrial
+ .align 2
+ .global ToshibaReadRetrial
+ .type ToshibaReadRetrial, %function
+ToshibaReadRetrial:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r8, r0
+ str r1, [sp, #4]
+ mov r9, r2
+ mov r7, r3
+ bl NandcWaitFlashReady
+ ldr r3, .L1101
+ add r2, r3, r8, asl #3
+ ldr r1, [r2, #16]
+ ldrb r4, [r2, #20] @ zero_extendqisi2
+ ldrb r2, [r3, #3765] @ zero_extendqisi2
+ add r4, r4, #8
+ sub r2, r2, #67
+ add r4, r1, r4, asl #8
+ uxtb r2, r2
+ cmp r2, #1
+ movls sl, #0
+ bls .L1081
+ ldrb sl, [r3, #3777] @ zero_extendqisi2
+ cmp sl, #0
+ beq .L1082
+ mov r0, #0
+ mov sl, #1
+ bl NandcSetDdrMode
+.L1082:
+ mov r3, #92
+ str r3, [r4, #8]
+ mov r3, #197
+ str r3, [r4, #8]
+.L1081:
+ mov r6, #1
+ mvn r5, #0
+ ldr fp, .L1101
+ b .L1083
+.L1092:
+ ldrb r3, [fp, #3765] @ zero_extendqisi2
+ mov r0, r4
+ uxtb r1, r6
+ sub r3, r3, #67
+ uxtb r3, r3
+ cmp r3, #1
+ bhi .L1084
+ bl SandiskSetRRPara
+ b .L1085
+.L1084:
+ bl ToshibaSetRRPara
+.L1085:
+ ldr r2, .L1101
+ ldrb r3, [r2, #3765] @ zero_extendqisi2
+ cmp r3, #34
+ bne .L1086
+ ldr r2, .L1101+4
+ ldrb r3, [r2, #120] @ zero_extendqisi2
+ sub r3, r3, #3
+ cmp r6, r3
+ moveq r3, #179
+ streq r3, [r4, #8]
+.L1086:
+ cmp sl, #0
+ mov r3, #38
+ str r3, [r4, #8]
+ mov r3, #93
+ str r3, [r4, #8]
+ beq .L1087
+ mov r0, #4
+ bl NandcSetDdrMode
+ ldr r1, [sp, #4]
+ mov r2, r9
+ mov r3, r7
+ mov r0, r8
+ bl FlashReadRawPage
+ mov r3, r0
+ mov r0, #0
+ str r3, [sp, #0]
+ bl NandcSetDdrMode
+ ldr r3, [sp, #0]
+ b .L1088
+.L1087:
+ mov r3, r7
+ mov r0, r8
+ ldr r1, [sp, #4]
+ mov r2, r9
+ bl FlashReadRawPage
+ mov r3, r0
+.L1088:
+ cmn r3, #1
+ beq .L1089
+ ldrb r2, [fp, #3836] @ zero_extendqisi2
+ cmn r5, #1
+ moveq r5, r3
+ add r2, r2, r2, asl #1
+ cmp r3, r2, lsr #2
+ bcc .L1100
+ mov r7, #0
+ mov r9, r7
+.L1089:
+ add r6, r6, #1
+.L1083:
+ ldr r2, .L1101+4
+ ldrb r3, [r2, #120] @ zero_extendqisi2
+ add r3, r3, #1
+ cmp r6, r3
+ bcc .L1092
+ b .L1091
+.L1100:
+ mov r5, r3
+.L1091:
+ ldr r6, .L1101
+ mov r0, r4
+ mov r1, #0
+ ldrb r3, [r6, #3765] @ zero_extendqisi2
+ sub r3, r3, #67
+ uxtb r3, r3
+ cmp r3, #1
+ bhi .L1093
+ bl SandiskSetRRPara
+ b .L1094
+.L1093:
+ bl ToshibaSetRRPara
+.L1094:
+ mov r3, #255
+ str r3, [r4, #8]
+ ldrb r3, [r6, #3836] @ zero_extendqisi2
+ adds r2, r5, #1
+ mov r0, r8
+ movne r2, #1
+ add r3, r3, r3, asl #1
+ cmp r5, r3, lsr #2
+ movcc r3, #0
+ andcs r3, r2, #1
+ cmp r3, #0
+ movne r5, #256
+ bl NandcWaitFlashReady
+ cmp sl, #0
+ beq .L1096
+ mov r0, #4
+ bl NandcSetDdrMode
+.L1096:
+ mov r0, r5
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1102:
+ .align 2
+.L1101:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size ToshibaReadRetrial, .-ToshibaReadRetrial
+ .align 2
+ .global FlashSavePhyInfo
+ .type FlashSavePhyInfo, %function
+FlashSavePhyInfo:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ .save {r3, r4, r5, r6, r7, r8, sl, lr}
+ mov r6, #0
+ ldr r5, .L1110
+ ldr r7, .L1110+4
+ ldr r8, .L1110+8
+ ldr r3, [r5, #3780]
+ ldrb r0, [r7, #128] @ zero_extendqisi2
+ str r3, [r7, #124]
+ bl FlashBchSel
+ mov r1, #0
+ mov r2, #2048
+ ldr r0, [r5, #3780]
+ bl ftl_memset
+ ldr r3, [r7, #124]
+ ldr r1, .L1110+12
+ mov r2, #32
+ str r8, [r3, #0]
+ ldr r4, [r7, #124]
+ ldrb r3, [r5, #3766] @ zero_extendqisi2
+ add r0, r4, #16
+ strh r3, [r4, #12] @ movhi
+ ldrb r3, [r5, #1] @ zero_extendqisi2
+ strh r3, [r4, #14] @ movhi
+ ldrb r3, [r5, #3777] @ zero_extendqisi2
+ str r3, [r4, #1076]
+ bl memcpy
+ add r0, r4, #80
+ ldr r1, .L1110+16
+ mov r2, #8
+ bl memcpy
+ add r0, r4, #96
+ ldr r1, .L1110+20
+ mov r2, #32
+ bl memcpy
+ ldr r0, [r7, #124]
+ ldr r1, .L1110+24
+ mov r2, #32
+ add r0, r0, #160
+ bl memcpy
+ ldr r4, [r7, #124]
+ add r1, r5, #48
+ mov r2, #32
+ add r0, r4, #192
+ bl memcpy
+ mov r2, #852
+ add r0, r4, #224
+ ldr r1, .L1110+28
+ bl memcpy
+ add r0, r4, #12
+ movw r1, #2036
+ bl JSHash
+ movw r3, #1592
+ str r3, [r4, #4]
+ ldr r3, [r7, #116]
+ str r3, [r7, #124]
+ str r0, [r4, #8]
+ mov r0, #0
+ bl flash_enter_slc_mode
+ mov r4, r6
+.L1106:
+ ldr r1, [r5, #4]
+ mov r0, #0
+ mov r2, r0
+ mul r1, r1, r4
+ bl FlashEraseBlock
+ ldr r1, [r5, #4]
+ mov r0, #0
+ ldr r2, [r5, #3780]
+ mov r3, r0
+ mul r1, r1, r4
+ bl FlashProgPage
+ ldr r1, [r5, #4]
+ mov r0, #0
+ ldr r2, [r5, #3780]
+ mov r3, r0
+ mul r1, r1, r4
+ add r1, r1, #1
+ bl FlashProgPage
+ ldr r1, [r5, #4]
+ mov r0, #0
+ ldr r2, [r7, #116]
+ mov r3, r0
+ mul r1, r1, r4
+ bl FlashReadRawPage
+ cmn r0, #1
+ beq .L1104
+ ldr sl, [r7, #124]
+ ldr r3, [sl, #0]
+ cmp r3, r8
+ bne .L1104
+ add r0, sl, #12
+ movw r1, #2036
+ bl JSHash
+ ldr r3, [sl, #8]
+ cmp r3, r0
+ bne .L1104
+ add r3, r4, #1
+ str r3, [r7, #132]
+ ldr r3, [r5, #4]
+ add r6, r6, #1
+ cmp r6, #1
+ mul r3, r3, r4
+ str r3, [r7, #136]
+ bhi .L1105
+.L1104:
+ add r4, r4, #1
+ cmp r4, #4
+ bne .L1106
+.L1105:
+ mov r0, #0
+ bl flash_exit_slc_mode
+ cmp r6, #0
+ mvneq r0, #0
+ movne r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, pc}
+.L1111:
+ .align 2
+.L1110:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word 1312902724
+ .word .LANCHOR0+2132
+ .word .LANCHOR0+3768
+ .word .LANCHOR0+2740
+ .word .LANCHOR1+2688
+ .word .LANCHOR0+2908
+ .fnend
+ .size FlashSavePhyInfo, .-FlashSavePhyInfo
+ .align 2
+ .global FlashReadIdbDataRaw
+ .type FlashReadIdbDataRaw, %function
+FlashReadIdbDataRaw:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r2, #4
+ mov sl, r0
+ ldr r1, .L1123
+ add r0, sp, #4
+ bl memcpy
+ ldr r3, .L1123+4
+ ldr r2, [r3, #3788]
+ ldrb fp, [r3, #3836] @ zero_extendqisi2
+ ldr r3, .L1123+8
+ cmp r2, r3
+ bne .L1113
+ mov r0, #0
+ bl flash_enter_slc_mode
+.L1113:
+ ldr r7, .L1123+4
+ mov r0, sl
+ mov r1, #0
+ mov r2, #2048
+ bl ftl_memset
+ mvn r8, #0
+ mov r4, #2
+ mov r6, r7
+ ldr r9, .L1123+12
+ b .L1114
+.L1121:
+ mov r5, #0
+.L1116:
+ add r3, sp, #4
+ ldrb r0, [r3, r5] @ zero_extendqisi2
+ bl FlashBchSel
+ ldr r1, [r7, #4]
+ mov r0, #0
+ ldr r2, [r7, #3780]
+ mov r3, r0
+ mul r1, r1, r4
+ bl FlashReadRawPage
+ cmn r0, #1
+ bne .L1115
+ add r5, r5, #1
+ cmp r5, #4
+ bne .L1116
+ b .L1117
+.L1115:
+ ldr r3, [r6, #3780]
+ ldr r3, [r3, #0]
+ cmp r3, r9
+ bne .L1117
+ add r3, sp, #8
+ ldr r0, .L1123+16
+ add r5, r3, r5
+ ldrb r1, [r5, #-4] @ zero_extendqisi2
+ bl printk
+ mov r2, #2048
+ mov r0, sl
+ ldr r1, [r6, #3780]
+ bl memcpy
+ ldr r3, [r6, #3780]
+ ldr r3, [r3, #512]
+ strb r3, [r6, #1]
+ ldr r3, .L1123+20
+ ldr r2, [r3, #132]
+ cmp r2, r4
+ bls .L1120
+ str r4, [r3, #132]
+ mov r8, #0
+ bl FlashSavePhyInfo
+.L1117:
+ add r4, r4, #1
+.L1114:
+ ldrb r3, [r7, #1] @ zero_extendqisi2
+ cmp r4, r3
+ bcc .L1121
+ b .L1118
+.L1120:
+ mov r8, #0
+.L1118:
+ mov r0, fp
+ bl FlashBchSel
+ ldr r3, .L1123+4
+ ldr r2, [r3, #3788]
+ ldr r3, .L1123+8
+ cmp r2, r3
+ bne .L1119
+ mov r0, #0
+ bl flash_exit_slc_mode
+.L1119:
+ mov r0, r8
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1124:
+ .align 2
+.L1123:
+ .word .LANCHOR3+11
+ .word .LANCHOR0
+ .word 1446522928
+ .word -52655045
+ .word .LC88
+ .word .LANCHOR2
+ .fnend
+ .size FlashReadIdbDataRaw, .-FlashReadIdbDataRaw
+ .align 2
+ .global FlashLoadPhyInfo
+ .type FlashLoadPhyInfo, %function
+FlashLoadPhyInfo:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r2, #4
+ ldr r1, .L1135
+ add r0, sp, #4
+ bl memcpy
+ ldr r7, .L1135+4
+ ldr r2, .L1135+8
+ movw r3, #2698
+ ldr r5, .L1135+12
+ mov r4, #0
+ mov r0, r4
+ mov r8, #4
+ ldrh fp, [r2, r3]
+ mvn sl, #0
+ ldr r3, [r7, #3780]
+ str r4, [r5, #136]
+ str r3, [r5, #124]
+ bl flash_enter_slc_mode
+ b .L1126
+.L1128:
+ add r3, sp, #4
+ ldrb r0, [r3, r6] @ zero_extendqisi2
+ bl FlashBchSel
+ mov r0, #0
+ mov r1, r4
+ ldr r2, [r7, #3780]
+ mov r3, r0
+ bl FlashReadRawPage
+ cmn r0, #1
+ bne .L1127
+ mov r0, #0
+ mov r1, r9
+ ldr r2, [r7, #3780]
+ mov r3, r0
+ bl FlashReadRawPage
+ cmn r0, #1
+ bne .L1127
+ add r6, r6, #1
+ cmp r6, #4
+ beq .L1129
+ b .L1128
+.L1127:
+ ldr r6, [r5, #124]
+ ldr r3, .L1135+16
+ ldr r2, [r6, #0]
+ cmp r2, r3
+ bne .L1129
+ cmp sl, #0
+ bne .L1130
+ ldr r2, .L1135+8
+ movw r3, #2698
+ mov r0, r4
+ ldrh r1, [r2, r3]
+ bl __aeabi_uidiv
+ ldr r3, .L1135+12
+ add r0, r0, #1
+ str r0, [r3, #132]
+ b .L1131
+.L1130:
+ add r0, r6, #12
+ movw r1, #2036
+ bl JSHash
+ ldr r3, [r6, #8]
+ cmp r3, r0
+ bne .L1129
+ ldr sl, .L1135+8
+ add r1, r6, #160
+ mov r2, #32
+ add r0, sl, #2688
+ bl memcpy
+ add r1, r6, #192
+ mov r2, #32
+ ldr r0, .L1135+20
+ bl memcpy
+ add r1, r6, #224
+ mov r2, #852
+ ldr r0, .L1135+24
+ bl memcpy
+ ldr r3, [r6, #1076]
+ mov r0, r4
+ str r4, [r5, #136]
+ strb r3, [r7, #3777]
+ movw r3, #2698
+ ldrh r1, [sl, r3]
+ mov sl, #0
+ bl __aeabi_uidiv
+ add r0, r0, #1
+ str r0, [r5, #132]
+ cmp r0, #1
+ moveq r3, #2
+ streq r3, [r5, #132]
+ ldrh r3, [r6, #14]
+ strb r3, [r5, #140]
+.L1129:
+ subs r8, r8, #1
+ add r4, r4, fp
+ beq .L1133
+.L1126:
+ add r9, r4, #1
+ mov r6, #0
+ b .L1128
+.L1133:
+ mov r0, r8
+ bl flash_exit_slc_mode
+.L1131:
+ mov r0, sl
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1136:
+ .align 2
+.L1135:
+ .word .LANCHOR3+11
+ .word .LANCHOR0
+ .word .LANCHOR1
+ .word .LANCHOR2
+ .word 1312902724
+ .word .LANCHOR0+48
+ .word .LANCHOR0+2908
+ .fnend
+ .size FlashLoadPhyInfo, .-FlashLoadPhyInfo
+ .align 2
+ .global FlashDdrTunningRead
+ .type FlashDdrTunningRead, %function
+FlashDdrTunningRead:
+ .fnstart
+ @ args = 4, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov sl, r3
+ ldr r4, .L1158
+ .pad #20
+ sub sp, sp, #20
+ mov fp, r0
+ mov r9, r2
+ str r1, [sp, #0]
+ ldr r3, [r4, #2164]
+ ldr r7, [r4, #12]
+ ldr r3, [r3, #304]
+ cmp r7, #7
+ movhi r7, #12
+ movls r7, #6
+ str r3, [sp, #12]
+ ldr r3, [sp, #56]
+ cmp r3, #0
+ moveq r8, #1024
+ beq .L1139
+ mov r0, #1
+ bl FlashSetInterfaceMode
+ mov r0, #1
+ bl NandcSetMode
+ mov r0, fp
+ bl FlashReset
+ ldr r1, [sp, #0]
+ mov r2, r9
+ mov r3, sl
+ mov r0, fp
+ bl FlashReadRawPage
+ mov r8, r0
+ ldrb r0, [r4, #3776] @ zero_extendqisi2
+ bl FlashSetInterfaceMode
+ ldrb r0, [r4, #3776] @ zero_extendqisi2
+ bl NandcSetMode
+ cmn r8, #1
+ beq .L1140
+ ldr r0, .L1158+4
+ mov r2, r8
+ ldr r1, [sp, #0]
+ bl printk
+ cmp r8, #9
+ bhi .L1141
+ add r4, r4, fp, asl #3
+ ldr r3, [r4, #16]
+ ldr r2, [r3, #3840]
+ ldr r2, [r3, #0]
+ orr r2, r2, #131072
+ str r2, [r3, #0]
+.L1141:
+ ldr r3, .L1158+8
+ ldr r2, [r3, #144]
+ add r2, r2, #1
+ str r2, [r3, #144]
+ cmp r2, #2048
+ movcs sl, #0
+ strcs sl, [r3, #144]
+ movcs r9, sl
+ bcc .L1140
+.L1139:
+ mov r4, #0
+ str fp, [sp, #4]
+ mov r5, r4
+ mvn r6, #0
+ mov fp, r4
+ str r4, [sp, #8]
+.L1146:
+ uxtb r0, r7
+ bl NandcSetDdrPara
+ mov r3, sl
+ ldr r0, [sp, #4]
+ mov r2, r9
+ ldr r1, [sp, #0]
+ bl FlashReadRawPage
+ add r3, r8, #1
+ cmp r0, r3
+ bhi .L1142
+ cmp r0, #2
+ bhi .L1152
+ add r5, r5, #1
+ cmp r5, #9
+ bls .L1152
+ mov ip, fp
+ rsb r4, r5, r7
+ ldr fp, [sp, #4]
+ mov r8, r0
+ mov r6, #0
+ b .L1144
+.L1142:
+ cmp fp, r5
+ bcs .L1153
+ cmp r5, #7
+ rsb r3, r5, r4
+ str r3, [sp, #8]
+ bhi .L1157
+ mov fp, r5
+ b .L1153
+.L1152:
+ mov r6, #0
+ mov r4, r7
+ mov r8, r0
+ mov sl, r6
+ mov r9, r6
+ b .L1143
+.L1153:
+ mov r5, #0
+.L1143:
+ add r7, r7, #2
+ cmp r7, #69
+ bls .L1146
+ mov ip, fp
+ ldr fp, [sp, #4]
+.L1144:
+ cmp ip, r5
+ bcc .L1147
+ b .L1145
+.L1157:
+ ldr fp, [sp, #4]
+.L1145:
+ ldr r4, [sp, #8]
+.L1147:
+ cmp r4, #0
+ beq .L1148
+ ldr r0, .L1158+12
+ mov r1, r4
+ bl printk
+ uxtb r0, r4
+ bl NandcSetDdrPara
+.L1148:
+ cmn r6, #1
+ bne .L1140
+ ldr r0, .L1158+16
+ mov r1, fp
+ ldr r2, [sp, #0]
+ bl printk
+ ldr r3, [sp, #56]
+ cmp r3, #0
+ moveq r8, r6
+ beq .L1140
+ ldr r3, [sp, #12]
+ ubfx r0, r3, #8, #8
+ bl NandcSetDdrPara
+.L1140:
+ mov r0, r8
+ add sp, sp, #20
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1159:
+ .align 2
+.L1158:
+ .word .LANCHOR0
+ .word .LC89
+ .word .LANCHOR2
+ .word .LC90
+ .word .LC91
+ .fnend
+ .size FlashDdrTunningRead, .-FlashDdrTunningRead
+ .align 2
+ .global FlashDdrParaScan
+ .type FlashDdrParaScan, %function
+FlashDdrParaScan:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r4, r5, r6, r7, r8, lr}
+ .save {r0, r1, r4, r5, r6, r7, r8, lr}
+ mov r7, r0
+ ldr r5, .L1164
+ mov r4, #0
+ mov r6, r1
+ ldrb r0, [r5, #3776] @ zero_extendqisi2
+ bl FlashSetInterfaceMode
+ ldrb r0, [r5, #3776] @ zero_extendqisi2
+ bl NandcSetMode
+ mov r1, r6
+ mov r2, r4
+ mov r3, r4
+ mov r0, r7
+ str r4, [sp, #0]
+ bl FlashDdrTunningRead
+ mov r1, r6
+ mov r2, r4
+ mov r3, r4
+ mov r8, r0
+ mov r0, r7
+ bl FlashReadRawPage
+ cmn r0, #1
+ beq .L1161
+ cmn r8, #1
+ bne .L1162
+.L1161:
+ ldrb r3, [r5, #3776] @ zero_extendqisi2
+ tst r3, #1
+ beq .L1162
+ mov r0, #1
+ bl FlashSetInterfaceMode
+ mov r0, #1
+ bl NandcSetMode
+ ldr r3, .L1164
+ mov r2, #0
+ strb r2, [r3, #3777]
+ b .L1163
+.L1162:
+ mov r3, #1
+ strb r3, [r5, #3777]
+.L1163:
+ mov r0, #0
+ ldmfd sp!, {r2, r3, r4, r5, r6, r7, r8, pc}
+.L1165:
+ .align 2
+.L1164:
+ .word .LANCHOR0
+ .fnend
+ .size FlashDdrParaScan, .-FlashDdrParaScan
+ .align 2
+ .global FlashInit
+ .type FlashInit, %function
+FlashInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r7, r0
+ mov r0, #32768
+ ldr r6, .L1208
+ bl ftl_malloc
+ ldr r5, .L1208+4
+ mov r4, #0
+ str r0, [r6, #3780]
+ mov r0, #32768
+ bl ftl_malloc
+ str r0, [r5, #116]
+ mov r0, #4096
+ bl ftl_malloc
+ str r0, [r5, #148]
+ mov r0, #32768
+ bl ftl_malloc
+ str r0, [r5, #152]
+ mov r0, #4096
+ bl ftl_malloc
+ mov r3, #50
+ str r4, [r5, #132]
+ strb r3, [r5, #140]
+ strb r3, [r6, #1]
+ mov r3, #128
+ str r4, [r5, #144]
+ str r3, [r6, #4]
+ mov r3, #60
+ strb r4, [r6, #3777]
+ strb r3, [r5, #128]
+ strb r4, [r6, #0]
+ str r0, [r5, #156]
+ mov r0, r7
+ bl NandcInit
+ ldr r5, .L1208+8
+.L1169:
+ uxtb r0, r4
+ mov r1, r5
+ bl FlashReadIDRaw
+ cmp r4, #0
+ bne .L1167
+ ldrb r3, [r6, #2132] @ zero_extendqisi2
+ sub r3, r3, #1
+ uxtb r3, r3
+ cmp r3, #253
+ bhi .L1201
+ ldrb r3, [r6, #2133] @ zero_extendqisi2
+ cmp r3, #255
+ beq .L1202
+.L1167:
+ add r4, r4, #1
+ add r5, r5, #8
+ cmp r4, #4
+ bne .L1169
+ ldr r4, .L1208
+ ldrb r3, [r4, #2132] @ zero_extendqisi2
+ cmp r3, #173
+ beq .L1170
+ ldr r0, [r4, #3784]
+ bl NandcSetDdrMode
+.L1170:
+ mov r1, #0
+ ldr r0, .L1208+12
+ mov r2, #852
+ bl ftl_memset
+ ldr r3, .L1208+16
+ str r3, [r4, #2776]
+ mov r3, #0
+ strb r3, [r4, #8]
+ ldrb r3, [r4, #2133] @ zero_extendqisi2
+ sub r1, r3, #218
+ rsbs ip, r1, #0
+ adc ip, ip, r1
+ cmp r3, #218
+ cmpne r3, #241
+ beq .L1171
+ cmp r3, #220
+ bne .L1172
+ ldr r2, .L1208
+ ldrb r2, [r2, #2135] @ zero_extendqisi2
+ cmp r2, #149
+ bne .L1172
+.L1171:
+ ldr r2, .L1208
+ mov r1, #1
+ mov r0, #16
+ strb r1, [r2, #0]
+ ldr r1, .L1208+4
+ strb r0, [r2, #1]
+ strb r0, [r1, #128]
+ ldrb r0, [r2, #2132] @ zero_extendqisi2
+ ldr r2, .L1208+20
+ cmp r0, #152
+ strb r0, [r2, #2969]
+ moveq r0, #24
+ streqb r0, [r1, #128]
+ cmp ip, #0
+ movwne r3, #2982
+ movne r1, #2048
+ strneh r1, [r2, r3] @ movhi
+ mvnne r3, #37
+ bne .L1205
+.L1174:
+ cmp r3, #220
+ bne .L1175
+ movw r3, #2982
+ mov r1, #4096
+ strh r1, [r2, r3] @ movhi
+ mvn r3, #35
+.L1205:
+ strb r3, [r2, #2970]
+.L1175:
+ ldr r1, .L1208+24
+ mov r2, #32
+ ldr r0, .L1208+28
+ bl memcpy
+ ldr r0, .L1208+16
+ mov r2, #32
+ add r1, r0, #280
+ bl memcpy
+.L1172:
+ ldr r4, .L1208
+ ldrb r3, [r4, #0] @ zero_extendqisi2
+ cmp r3, #0
+ bne .L1176
+ bl FlashLoadPhyInfoInRam
+ cmp r0, #0
+ bne .L1177
+ ldr r3, [r4, #2776]
+ ldrh r0, [r3, #16]
+ ubfx r0, r0, #8, #3
+ strb r0, [r4, #3776]
+ tst r0, #1
+ bne .L1177
+ mov r3, #1
+ strb r3, [r4, #3777]
+ bl FlashSetInterfaceMode
+ ldrb r0, [r4, #3776] @ zero_extendqisi2
+ bl NandcSetMode
+.L1177:
+ ldr r4, .L1208
+ ldr r3, [r4, #2776]
+ ldrb r3, [r3, #26] @ zero_extendqisi2
+ strb r3, [r4, #80]
+ bl FlashLoadPhyInfo
+ cmp r0, #0
+ beq .L1176
+ ldr r3, [r4, #3784]
+ cmp r3, #0
+ beq .L1179
+ mov r0, #1
+ bl FlashSetInterfaceMode
+ mov r0, #1
+ b .L1206
+.L1179:
+ ldrb r0, [r4, #3776] @ zero_extendqisi2
+ bl FlashSetInterfaceMode
+ ldrb r0, [r4, #3776] @ zero_extendqisi2
+.L1206:
+ bl NandcSetMode
+ bl FlashLoadPhyInfo
+ cmp r0, #0
+ beq .L1176
+ ldr r4, .L1208
+ mov r0, #1
+ bl FlashSetInterfaceMode
+ mov r0, #1
+ bl NandcSetMode
+ ldr r0, .L1208+32
+ ldr r3, [r4, #2776]
+ ldrh r1, [r3, #14]
+ bl printk
+ bl FlashLoadPhyInfoInRam
+ cmn r0, #1
+ ldmeqfd sp!, {r3, r4, r5, r6, r7, pc}
+ bl FlashDieInfoInit
+ ldr r3, [r4, #2776]
+ ldrb r0, [r3, #19] @ zero_extendqisi2
+ bl FlashGetReadRetryDefault
+ ldr r1, .L1208+36
+ ldr r0, .L1208+4
+ ldr r3, [r4, #2776]
+ ldrh r1, [r0, r1]
+ ldrb r2, [r3, #9] @ zero_extendqisi2
+ add r1, r1, #4080
+ add r1, r1, #15
+ cmp r2, r1, lsr #12
+ blt .L1182
+ ldrh r1, [r3, #14]
+ add r1, r1, #255
+ cmp r2, r1, lsr #8
+ bge .L1183
+.L1182:
+ ldrh r2, [r3, #14]
+ bic r2, r2, #255
+ strh r2, [r3, #14] @ movhi
+.L1183:
+ ldr r3, .L1208
+ ldrb r3, [r3, #3776] @ zero_extendqisi2
+ tst r3, #6
+ beq .L1184
+ bl FlashSavePhyInfo
+ ldr r3, .L1208+4
+ mov r0, #0
+ ldr r1, [r3, #136]
+ bl FlashDdrParaScan
+.L1184:
+ bl FlashSavePhyInfo
+.L1176:
+ ldr r1, .L1208
+ ldr r3, [r1, #2776]
+ ldrb r2, [r3, #26] @ zero_extendqisi2
+ strb r2, [r1, #80]
+ ldrh r2, [r3, #16]
+ ubfx r0, r2, #7, #1
+ strb r0, [r1, #8]
+ ldr r0, .L1208+4
+ tst r2, #64
+ ubfx ip, r2, #3, #1
+ strb ip, [r0, #160]
+ ubfx ip, r2, #4, #1
+ strb ip, [r1, #3837]
+ ubfx ip, r2, #8, #3
+ strb ip, [r1, #3776]
+ mov ip, #0
+ str ip, [r0, #164]
+ beq .L1185
+ ldrb ip, [r1, #2909] @ zero_extendqisi2
+ ldrb r2, [r3, #19] @ zero_extendqisi2
+ strb ip, [r1, #3764]
+ ldrb ip, [r1, #2910] @ zero_extendqisi2
+ strb r2, [r1, #3765]
+ strb ip, [r0, #120]
+ sub ip, r2, #1
+ uxtb ip, ip
+ cmp ip, #5
+ bhi .L1186
+ sub r2, r2, #5
+ ldr ip, .L1208+40
+ uxtb r2, r2
+ cmp r2, #1
+ str ip, [r0, #164]
+ movls r2, #1
+ strls r2, [r1, #3828]
+ b .L1185
+.L1186:
+ sub r1, r2, #17
+ uxtb r1, r1
+ cmp r1, #2
+ bhi .L1187
+ ldr r1, .L1208+44
+ cmp r2, #19
+ moveq r2, #15
+ str r1, [r0, #164]
+ mov r1, #7
+ strb r1, [r0, #120]
+ streqb r2, [r0, #120]
+ b .L1185
+.L1187:
+ cmp r2, #33
+ cmpne r2, #65
+ beq .L1188
+ cmp r2, #66
+ bne .L1189
+.L1188:
+ ldr r2, .L1208+4
+ mov r0, #4
+ ldr r1, .L1208+48
+ str r1, [r2, #164]
+ ldr r1, .L1208
+ strb r0, [r1, #3764]
+ mov r1, #7
+ strb r1, [r2, #120]
+ b .L1185
+.L1189:
+ cmp r2, #67
+ cmpne r2, #34
+ beq .L1190
+ cmp r2, #35
+ beq .L1190
+ cmp r2, #68
+ bne .L1191
+.L1190:
+ ldr r1, .L1208+4
+ cmp r2, #35
+ cmpne r2, #68
+ ldr r0, .L1208+48
+ sub r2, r2, #67
+ uxtb r2, r2
+ str r0, [r1, #164]
+ mov r0, #7
+ strb r0, [r1, #120]
+ moveq r0, #17
+ streqb r0, [r1, #120]
+ cmp r2, #1
+ ldr r2, .L1208
+ movls r1, #4
+ movhi r1, #5
+ strb r1, [r2, #3764]
+ b .L1185
+.L1191:
+ cmp r2, #49
+ ldreq r2, .L1208+52
+ streq r2, [r0, #164]
+.L1185:
+ ldrb r1, [r3, #12] @ zero_extendqisi2
+ ldrh r0, [r3, #10]
+ ldrb r4, [r3, #18] @ zero_extendqisi2
+ bl __aeabi_idiv
+ mov r1, r0
+ mov r0, r4
+ bl BuildFlashLsbPageTable
+ bl FlashDieInfoInit
+ ldr r3, .L1208
+ ldrb r2, [r3, #2132] @ zero_extendqisi2
+ cmp r2, #44
+ bne .L1194
+ ldrb r2, [r3, #3777] @ zero_extendqisi2
+ cmp r2, #0
+ beq .L1194
+ mov r2, #0
+ mov r0, #1
+ strb r2, [r3, #3777]
+ bl FlashSetInterfaceMode
+ mov r0, #1
+ bl NandcSetMode
+.L1194:
+ mov r0, #0
+ bl flash_enter_slc_mode
+ ldr r2, .L1208
+ ldrb r3, [r2, #3776] @ zero_extendqisi2
+ tst r3, #6
+ beq .L1195
+ ldrb r2, [r2, #3777] @ zero_extendqisi2
+ cmp r2, #0
+ bne .L1196
+ tst r3, #1
+ bne .L1195
+.L1196:
+ ldr r3, .L1208+4
+ mov r0, #0
+ ldr r1, [r3, #136]
+ bl FlashDdrParaScan
+.L1195:
+ ldr r4, .L1208
+ mov r0, #0
+ bl flash_exit_slc_mode
+ ldr r3, [r4, #2776]
+ ldrb r0, [r3, #20] @ zero_extendqisi2
+ bl FlashBchSel
+ add r0, r4, #84
+ bl FlashReadIdbDataRaw
+ mov r3, r4
+ cmp r0, #0
+ movne r3, #16
+ strneb r3, [r4, #1]
+ bne .L1199
+ ldr r2, .L1208+4
+ ldrb r1, [r3, #1] @ zero_extendqisi2
+ ldrb r2, [r2, #140] @ zero_extendqisi2
+ cmp r1, r2
+ strhib r2, [r3, #1]
+ ldrb r3, [r3, #1] @ zero_extendqisi2
+ cmp r3, #15
+ ldrls r3, .L1208
+ movls r2, #16
+ strlsb r2, [r3, #1]
+.L1199:
+ ldr r4, .L1208
+ movw r6, #2214
+ ldr r0, .L1208+56
+ bl FlashTimingCfg
+ mov r3, #2208
+ ldr r5, [r4, #2776]
+ ldrb r2, [r5, #12] @ zero_extendqisi2
+ ldrh r7, [r5, #14]
+ strh r2, [r4, r3] @ movhi
+ ldrb r3, [r5, #7] @ zero_extendqisi2
+ ldrb r2, [r4, #3766] @ zero_extendqisi2
+ str r3, [r4, #2204]
+ ldr r3, [r4, #2132]
+ str r3, [r4, #2200]
+ movw r3, #2210
+ strh r2, [r4, r3] @ movhi
+ add r3, r3, #2
+ ldrb r2, [r5, #13] @ zero_extendqisi2
+ strh r7, [r4, r6] @ movhi
+ strh r2, [r4, r3] @ movhi
+ add r3, r3, #4
+ ldrh r2, [r5, #10]
+ strh r2, [r4, r3] @ movhi
+ ldrb r1, [r5, #12] @ zero_extendqisi2
+ ldrh r0, [r5, #10]
+ bl __aeabi_idiv
+ movw r3, #2218
+ mov lr, #512
+ movw r2, #2222
+ strh r0, [r4, r3] @ movhi
+ movw r0, #2220
+ ldrb ip, [r5, #9] @ zero_extendqisi2
+ strh ip, [r4, r0] @ movhi
+ ldrb r3, [r5, #9] @ zero_extendqisi2
+ ldrh r1, [r5, #10]
+ mul r1, r1, r3
+ mov r3, #2224
+ strh lr, [r4, r3] @ movhi
+ add r3, r3, #2
+ ldrb lr, [r4, #1] @ zero_extendqisi2
+ strh lr, [r4, r3] @ movhi
+ uxth r1, r1
+ ldrb lr, [r4, #0] @ zero_extendqisi2
+ strh r1, [r4, r2] @ movhi
+ cmp lr, #1
+ bne .L1200
+ mov lr, #16
+ mov r7, r7, lsr #1
+ mov ip, ip, asl #1
+ mov r1, r1, asl #1
+ strb lr, [r4, #1]
+ strh r1, [r4, r2] @ movhi
+ mov r2, #8
+ strh r7, [r4, r6] @ movhi
+ strh ip, [r4, r0] @ movhi
+ strh r2, [r4, r3] @ movhi
+.L1200:
+ ldrb r0, [r5, #20] @ zero_extendqisi2
+ bl FlashBchSel
+ bl FlashSuspend
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1201:
+ mvn r0, #1
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1202:
+ mvn r0, #1
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1209:
+ .align 2
+.L1208:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LANCHOR0+2132
+ .word .LANCHOR0+2908
+ .word .LANCHOR1+2688
+ .word .LANCHOR1
+ .word .LANCHOR1+2592
+ .word .LANCHOR0+48
+ .word .LC92
+ .word -914
+ .word HynixReadRetrial
+ .word MicronReadRetrial
+ .word ToshibaReadRetrial
+ .word SamsungReadRetrial
+ .word 150000
+ .fnend
+ .size FlashInit, .-FlashInit
+ .align 2
+ .global FlashReadPage
+ .type FlashReadPage, %function
+FlashReadPage:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr}
+ mov r6, r0
+ mov r5, r1
+ mov r8, r2
+ mov sl, r3
+ bl FlashReadRawPage
+ cmn r0, #1
+ mov r4, r0
+ bne .L1211
+ ldr r7, .L1216
+ ldrb r9, [r7, #8] @ zero_extendqisi2
+ cmp r9, #0
+ beq .L1212
+ mov r3, #0
+ mov r0, r6
+ strb r3, [r7, #8]
+ mov r1, r5
+ mov r2, r8
+ mov r3, sl
+ bl FlashReadRawPage
+ strb r9, [r7, #8]
+ cmn r0, #1
+ movne r4, r0
+ bne .L1211
+.L1212:
+ ldr r7, .L1216
+ ldrb r3, [r7, #3777] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L1211
+ ldr r3, [r7, #2164]
+ mov r0, r6
+ mov r1, r5
+ mov r2, r8
+ ldr r9, [r3, #304]
+ mov r3, #1
+ str r3, [sp, #0]
+ mov r3, sl
+ bl FlashDdrTunningRead
+ cmn r0, #1
+ mov r4, r0
+ beq .L1213
+ ldrb r3, [r7, #3836] @ zero_extendqisi2
+ cmp r0, r3, lsr #1
+ bls .L1211
+.L1213:
+ ubfx r0, r9, #8, #8
+ bl NandcSetDdrPara
+.L1211:
+ ldr r3, .L1216+4
+ ldr ip, [r3, #164]
+ adds r3, ip, #0
+ movne r3, #1
+ cmn r4, #1
+ movne r3, #0
+ cmp r3, #0
+ beq .L1214
+ mov r1, r5
+ mov r2, r8
+ mov r3, sl
+ mov r0, r6
+ blx ip
+ mov r2, r6
+ mov r3, r5
+ mov r4, r0
+ ldr r0, .L1216+8
+ mov r1, r4
+ bl printk
+.L1214:
+ mov r0, r4
+ ldmfd sp!, {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}
+.L1217:
+ .align 2
+.L1216:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LC93
+ .fnend
+ .size FlashReadPage, .-FlashReadPage
+ .align 2
+ .global FlashReadSlc2KPages
+ .type FlashReadSlc2KPages, %function
+FlashReadSlc2KPages:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L1231
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r8, r1
+ .pad #28
+ sub sp, sp, #28
+ mov fp, r2
+ ldrb sl, [r3, #2697] @ zero_extendqisi2
+ mov r4, r0
+ mov r7, #0
+ ldr r6, .L1231+4
+ b .L1219
+.L1228:
+ rsb r3, r7, r8
+ add r2, sp, #20
+ mov r0, r4
+ mov r1, fp
+ uxtb r3, r3
+ str r3, [sp, #0]
+ add r3, sp, #16
+ bl LogAddr2PhyAddr
+ ldr r3, [sp, #16]
+ ldrb r2, [r6, #3766] @ zero_extendqisi2
+ cmp r3, r2
+ mvncs r3, #0
+ strcs r3, [r4, #0]
+ bcs .L1221
+ add r3, r6, r3
+ ldrb r5, [r3, #3768] @ zero_extendqisi2
+ mov r0, r5
+ bl NandcWaitFlashReady
+ mov r0, r5
+ bl NandcFlashCs
+ ldr r1, [sp, #20]
+ mov r0, r5
+ bl FlashReadCmd
+ mov r0, r5
+ bl NandcWaitFlashReady
+ ldr r3, [r4, #12]
+ mov r2, sl
+ mov r1, #0
+ mov r0, r5
+ str r3, [sp, #0]
+ ldr r3, [r4, #8]
+ bl NandcXferData
+ ldr r3, [sp, #20]
+ ldr r1, [r6, #4]
+ add r1, r1, r3
+ mov r9, r0
+ mov r0, r5
+ bl FlashReadCmd
+ ldr r3, [r4, #8]
+ ldr r2, [r4, #12]
+ mov r1, #0
+ cmp r3, #0
+ mov r0, r5
+ addne r3, r3, #2048
+ cmp r2, #0
+ addne r2, r2, #8
+ str r2, [sp, #0]
+ mov r2, sl
+ bl NandcXferData
+ mov r3, r0
+ mov r0, r5
+ str r3, [sp, #12]
+ bl NandcFlashDeCs
+ ldr r3, [sp, #12]
+ cmp r3, r9
+ movcs r9, r3
+ ldrb r3, [r6, #3836] @ zero_extendqisi2
+ adds r2, r9, #1
+ add r3, r3, r3, asl #1
+ movne r2, #1
+ cmp r9, r3, lsr #2
+ movls r3, #0
+ andhi r3, r2, #1
+ cmp r3, #0
+ movne r9, #256
+ cmp r9, #256
+ cmnne r9, #1
+ str r9, [r4, #0]
+ movne r3, #0
+ strne r3, [r4, #0]
+ ldr r3, [r4, #12]
+ cmp r3, #0
+ beq .L1226
+ ldr r2, [r3, #8]
+ cmn r2, #1
+ bne .L1226
+ ldr r3, [r3, #0]
+ cmn r3, #1
+ strne r2, [r4, #0]
+.L1226:
+ ldr r3, [r4, #0]
+ cmn r3, #1
+ bne .L1221
+ ldr r1, [r4, #4]
+ ldr r0, .L1231+8
+ ldrb r2, [r6, #3836] @ zero_extendqisi2
+ bl printk
+ ldr r1, [r4, #8]
+ cmp r1, #0
+ beq .L1227
+ ldr r0, .L1231+12
+ mov r2, #4
+ mov r3, #8
+ bl rknand_print_hex
+.L1227:
+ ldr r1, [r4, #12]
+ cmp r1, #0
+ beq .L1221
+ mov r2, #4
+ ldr r0, .L1231+16
+ mov r3, r2
+ bl rknand_print_hex
+.L1221:
+ add r7, r7, #1
+ add r4, r4, #36
+.L1219:
+ cmp r7, r8
+ bne .L1228
+ mov r0, #0
+ add sp, sp, #28
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1232:
+ .align 2
+.L1231:
+ .word .LANCHOR1
+ .word .LANCHOR0
+ .word .LC94
+ .word .LC95
+ .word .LC96
+ .fnend
+ .size FlashReadSlc2KPages, .-FlashReadSlc2KPages
+ .align 2
+ .global FlashReadPages
+ .type FlashReadPages, %function
+FlashReadPages:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 40
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L1269
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #52
+ sub sp, sp, #52
+ ldrb r3, [r3, #2697] @ zero_extendqisi2
+ mov r9, r0
+ str r1, [sp, #28]
+ str r2, [sp, #32]
+ str r3, [sp, #20]
+ ldr r3, .L1269+4
+ ldrb r8, [r3, #0] @ zero_extendqisi2
+ ldrb ip, [r3, #8] @ zero_extendqisi2
+ cmp r8, #0
+ str ip, [sp, #36]
+ moveq sl, r8
+ beq .L1234
+ bl FlashReadSlc2KPages
+ b .L1235
+.L1258:
+ mov r3, #36
+ ldr ip, [sp, #28]
+ mul r3, r3, sl
+ add r2, sp, #44
+ ldr r1, [sp, #32]
+ ldr r5, .L1269+4
+ add r6, r9, r3
+ str r3, [sp, #16]
+ rsb r3, sl, ip
+ ldr fp, [r6, #4]
+ mov r0, r6
+ uxtb r3, r3
+ str r3, [sp, #0]
+ add r3, sp, #40
+ bl LogAddr2PhyAddr
+ ldr r3, [sp, #40]
+ ldrb r2, [r5, #3766] @ zero_extendqisi2
+ cmp r3, r2
+ ldrcs ip, [sp, #16]
+ mvncs r3, #0
+ mov r7, r0
+ strcs r3, [r9, ip]
+ bcs .L1237
+ add r3, r5, r3
+ ldrb r4, [r3, #3768] @ zero_extendqisi2
+ ldr r3, .L1269+8
+ mov r0, r4
+ ldrb r3, [r3, #160] @ zero_extendqisi2
+ cmp r3, #0
+ moveq r7, #0
+ bl NandcWaitFlashReady
+ ldr r3, [r5, #2776]
+ ldrb r3, [r3, #19] @ zero_extendqisi2
+ sub r3, r3, #1
+ uxtb r3, r3
+ cmp r3, #5
+ bhi .L1239
+ add r2, r5, r4
+ ldrb r3, [r2, #2920] @ zero_extendqisi2
+ ldrb r2, [r2, #3760] @ zero_extendqisi2
+ cmp r2, r3
+ beq .L1239
+ mov r0, r4
+ ldrb r1, [r5, #2909] @ zero_extendqisi2
+ add r2, r5, #2912
+ bl HynixSetRRPara
+.L1239:
+ mov r0, r4
+ mov fp, fp, lsr #31
+ bl NandcFlashCs
+ ldr ip, [sp, #32]
+ cmp ip, #1
+ orreq fp, fp, #1
+ str fp, [sp, #24]
+ cmp fp, #0
+ beq .L1245
+ ldr r3, .L1269+4
+ ldrb r3, [r3, #80] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L1245
+ mov r0, r4
+ bl flash_enter_slc_mode
+.L1245:
+ ldr fp, .L1269+4
+.L1268:
+ ldr r1, [sp, #44]
+ cmn r1, #1
+ cmpeq r4, #255
+ moveq r3, #0
+ movne r3, #1
+ moveq r7, r3
+ beq .L1241
+ cmp r7, #0
+ beq .L1242
+ ldr r2, [fp, #4]
+ mov r0, r4
+ add r2, r1, r2
+ bl FlashReadDpCmd
+ b .L1243
+.L1242:
+ mov r0, r4
+ bl FlashReadCmd
+.L1243:
+ mov r0, r4
+ bl NandcWaitFlashReady
+ cmp r7, #0
+ beq .L1241
+ mov r0, r4
+ ldr r1, [sp, #44]
+ bl FlashReadDpDataOutCmd
+.L1241:
+ ldr r3, [r6, #12]
+ mov r0, r4
+ ldr r2, [sp, #20]
+ mov r1, #0
+ str r3, [sp, #0]
+ ldr r3, [r6, #8]
+ bl NandcXferData
+ ldrb r2, [fp, #8] @ zero_extendqisi2
+ adds r2, r2, #0
+ movne r2, #1
+ cmn r0, #1
+ movne r2, #0
+ cmp r2, #0
+ movne r2, #0
+ movne r7, #0
+ strneb r2, [fp, #8]
+ bne .L1268
+.L1244:
+ cmp r7, #0
+ mov r5, r0
+ beq .L1246
+ ldr r3, .L1269+4
+ mov r0, r4
+ ldr r1, [r3, #4]
+ ldr r3, [sp, #44]
+ str r2, [sp, #12]
+ add r1, r1, r3
+ bl FlashReadDpDataOutCmd
+ add r3, sl, #1
+ mov r1, #36
+ ldr r2, [sp, #12]
+ mla r3, r1, r3, r9
+ mov r0, r4
+ ldr r1, [r3, #12]
+ str r1, [sp, #0]
+ mov r1, r2
+ ldr r3, [r3, #8]
+ ldr r2, [sp, #20]
+ bl NandcXferData
+ cmn r0, #1
+ mov r8, r0
+ moveq r7, #0
+.L1246:
+ mov r0, r4
+ ldr fp, .L1269+4
+ bl NandcFlashDeCs
+ ldr ip, [sp, #36]
+ cmn r5, #1
+ strb ip, [fp, #8]
+ bne .L1250
+ ldrb r3, [fp, #3777] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L1248
+ ldr r3, [fp, #2164]
+ mov r0, r4
+ ldr r1, [sp, #44]
+ ldr r7, [r3, #304]
+ mov r3, #1
+ str r3, [sp, #0]
+ ldr r2, [r6, #8]
+ ldr r3, [r6, #12]
+ bl FlashDdrTunningRead
+ cmn r0, #1
+ mov r5, r0
+ beq .L1249
+ ldrb r3, [fp, #3836] @ zero_extendqisi2
+ cmp r0, r3, lsr #1
+ bls .L1264
+.L1249:
+ ubfx r0, r7, #8, #8
+ bl NandcSetDdrPara
+ cmn r5, #1
+ bne .L1264
+.L1248:
+ ldr r3, .L1269+8
+ mov r0, r4
+ ldr r1, [sp, #44]
+ ldr r2, [r6, #8]
+ ldr r7, [r3, #164]
+ ldr r3, [r6, #12]
+ cmp r7, #0
+ beq .L1251
+ blx r7
+ cmn r0, #1
+ mov r5, r0
+ bne .L1265
+ ldr r2, .L1269+4
+ ldr r3, [r2, #2776]
+ ldrb r3, [r3, #19] @ zero_extendqisi2
+ sub r3, r3, #1
+ uxtb r3, r3
+ cmp r3, #5
+ bhi .L1253
+ ldrb r1, [r2, #2909] @ zero_extendqisi2
+ mov r0, r4
+ add r2, r2, #2912
+ mov r3, #0
+ bl HynixSetRRPara
+.L1253:
+ ldr r1, [sp, #44]
+ mov r0, r4
+ ldr r2, [r6, #8]
+ ldr r3, [r6, #12]
+ bl FlashReadRawPage
+ ldr r3, .L1269+4
+ ldr r1, [r6, #4]
+ ldrb r2, [r3, #3836] @ zero_extendqisi2
+ mov r5, r0
+ ldr r0, .L1269+12
+ mov r3, r5
+ bl printk
+ b .L1265
+.L1251:
+ bl FlashReadRawPage
+ mov r5, r0
+ b .L1252
+.L1264:
+ mov r7, #0
+.L1250:
+ ldr r3, .L1269+4
+ ldrb r3, [r3, #3836] @ zero_extendqisi2
+ add r3, r3, r3, asl #1
+ cmp r5, r3, lsr #2
+ bls .L1252
+ ldr r3, .L1269+8
+ ldr r3, [r3, #164]
+ cmp r3, #0
+ moveq r5, #256
+ b .L1252
+.L1265:
+ mov r7, #0
+.L1252:
+ ldr ip, [sp, #16]
+ cmp r5, #256
+ cmnne r5, #1
+ movne r2, #0
+ str r5, [r9, ip]
+ strne r2, [r9, ip]
+ ldr ip, [sp, #16]
+ ldr r3, [r9, ip]
+ cmn r3, #1
+ bne .L1255
+ ldr r2, .L1269+4
+ ldr r1, [r6, #4]
+ ldr r0, .L1269+16
+ ldrb r2, [r2, #3836] @ zero_extendqisi2
+ bl printk
+ ldr r1, [r6, #12]
+ cmp r1, #0
+ beq .L1255
+ mov r2, #4
+ ldr r0, .L1269+20
+ mov r3, r2
+ bl rknand_print_hex
+.L1255:
+ cmp r7, #0
+ beq .L1256
+ ldr r3, .L1269+4
+ ldrb r3, [r3, #3836] @ zero_extendqisi2
+ add r3, r3, r3, asl #1
+ cmp r8, r3, lsr #2
+ bls .L1257
+ ldr r3, .L1269+8
+ ldr r3, [r3, #164]
+ cmp r3, #0
+ moveq r8, #256
+.L1257:
+ add r3, sl, #1
+ mov r2, #36
+ cmp r8, #256
+ cmnne r8, #1
+ mul r3, r2, r3
+ movne r2, #0
+ str r8, [r9, r3]
+ strne r2, [r9, r3]
+.L1256:
+ ldr ip, [sp, #24]
+ add sl, sl, r7
+ cmp ip, #0
+ beq .L1237
+ ldr r3, .L1269+4
+ ldrb r3, [r3, #80] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L1237
+ mov r0, r4
+ bl flash_exit_slc_mode
+.L1237:
+ add sl, sl, #1
+.L1234:
+ ldr ip, [sp, #28]
+ cmp sl, ip
+ bcc .L1258
+ mov r0, #0
+.L1235:
+ add sp, sp, #52
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1270:
+ .align 2
+.L1269:
+ .word .LANCHOR1
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LC97
+ .word .LC94
+ .word .LC96
+ .fnend
+ .size FlashReadPages, .-FlashReadPages
+ .align 2
+ .global FtlGcScanTempBlk
+ .type FtlGcScanTempBlk, %function
+FtlGcScanTempBlk:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r2, .L1297
+ movw r3, #3000
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #20
+ sub sp, sp, #20
+ ldrh r4, [r2, r3]
+ movw r3, #65535
+ mov r5, r0
+ str r1, [sp, #12]
+ cmp r4, r3
+ beq .L1290
+ cmp r4, #0
+ bne .L1272
+ b .L1273
+.L1290:
+ mov r4, #0
+.L1272:
+ ldr r2, .L1297+4
+ movw r3, #3912
+ ldr fp, [sp, #12]
+ ldrh r3, [r2, r3]
+ cmp fp, r3
+ bne .L1274
+.L1273:
+ bl FtlGcPageVarInit
+.L1274:
+ mvn r8, #0
+ mov r7, #0
+ movw sl, #65535
+.L1285:
+ ldrh r3, [r5, #0]
+ mov r0, #0
+ strb r0, [r5, #8]
+ cmp r3, sl
+ beq .L1291
+.L1276:
+.L1294:
+ ldr r3, .L1297+4
+ movw r2, #3844
+ ldrh r9, [r3, r2]
+ ldr r2, .L1297+8
+ ldr lr, [r2, #-984]
+ ldr ip, [r2, #-1164]
+ movw r2, #3924
+ ldrh r2, [r3, r2]
+ mov r3, #0
+ mov r6, r3
+ str r2, [sp, #8]
+ mov r2, r5
+ b .L1277
+.L1279:
+ ldrh r0, [r2, #16]
+ cmp r0, sl
+ beq .L1278
+ mov fp, #36
+ orr r0, r4, r0, asl #10
+ mla r1, fp, r6, lr
+ ldr fp, [sp, #8]
+ str r0, [r1, #4]
+ mov r0, #0
+ str r0, [r1, #8]
+ mul r0, fp, r6
+ add r6, r6, #1
+ uxth r6, r6
+ add fp, r0, #3
+ cmp r0, #0
+ movlt r0, fp
+ bic r0, r0, #3
+ add r0, ip, r0
+ str r0, [r1, #12]
+.L1278:
+ add r3, r3, #1
+ add r2, r2, #2
+ uxth r3, r3
+.L1277:
+ cmp r3, r9
+ bne .L1279
+ ldr r9, .L1297+8
+ mov r1, r6
+ mov r2, #0
+ ldr r0, [r9, #-984]
+ bl FlashReadPages
+ mov r3, #36
+ mul r3, r3, r6
+ mov r6, #0
+ str r3, [sp, #8]
+ b .L1280
+.L1286:
+ ldr fp, .L1297+8
+ ldr r1, [fp, #-984]
+ add r3, r1, r6
+ ldr r9, [r3, #4]
+ stmia sp, {r1, r3}
+ ubfx r0, r9, #10, #16
+ bl P2V_plane
+ ldr r1, [sp, #0]
+ ldr r3, [sp, #4]
+ ldr r1, [r1, r6]
+ cmp r1, #0
+ mov r2, r0
+ bne .L1281
+ ldr r3, [r3, #12]
+ add r6, r6, #36
+ ldrh r1, [r3, #0]
+ cmp r1, sl
+ moveq r3, #1
+ streq r3, [fp, #-1016]
+ beq .L1275
+.L1282:
+ ldr r0, [r3, #12]
+ mov r1, r9
+ ldr r2, [r3, #8]
+ bl FtlGcUpdatePage
+ b .L1280
+.L1281:
+ ldr r3, [fp, #-1884]
+ cmp r3, #0
+ beq .L1283
+ ldrh r3, [r5, #0]
+ ldr r2, [fp, #-2084]
+ mov r3, r3, asl #1
+ ldrh r3, [r2, r3]
+ cmp r3, #119
+ movls r8, r9
+ bls .L1284
+.L1283:
+ cmn r1, #1
+ moveq r8, r9
+.L1284:
+ ldr r2, .L1297+8
+ mov r0, #0 @ movhi
+ ldrh r3, [r5, #0]
+ mov r4, #0
+ ldr r2, [r2, #-2064]
+ mov r3, r3, asl #1
+ strh r0, [r2, r3] @ movhi
+ ldrh r0, [r5, #0]
+ bl INSERT_FREE_LIST
+ mvn r3, #0
+ strh r3, [r5, #0] @ movhi
+ bl FtlGcPageVarInit
+ b .L1285
+.L1280:
+ ldr r3, [sp, #8]
+ cmp r6, r3
+ bne .L1286
+ ldr fp, [sp, #12]
+ add r7, r7, #1
+ add r4, r4, #1
+ cmp r7, fp
+ uxth r4, r4
+ bcc .L1287
+ ldr r2, .L1297
+ movw r3, #3000
+ ldrh r1, [r2, r3]
+ cmp r1, sl
+ beq .L1287
+ add r1, r1, r7
+ strh r1, [r2, r3] @ movhi
+ ldr r2, .L1297+4
+ add r3, r3, #912
+ ldrh r3, [r2, r3]
+ cmp r3, r4
+ bhi .L1288
+.L1287:
+ ldr r2, .L1297+4
+ movw r3, #3912
+ ldrh r3, [r2, r3]
+ cmp r3, r4
+ bhi .L1294
+.L1291:
+ mov r2, #0
+.L1275:
+ ldr r1, .L1297
+ movw r3, #3000
+ mvn r0, #0
+ strh r4, [r5, #2] @ movhi
+ strb r2, [r5, #6]
+ strh r0, [r1, r3] @ movhi
+ mov r0, r5
+ mov r1, r4
+ bl ftl_sb_update_avl_pages
+.L1288:
+ mov r0, r8
+ add sp, sp, #20
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1298:
+ .align 2
+.L1297:
+ .word .LANCHOR1
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size FtlGcScanTempBlk, .-FtlGcScanTempBlk
+ .align 2
+ .global FtlScanSysBlk
+ .type FtlScanSysBlk, %function
+FtlScanSysBlk:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 24
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r6, #0
+ ldr r5, .L1357
+ .pad #28
+ sub sp, sp, #28
+ ldr r4, .L1357+4
+ mov r1, r6
+ ldr r3, .L1357+8
+ movw r7, #3932
+ ldr r2, [r5, #3940]
+ ldr r0, [r4, #-1040]
+ mov sl, r4
+ strh r6, [r4, r3] @ movhi
+ movw r3, #3956
+ strh r6, [r5, r3] @ movhi
+ mov r2, r2, asl #2
+ bl ftl_memset
+ ldr r2, [r5, #3940]
+ mov r1, r6
+ ldr r0, [r4, #-1044]
+ mov r2, r2, asl #1
+ bl ftl_memset
+ ldrh r2, [r5, r7]
+ mov r1, r6
+ ldr r0, [r4, #-924]
+ mov r2, r2, asl #2
+ bl ftl_memset
+ ldrh r2, [r5, r7]
+ mov r1, r6
+ ldr r0, [r5, #3960]
+ mov r2, r2, asl #1
+ bl ftl_memset
+ ldr r0, .L1357+12
+ mov r1, #255
+ mov r2, #12
+ bl ftl_memset
+ movw r3, #3852
+ ldrh r3, [r5, r3]
+ str r3, [sp, #8]
+ b .L1300
+.L1302:
+ add r3, r6, r5
+ ldr r1, [sp, #8]
+ ldrb r0, [r3, #3870] @ zero_extendqisi2
+ bl V2P_block
+ str r0, [sp, #0]
+ bl FtlBbmIsBadBlock
+ ldr r3, [sp, #0]
+ cmp r0, #0
+ bne .L1301
+ ldr r2, [r4, #-984]
+ mov r3, r3, asl #10
+ mla r2, r9, r7, r2
+ str r3, [r2, #4]
+ ldrh r3, [r6, r8]
+ str r0, [r2, #8]
+ mul r3, r3, r7
+ add r7, r7, #1
+ uxth r7, r7
+ add r1, r3, #3
+ cmp r3, #0
+ movlt r3, r1
+ ldr r1, [r4, #-1164]
+ bic r3, r3, #3
+ add r3, r1, r3
+ str r3, [r2, #12]
+.L1301:
+ add r5, r5, #1
+ uxth r5, r5
+ b .L1338
+.L1351:
+ mov r7, #0
+ movw fp, #3844
+ mov r5, r7
+ mov r9, #36
+ movw r8, #3924
+.L1338:
+ ldrh r3, [r6, fp]
+ cmp r3, r5
+ bhi .L1302
+ ldr r0, [r4, #-984]
+ mov r1, r7
+ mov r2, #1
+ mov r8, #0
+ bl FlashReadPages
+ mov fp, r7
+ str r8, [sp, #12]
+ b .L1303
+.L1337:
+ ldr r2, [r4, #-984]
+ add r0, r2, r8
+ ldr r7, [r2, r8]
+ ldr r3, [r0, #4]
+ cmn r7, #1
+ ldr r5, [r0, #12]
+ ubfx r6, r3, #10, #16
+ bne .L1304
+ mov r1, #1
+ add r3, r3, #1
+ mov r2, r1
+ str r3, [r0, #4]
+ bl FlashReadPages
+ ldrh r3, [r5, #0]
+ movw r0, #65535
+ cmp r3, r0
+ ldreq r3, [r4, #-984]
+ streq r7, [r3, r8]
+.L1304:
+ ldr r3, [r4, #-984]
+ ldr r3, [r3, r8]
+ cmn r3, #1
+ beq .L1305
+ ldr r2, [r4, #-1848]
+ ldr r3, [r5, #4]
+ cmn r2, #1
+ beq .L1306
+ cmp r2, r3
+ bhi .L1307
+.L1306:
+ cmn r3, #1
+ addne r3, r3, #1
+ strne r3, [sl, #-1848]
+.L1307:
+ ldrh r3, [r5, #0]
+ movw r2, #61604
+ cmp r3, r2
+ beq .L1310
+ bhi .L1313
+ movw r2, #61574
+ cmp r3, r2
+ bne .L1308
+ b .L1355
+.L1313:
+ movw r2, #61634
+ cmp r3, r2
+ beq .L1311
+ movw r1, #65535
+ cmp r3, r1
+ bne .L1308
+ b .L1356
+.L1311:
+ ldr r3, .L1357
+ ldr r1, [r4, #-1040]
+ ldr r2, [r3, #3940]
+ ldr r3, .L1357+8
+ uxth r0, r2
+ ldrh r3, [r4, r3]
+ sub r7, r0, #1
+ rsb r0, r3, r0
+ uxth r7, r7
+ sub r0, r0, #1
+ sxth r0, r0
+ str r0, [sp, #4]
+ b .L1314
+.L1322:
+ mov ip, r9, asl #2
+ ldr r0, [r1, r9, asl #2]
+ str ip, [sp, #16]
+ ldr ip, [r5, #4]
+ cmp ip, r0
+ bls .L1315
+ ldr r1, [r1, #0]
+ cmp r1, #0
+ bne .L1316
+ cmp r3, r2
+ bne .L1317
+.L1316:
+ ldr r3, [r4, #-1044]
+ mov r1, #1
+ ldrh r0, [r3, #0]
+ bl FtlFreeSysBlkQueueIn
+ b .L1318
+.L1317:
+ ldr r2, .L1357+8
+ add r3, r3, #1
+ strh r3, [r4, r2] @ movhi
+.L1318:
+ sxth ip, r7
+ mov r2, #0
+ str ip, [sp, #4]
+ b .L1319
+.L1320:
+ ldr r0, [r4, #-1040]
+ add r1, r3, #1
+ add r2, r2, #1
+ ldr ip, [r0, r1, asl #2]
+ mov r1, r1, asl #1
+ uxth r2, r2
+ str ip, [r0, r3, asl #2]
+ mov r3, r3, asl #1
+ ldr r0, [r4, #-1044]
+ ldrh r1, [r0, r1]
+ strh r1, [r0, r3] @ movhi
+.L1319:
+ ldr r0, [sp, #4]
+ sxth r3, r2
+ cmp r3, r0
+ bne .L1320
+ ldr r3, [sl, #-1040]
+ mov r9, r9, asl #1
+ ldr r2, [r5, #4]
+ ldr ip, [sp, #16]
+ str r2, [r3, ip]
+ ldr r3, [sl, #-1044]
+ strh r6, [r3, r9] @ movhi
+ b .L1321
+.L1315:
+ sub r7, r7, #1
+ uxth r7, r7
+.L1314:
+ ldr r0, [sp, #4]
+ sxth r9, r7
+ cmp r9, r0
+ bgt .L1322
+.L1321:
+ sxth r7, r7
+ cmp r7, #0
+ blt .L1305
+.L1323:
+ ldr r3, .L1357+8
+ ldr r1, .L1357
+ ldrh r2, [r4, r3]
+ ldr r1, [r1, #3940]
+ rsb r1, r2, r1
+ sub r1, r1, #1
+ sxth r1, r1
+ cmp r7, r1
+ bgt .L1308
+ add r2, r2, #1
+ strh r2, [r4, r3] @ movhi
+ ldr r3, [r4, #-1040]
+ ldr r2, [r5, #4]
+ str r2, [r3, r7, asl #2]
+ mov r7, r7, asl #1
+ ldr r3, [r4, #-1044]
+ b .L1353
+.L1355:
+ ldr r3, .L1357
+ movw r2, #3932
+ movw r0, #3956
+ ldrh r2, [r3, r2]
+ ldrh r3, [r3, r0]
+ sub r1, r2, #1
+ uxth r7, r1
+ rsb r1, r3, r1
+ str r1, [sp, #4]
+ ldr r1, [r4, #-924]
+ b .L1324
+.L1332:
+ mov ip, r9, asl #2
+ ldr r0, [r1, r9, asl #2]
+ str ip, [sp, #16]
+ ldr ip, [r5, #4]
+ cmp ip, r0
+ bls .L1325
+ ldr r1, [r1, #0]
+ cmp r1, #0
+ ldr r1, .L1357
+ bne .L1326
+ cmp r3, r2
+ bne .L1327
+.L1326:
+ ldr r3, [r1, #3960]
+ mov r1, #1
+ ldrh r0, [r3, #0]
+ bl FtlFreeSysBlkQueueIn
+ b .L1328
+.L1327:
+ movw r2, #3956
+ add r3, r3, #1
+ strh r3, [r1, r2] @ movhi
+.L1328:
+ sxth r0, r7
+ mov r2, #0
+ str r0, [sp, #20]
+ ldr ip, .L1357
+ str r5, [sp, #4]
+ b .L1329
+.L1330:
+ ldr r0, [r4, #-924]
+ add r1, r3, #1
+ add r2, r2, #1
+ ldr r5, [r0, r1, asl #2]
+ mov r1, r1, asl #1
+ uxth r2, r2
+ str r5, [r0, r3, asl #2]
+ mov r3, r3, asl #1
+ ldr r0, [ip, #3960]
+ ldrh r1, [r0, r1]
+ strh r1, [r0, r3] @ movhi
+.L1329:
+ ldr r0, [sp, #20]
+ sxth r3, r2
+ cmp r3, r0
+ bne .L1330
+ ldr r5, [sp, #4]
+ mov r9, r9, asl #1
+ ldr r3, [sl, #-924]
+ ldr ip, [sp, #16]
+ ldr r2, [r5, #4]
+ str r2, [r3, ip]
+ ldr r3, .L1357
+ ldr r3, [r3, #3960]
+ strh r6, [r3, r9] @ movhi
+ b .L1331
+.L1325:
+ sub r7, r7, #1
+ uxth r7, r7
+.L1324:
+ ldr r0, [sp, #4]
+ sxth r9, r7
+ cmp r9, r0
+ bgt .L1332
+.L1331:
+ sxth r7, r7
+ cmp r7, #0
+ blt .L1305
+.L1333:
+ ldr r3, .L1357
+ movw r0, #3932
+ movw r2, #3956
+ ldrh r0, [r3, r0]
+ ldrh r1, [r3, r2]
+ sub r0, r0, #1
+ rsb r0, r1, r0
+ sxth r0, r0
+ cmp r7, r0
+ bgt .L1308
+ add r1, r1, #1
+ strh r1, [r3, r2] @ movhi
+ ldr r1, [r5, #4]
+ ldr r2, [r4, #-924]
+ str r1, [r2, r7, asl #2]
+ mov r7, r7, asl #1
+ ldr r3, [r3, #3960]
+.L1353:
+ strh r6, [r3, r7] @ movhi
+ b .L1308
+.L1310:
+ ldr r3, .L1357+16
+ movw r1, #65535
+ ldrh r2, [r4, r3]
+ cmp r2, r1
+ streqh r6, [r4, r3] @ movhi
+ beq .L1354
+ ldr r3, .L1357+20
+ movw r2, #65535
+ ldrh r0, [r4, r3]
+ cmp r0, r2
+ beq .L1335
+ mov r1, #1
+ bl FtlFreeSysBlkQueueIn
+.L1335:
+ ldr r3, [r5, #4]
+ ldr r2, [sl, #-1760]
+ cmp r2, r3
+ ldr r3, .L1357+20
+ strcsh r6, [r4, r3] @ movhi
+ bcs .L1308
+ ldr r2, .L1357+16
+ ldrh r1, [r4, r2]
+ strh r6, [r4, r2] @ movhi
+ strh r1, [r4, r3] @ movhi
+.L1354:
+ ldr r3, [r5, #4]
+ str r3, [r4, #-1760]
+ b .L1308
+.L1356:
+ mov r0, r6
+ mov r1, #0
+ b .L1352
+.L1305:
+ mov r0, r6
+ mov r1, #1
+.L1352:
+ bl FtlFreeSysBlkQueueIn
+.L1308:
+ ldr r5, [sp, #12]
+ add r8, r8, #36
+ add r3, r5, #1
+ uxth r3, r3
+ str r3, [sp, #12]
+.L1303:
+ ldr ip, [sp, #12]
+ cmp ip, fp
+ bne .L1337
+ ldr r5, [sp, #8]
+ add r3, r5, #1
+ uxth r3, r3
+ str r3, [sp, #8]
+.L1300:
+ ldr r6, .L1357
+ movw r3, #3854
+ ldr ip, [sp, #8]
+ ldrh r3, [r6, r3]
+ cmp r3, ip
+ bhi .L1351
+ ldr r1, .L1357+4
+ ldr r2, [r1, #-1044]
+ ldrh r3, [r2, #0]
+ cmp r3, #0
+ bne .L1339
+ ldr r0, .L1357+8
+ ldrh r1, [r1, r0]
+ cmp r1, #0
+ ldrne r0, [r6, #3940]
+ bne .L1340
+ b .L1339
+.L1344:
+ mov r1, r1, asl #1
+ ldrh r1, [r2, r1]
+ cmp r1, #0
+ beq .L1341
+ ldr r7, .L1357
+ sxth r6, r3
+ ldr r1, .L1357+4
+ mov r5, #0
+ b .L1342
+.L1343:
+ ldr ip, [r1, #-1044]
+ mov r0, r2, asl #1
+ rsb r4, r6, r2
+ add r3, r3, #1
+ ldrh sl, [ip, r0]
+ mov r8, r4, asl #1
+ uxth r3, r3
+ strh sl, [ip, r8] @ movhi
+ ldr ip, [r1, #-1040]
+ ldr r2, [ip, r2, asl #2]
+ str r2, [ip, r4, asl #2]
+ ldr r2, [r1, #-1044]
+ strh r5, [r2, r0] @ movhi
+.L1342:
+ ldr r0, [r7, #3940]
+ sxth r2, r3
+ cmp r2, r0
+ bcc .L1343
+ b .L1339
+.L1341:
+ add r3, r3, #1
+ uxth r3, r3
+.L1340:
+ sxth r1, r3
+ cmp r1, r0
+ bcc .L1344
+.L1339:
+ ldr r2, .L1357
+ ldr r1, [r2, #3960]
+ ldrh r3, [r1, #0]
+ cmp r3, #0
+ bne .L1345
+ movw r0, #3956
+ ldrh r0, [r2, r0]
+ cmp r0, #0
+ movwne r0, #3932
+ ldrneh r2, [r2, r0]
+ bne .L1346
+ b .L1345
+.L1350:
+ mov ip, r0, asl #1
+ ldrh ip, [r1, ip]
+ cmp ip, #0
+ beq .L1347
+ ldr r1, .L1357
+ movw r8, #3932
+ ldr r7, .L1357+4
+ mov r6, #0
+ b .L1348
+.L1349:
+ ldr r4, [r1, #3960]
+ mov ip, r2, asl #1
+ rsb r5, r0, r2
+ add r3, r3, #1
+ ldrh r9, [r4, ip]
+ mov sl, r5, asl #1
+ uxth r3, r3
+ strh r9, [r4, sl] @ movhi
+ ldr r4, [r7, #-924]
+ ldr r2, [r4, r2, asl #2]
+ str r2, [r4, r5, asl #2]
+ ldr r2, [r1, #3960]
+ strh r6, [r2, ip] @ movhi
+.L1348:
+ ldrh ip, [r1, r8]
+ sxth r2, r3
+ cmp r2, ip
+ blt .L1349
+ b .L1345
+.L1347:
+ add r3, r3, #1
+ uxth r3, r3
+.L1346:
+ sxth r0, r3
+ cmp r0, r2
+ blt .L1350
+.L1345:
+ mov r0, #0
+ add sp, sp, #28
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1358:
+ .align 2
+.L1357:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -1048
+ .word .LANCHOR2-1768
+ .word -1768
+ .word -1764
+ .fnend
+ .size FtlScanSysBlk, .-FtlScanSysBlk
+ .align 2
+ .global FtlVendorPartRead
+ .type FtlVendorPartRead, %function
+FtlVendorPartRead:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 48
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L1369
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r8, r2
+ mov r2, #3920
+ mov r5, r1
+ ldrh r9, [r3, r2]
+ movw r2, #3906
+ ldrh r2, [r3, r2]
+ add r1, r1, r0
+ .pad #52
+ sub sp, sp, #52
+ mov r6, r0
+ cmp r1, r2
+ mvnhi r7, #0
+ bhi .L1360
+ mov r9, r0, lsr r9
+ mov r7, #0
+ ldr sl, .L1369+4
+ mov r9, r9, asl #2
+ b .L1361
+.L1366:
+ ldr r3, [sl, #-920]
+ mov r0, r6
+ ldr r1, .L1369
+ ldr fp, [r3, r9]
+ movw r3, #3918
+ ldrh r4, [r1, r3]
+ mov r1, r4
+ bl __aeabi_uidivmod
+ uxth r3, r1
+ rsb r4, r3, r4
+ uxth r4, r4
+ cmp r4, r5
+ uxthhi r4, r5
+ cmp fp, #0
+ beq .L1363
+ ldr r1, .L1369+4
+ add r0, sp, #12
+ str fp, [sp, #16]
+ ldr r2, [r1, #-968]
+ mov r1, #1
+ str r3, [sp, #4]
+ str r2, [sp, #20]
+ mov r2, #0
+ str r2, [sp, #24]
+ mov r2, r1
+ bl FlashReadPages
+ ldr r2, [sp, #12]
+ ldr r3, [sp, #4]
+ mov r0, r8
+ cmn r2, #1
+ ldr r1, [sl, #-968]
+ moveq r7, r2
+ add r1, r1, r3, asl #9
+ mov r2, r4, asl #9
+ bl memcpy
+ b .L1365
+.L1363:
+ mov r0, r8
+ mov r1, fp
+ mov r2, r4, asl #9
+ bl ftl_memset
+.L1365:
+ rsb r5, r4, r5
+ add r6, r6, r4
+ add r8, r8, r4, asl #9
+ add r9, r9, #4
+.L1361:
+ cmp r5, #0
+ bne .L1366
+.L1360:
+ mov r0, r7
+ add sp, sp, #52
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1370:
+ .align 2
+.L1369:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size FtlVendorPartRead, .-FtlVendorPartRead
+ .align 2
+ .global Ftl_load_ext_data
+ .type Ftl_load_ext_data, %function
+Ftl_load_ext_data:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r0, #0
+ ldr r5, .L1375
+ mov r1, #1
+ ldr r2, .L1375+4
+ bl FtlVendorPartRead
+ ldr r4, .L1375+8
+ ldr r3, [r5, #-1704]
+ cmp r3, r4
+ beq .L1372
+ ldr r0, .L1375+4
+ mov r1, #0
+ mov r2, #512
+ bl ftl_memset
+ str r4, [r5, #-1704]
+.L1372:
+ ldr r2, [r5, #-1704]
+ ldr r3, .L1375
+ cmp r2, r4
+ bne .L1373
+ ldr r2, [r3, #-1616]
+ str r2, [r3, #-1856]
+ ldr r2, [r3, #-1612]
+ str r2, [r3, #-1852]
+ ldr r2, [r3, #-1696]
+ str r2, [r3, #-1860]
+ ldr r2, [r3, #-1692]
+ str r2, [r3, #-1872]
+ ldr r2, [r3, #-1688]
+ str r2, [r3, #-1880]
+ ldr r2, [r3, #-1684]
+ str r2, [r3, #-1864]
+ ldr r2, [r3, #-1676]
+ str r2, [r3, #-1836]
+ ldr r2, [r3, #-1672]
+ str r2, [r3, #-2080]
+ ldr r2, [r3, #-1668]
+ str r2, [r3, #-1876]
+ ldr r2, [r3, #-1664]
+ str r2, [r3, #-1868]
+ ldr r2, [r3, #-1660]
+ str r2, [r3, #-1828]
+ ldr r2, [r3, #-1656]
+ str r2, [r3, #-1824]
+ ldr r2, [r3, #-1644]
+ str r2, [r3, #-1708]
+.L1373:
+ ldr r4, .L1375
+ mov r3, #0
+ ldr r2, [r4, #-1636]
+ str r3, [r4, #-1004]
+ ldr r3, .L1375+12
+ cmp r2, r3
+ bne .L1374
+ mov r3, #1
+ ldr r0, .L1375+16
+ str r3, [r4, #-1884]
+ ldr r1, .L1375+20
+ bl printk
+.L1374:
+ ldr r3, .L1375+24
+ movw r2, #3902
+ ldr r0, [r4, #-1840]
+ ldrh r1, [r3, r2]
+ ldr r2, [r4, #-1836]
+ mla r0, r0, r1, r2
+ movw r2, #3852
+ ldrh r1, [r3, r2]
+ bl __aeabi_uidiv
+ str r0, [r4, #-1832]
+ ldmfd sp!, {r3, r4, r5, pc}
+.L1376:
+ .align 2
+.L1375:
+ .word .LANCHOR2
+ .word .LANCHOR2-1704
+ .word 1179929683
+ .word 305432421
+ .word .LC75
+ .word .LC98
+ .word .LANCHOR0
+ .fnend
+ .size Ftl_load_ext_data, .-Ftl_load_ext_data
+ .align 2
+ .global FtlLoadEctTbl
+ .type FtlLoadEctTbl, %function
+FtlLoadEctTbl:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r0, #64
+ ldr r4, .L1379
+ ldr r5, .L1379+4
+ ldr r2, [r4, #-936]
+ ldrh r1, [r4, r5]
+ bl FtlVendorPartRead
+ ldr r3, [r4, #-936]
+ ldr r2, [r3, #0]
+ ldr r3, .L1379+8
+ cmp r2, r3
+ beq .L1378
+ ldr r1, .L1379+12
+ ldr r0, .L1379+16
+ bl printk
+ ldrh r2, [r4, r5]
+ ldr r0, [r4, #-936]
+ mov r1, #0
+ mov r2, r2, asl #9
+ bl ftl_memset
+.L1378:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, pc}
+.L1380:
+ .align 2
+.L1379:
+ .word .LANCHOR2
+ .word -940
+ .word 1112818501
+ .word .LC99
+ .word .LC75
+ .fnend
+ .size FtlLoadEctTbl, .-FtlLoadEctTbl
+ .align 2
+ .global load_l2p_region
+ .type load_l2p_region, %function
+load_l2p_region:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r6, r0
+ ldr r4, .L1384
+ mov r5, #12
+ ldr r3, [r4, #-1036]
+ ldr r7, [r3, r0, asl #2]
+ cmp r7, #0
+ bne .L1382
+ mul r5, r5, r1
+ ldr r3, [r4, #-1900]
+ ldr r2, .L1384+4
+ mov r1, #255
+ add r3, r3, r5
+ ldr r0, [r3, #8]
+ movw r3, #3922
+ ldrh r2, [r2, r3]
+ bl ftl_memset
+ ldr r3, [r4, #-1900]
+ strh r6, [r3, r5] @ movhi
+ ldr r3, [r4, #-1900]
+ add r5, r3, r5
+ str r7, [r5, #4]
+ b .L1383
+.L1382:
+ mul r5, r5, r1
+ ldr r3, [r4, #-1900]
+ mov r1, #1
+ add r0, r4, #168
+ mov r2, r1
+ str r7, [r4, #172]
+ add r3, r3, r5
+ ldr r3, [r3, #8]
+ str r3, [r4, #176]
+ ldr r3, [r4, #-952]
+ str r3, [r4, #180]
+ bl FlashReadPages
+ ldr r3, [r4, #-1900]
+ mov r1, #0
+ add r2, r3, r5
+ str r1, [r2, #4]
+ strh r6, [r3, r5] @ movhi
+.L1383:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1385:
+ .align 2
+.L1384:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .fnend
+ .size load_l2p_region, .-load_l2p_region
+ .align 2
+ .global FtlGetLastWrittenPage
+ .type FtlGetLastWrittenPage, %function
+FtlGetLastWrittenPage:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 104
+ @ frame_needed = 0, uses_anonymous_args = 0
+ cmp r1, #1
+ ldr r3, .L1397
+ stmfd sp!, {r4, r5, r6, r7, r8, sl, lr}
+ .save {r4, r5, r6, r7, r8, sl, lr}
+ movweq r2, #3914
+ movwne r2, #3912
+ .pad #108
+ sub sp, sp, #108
+ ldrh r4, [r3, r2]
+ add r7, sp, #4
+ mov r5, r1
+ add r3, sp, #40
+ sub r4, r4, #1
+ str r3, [sp, #16]
+ mov sl, r0, asl #10
+ mov r1, #1
+ uxth r4, r4
+ mov r0, r7
+ mov r2, r5
+ mov r8, #0
+ sxth r3, r4
+ str r8, [sp, #12]
+ orr r3, r3, sl
+ str r3, [sp, #8]
+ bl FlashReadPages
+ ldr r3, [sp, #40]
+ cmn r3, #1
+ bne .L1390
+ b .L1395
+.L1393:
+ add r6, r6, r3
+ mov r0, r7
+ mov r1, #1
+ mov r2, r5
+ add r6, r6, r6, lsr #31
+ ubfx r6, r6, #1, #16
+ sxth r3, r6
+ orr r3, r3, sl
+ str r3, [sp, #8]
+ bl FlashReadPages
+ ldr r3, [sp, #40]
+ cmn r3, #1
+ bne .L1391
+ ldr r3, [sp, #44]
+ cmn r3, #1
+ bne .L1391
+ ldr r3, [sp, #4]
+ cmn r3, #1
+ subne r4, r6, #1
+ uxthne r4, r4
+ bne .L1395
+.L1391:
+ add r6, r6, #1
+ uxth r8, r6
+.L1395:
+ sxth r6, r8
+ sxth r3, r4
+ cmp r6, r3
+ ble .L1393
+.L1390:
+ sxth r0, r4
+ add sp, sp, #108
+ ldmfd sp!, {r4, r5, r6, r7, r8, sl, pc}
+.L1398:
+ .align 2
+.L1397:
+ .word .LANCHOR0
+ .fnend
+ .size FtlGetLastWrittenPage, .-FtlGetLastWrittenPage
+ .align 2
+ .global FtlLoadSysInfo
+ .type FtlLoadSysInfo, %function
+FtlLoadSysInfo:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r5, #0
+ ldr r4, .L1413
+ mov r1, r5
+ ldr r2, .L1413+4
+ ldr r7, .L1413+8
+ ldr r3, [r4, #-952]
+ str r5, [r4, #176]
+ ldr r0, [r4, #-2064]
+ str r3, [r4, #180]
+ movw r3, #3852
+ ldrh r2, [r2, r3]
+ mov r2, r2, asl #1
+ bl ftl_memset
+ ldrh r0, [r4, r7]
+ movw r3, #65535
+ cmp r0, r3
+ beq .L1411
+ mov r1, #1
+ bl FtlGetLastWrittenPage
+ ldr r3, .L1413+12
+ add r2, r0, #1
+ mov r6, r0
+ strh r2, [r4, r3] @ movhi
+ b .L1401
+.L1403:
+ ldrh r2, [r4, r7]
+ mov r1, #1
+ ldr r0, .L1413+16
+ sub r5, r5, #1
+ orr r3, r3, r2, asl #10
+ str r3, [r4, #172]
+ ldr r3, [r4, #-2076]
+ mov r2, r1
+ uxth r5, r5
+ str r3, [r4, #176]
+ bl FlashReadPages
+ ldr r3, [r4, #168]
+ cmn r3, #1
+ bne .L1402
+.L1401:
+ add r3, r5, r6
+ sxth r3, r3
+ cmp r3, #0
+ bge .L1403
+.L1402:
+ ldr r4, .L1413
+ mov r2, #48
+ ldr r5, .L1413+4
+ movw r6, #3852
+ ldr r0, .L1413+20
+ ldr r7, [r4, #176]
+ mov r1, r7
+ bl memcpy
+ ldrh r2, [r5, r6]
+ add r1, r7, #48
+ ldr r0, [r4, #-2064]
+ mov r2, r2, asl #1
+ bl memcpy
+ ldrh r1, [r5, r6]
+ ldr r3, [r4, #176]
+ ldr r0, [r4, #-1888]
+ mov r2, r1, lsr #3
+ add r1, r1, #24
+ add r2, r2, #4
+ mov r1, r1, lsr #1
+ add r1, r3, r1, asl #2
+ bl memcpy
+ ldr r2, [r4, #-1820]
+ ldr r3, .L1413+24
+ cmp r2, r3
+ bne .L1411
+ ldr r3, .L1413+28
+ ldr r2, .L1413+32
+ ldrb r1, [r4, #-1810] @ zero_extendqisi2
+ ldrh r3, [r4, r3]
+ strh r3, [r4, r2] @ movhi
+ movw r2, #3866
+ ldrh r2, [r5, r2]
+ cmp r1, r2
+ bne .L1411
+ movw r2, #3912
+ movw r1, #3918
+ ldrh r2, [r5, r2]
+ ldrh r1, [r5, r1]
+ ldr r0, [r5, #3856]
+ mul r2, r3, r2
+ str r3, [r4, #204]
+ str r2, [r5, #3972]
+ mul r2, r1, r2
+ str r2, [r5, #3952]
+ movw r2, #3986
+ ldrh r2, [r5, r2]
+ rsb r0, r2, r0
+ rsb r0, r3, r0
+ movw r3, #3844
+ ldrh r1, [r5, r3]
+ movw r5, #65535
+ bl __aeabi_uidiv
+ ldr r3, .L1413+36
+ ldr r1, .L1413+40
+ strh r0, [r4, r3] @ movhi
+ sub r3, r3, #34
+ ldrh r2, [r4, r3]
+ sub r3, r3, #238
+ strh r2, [r4, r3] @ movhi
+ add r3, r3, #240
+ ldrh r3, [r4, r3]
+ mov r0, r3, lsr #6
+ and r3, r3, #63
+ strb r3, [r4, #-2038]
+ ldrb r3, [r4, #-1809] @ zero_extendqisi2
+ strh r0, [r4, r1] @ movhi
+ mvn r1, #0
+ ldr r0, .L1413+44
+ strb r3, [r4, #-2036]
+ ldr r3, .L1413+48
+ strh r1, [r4, r3] @ movhi
+ mov r3, #0
+ ldr r1, .L1413+52
+ strh r3, [r4, r0] @ movhi
+ strb r3, [r4, #-1750]
+ ldrh r0, [r4, r1]
+ sub r1, r1, #194
+ strb r3, [r4, #-1748]
+ str r3, [r4, #-1860]
+ strh r0, [r4, r1] @ movhi
+ add r1, r1, #196
+ ldr r0, .L1413+56
+ ldrh r1, [r4, r1]
+ mov ip, r1, lsr #6
+ and r1, r1, #63
+ strb r1, [r4, #-1990]
+ ldrb r1, [r4, #-1808] @ zero_extendqisi2
+ strh ip, [r4, r0] @ movhi
+ strb r1, [r4, #-1988]
+ ldr r1, .L1413+60
+ ldrh r0, [r4, r1]
+ sub r1, r1, #150
+ strh r0, [r4, r1] @ movhi
+ add r1, r1, #152
+ ldr r0, .L1413+64
+ ldrh r1, [r4, r1]
+ mov ip, r1, lsr #6
+ and r1, r1, #63
+ strb r1, [r4, #-1942]
+ ldrb r1, [r4, #-1807] @ zero_extendqisi2
+ strh ip, [r4, r0] @ movhi
+ strb r1, [r4, #-1940]
+ str r3, [r4, #-1872]
+ ldr r1, [r4, #-1788]
+ str r3, [r4, #-1880]
+ str r3, [r4, #-1864]
+ str r3, [r4, #-1836]
+ str r3, [r4, #-1828]
+ str r3, [r4, #-1868]
+ ldr r3, [r4, #-1780]
+ str r1, [r4, #-1840]
+ ldr r1, [r4, #-1848]
+ cmp r3, r1
+ strhi r3, [r4, #-1848]
+ ldr r4, .L1413
+ ldr r3, [r4, #-1784]
+ ldr r1, [r4, #-1844]
+ cmp r3, r1
+ strhi r3, [r4, #-1844]
+ cmp r2, r5
+ beq .L1406
+ ldr r0, .L1413+68
+ bl make_superblock
+.L1406:
+ ldr r3, .L1413+72
+ ldrh r3, [r4, r3]
+ cmp r3, r5
+ beq .L1407
+ ldr r0, .L1413+76
+ bl make_superblock
+.L1407:
+ ldr r5, .L1413
+ movw r4, #65535
+ ldr r3, .L1413+80
+ ldrh r3, [r5, r3]
+ cmp r3, r4
+ beq .L1408
+ ldr r0, .L1413+84
+ bl make_superblock
+.L1408:
+ ldr r3, .L1413+48
+ ldrh r3, [r5, r3]
+ cmp r3, r4
+ beq .L1412
+ ldr r0, .L1413+88
+ bl make_superblock
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1411:
+ mvn r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1412:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1414:
+ .align 2
+.L1413:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .word -1768
+ .word -1766
+ .word .LANCHOR2+168
+ .word .LANCHOR2-1820
+ .word 1179929683
+ .word -1812
+ .word -1762
+ .word -1772
+ .word -2042
+ .word -1754
+ .word -1756
+ .word -1802
+ .word -1994
+ .word -1798
+ .word -1946
+ .word .LANCHOR2-2044
+ .word -1996
+ .word .LANCHOR2-1996
+ .word -1948
+ .word .LANCHOR2-1948
+ .word .LANCHOR2-1756
+ .fnend
+ .size FtlLoadSysInfo, .-FtlLoadSysInfo
+ .align 2
+ .global FtlLoadBbt
+ .type FtlLoadBbt, %function
+FtlLoadBbt:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, lr}
+ .save {r4, r5, r6, r7, r8, lr}
+ mov r3, #0
+ ldr r6, .L1430
+ ldr r8, .L1430+4
+ ldr r4, [r6, #-952]
+ mov r7, r6
+ str r3, [r6, #176]
+ str r4, [r6, #180]
+ bl FtlBbtMemInit
+ movw r3, #3908
+ ldrh r5, [r8, r3]
+ sub r5, r5, #1
+ uxth r5, r5
+ b .L1416
+.L1420:
+ mov r1, #1
+ mov r3, r5, asl #10
+ ldr r0, .L1430+8
+ mov r2, r1
+ str r3, [r6, #172]
+ bl FlashReadPages
+ ldr r3, [r6, #168]
+ cmn r3, #1
+ bne .L1417
+ ldr r3, [r6, #172]
+ mov r1, #1
+ ldr r0, .L1430+8
+ mov r2, r1
+ add r3, r3, #1
+ str r3, [r6, #172]
+ bl FlashReadPages
+.L1417:
+ ldr r3, [r7, #168]
+ cmn r3, #1
+ beq .L1418
+ ldrh r2, [r4, #0]
+ movw r3, #61649
+ cmp r2, r3
+ bne .L1418
+ ldr r3, .L1430+4
+ movw r2, #3980
+ strh r5, [r3, r2] @ movhi
+ ldr r2, [r4, #4]
+ str r2, [r3, #3988]
+ mov r2, #3984
+ ldrh r1, [r4, #8]
+ strh r1, [r3, r2] @ movhi
+ b .L1419
+.L1418:
+ sub r5, r5, #1
+ uxth r5, r5
+.L1416:
+ movw r3, #3908
+ ldrh r3, [r8, r3]
+ sub r3, r3, #48
+ cmp r5, r3
+ bgt .L1420
+.L1419:
+ ldr r5, .L1430+4
+ movw r8, #3980
+ movw r3, #65535
+ ldrh r2, [r5, r8]
+ cmp r2, r3
+ beq .L1429
+ mov r6, #3984
+ ldrh r2, [r5, r6]
+ cmp r2, r3
+ beq .L1422
+ ldr r7, .L1430
+ mov r1, #1
+ mov r2, r2, asl #10
+ add r0, r7, #168
+ str r2, [r7, #172]
+ mov r2, r1
+ bl FlashReadPages
+ ldr r3, [r7, #168]
+ cmn r3, #1
+ beq .L1422
+ ldrh r2, [r4, #0]
+ movw r3, #61649
+ cmp r2, r3
+ bne .L1422
+ ldr r3, [r4, #4]
+ ldr r2, [r5, #3988]
+ cmp r3, r2
+ strhi r3, [r5, #3988]
+ ldrhih r2, [r5, r6]
+ ldrhih r3, [r4, #8]
+ strhih r2, [r5, r8] @ movhi
+ strhih r3, [r5, r6] @ movhi
+.L1422:
+ ldr r8, .L1430+4
+ movw r3, #3980
+ mov r1, #1
+ mov r6, #0
+ ldr r5, .L1430
+ ldrh r0, [r8, r3]
+ bl FtlGetLastWrittenPage
+ movw r3, #3982
+ add r2, r0, #1
+ mov r7, r0
+ strh r2, [r8, r3] @ movhi
+ b .L1423
+.L1425:
+ movw r2, #3980
+ mov r1, #1
+ ldrh r2, [r8, r2]
+ sub r6, r6, #1
+ ldr r0, .L1430+8
+ uxth r6, r6
+ orr r3, r3, r2, asl #10
+ str r3, [r5, #172]
+ ldr r3, [r5, #-2076]
+ mov r2, r1
+ str r3, [r5, #176]
+ bl FlashReadPages
+ ldr r3, [r5, #168]
+ cmn r3, #1
+ bne .L1424
+.L1423:
+ add r3, r6, r7
+ sxth r3, r3
+ cmp r3, #0
+ bge .L1425
+.L1424:
+ ldr r3, .L1430+4
+ movw r2, #3986
+ ldrh r1, [r4, #10]
+ ldrh r0, [r4, #12]
+ strh r1, [r3, r2] @ movhi
+ movw r2, #65535
+ cmp r0, r2
+ beq .L1426
+ ldr r2, [r3, #3840]
+ cmp r0, r2
+ beq .L1426
+ movw r1, #3854
+ ldrh r3, [r3, r1]
+ mov r3, r3, lsr #2
+ cmp r2, r3
+ bcs .L1426
+ cmp r0, r3
+ bcs .L1426
+ bl FtlSysBlkNumInit
+.L1426:
+ ldr r6, .L1430+12
+ mov r4, #0
+ ldr r8, .L1430+4
+ movw r7, #3866
+ ldr r5, .L1430
+ b .L1427
+.L1428:
+ ldr r3, .L1430+16
+ ldr r1, [r5, #176]
+ ldr r0, [r6, #4]!
+ ldrh r2, [r5, r3]
+ mov r2, r2, asl #2
+ mla r1, r4, r2, r1
+ bl memcpy
+ add r4, r4, #1
+.L1427:
+ ldrh r3, [r8, r7]
+ cmp r4, r3
+ bcc .L1428
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, r7, r8, pc}
+.L1429:
+ mvn r0, #0
+ ldmfd sp!, {r4, r5, r6, r7, r8, pc}
+.L1431:
+ .align 2
+.L1430:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .word .LANCHOR2+168
+ .word .LANCHOR0+4004
+ .word -1032
+ .fnend
+ .size FtlLoadBbt, .-FtlLoadBbt
+ .align 2
+ .global FtlLoadFactoryBbt
+ .type FtlLoadFactoryBbt, %function
+FtlLoadFactoryBbt:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r5, #0
+ ldr r3, .L1439
+ movw fp, #3866
+ ldr r7, .L1439+4
+ ldr r6, .L1439+8
+ ldr r2, [r3, #-2076]
+ ldr r8, [r3, #-952]
+ str r2, [r3, #176]
+ str r8, [r3, #180]
+ b .L1433
+.L1438:
+ movw r9, #3908
+ mvn r3, #0
+ ldrh r4, [r6, r9]
+ strh r3, [r7], #2 @ movhi
+ add r4, r4, r3
+ ldr sl, .L1439
+ uxth r4, r4
+ b .L1434
+.L1437:
+ mla r3, r3, r5, r4
+ mov r1, #1
+ ldr r0, .L1439+12
+ mov r2, r1
+ mov r3, r3, asl #10
+ str r3, [sl, #172]
+ bl FlashReadPages
+ ldr r3, [sl, #168]
+ cmn r3, #1
+ beq .L1435
+ ldrh r2, [r8, #0]
+ movw r3, #61664
+ cmp r2, r3
+ streqh r4, [r7, #-2] @ movhi
+ beq .L1436
+.L1435:
+ sub r4, r4, #1
+ uxth r4, r4
+.L1434:
+ ldrh r3, [r6, r9]
+ sub r2, r3, #16
+ cmp r4, r2
+ bgt .L1437
+.L1436:
+ add r5, r5, #1
+.L1433:
+ ldrh r3, [r6, fp]
+ cmp r5, r3
+ bcc .L1438
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1440:
+ .align 2
+.L1439:
+ .word .LANCHOR2
+ .word .LANCHOR0+3992
+ .word .LANCHOR0
+ .word .LANCHOR2+168
+ .fnend
+ .size FtlLoadFactoryBbt, .-FtlLoadFactoryBbt
+ .align 2
+ .global FlashProgSlc2KPages
+ .type FlashProgSlc2KPages, %function
+FlashProgSlc2KPages:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 56
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #68
+ sub sp, sp, #68
+ mov sl, r1
+ mov r9, r2
+ str r3, [sp, #12]
+ mov r4, r0
+ ldr r3, .L1460
+ mov r6, r0
+ mov r8, #0
+ ldr r7, .L1460+4
+ ldrb fp, [r3, #2697] @ zero_extendqisi2
+ b .L1442
+.L1449:
+ rsb r3, r8, sl
+ add r2, sp, #20
+ mov r0, r6
+ mov r1, r9
+ uxtb r3, r3
+ str r3, [sp, #0]
+ add r3, sp, #24
+ bl LogAddr2PhyAddr
+ ldr r3, [sp, #24]
+ ldrb r2, [r7, #3766] @ zero_extendqisi2
+ cmp r3, r2
+ mvncs r3, #0
+ strcs r3, [r6, #0]
+ bcs .L1444
+ add r3, r7, r3
+ ldrb r5, [r3, #3768] @ zero_extendqisi2
+ mov r0, r5
+ bl NandcWaitFlashReady
+ mov r0, r5
+ bl NandcFlashCs
+ mov r0, r5
+ ldr r1, [sp, #20]
+ bl FlashProgFirstCmd
+ ldr r3, [r6, #12]
+ mov r2, fp
+ mov r1, #1
+ mov r0, r5
+ str r3, [sp, #0]
+ ldr r3, [r6, #8]
+ bl NandcXferData
+ ldr r1, [sp, #20]
+ mov r0, r5
+ bl FlashProgSecondCmd
+ mov r0, r5
+ bl NandcWaitFlashReady
+ ldr r1, [sp, #20]
+ mov r0, r5
+ bl FlashReadStatus
+ ldr r3, [sp, #20]
+ ands r0, r0, #1
+ mvnne r0, #0
+ str r0, [r6, #0]
+ ldr r1, [r7, #4]
+ mov r0, r5
+ add r1, r1, r3
+ bl FlashProgFirstCmd
+ ldr r3, [r6, #8]
+ ldr r2, [r6, #12]
+ mov r1, #1
+ cmp r3, #0
+ mov r0, r5
+ addne r3, r3, #2048
+ cmp r2, #0
+ addne r2, r2, #8
+ str r2, [sp, #0]
+ mov r2, fp
+ bl NandcXferData
+ ldr r3, [sp, #20]
+ ldr r1, [r7, #4]
+ mov r0, r5
+ add r1, r1, r3
+ bl FlashProgSecondCmd
+ mov r0, r5
+ bl NandcWaitFlashReady
+ mov r0, r5
+ ldr r1, [sp, #20]
+ bl FlashReadStatus
+ tst r0, #1
+ mov r0, r5
+ mvnne r3, #0
+ strne r3, [r6, #0]
+ bl NandcFlashDeCs
+.L1444:
+ add r8, r8, #1
+ add r6, r6, #36
+.L1442:
+ cmp r8, sl
+ bne .L1449
+ ldr r3, [sp, #12]
+ cmp r3, #0
+ movne r6, #0
+ ldrne r5, .L1460+8
+ bne .L1450
+ b .L1451
+.L1456:
+ ldr r3, [r4, #0]
+ cmn r3, #1
+ bne .L1452
+ ldr r1, [r4, #4]
+ ldr r0, .L1460+12
+ bl printk
+ b .L1453
+.L1452:
+ rsb r3, r6, sl
+ mov r1, r9
+ add r2, sp, #20
+ mov r0, r4
+ uxtb r3, r3
+ str r3, [sp, #0]
+ add r3, sp, #24
+ bl LogAddr2PhyAddr
+ ldr r2, [r5, #152]
+ mov r3, #0
+ mov lr, r4
+ add ip, sp, #28
+ str r3, [r2, #0]
+ ldr r2, [r5, #156]
+ str r3, [r2, #0]
+ ldmia lr!, {r0, r1, r2, r3}
+ stmia ip!, {r0, r1, r2, r3}
+ ldmia lr!, {r0, r1, r2, r3}
+ stmia ip!, {r0, r1, r2, r3}
+ add r0, sp, #28
+ ldr r3, [lr, #0]
+ mov r1, #1
+ mov r2, r9
+ str r3, [ip, #0]
+ ldr r3, [r5, #152]
+ str r3, [sp, #36]
+ ldr r3, [r5, #156]
+ str r3, [sp, #40]
+ bl FlashReadPages
+ ldr r7, [sp, #28]
+ cmn r7, #1
+ bne .L1454
+ ldr r0, .L1460+16
+ ldr r1, [r4, #4]
+ bl printk
+ str r7, [r4, #0]
+.L1454:
+ ldr r3, [r4, #12]
+ cmp r3, #0
+ beq .L1455
+ ldr r2, [r3, #0]
+ ldr r3, [r5, #156]
+ ldr r3, [r3, #0]
+ cmp r2, r3
+ beq .L1455
+ ldr r0, .L1460+20
+ ldr r1, [r4, #4]
+ bl printk
+ mvn r3, #0
+ str r3, [r4, #0]
+.L1455:
+ ldr r3, [r4, #8]
+ cmp r3, #0
+ beq .L1453
+ ldr r2, [r3, #0]
+ ldr r3, [r5, #152]
+ ldr r3, [r3, #0]
+ cmp r2, r3
+ beq .L1453
+ ldr r0, .L1460+24
+ ldr r1, [r4, #4]
+ bl printk
+ mvn r3, #0
+ str r3, [r4, #0]
+.L1453:
+ add r6, r6, #1
+ add r4, r4, #36
+.L1450:
+ cmp r6, sl
+ bne .L1456
+.L1451:
+ mov r0, #0
+ add sp, sp, #68
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1461:
+ .align 2
+.L1460:
+ .word .LANCHOR1
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LC100
+ .word .LC101
+ .word .LC102
+ .word .LC103
+ .fnend
+ .size FlashProgSlc2KPages, .-FlashProgSlc2KPages
+ .align 2
+ .global FlashProgPages
+ .type FlashProgPages, %function
+FlashProgPages:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 64
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #76
+ sub sp, sp, #76
+ ldr r5, .L1489
+ mov r9, r0
+ str r1, [sp, #8]
+ mov sl, r2
+ str r3, [sp, #16]
+ ldr ip, [r5, #2776]
+ ldrb r6, [r5, #0] @ zero_extendqisi2
+ ldrb ip, [ip, #19] @ zero_extendqisi2
+ cmp r6, #0
+ moveq fp, r5
+ str ip, [sp, #20]
+ ldr ip, .L1489+4
+ ldrb ip, [ip, #2697] @ zero_extendqisi2
+ str ip, [sp, #12]
+ beq .L1463
+ bl FlashProgSlc2KPages
+ b .L1464
+.L1476:
+ mov r4, #36
+ ldr r2, [sp, #8]
+ mul r4, r4, r6
+ rsb r3, r6, r2
+ mov r1, sl
+ add r2, sp, #28
+ uxtb r3, r3
+ str r3, [sp, #0]
+ add r7, r9, r4
+ add r3, sp, #32
+ mov r0, r7
+ bl LogAddr2PhyAddr
+ ldrb r3, [r5, #3766] @ zero_extendqisi2
+ ldr r2, [sp, #32]
+ cmp r2, r3
+ mvncs r3, #0
+ strcs r3, [r9, r4]
+ mov r8, r0
+ bcs .L1466
+ ldrb r1, [r5, #3837] @ zero_extendqisi2
+ add r2, fp, r2, asl #4
+ cmp r1, #0
+ ldr r2, [r2, #2788]
+ moveq r8, #0
+ cmp r2, #0
+ beq .L1468
+ cmp r3, #1
+ bne .L1469
+ ldr r0, [r5, #2164]
+ bl NandcIqrWaitFlashReady
+.L1469:
+ ldrb r0, [sp, #32] @ zero_extendqisi2
+ bl FlashWaitCmdDone
+.L1468:
+ ldr r2, [sp, #32]
+ mov r1, #0
+ cmp r8, #0
+ add r3, r5, r2, asl #4
+ movne r0, #36
+ str r1, [r3, #2792]
+ ldr r1, [sp, #28]
+ str r7, [r3, #2788]
+ str r1, [r3, #2784]
+ addne r1, r6, #1
+ mlane r1, r0, r1, r9
+ strne r1, [r3, #2792]
+ add r3, fp, r2
+ add r2, fp, r2, asl #4
+ ldrb r4, [r3, #3768] @ zero_extendqisi2
+ ldrb r3, [fp, #3766] @ zero_extendqisi2
+ cmp r3, #1
+ strb r4, [r2, #2780]
+ mov r0, r4
+ bne .L1471
+ bl NandcWaitFlashReady
+ b .L1472
+.L1471:
+ bl NandcFlashCs
+ ldr r3, [sp, #32]
+ mov r0, r4
+ ldr r1, [sp, #28]
+ add r3, r5, r3, asl #2
+ ldr r2, [r3, #2740]
+ adds r2, r2, #0
+ movne r2, #1
+ bl FlashWaitReadyEN
+ mov r0, r4
+ bl NandcFlashDeCs
+.L1472:
+ ldr r2, [sp, #20]
+ sub r3, r2, #1
+ cmp r3, #5
+ bhi .L1473
+ add r3, r5, r4
+ ldrb r3, [r3, #3760] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L1473
+ mov r0, r4
+ ldrb r1, [r5, #2909] @ zero_extendqisi2
+ ldr r2, .L1489+8
+ mov r3, #0
+ bl HynixSetRRPara
+.L1473:
+ mov r0, r4
+ bl NandcFlashCs
+ cmp sl, #1
+ bne .L1474
+ ldrb r3, [r5, #80] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L1474
+ mov r0, r4
+ bl flash_enter_slc_mode
+.L1474:
+ mov r0, r4
+ ldr r1, [sp, #28]
+ bl FlashProgFirstCmd
+ ldr r3, [r7, #12]
+ mov r0, r4
+ mov r1, #1
+ ldr r2, [sp, #12]
+ str r3, [sp, #0]
+ ldr r3, [r7, #8]
+ bl NandcXferData
+ cmp r8, #0
+ beq .L1475
+ mov r0, r4
+ ldr r1, [sp, #28]
+ bl FlashProgDpFirstCmd
+ ldr r3, [sp, #32]
+ ldr r1, [sp, #28]
+ mov r0, r4
+ add r3, r5, r3, asl #2
+ ldr r2, [r3, #2740]
+ adds r2, r2, #0
+ movne r2, #1
+ bl FlashWaitReadyEN
+ ldr r3, [sp, #28]
+ ldr r1, [r5, #4]
+ mov r0, r4
+ add r1, r1, r3
+ bl FlashProgDpSecondCmd
+ add r3, r6, #1
+ mov r2, #36
+ mov r0, r4
+ mla r3, r2, r3, r9
+ mov r1, #1
+ ldr r2, [r3, #12]
+ str r2, [sp, #0]
+ ldr r2, [sp, #12]
+ ldr r3, [r3, #8]
+ bl NandcXferData
+.L1475:
+ mov r0, r4
+ ldr r1, [sp, #28]
+ bl FlashProgSecondCmd
+ mov r0, r4
+ bl NandcFlashDeCs
+ add r6, r6, r8
+.L1466:
+ add r6, r6, #1
+.L1463:
+ ldr r3, [sp, #8]
+ cmp r6, r3
+ bcc .L1476
+ ldr r5, .L1489
+ mov r4, #0
+ ldr r6, .L1489+12
+ ldr r0, [r5, #2164]
+ bl NandcIqrWaitFlashReady
+ b .L1477
+.L1479:
+ uxtb r0, r4
+ bl FlashWaitCmdDone
+ cmp sl, #1
+ bne .L1478
+ ldrb r3, [r5, #80] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L1478
+ ldrb r0, [r6, r4, asl #4] @ zero_extendqisi2
+ bl flash_exit_slc_mode
+.L1478:
+ add r4, r4, #1
+.L1477:
+ ldrb r3, [r5, #3766] @ zero_extendqisi2
+ cmp r4, r3
+ bcc .L1479
+ ldr r2, [sp, #16]
+ cmp r2, #0
+ ldreq r0, [sp, #16]
+ beq .L1464
+ mov r5, #0
+ ldr r4, .L1489+16
+ ldr r6, [sp, #8]
+ b .L1480
+.L1485:
+ ldr r3, [r9, #0]
+ cmn r3, #1
+ bne .L1481
+ ldr r1, [r9, #4]
+ ldr r0, .L1489+20
+ bl printk
+ b .L1482
+.L1481:
+ rsb r3, r5, r6
+ mov r1, sl
+ add r2, sp, #28
+ mov r0, r9
+ uxtb r3, r3
+ str r3, [sp, #0]
+ add r3, sp, #32
+ bl LogAddr2PhyAddr
+ ldr r2, [r4, #152]
+ mov r3, #0
+ mov lr, r9
+ add ip, sp, #36
+ str r3, [r2, #0]
+ ldr r2, [r4, #156]
+ str r3, [r2, #0]
+ ldmia lr!, {r0, r1, r2, r3}
+ stmia ip!, {r0, r1, r2, r3}
+ ldmia lr!, {r0, r1, r2, r3}
+ stmia ip!, {r0, r1, r2, r3}
+ add r0, sp, #36
+ ldr r3, [lr, #0]
+ mov r1, #1
+ mov r2, sl
+ str r3, [ip, #0]
+ ldr r3, [r4, #152]
+ str r3, [sp, #44]
+ ldr r3, [r4, #156]
+ str r3, [sp, #48]
+ bl FlashReadPages
+ ldr r7, [sp, #36]
+ cmn r7, #1
+ bne .L1483
+ ldr r0, .L1489+24
+ ldr r1, [r9, #4]
+ bl printk
+ str r7, [r9, #0]
+.L1483:
+ ldr r3, [r9, #12]
+ cmp r3, #0
+ beq .L1484
+ ldr r2, [r3, #0]
+ ldr r3, [r4, #156]
+ ldr r3, [r3, #0]
+ cmp r2, r3
+ beq .L1484
+ ldr r0, .L1489+28
+ ldr r1, [r9, #4]
+ bl printk
+ mvn r3, #0
+ str r3, [r9, #0]
+.L1484:
+ ldr r3, [r9, #8]
+ cmp r3, #0
+ beq .L1482
+ ldr r2, [r3, #0]
+ ldr r3, [r4, #152]
+ ldr r3, [r3, #0]
+ cmp r2, r3
+ beq .L1482
+ ldr r0, .L1489+32
+ ldr r1, [r9, #4]
+ bl printk
+ mvn r3, #0
+ str r3, [r9, #0]
+.L1482:
+ add r5, r5, #1
+ add r9, r9, #36
+.L1480:
+ cmp r5, r6
+ bne .L1485
+ mov r0, #0
+.L1464:
+ add sp, sp, #76
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1490:
+ .align 2
+.L1489:
+ .word .LANCHOR0
+ .word .LANCHOR1
+ .word .LANCHOR0+2912
+ .word .LANCHOR0+2780
+ .word .LANCHOR2
+ .word .LC100
+ .word .LC101
+ .word .LC102
+ .word .LC103
+ .fnend
+ .size FlashProgPages, .-FlashProgPages
+ .align 2
+ .global FtlVpcTblFlush
+ .type FtlVpcTblFlush, %function
+FtlVpcTblFlush:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ .save {r3, r4, r5, r6, r7, r8, sl, lr}
+ mov r8, #0
+ ldr r4, .L1500
+ mov r1, #255
+ ldr r6, .L1500+4
+ movw sl, #3852
+ ldr r7, .L1500+8
+ ldr r3, [r4, #-2076]
+ ldr r5, [r4, #-952]
+ str r3, [r4, #176]
+ ldrh r3, [r4, r6]
+ str r5, [r4, #180]
+ str r8, [r5, #12]
+ strh r3, [r5, #2] @ movhi
+ ldr r3, .L1500+12
+ strh r3, [r5, #0] @ movhi
+ ldr r3, [r4, #-1760]
+ str r8, [r5, #8]
+ str r3, [r5, #4]
+ ldr r3, .L1500+16
+ str r3, [r4, #-1820]
+ ldr r3, .L1500+20
+ str r3, [r4, #-1816]
+ ldr r3, .L1500+24
+ ldrh r2, [r4, r3]
+ sub r3, r3, #50
+ strh r2, [r4, r3] @ movhi
+ movw r3, #3866
+ ldrh r3, [r7, r3]
+ strb r3, [r4, #-1810]
+ ldr r3, .L1500+28
+ ldrh r2, [r4, r3]
+ add r3, r3, #238
+ strh r2, [r4, r3] @ movhi
+ sub r3, r3, #236
+ ldrh r2, [r4, r3]
+ ldrb r3, [r4, #-2038] @ zero_extendqisi2
+ orr r2, r3, r2, asl #6
+ ldr r3, .L1500+32
+ strh r2, [r4, r3] @ movhi
+ ldrb r3, [r4, #-2036] @ zero_extendqisi2
+ strb r3, [r4, #-1809]
+ ldr r3, .L1500+36
+ ldrh r2, [r4, r3]
+ add r3, r3, #194
+ strh r2, [r4, r3] @ movhi
+ sub r3, r3, #192
+ ldrh r2, [r4, r3]
+ ldrb r3, [r4, #-1990] @ zero_extendqisi2
+ orr r2, r3, r2, asl #6
+ ldr r3, .L1500+40
+ strh r2, [r4, r3] @ movhi
+ ldrb r3, [r4, #-1988] @ zero_extendqisi2
+ strb r3, [r4, #-1808]
+ ldr r3, .L1500+44
+ ldrh r2, [r4, r3]
+ add r3, r3, #150
+ strh r2, [r4, r3] @ movhi
+ sub r3, r3, #148
+ ldr r0, [r4, #176]
+ ldrh r2, [r4, r3]
+ ldrb r3, [r4, #-1942] @ zero_extendqisi2
+ orr r2, r3, r2, asl #6
+ ldr r3, .L1500+48
+ strh r2, [r4, r3] @ movhi
+ ldrb r3, [r4, #-1940] @ zero_extendqisi2
+ strb r3, [r4, #-1807]
+ ldr r3, [r4, #-1840]
+ str r3, [r4, #-1788]
+ ldr r3, [r4, #-1848]
+ str r3, [r4, #-1780]
+ ldr r3, [r4, #-1844]
+ str r3, [r4, #-1784]
+ movw r3, #3922
+ ldrh r2, [r7, r3]
+ bl ftl_memset
+ ldr r1, .L1500+52
+ mov r2, #48
+ ldr r0, [r4, #176]
+ bl memcpy
+ ldrh r2, [r7, sl]
+ ldr r0, [r4, #176]
+ ldr r1, [r4, #-2064]
+ mov r2, r2, asl #1
+ add r0, r0, #48
+ bl memcpy
+ ldrh r2, [r7, sl]
+ ldr r3, [r4, #176]
+ add r0, r2, #24
+ ldr r1, [r4, #-1888]
+ mov r2, r2, lsr #3
+ mov r0, r0, lsr #1
+ add r2, r2, #4
+ add r0, r3, r0, asl #2
+ bl memcpy
+ mov r0, r8
+ bl FtlUpdateVaildLpn
+ movw r8, #65535
+.L1499:
+ ldr r3, [r4, #-2076]
+ mov r1, #1
+ ldr r7, .L1500+56
+ ldrh r2, [r4, r6]
+ str r3, [r4, #176]
+ ldr r3, [r4, #-952]
+ ldr r0, .L1500+60
+ str r3, [r4, #180]
+ ldrh r3, [r4, r7]
+ orr r3, r3, r2, asl #10
+ mov r2, r1
+ str r3, [r4, #172]
+ mov r3, r1
+ bl FlashProgPages
+ ldr r1, .L1500+8
+ movw r3, #3914
+ ldrh r2, [r4, r7]
+ ldrh r3, [r1, r3]
+ sub r3, r3, #1
+ cmp r2, r3
+ blt .L1493
+ ldr r3, .L1500+64
+ ldrh r2, [r4, r6]
+ ldrh r8, [r4, r3]
+ strh r2, [r4, r3] @ movhi
+ mov r3, #0
+ strh r3, [r4, r7] @ movhi
+ bl FtlFreeSysBlkQueueOut
+ ldr r3, [r4, #-1848]
+ mov r1, #1
+ add r2, r3, #1
+ str r2, [r4, #-1848]
+ str r3, [r4, #-1760]
+ mov r2, r0, asl #10
+ strh r0, [r4, r6] @ movhi
+ str r2, [r4, #172]
+ mov r2, r1
+ str r3, [r5, #4]
+ mov r3, r1
+ strh r0, [r5, #2] @ movhi
+ ldr r0, .L1500+60
+ bl FlashProgPages
+.L1493:
+ ldr r2, .L1500+56
+ ldr r1, [r4, #168]
+ ldrh r3, [r4, r2]
+ cmn r1, #1
+ add r3, r3, #1
+ uxth r3, r3
+ strh r3, [r4, r2] @ movhi
+ bne .L1494
+ cmp r3, #1
+ ldreq r1, .L1500+8
+ movweq r3, #3914
+ ldreqh r3, [r1, r3]
+ subeq r3, r3, #1
+ streqh r3, [r4, r2] @ movhi
+ b .L1499
+.L1494:
+ cmp r3, #1
+ beq .L1499
+ movw r3, #65535
+ cmp r8, r3
+ beq .L1496
+ mov r0, r8
+ mov r1, #1
+ bl FtlFreeSysBlkQueueIn
+.L1496:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, pc}
+.L1501:
+ .align 2
+.L1500:
+ .word .LANCHOR2
+ .word -1768
+ .word .LANCHOR0
+ .word -3932
+ .word 1179929683
+ .word 1342177334
+ .word -1762
+ .word -2044
+ .word -1804
+ .word -1996
+ .word -1800
+ .word -1948
+ .word -1796
+ .word .LANCHOR2-1820
+ .word -1766
+ .word .LANCHOR2+168
+ .word -1764
+ .fnend
+ .size FtlVpcTblFlush, .-FtlVpcTblFlush
+ .align 2
+ .global FtlBbmTblFlush
+ .type FtlBbmTblFlush, %function
+FtlBbmTblFlush:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r1, #0
+ ldr r7, .L1511
+ mov r6, #0
+ ldr sl, .L1511+4
+ movw r9, #3866
+ ldr r8, .L1511+8
+ ldr r3, [r7, #-952]
+ ldr r0, [r7, #-2076]
+ str r3, [r7, #180]
+ movw r3, #3922
+ str r0, [r7, #176]
+ ldrh r2, [sl, r3]
+ bl ftl_memset
+ b .L1503
+.L1504:
+ ldr r3, .L1511+12
+ ldr r1, [r8, #4]!
+ ldrh r2, [r7, r3]
+ ldr r3, [r7, #176]
+ mul r0, r2, r6
+ mov r2, r2, asl #2
+ add r6, r6, #1
+ add r0, r3, r0, asl #2
+ bl memcpy
+.L1503:
+ ldrh r3, [sl, r9]
+ ldr r4, .L1511+4
+ cmp r6, r3
+ ldr r5, .L1511
+ blt .L1504
+ ldr r6, [r5, #180]
+ mov r1, #255
+ mov r2, #16
+ mov r7, #0
+ mov fp, r7
+ mov r0, r6
+ bl ftl_memset
+ ldr r3, .L1511+16
+ strh r3, [r6, #0] @ movhi
+ ldr r3, [r4, #3988]
+ str r3, [r6, #4]
+ movw r3, #3980
+ ldrh r3, [r4, r3]
+ strh r3, [r6, #2] @ movhi
+ mov r3, #3984
+ ldrh r3, [r4, r3]
+ strh r3, [r6, #8] @ movhi
+ movw r3, #3986
+ ldrh r3, [r4, r3]
+ strh r3, [r6, #10] @ movhi
+ ldr r3, [r4, #3840]
+ strh r3, [r6, #12] @ movhi
+ b .L1510
+.L1509:
+ mov r7, #1
+.L1510:
+ ldr r3, [r5, #-2076]
+ movw r8, #3980
+ ldr r4, .L1511+4
+ movw sl, #3982
+ mov r9, #3984
+ str r3, [r5, #176]
+ ldr r3, [r5, #-952]
+ ldrh r1, [r4, r8]
+ ldrh r2, [r4, sl]
+ str r3, [r5, #180]
+ mov r3, #0
+ ldrh r0, [r6, #10]
+ str r3, [r5, #168]
+ orr r3, r2, r1, asl #10
+ str r3, [r5, #172]
+ str r0, [sp, #0]
+ ldrh r3, [r4, r9]
+ ldr r0, .L1511+20
+ bl printk
+ mov r1, #1
+ mov r2, r1
+ mov r3, r1
+ ldr r0, .L1511+24
+ bl FlashProgPages
+ movw r3, #3914
+ ldrh r3, [r4, r3]
+ ldrh r2, [r4, sl]
+ sub r3, r3, #1
+ cmp r2, r3
+ blt .L1506
+ ldr r3, [r4, #3988]
+ mov r1, #1
+ ldrh r2, [r4, r8]
+ add r3, r3, #1
+ ldr r0, [r5, #-2088]
+ str r3, [r4, #3988]
+ str r3, [r6, #4]
+ ldrh r3, [r4, r9]
+ strh r2, [r6, #8] @ movhi
+ strh r2, [r4, r9] @ movhi
+ mov r2, r1
+ strh r3, [r4, r8] @ movhi
+ mov r3, r3, asl #10
+ str r3, [r5, #172]
+ str r3, [r0, #4]
+ strh fp, [r4, sl] @ movhi
+ bl FlashEraseBlocks
+ mov r1, #1
+ ldr r0, .L1511+24
+ mov r2, r1
+ mov r3, r1
+ bl FlashProgPages
+.L1506:
+ ldr r2, .L1511+4
+ movw r3, #3982
+ ldrh r1, [r2, r3]
+ add r1, r1, #1
+ strh r1, [r2, r3] @ movhi
+ ldr r3, [r5, #168]
+ cmn r3, #1
+ bne .L1507
+ ldr r1, [r5, #172]
+ ldr r0, .L1511+28
+ bl printk
+ b .L1510
+.L1507:
+ cmp r7, #0
+ beq .L1509
+ mov r0, #0
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1512:
+ .align 2
+.L1511:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .word .LANCHOR0+4004
+ .word -1032
+ .word -3887
+ .word .LC104
+ .word .LANCHOR2+168
+ .word .LC105
+ .fnend
+ .size FtlBbmTblFlush, .-FtlBbmTblFlush
+ .align 2
+ .global FtlGcFreeBadSuperBlk
+ .type FtlGcFreeBadSuperBlk, %function
+FtlGcFreeBadSuperBlk:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, lr}
+ mov r9, r0
+ ldr r4, .L1523
+ ldr r3, .L1523+4
+ ldrh r3, [r4, r3]
+ cmp r3, #0
+ movne r6, #0
+ movne sl, r4
+ bne .L1514
+ b .L1515
+.L1521:
+ add r3, r3, r6
+ mov r1, r9
+ mov r5, #0
+ ldr r7, .L1523+4
+ ldrb r0, [r3, #3870] @ zero_extendqisi2
+ bl V2P_block
+ mov r8, r0
+ b .L1516
+.L1520:
+ add r3, r4, r5, asl #1
+ sub r3, r3, #1120
+ sub r3, r3, #12
+ ldrh r3, [r3, #0]
+ cmp r3, r8
+ bne .L1517
+ mov r1, r8
+ ldr r0, .L1523+8
+ bl printk
+ mov r0, r8
+ bl FtlBbmMapBadBlock
+ bl FtlBbmTblFlush
+ ldrh r1, [r4, r7]
+ mov r3, r5
+ b .L1518
+.L1519:
+ add r0, r3, #1
+ add r3, r4, r3, asl #1
+ sub r3, r3, #1120
+ add r2, r4, r0, asl #1
+ sub r2, r2, #1120
+ sub r2, r2, #12
+ ldrh r2, [r2, #0]
+ strh r2, [r3, #-12] @ movhi
+ uxth r3, r0
+.L1518:
+ cmp r3, r1
+ bcc .L1519
+ sub r1, r1, #1
+ strh r1, [sl, r7] @ movhi
+.L1517:
+ add r5, r5, #1
+ uxth r5, r5
+.L1516:
+ ldrh r3, [r4, r7]
+ cmp r3, r5
+ bhi .L1520
+ add r6, r6, #1
+ uxth r6, r6
+.L1514:
+ ldr r3, .L1523+12
+ movw r2, #3844
+ ldrh r2, [r3, r2]
+ cmp r2, r6
+ bhi .L1521
+ bl FtlGcReFreshBadBlk
+.L1515:
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L1524:
+ .align 2
+.L1523:
+ .word .LANCHOR2
+ .word -1134
+ .word .LC106
+ .word .LANCHOR0
+ .fnend
+ .size FtlGcFreeBadSuperBlk, .-FtlGcFreeBadSuperBlk
+ .align 2
+ .global update_vpc_list
+ .type update_vpc_list, %function
+update_vpc_list:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r2, r0, asl #1
+ ldr r3, .L1533
+ mov r4, r0
+ ldr r1, [r3, #-2064]
+ ldrh r2, [r1, r2]
+ cmp r2, #0
+ bne .L1526
+ ldr r1, .L1533+4
+ ldrh r0, [r3, r1]
+ cmp r0, r4
+ mvneq r2, #0
+ streqh r2, [r3, r1] @ movhi
+ beq .L1528
+ ldr r1, .L1533+8
+ ldrh r1, [r3, r1]
+ cmp r1, r4
+ beq .L1529
+ ldr r1, .L1533+12
+ ldrh r1, [r3, r1]
+ cmp r1, r4
+ beq .L1529
+ ldr r1, .L1533+16
+ ldrh r3, [r3, r1]
+ cmp r3, r4
+ beq .L1529
+.L1528:
+ mov r1, r4
+ ldr r0, .L1533+20
+ bl List_remove_node
+ ldr r5, .L1533
+ ldr r3, .L1533+24
+ mov r0, r4
+ ldrh r2, [r5, r3]
+ sub r2, r2, #1
+ strh r2, [r5, r3] @ movhi
+ bl free_data_superblock
+ mov r0, r4
+ bl FtlGcFreeBadSuperBlk
+ mov r2, #1
+ b .L1529
+.L1526:
+ bl List_update_data_list
+ mov r2, #0
+.L1529:
+ mov r0, r2
+ ldmfd sp!, {r3, r4, r5, pc}
+.L1534:
+ .align 2
+.L1533:
+ .word .LANCHOR2
+ .word -1756
+ .word -2044
+ .word -1996
+ .word -1948
+ .word .LANCHOR2-2068
+ .word -2056
+ .fnend
+ .size update_vpc_list, .-update_vpc_list
+ .align 2
+ .global decrement_vpc_count
+ .type decrement_vpc_count, %function
+decrement_vpc_count:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ movw r3, #65535
+ cmp r0, r3
+ mov r5, r0
+ beq .L1536
+ ldr r2, .L1541
+ mov r3, r0, asl #1
+ ldr r2, [r2, #-2064]
+ ldrh r4, [r2, r3]
+ cmp r4, #0
+ subne r4, r4, #1
+ strneh r4, [r2, r3] @ movhi
+ bne .L1536
+ ldr r0, .L1541+4
+ mov r1, r5
+ mov r2, r4
+ bl printk
+ mov r0, r4
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1536:
+ ldr r7, .L1541
+ movw r3, #65535
+ ldr r6, .L1541+8
+ ldrh r0, [r7, r6]
+ cmp r0, r3
+ streqh r5, [r7, r6] @ movhi
+ moveq r0, #0
+ ldmeqfd sp!, {r3, r4, r5, r6, r7, pc}
+ cmp r0, r5
+ beq .L1540
+ bl update_vpc_list
+ strh r5, [r7, r6] @ movhi
+ adds r0, r0, #0
+ movne r0, #1
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1540:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1542:
+ .align 2
+.L1541:
+ .word .LANCHOR2
+ .word .LC107
+ .word -1024
+ .fnend
+ .size decrement_vpc_count, .-decrement_vpc_count
+ .align 2
+ .global get_new_active_ppa
+ .type get_new_active_ppa, %function
+get_new_active_ppa:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r3, #0
+ strb r3, [r0, #10]
+ mov r4, r0
+ ldrb r3, [r0, #6] @ zero_extendqisi2
+ movw r6, #65535
+ ldr r5, .L1555
+ ldr r7, .L1555+4
+ add r3, r0, r3, asl #1
+ ldrh r3, [r3, #16]
+ b .L1544
+.L1545:
+ ldrb r3, [r4, #6] @ zero_extendqisi2
+ movw r2, #3844
+ ldrh r2, [r5, r2]
+ add r3, r3, #1
+ uxtb r3, r3
+ strb r3, [r4, #6]
+ cmp r2, r3
+ ldreqh r3, [r4, #2]
+ addeq r3, r3, #1
+ streqh r3, [r4, #2] @ movhi
+ moveq r3, #0
+ streqb r3, [r4, #6]
+ ldrb r3, [r4, #6] @ zero_extendqisi2
+ add r3, r4, r3, asl #1
+ ldrh r3, [r3, #16]
+.L1544:
+ cmp r3, r6
+ beq .L1545
+ ldrb r2, [r4, #8] @ zero_extendqisi2
+ cmp r2, #1
+ bne .L1547
+ ldrb r2, [r5, #80] @ zero_extendqisi2
+ cmp r2, #0
+ bne .L1547
+ ldrh r2, [r4, #2]
+ add r2, r7, r2, asl #1
+ sub r2, r2, #912
+ ldrh r2, [r2, #0]
+ cmp r2, r6
+ bne .L1547
+ ldrh r3, [r4, #4]
+ ldrh r0, [r4, #0]
+ sub r3, r3, #1
+ strh r3, [r4, #4] @ movhi
+ bl decrement_vpc_count
+ b .L1545
+.L1547:
+ ldrh r6, [r4, #2]
+ movw r5, #65535
+ mov r7, r5
+ orr r6, r6, r3, asl #10
+ ldrh r3, [r4, #4]
+ sub r3, r3, #1
+ strh r3, [r4, #4] @ movhi
+.L1552:
+ ldr r2, .L1555
+ movw r3, #3844
+ ldrh r2, [r2, r3]
+ ldrb r3, [r4, #6] @ zero_extendqisi2
+.L1549:
+ add r3, r3, #1
+ uxtb r3, r3
+ cmp r3, r2
+ ldreqh r3, [r4, #2]
+ addeq r3, r3, #1
+ streqh r3, [r4, #2] @ movhi
+ moveq r3, #0
+ add r1, r4, r3, asl #1
+ ldrh r1, [r1, #16]
+ cmp r1, r5
+ beq .L1549
+ strb r3, [r4, #6]
+ ldrb r3, [r4, #8] @ zero_extendqisi2
+ cmp r3, #1
+ bne .L1550
+ ldr r3, .L1555
+ ldrb r2, [r3, #80] @ zero_extendqisi2
+ cmp r2, #0
+ ldrh r2, [r4, #2]
+ bne .L1553
+ ldr r3, .L1555+4
+ add r2, r3, r2, asl #1
+ sub r2, r2, #912
+ ldrh r3, [r2, #0]
+ cmp r3, r7
+ bne .L1550
+ ldrh r3, [r4, #4]
+ cmp r3, #0
+ beq .L1550
+ sub r3, r3, #1
+ ldrh r0, [r4, #0]
+ strh r3, [r4, #4] @ movhi
+ bl decrement_vpc_count
+ b .L1552
+.L1553:
+ movw r1, #3914
+ ldrh r1, [r3, r1]
+ cmp r2, r1
+ bcc .L1550
+ ldr r1, .L1555+4
+ ldrh r2, [r4, #0]
+ ldrh r0, [r4, #4]
+ ldr r1, [r1, #-2064]
+ mov r2, r2, asl #1
+ ldrh ip, [r1, r2]
+ rsb r0, r0, ip
+ strh r0, [r1, r2] @ movhi
+ mov r2, #0
+ strh r2, [r4, #4] @ movhi
+ mov r1, r2 @ movhi
+ movw r2, #3912
+ ldrh r3, [r3, r2]
+ strb r1, [r4, #6]
+ strh r3, [r4, #2] @ movhi
+.L1550:
+ mov r0, r6
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1556:
+ .align 2
+.L1555:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size get_new_active_ppa, .-get_new_active_ppa
+ .align 2
+ .type FtlSlcSuperblockCheck.part.18, %function
+FtlSlcSuperblockCheck.part.18:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r4, r0
+ ldrb r3, [r0, #6] @ zero_extendqisi2
+ movw r6, #65535
+ ldr r5, .L1563
+ ldr r7, .L1563+4
+ add r3, r0, r3, asl #1
+ ldrh r3, [r3, #16]
+ b .L1558
+.L1559:
+ ldrb r3, [r4, #6] @ zero_extendqisi2
+ movw r2, #3844
+ ldrh r2, [r5, r2]
+ add r3, r3, #1
+ uxtb r3, r3
+ strb r3, [r4, #6]
+ cmp r2, r3
+ ldreqh r3, [r4, #2]
+ addeq r3, r3, #1
+ streqh r3, [r4, #2] @ movhi
+ moveq r3, #0
+ streqb r3, [r4, #6]
+ ldrb r3, [r4, #6] @ zero_extendqisi2
+ add r3, r4, r3, asl #1
+ ldrh r3, [r3, #16]
+.L1558:
+ cmp r3, r6
+ beq .L1559
+ ldrb r2, [r4, #8] @ zero_extendqisi2
+ cmp r2, #1
+ bne .L1561
+ ldrb r3, [r5, #80] @ zero_extendqisi2
+ cmp r3, #0
+ bne .L1561
+ ldrh r3, [r4, #2]
+ add r3, r7, r3, asl #1
+ sub r3, r3, #912
+ ldrh r3, [r3, #0]
+ cmp r3, r6
+ bne .L1561
+ ldrh r3, [r4, #4]
+ ldrh r0, [r4, #0]
+ sub r3, r3, #1
+ strh r3, [r4, #4] @ movhi
+ bl decrement_vpc_count
+ ldrh r3, [r4, #4]
+ cmp r3, #0
+ bne .L1559
+ ldrh r2, [r4, #2]
+ strb r3, [r4, #6]
+ add r2, r2, #1
+ strh r2, [r4, #2] @ movhi
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1561:
+ ldr r3, .L1563
+ ldrb r1, [r3, #80] @ zero_extendqisi2
+ cmp r1, #0
+ ldmeqfd sp!, {r3, r4, r5, r6, r7, pc}
+ cmp r2, #1
+ ldmnefd sp!, {r3, r4, r5, r6, r7, pc}
+ movw r2, #3914
+ ldrh r1, [r4, #2]
+ ldrh r2, [r3, r2]
+ cmp r1, r2
+ ldmccfd sp!, {r3, r4, r5, r6, r7, pc}
+ ldr r1, .L1563+4
+ ldrh r2, [r4, #0]
+ ldrh r0, [r4, #4]
+ ldr r1, [r1, #-2064]
+ mov r2, r2, asl #1
+ ldrh ip, [r1, r2]
+ rsb r0, r0, ip
+ strh r0, [r1, r2] @ movhi
+ mov r2, #0
+ strh r2, [r4, #4] @ movhi
+ mov r1, r2 @ movhi
+ movw r2, #3912
+ ldrh r3, [r3, r2]
+ strb r1, [r4, #6]
+ strh r3, [r4, #2] @ movhi
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1564:
+ .align 2
+.L1563:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size FtlSlcSuperblockCheck.part.18, .-FtlSlcSuperblockCheck.part.18
+ .align 2
+ .global FtlSlcSuperblockCheck
+ .type FtlSlcSuperblockCheck, %function
+FtlSlcSuperblockCheck:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldrh r3, [r0, #4]
+ cmp r3, #0
+ bxeq lr
+ b FtlSlcSuperblockCheck.part.18
+ .fnend
+ .size FtlSlcSuperblockCheck, .-FtlSlcSuperblockCheck
+ .align 2
+ .global allocate_data_superblock
+ .type allocate_data_superblock, %function
+allocate_data_superblock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #20
+ sub sp, sp, #20
+ ldr r4, .L1601
+ mov r5, r0
+ mov r7, r4
+.L1597:
+ ldr r3, .L1601+4
+ cmp r5, r3
+ bne .L1569
+ ldr r3, .L1601+8
+ ldrh r2, [r4, r3]
+ ldr r3, [r4, #-1180]
+ mov r1, r2, lsr #1
+ mul ip, r3, r2
+ add r0, r1, #1
+ add r0, r0, ip, lsr #2
+ ldr ip, [r4, #-1884]
+ cmp ip, #0
+ uxth r0, r0
+ beq .L1591
+ ldr ip, [r4, #-1824]
+ cmp ip, #29
+ bhi .L1591
+ cmp ip, #2
+ bls .L1596
+ tst r2, #1
+ beq .L1570
+ cmp r3, #0
+ moveq r1, r3
+ beq .L1571
+ b .L1570
+.L1569:
+ ldrb r3, [r5, #8] @ zero_extendqisi2
+ cmp r3, #1
+ bne .L1596
+ ldr r3, .L1601+12
+ movw r2, #3864
+ ldrh r2, [r3, r2]
+ cmp r2, #1
+ beq .L1596
+ ldrb r3, [r3, #80] @ zero_extendqisi2
+ cmp r3, #0
+ bne .L1596
+ sub r3, r3, #2048
+ ldr r2, [r4, #-1884]
+ ldrh r3, [r4, r3]
+ cmp r2, #0
+ mov r1, r3, lsr #3
+ beq .L1570
+ ldr r2, [r4, #-1824]
+ cmp r2, #1
+ movls r1, #7
+ mulls r1, r1, r3
+ movls r1, r1, lsr #3
+ b .L1570
+.L1591:
+ mov r1, r0
+.L1570:
+ cmp r1, #0
+ subne r1, r1, #1
+ uxthne r1, r1
+ b .L1571
+.L1596:
+ mov r1, #0
+.L1571:
+ ldr r0, .L1601+16
+ bl List_pop_index_node
+ ldr r3, .L1601+8
+ ldrh r2, [r4, r3]
+ sub r2, r2, #1
+ strh r2, [r4, r3] @ movhi
+ uxth r6, r0
+ mov r0, r5
+ strh r6, [r5, #0] @ movhi
+ bl make_superblock
+ ldrb r3, [r5, #7] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L1572
+ ldr r2, .L1601+12
+ movw r3, #3844
+ ldr ip, [r4, #-2088]
+ mov fp, #0
+ mov sl, r5
+ mov r1, r5
+ ldrh r8, [r2, r3]
+ mov r0, fp
+ mov r3, ip
+ mov r2, fp
+ stmia sp, {r5, ip}
+ b .L1573
+.L1572:
+ ldr r2, [r4, #-2064]
+ mov r3, r6, asl #1
+ mvn r1, #0
+ strh r1, [r2, r3] @ movhi
+ b .L1598
+.L1576:
+ str r0, [r3, #8]
+ movw r5, #65535
+ str r0, [r3, #12]
+ ldrh lr, [r1, #16]
+ cmp lr, r5
+ beq .L1575
+ ldr r5, [sp, #4]
+ mov ip, #36
+ mov lr, lr, asl #10
+ mla r9, ip, fp, r5
+ add fp, fp, #1
+ uxth fp, fp
+ str lr, [r9, #4]
+.L1575:
+ add r2, r2, #1
+ add r3, r3, #36
+ add r1, r1, #2
+ uxth r2, r2
+.L1573:
+ cmp r2, r8
+ bne .L1576
+ ldr r3, [r4, #-1884]
+ ldr r5, [sp, #0]
+ cmp r3, #0
+ beq .L1577
+ ldr r3, .L1601+20
+ cmp r5, r3
+ bne .L1577
+ ldr r2, [r4, #-2084]
+ mov r3, r6, asl #1
+ ldrh r3, [r2, r3]
+ cmp r3, #30
+ movhi r3, #0
+ strhib r3, [r4, #-2036]
+.L1577:
+ ldrb r3, [r5, #8] @ zero_extendqisi2
+ ldr r2, [r4, #-2084]
+ cmp r3, #0
+ mov r3, r6, asl #1
+ ldrh r1, [r2, r3]
+ bne .L1578
+ cmp r1, #0
+ ldrne ip, .L1601+12
+ movwne r0, #3902
+ moveq r1, #2
+ ldrneh r0, [ip, r0]
+ addne r1, r1, r0
+ strh r1, [r2, r3] @ movhi
+ ldr r3, [r4, #-1840]
+ mov r0, r6
+ mov r1, #0
+ add r3, r3, #1
+ str r3, [r4, #-1840]
+ b .L1600
+.L1578:
+ add r1, r1, #1
+ strh r1, [r2, r3] @ movhi
+ ldr r3, [r4, #-1836]
+ mov r0, r6
+ mov r1, #1
+ add r3, r3, #1
+ str r3, [r4, #-1836]
+.L1600:
+ bl ftl_set_blk_mode
+ ldr r3, [r4, #-2084]
+ mov r9, r6, asl #1
+ ldr r2, [r4, #-1828]
+ ldr r0, [r7, #-1840]
+ mov r8, #0
+ ldrh r3, [r3, r9]
+ cmp r3, r2
+ movw r2, #3902
+ strhi r3, [r4, #-1828]
+ ldr r3, .L1601+12
+ ldrh r1, [r3, r2]
+ ldr r2, [r7, #-1836]
+ mla r0, r0, r1, r2
+ movw r2, #3852
+ ldrh r1, [r3, r2]
+ bl __aeabi_uidiv
+ ldr r3, [r7, #-936]
+ ldr r2, [r3, #16]
+ add r2, r2, #1
+ str r2, [r3, #16]
+ ldr r3, [r7, #-2088]
+ str r0, [r7, #-1832]
+ b .L1583
+.L1584:
+ add r8, r8, #1
+ ldr r2, [r3, #-32]
+ uxth r8, r8
+ bic r2, r2, #1020
+ bic r2, r2, #3
+ str r2, [r3, #-32]
+.L1583:
+ cmp r8, fp
+ add r3, r3, #36
+ bne .L1584
+ mov r2, r8
+ ldr r0, [r4, #-2088]
+ ldrb r1, [r5, #8] @ zero_extendqisi2
+ mov fp, #0
+ bl FlashEraseBlocks
+ mov r2, #36
+ mul r2, r2, r8
+ mov r3, r6
+ mov ip, r9
+ mov r8, fp
+ mov r6, r5
+ mov r9, r2
+ b .L1585
+.L1587:
+ ldr r1, [r4, #-2088]
+ add r0, r1, fp
+ ldr r5, [r1, fp]
+ cmn r5, #1
+ bne .L1586
+ ldr r0, [r0, #4]
+ add r8, r8, #1
+ str r3, [sp, #12]
+ ubfx r0, r0, #10, #16
+ str ip, [sp, #8]
+ bl FtlBbmMapBadBlock
+ strh r5, [sl, #16] @ movhi
+ ldrb r1, [r6, #7] @ zero_extendqisi2
+ sub r1, r1, #1
+ strb r1, [r6, #7]
+ ldr ip, [sp, #8]
+ ldr r3, [sp, #12]
+.L1586:
+ add fp, fp, #36
+ add sl, sl, #2
+.L1585:
+ cmp fp, r9
+ bne .L1587
+ cmp r8, #0
+ mov r5, r6
+ mov r9, ip
+ mov r6, r3
+ beq .L1588
+ mov r0, r3
+ bl update_multiplier_value
+ bl FtlBbmTblFlush
+.L1588:
+ ldrb r3, [r5, #7] @ zero_extendqisi2
+ cmp r3, #0
+ bne .L1589
+ ldr r3, [r7, #-2064]
+ mvn r2, #0
+ strh r2, [r3, r9] @ movhi
+.L1598:
+ mov r0, r6
+ bl INSERT_DATA_LIST
+ b .L1597
+.L1589:
+ ldr r1, .L1601+12
+ movw r2, #3912
+ mov r0, #0
+ strh r0, [r5, #2] @ movhi
+ strb r0, [r5, #6]
+ ldrh r2, [r1, r2]
+ strh r6, [r5, #0] @ movhi
+ mul r2, r2, r3
+ ldr r3, .L1601
+ ldr r1, [r3, #-1848]
+ uxth r2, r2
+ strh r2, [r5, #4] @ movhi
+ str r1, [r5, #12]
+ add r1, r1, #1
+ str r1, [r3, #-1848]
+ ldrh ip, [r5, #0]
+ ldr r1, [r3, #-2064]
+ mov r3, ip, asl #1
+ strh r2, [r1, r3] @ movhi
+ add sp, sp, #20
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1602:
+ .align 2
+.L1601:
+ .word .LANCHOR2
+ .word .LANCHOR2-1948
+ .word -2048
+ .word .LANCHOR0
+ .word .LANCHOR2-2052
+ .word .LANCHOR2-2044
+ .fnend
+ .size allocate_data_superblock, .-allocate_data_superblock
+ .align 2
+ .global FtlSuperblockPowerLostFix
+ .type FtlSuperblockPowerLostFix, %function
+FtlSuperblockPowerLostFix:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 40
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L1610
+ stmfd sp!, {r4, r5, r6, r7, r8, sl, lr}
+ .save {r4, r5, r6, r7, r8, sl, lr}
+ mov r4, r0
+ ldr r5, [r3, #-1164]
+ .pad #44
+ sub sp, sp, #44
+ ldr r3, .L1610+4
+ ldrb r8, [r3, #80] @ zero_extendqisi2
+ cmp r8, #0
+ beq .L1604
+ ldrb r8, [r0, #8] @ zero_extendqisi2
+ sub r0, r8, #1
+ rsbs r8, r0, #0
+ adc r8, r8, r0
+.L1604:
+ mov sl, #7
+ mvn r7, #0
+ ldr r6, .L1610
+ b .L1605
+.L1608:
+ ldrh r3, [r4, #4]
+ cmp r3, #0
+ beq .L1606
+ mov r0, r4
+ bl get_new_active_ppa
+ ldr r3, [r6, #-2076]
+ str r7, [sp, #20]
+ mov r1, #1
+ str r3, [sp, #12]
+ ldr r3, [r6, #-952]
+ str r3, [sp, #16]
+ str r7, [r5, #8]
+ str r7, [r5, #12]
+ ldrh r3, [r4, #0]
+ str r0, [sp, #8]
+ add r0, sp, #4
+ strh r3, [r5, #2] @ movhi
+ mov r3, #0
+ strh r3, [r5, #0] @ movhi
+ ldr r2, [r6, #-1844]
+ ldr r5, [r6, #-952]
+ cmn r2, #2
+ str r2, [r5, #4]
+ addne r2, r2, #1
+ moveq r2, #0
+ str r2, [r6, #-1844]
+ mov r2, r8
+ bl FlashProgPages
+ ldrh r0, [r4, #0]
+ bl decrement_vpc_count
+.L1605:
+ subs sl, sl, #1
+ bne .L1608
+.L1606:
+ ldr r2, .L1610
+ ldrh r3, [r4, #0]
+ ldrh r1, [r4, #4]
+ ldr r2, [r2, #-2064]
+ mov r3, r3, asl #1
+ ldrh r0, [r2, r3]
+ rsb r1, r1, r0
+ strh r1, [r2, r3] @ movhi
+ ldr r2, .L1610+4
+ movw r3, #3912
+ ldrh r3, [r2, r3]
+ strh r3, [r4, #2] @ movhi
+ mov r3, #0
+ strb r3, [r4, #6]
+ strh r3, [r4, #4] @ movhi
+ add sp, sp, #44
+ ldmfd sp!, {r4, r5, r6, r7, r8, sl, pc}
+.L1611:
+ .align 2
+.L1610:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .fnend
+ .size FtlSuperblockPowerLostFix, .-FtlSuperblockPowerLostFix
+ .align 2
+ .global FtlLowFormatEraseBlock
+ .type FtlLowFormatEraseBlock, %function
+FtlLowFormatEraseBlock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #20
+ sub sp, sp, #20
+ ldr r9, .L1638
+ mov r6, #0
+ mov r8, r0
+ mov r7, r1
+ mov r4, r6
+ mov r5, r6
+ ldrb r2, [r9, #80] @ zero_extendqisi2
+ mov fp, #36
+ str r0, [r9, #3976]
+ ldr sl, .L1638+4
+ str r2, [sp, #8]
+ b .L1613
+.L1617:
+ mul r3, fp, r6
+ ldr r2, [sl, #-2088]
+ mov r0, #0
+ mov r1, r8
+ str r0, [r2, r3]
+ add r3, r9, r6
+ ldrb r0, [r3, #3870] @ zero_extendqisi2
+ bl V2P_block
+ cmp r7, #0
+ str r0, [sp, #4]
+ beq .L1614
+ bl IsBlkInVendorPart
+ cmp r0, #0
+ bne .L1615
+.L1614:
+ ldr r0, [sp, #4]
+ bl FtlBbmIsBadBlock
+ cmp r0, #0
+ addne r5, r5, #1
+ uxthne r5, r5
+ bne .L1615
+ ldr r3, [sl, #-2088]
+ ldr r1, [sp, #4]
+ mla r3, fp, r4, r3
+ mov r2, r1, asl #10
+ str r0, [r3, #8]
+ movw r0, #3924
+ str r2, [r3, #4]
+ ldrh r2, [r9, r0]
+ mul r2, r2, r4
+ add r4, r4, #1
+ uxth r4, r4
+ add r1, r2, #3
+ cmp r2, #0
+ movlt r2, r1
+ ldr r1, [sl, #-948]
+ bic r2, r2, #3
+ add r2, r1, r2
+ str r2, [r3, #12]
+.L1615:
+ add r6, r6, #1
+ uxth r6, r6
+.L1613:
+ movw r1, #3844
+ ldrh r3, [r9, r1]
+ cmp r3, r6
+ bhi .L1617
+ cmp r4, #0
+ beq .L1619
+ ldr r2, [sp, #8]
+ mov r9, #0
+ ldr r6, .L1638+4
+ mov fp, r9
+ adds sl, r2, #0
+ mov r2, r4
+ movne sl, #1
+ ldr r0, [r6, #-2088]
+ mov r1, sl
+ bl FlashEraseBlocks
+.L1621:
+ ldr r3, [r6, #-2088]
+ add r2, r3, r9
+ ldr r3, [r3, r9]
+ cmn r3, #1
+ bne .L1620
+ ldr r0, [r2, #4]
+ add r5, r5, #1
+ ubfx r0, r0, #10, #16
+ uxth r5, r5
+ bl FtlBbmMapBadBlock
+.L1620:
+ add fp, fp, #1
+ add r9, r9, #36
+ uxth fp, fp
+ cmp fp, r4
+ bne .L1621
+.L1622:
+ cmp r7, #0
+ mov r6, #0
+ ldrne r2, .L1638
+ movwne r3, #3914
+ movne sl, #1
+ moveq r0, #1
+ moveq r1, #6
+ stmeqib sp, {r0, r1}
+ ldrneh r3, [r2, r3]
+ strne r3, [sp, #4]
+ movne r3, r3, lsr #2
+ strne r3, [sp, #8]
+.L1632:
+ mov r9, #0
+ ldr fp, .L1638+4
+ mov r4, r9
+ b .L1623
+.L1626:
+ mov r0, #36
+ ldr r2, [fp, #-2088]
+ mul r3, r0, r9
+ mov r1, #0
+ str r1, [r2, r3]
+ mov r1, r8
+ ldr r2, .L1638
+ add r3, r2, r9
+ ldrb r0, [r3, #3870] @ zero_extendqisi2
+ bl V2P_block
+ cmp r7, #0
+ str r0, [sp, #12]
+ beq .L1624
+ bl IsBlkInVendorPart
+ cmp r0, #0
+ bne .L1625
+.L1624:
+ ldr r0, [sp, #12]
+ bl FtlBbmIsBadBlock
+ cmp r0, #0
+ bne .L1625
+ ldr r3, [fp, #-2088]
+ mov r0, #36
+ ldr r1, [sp, #12]
+ mla r3, r0, r4, r3
+ add r2, r6, r1, asl #10
+ ldr r1, .L1638
+ add r0, r0, #3888
+ str r2, [r3, #4]
+ ldr r2, [fp, #-960]
+ str r2, [r3, #8]
+ ldrh r2, [r1, r0]
+ mul r2, r2, r4
+ add r4, r4, #1
+ uxth r4, r4
+ add r1, r2, #3
+ cmp r2, #0
+ movlt r2, r1
+ ldr r1, [fp, #-956]
+ bic r2, r2, #3
+ add r2, r1, r2
+ str r2, [r3, #12]
+.L1625:
+ add r9, r9, #1
+ uxth r9, r9
+.L1623:
+ ldr r0, .L1638
+ movw r2, #3844
+ ldrh r3, [r0, r2]
+ cmp r3, r9
+ bhi .L1626
+ cmp r4, #0
+ beq .L1619
+ ldr r9, .L1638+4
+ mov r3, #1
+ mov r1, r4
+ mov r2, sl
+ mov fp, #0
+ ldr r0, [r9, #-2088]
+ bl FlashProgPages
+ mov r3, #36
+ mul r3, r3, r4
+ str r3, [sp, #12]
+ b .L1628
+.L1631:
+ ldr r2, [r9, #-2088]
+ add r3, r2, fp
+ ldr r2, [r2, fp]
+ cmn r2, #1
+ bne .L1629
+ ldr r0, [r3, #4]
+ add r5, r5, #1
+ ubfx r0, r0, #10, #16
+ uxth r5, r5
+ bl FtlBbmMapBadBlock
+ b .L1630
+.L1629:
+ cmp r7, #0
+ beq .L1630
+ ldr r0, [r3, #4]
+ mov r1, #1
+ ubfx r0, r0, #10, #16
+ bl FtlFreeSysBlkQueueIn
+.L1630:
+ add fp, fp, #36
+.L1628:
+ ldr r2, [sp, #12]
+ cmp fp, r2
+ bne .L1631
+ ldr r3, [sp, #8]
+ ldr r0, [sp, #4]
+ add r6, r6, r3
+ uxth r6, r6
+ cmp r6, r0
+ bcc .L1632
+ cmp r8, #63
+ bhi .L1619
+ ldr r3, .L1638+4
+ mov r1, sl
+ mov r2, r4
+ ldr r0, [r3, #-2088]
+ bl FlashEraseBlocks
+.L1619:
+ mov r0, r5
+ add sp, sp, #20
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1639:
+ .align 2
+.L1638:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size FtlLowFormatEraseBlock, .-FtlLowFormatEraseBlock
+ .align 2
+ .type FlashTestBlk.part.20, %function
+FlashTestBlk.part.20:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 104
+ @ frame_needed = 0, uses_anonymous_args = 0
+.L1641:
+ stmfd sp!, {r4, r5, lr}
+ .save {r4, r5, lr}
+ .pad #108
+ sub sp, sp, #108
+ ldr r4, .L1643
+ mov r5, r0
+ mov r1, #165
+ add r0, sp, #40
+ mov r2, #32
+ str r0, [sp, #16]
+ ldr r3, [r4, #116]
+ mov r5, r5, asl #10
+ str r3, [sp, #12]
+ bl ftl_memset
+ ldr r0, [r4, #116]
+ mov r1, #90
+ mov r2, #8
+ bl ftl_memset
+ mov r1, #1
+ mov r2, r1
+ add r0, sp, #4
+ str r5, [sp, #8]
+ bl FlashEraseBlocks
+ mov r1, #1
+ add r0, sp, #4
+ mov r3, r1
+ mov r2, r1
+ bl FlashProgPages
+ ldr r4, [sp, #4]
+ add r0, sp, #4
+ mov r1, #0
+ cmn r4, #1
+ mov r2, #1
+ movne r4, #0
+ bl FlashEraseBlocks
+ mov r0, r4
+ add sp, sp, #108
+ ldmfd sp!, {r4, r5, pc}
+.L1644:
+ .align 2
+.L1643:
+ .word .LANCHOR2
+ .fnend
+ .size FlashTestBlk.part.20, .-FlashTestBlk.part.20
+ .align 2
+ .global FlashTestBlk
+ .type FlashTestBlk, %function
+FlashTestBlk:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L1647
+ ldr r3, [r3, #132]
+ cmp r0, r3
+ bcc .L1646
+ b FlashTestBlk.part.20
+.L1646:
+ mov r0, #0
+ bx lr
+.L1648:
+ .align 2
+.L1647:
+ .word .LANCHOR2
+ .fnend
+ .size FlashTestBlk, .-FlashTestBlk
+ .align 2
+ .global FlashMakeFactorBbt
+ .type FlashMakeFactorBbt, %function
+FlashMakeFactorBbt:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 72
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #76
+ sub sp, sp, #76
+ ldr r4, .L1677
+ movw r1, #2214
+ ldr r3, .L1677+4
+ mov r5, #0
+ ldr r0, .L1677+8
+ ldr r2, [r4, #148]
+ ldrh r9, [r3, r1]
+ mov r1, #1
+ str r2, [sp, #28]
+ movw r2, #2212
+ ldrh r2, [r3, r2]
+ mul r9, r9, r2
+ ldr r2, [r3, #2776]
+ ldrb r2, [r2, #24] @ zero_extendqisi2
+ uxth r9, r9
+ str r2, [sp, #12]
+ ldrh r2, [r3, #4]
+ ldrb r3, [r3, #0] @ zero_extendqisi2
+ cmp r3, #1
+ str r2, [sp, #8]
+ moveq r3, r2, asl #1
+ uxtheq r3, r3
+ streq r3, [sp, #8]
+ bl printk
+ ldr r0, [r4, #148]
+ mov r1, #0
+ mov r2, #4096
+ bl ftl_memset
+ mov r3, r9, lsr #4
+ str r3, [sp, #20]
+ sub r3, r9, #1
+ ldr r4, .L1677+4
+ uxth r3, r3
+ str r3, [sp, #24]
+ b .L1651
+.L1673:
+ ldr r3, .L1677
+ add r3, r3, r5, asl #1
+ ldrh r6, [r3, #208]
+ cmp r6, #0
+ bne .L1652
+ movw r3, #2220
+ ldr r0, [r4, #3780]
+ ldrh r2, [r4, r3]
+ mov r1, r6
+ mov r7, r6
+ mov sl, r6
+ add r8, r4, r5, asl #2
+ mov r2, r2, asl #9
+ bl ftl_memset
+ add r3, r4, r5
+ ldrb fp, [r3, #3768] @ zero_extendqisi2
+ b .L1653
+.L1661:
+ ldr r2, [sp, #12]
+ mvn r3, #0
+ strb r3, [sp, #34]
+ tst r2, #1
+ strb r3, [sp, #35]
+ beq .L1654
+ ldr r3, [r8, #2740]
+ add r2, sp, #34
+ mov r0, fp
+ add r3, r6, r3
+ str r3, [sp, #4]
+ mov r1, r3
+ bl FlashReadSpare
+ ldrb r2, [r4, #0] @ zero_extendqisi2
+ ldr r3, [sp, #4]
+ cmp r2, #1
+ bne .L1654
+ ldr r1, [r4, #4]
+ add r2, sp, #35
+ mov r0, fp
+ add r1, r3, r1
+ bl FlashReadSpare
+ ldrb r3, [sp, #34] @ zero_extendqisi2
+ ldrb r2, [sp, #35] @ zero_extendqisi2
+ and r3, r2, r3
+ strb r3, [sp, #34]
+.L1654:
+ ldr r3, [sp, #12]
+ tst r3, #2
+ beq .L1655
+ ldr r3, [r4, #2776]
+ mov r0, fp
+ add r2, sp, #35
+ ldrh r1, [r3, #10]
+ ldr r3, [r8, #2740]
+ sub r1, r1, #1
+ add r1, r1, r3
+ add r1, r1, r6
+ bl FlashReadSpare
+.L1655:
+ ldr r3, [r4, #2776]
+ ldrb r3, [r3, #7] @ zero_extendqisi2
+ cmp r3, #1
+ cmpne r3, #8
+ ldrb r3, [sp, #34] @ zero_extendqisi2
+ bne .L1656
+ cmp r3, #0
+ beq .L1675
+ ldrb r0, [sp, #35] @ zero_extendqisi2
+ rsbs r0, r0, #1
+ movcc r0, #0
+ b .L1657
+.L1656:
+ cmp r3, #255
+ bne .L1675
+ ldrb r0, [sp, #35] @ zero_extendqisi2
+ subs r0, r0, #255
+ movne r0, #1
+ b .L1657
+.L1675:
+ mov r0, #1
+.L1657:
+ ldr r2, [sp, #12]
+ tst r2, #4
+ beq .L1658
+ ldr r1, [r8, #2740]
+ mov r0, fp
+ add r1, r6, r1
+ bl SandiskProgTestBadBlock
+.L1658:
+ cmp r0, #0
+ beq .L1659
+ mov r1, r5
+ mov r2, r7
+ ldr r0, .L1677+12
+ add sl, sl, #1
+ bl printk
+ ldr r3, [sp, #16]
+ and r0, r7, #31
+ mov ip, #1
+ uxth sl, sl
+ mov r2, r3, lsr #5
+ ldr r3, [r4, #3780]
+ ldr r1, [r3, r2, asl #2]
+ orr r1, r1, ip, asl r0
+ str r1, [r3, r2, asl #2]
+ ldr r2, [sp, #20]
+ ldrb r3, [r4, #3766] @ zero_extendqisi2
+ mul r3, r3, r2
+ cmp sl, r3
+ bgt .L1660
+.L1659:
+ ldr r3, [sp, #8]
+ add r7, r7, #1
+ add r6, r6, r3
+.L1653:
+ uxth r3, r7
+ str r3, [sp, #16]
+ cmp r3, r9
+ bcc .L1661
+.L1660:
+ mov r2, sl
+ ldr r0, .L1677+16
+ mov r1, r5
+ bl printk
+ ldrb r3, [r4, #3766] @ zero_extendqisi2
+ ldr r2, [sp, #20]
+ mul r3, r3, r2
+ cmp sl, r3
+ blt .L1662
+ movw r3, #2220
+ ldr r0, [r4, #3780]
+ ldrh r2, [r4, r3]
+ mov r1, #0
+ mov r2, r2, asl #9
+ bl ftl_memset
+.L1662:
+ cmp r5, #0
+ bne .L1663
+ ldr r3, .L1677
+ mov r8, r5
+ mov r7, r5
+ mov sl, #1
+ ldrh fp, [r3, #132]
+ b .L1664
+.L1666:
+ mov r0, r6
+ bl FlashTestBlk
+ cmp r0, #0
+ beq .L1665
+ mov r1, r6
+ ldr r0, .L1677+20
+ bl printk
+ ldr r3, [r4, #3780]
+ mov r2, r6, lsr #5
+ add r7, r7, #1
+ and r6, r6, #31
+ ldr r1, [r3, r2, asl #2]
+ uxth r7, r7
+ orr r6, r1, sl, asl r6
+ str r6, [r3, r2, asl #2]
+.L1665:
+ add r8, r8, #1
+ uxth r8, r8
+.L1664:
+ add r6, r8, fp
+ ldrb r3, [r4, #1] @ zero_extendqisi2
+ uxth r6, r6
+ cmp r3, r6
+ bhi .L1666
+ ldr r6, [sp, #24]
+ sub sl, r9, #50
+ mov r8, #1
+ b .L1667
+.L1669:
+ mov r0, r6
+ bl FlashTestBlk
+ cmp r0, #0
+ beq .L1668
+ mov r1, r6
+ ldr r0, .L1677+20
+ bl printk
+ ldr r3, [r4, #3780]
+ mov r2, r6, lsr #5
+ and r0, r6, #31
+ ldr r1, [r3, r2, asl #2]
+ orr r1, r1, r8, asl r0
+ str r1, [r3, r2, asl #2]
+.L1668:
+ sub r6, r6, #1
+ uxth r6, r6
+.L1667:
+ cmp r6, sl
+ bgt .L1669
+ ldr r3, .L1677
+ ldrb r2, [r4, #1] @ zero_extendqisi2
+ ldr r3, [r3, #132]
+ rsb r3, r3, r2
+ cmp r7, r3
+ bcc .L1663
+ movw r3, #2220
+ ldr r0, [r4, #3780]
+ ldrh r2, [r4, r3]
+ mov r1, #0
+ mov r2, r2, asl #9
+ bl ftl_memset
+.L1663:
+ mul r8, r9, r5
+ ldr r7, .L1677
+ ldr r6, [sp, #24]
+ ldr fp, [sp, #28]
+ add sl, r7, r5, asl #1
+.L1670:
+ ldr r0, .L1677+24
+ mov r1, r5
+ mov r2, r6
+ bl printk
+ ldr r3, [r4, #3780]
+ b .L1671
+.L1672:
+ sub r6, r6, #1
+ uxth r6, r6
+.L1671:
+ mov r1, r6, lsr #5
+ and r2, r6, #31
+ ldr r1, [r3, r1, asl #2]
+ mov r2, r1, lsr r2
+ ands r2, r2, #1
+ bne .L1672
+ ldr r3, .L1677+28
+ mov r1, #1
+ strh r6, [sl, #208] @ movhi
+ add r0, sp, #36
+ strh r6, [fp, #2] @ movhi
+ strh r3, [fp, #0] @ movhi
+ ldr r3, [r4, #3780]
+ strh r2, [fp, #8] @ movhi
+ mov r2, r1
+ str r3, [sp, #44]
+ ldr r3, [r7, #148]
+ str r3, [sp, #48]
+ add r3, r6, r8
+ mov r3, r3, asl #10
+ str r3, [sp, #40]
+ bl FlashEraseBlocks
+ mov r1, #1
+ mov r3, r1
+ add r0, sp, #36
+ mov r2, r1
+ bl FlashProgPages
+ ldr r3, [sp, #36]
+ cmp r3, #0
+ subne r6, r6, #1
+ uxthne r6, r6
+ bne .L1670
+.L1652:
+ add r5, r5, #1
+ uxtb r5, r5
+.L1651:
+ ldrb r3, [r4, #3766] @ zero_extendqisi2
+ cmp r3, r5
+ bhi .L1673
+ add sp, sp, #76
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1678:
+ .align 2
+.L1677:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .word .LC108
+ .word .LC109
+ .word .LC110
+ .word .LC111
+ .word .LC112
+ .word -3872
+ .fnend
+ .size FlashMakeFactorBbt, .-FlashMakeFactorBbt
+ .align 2
+ .global ftl_map_blk_gc
+ .type ftl_map_blk_gc, %function
+ftl_map_blk_gc:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, lr}
+ mov r4, r0
+ ldr r5, [r0, #12]
+ ldr r8, [r0, #24]
+ bl ftl_free_no_use_map_blk
+ ldrh r3, [r4, #10]
+ ldrh r2, [r4, #8]
+ sub r3, r3, #1
+ cmp r2, r3
+ blt .L1680
+ uxth r0, r0
+ mov r0, r0, asl #1
+ ldrh r7, [r5, r0]
+ cmp r7, #0
+ beq .L1680
+ ldr r3, [r4, #32]
+ cmp r3, #0
+ bne .L1680
+ mov r2, #1
+ ldr r1, .L1687
+ str r2, [r4, #32]
+ strh r3, [r5, r0] @ movhi
+ ldrh r3, [r4, #8]
+ ldrh r2, [r4, #2]
+ sub r3, r3, #1
+ strh r3, [r4, #8] @ movhi
+ movw r3, #3914
+ ldrh r3, [r1, r3]
+ cmp r2, r3
+ bcc .L1681
+ mov r0, r4
+ bl ftl_map_blk_alloc_new_blk
+.L1681:
+ mov r5, #0
+ ldr r6, .L1687+4
+ mov r9, r5
+ b .L1682
+.L1685:
+ ldr r3, [r8, r5, asl #2]
+ mov sl, r5, asl #2
+ cmp r7, r3, lsr #10
+ bne .L1683
+ ldr r3, [r6, #-972]
+ mov r1, #1
+ ldr r0, .L1687+8
+ mov r2, r1
+ str r3, [r6, #176]
+ ldr r3, [r6, #-952]
+ str r3, [r6, #180]
+ ldr r3, [r8, r5, asl #2]
+ str r3, [r6, #172]
+ bl FlashReadPages
+ ldr r3, [r6, #168]
+ cmn r3, #1
+ streq r9, [r8, sl]
+ beq .L1683
+ mov r0, r4
+ mov r1, r5
+ ldr r2, [r6, #176]
+ bl FtlMapWritePage
+.L1683:
+ add r5, r5, #1
+ uxth r5, r5
+.L1682:
+ ldrh r3, [r4, #6]
+ cmp r3, r5
+ bhi .L1685
+ mov r0, r7
+ mov r1, #1
+ bl FtlFreeSysBlkQueueIn
+ mov r3, #0
+ str r3, [r4, #32]
+.L1680:
+ ldr r1, .L1687
+ movw r3, #3914
+ ldrh r2, [r4, #2]
+ ldrh r3, [r1, r3]
+ cmp r2, r3
+ bcc .L1686
+ mov r0, r4
+ bl ftl_map_blk_alloc_new_blk
+.L1686:
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L1688:
+ .align 2
+.L1687:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LANCHOR2+168
+ .fnend
+ .size ftl_map_blk_gc, .-ftl_map_blk_gc
+ .align 2
+ .global Ftl_write_map_blk_to_last_page
+ .type Ftl_write_map_blk_to_last_page, %function
+Ftl_write_map_blk_to_last_page:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ movw r2, #65535
+ ldrh r3, [r0, #0]
+ mov r4, r0
+ ldr r5, [r0, #12]
+ cmp r3, r2
+ ldr r7, [r0, #24]
+ bne .L1690
+ ldrh r3, [r0, #8]
+ add r3, r3, #1
+ strh r3, [r0, #8] @ movhi
+ bl FtlFreeSysBlkQueueOut
+ mov r3, #0
+ strh r0, [r5, #0] @ movhi
+ strh r3, [r4, #2] @ movhi
+ strh r3, [r4, #0] @ movhi
+ ldr r3, [r4, #28]
+ add r3, r3, #1
+ str r3, [r4, #28]
+ b .L1691
+.L1690:
+ mov r3, r3, asl #1
+ ldr r2, [r0, #28]
+ mov r1, #255
+ ldrh r6, [r5, r3]
+ ldr r5, .L1695
+ ldrh r3, [r0, #2]
+ orr r3, r3, r6, asl #10
+ str r3, [r5, #172]
+ ldr r3, [r5, #-2076]
+ str r3, [r5, #176]
+ ldr r3, [r5, #-952]
+ str r3, [r5, #180]
+ str r2, [r3, #4]
+ ldr r2, .L1695+4
+ strh r2, [r3, #8] @ movhi
+ ldrh r2, [r0, #4]
+ strh r6, [r3, #2] @ movhi
+ strh r2, [r3, #0] @ movhi
+ movw r3, #3914
+ ldr r2, .L1695+8
+ ldr r0, [r5, #-2076]
+ ldrh r2, [r2, r3]
+ mov r2, r2, asl #3
+ bl ftl_memset
+ mov r2, #0
+ mov r3, r2
+ b .L1692
+.L1694:
+ ldr r1, [r7, r3, asl #2]
+ cmp r6, r1, lsr #10
+ bne .L1693
+ add r2, r2, #1
+ ldr r1, [r5, #-2076]
+ uxth r2, r2
+ str r3, [r1, r2, asl #3]
+ ldr r1, [r5, #-2076]
+ ldr r0, [r7, r3, asl #2]
+ add r1, r1, r2, asl #3
+ str r0, [r1, #4]
+.L1693:
+ add r3, r3, #1
+ uxth r3, r3
+.L1692:
+ ldrh r1, [r4, #6]
+ cmp r1, r3
+ bhi .L1694
+ mov r1, #1
+ mov r3, #0
+ ldr r0, .L1695+12
+ mov r2, r1
+ bl FlashProgPages
+ ldrh r3, [r4, #2]
+ mov r0, r4
+ add r3, r3, #1
+ strh r3, [r4, #2] @ movhi
+ bl ftl_map_blk_gc
+.L1691:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1696:
+ .align 2
+.L1695:
+ .word .LANCHOR2
+ .word -1291
+ .word .LANCHOR0
+ .word .LANCHOR2+168
+ .fnend
+ .size Ftl_write_map_blk_to_last_page, .-Ftl_write_map_blk_to_last_page
+ .align 2
+ .global FtlMapWritePage
+ .type FtlMapWritePage, %function
+FtlMapWritePage:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r4, r0
+ ldr r5, .L1704
+ mov r6, r1
+ ldr r9, .L1704+4
+ mov r8, r2
+ movw fp, #3914
+.L1703:
+ ldr r3, [r5, #-1864]
+ add r3, r3, #1
+ str r3, [r5, #-1864]
+ ldrh r3, [r9, fp]
+ ldrh r2, [r4, #2]
+ sub r3, r3, #1
+ cmp r2, r3
+ bge .L1698
+ ldrh r2, [r4, #0]
+ movw r3, #65535
+ cmp r2, r3
+ bne .L1699
+.L1698:
+ mov r0, r4
+ bl Ftl_write_map_blk_to_last_page
+.L1699:
+ ldrh r3, [r4, #0]
+ mov r1, #0
+ ldr r2, [r4, #12]
+ ldr r0, [r5, #-952]
+ mov r3, r3, asl #1
+ ldr r7, .L1704
+ ldrh sl, [r2, r3]
+ mov r2, #16
+ ldrh r3, [r4, #2]
+ str r8, [r5, #176]
+ orr r3, r3, sl, asl #10
+ str r0, [r5, #180]
+ str r3, [r5, #172]
+ bl ftl_memset
+ ldr r3, [r5, #180]
+ mov r1, #1
+ ldr r2, [r4, #28]
+ add r0, r7, #168
+ strh r6, [r3, #8] @ movhi
+ str r2, [r3, #4]
+ ldrh r2, [r4, #4]
+ strh sl, [r3, #2] @ movhi
+ strh r2, [r3, #0] @ movhi
+ mov r3, r1
+ mov r2, r1
+ bl FlashProgPages
+ ldrh r3, [r4, #2]
+ add r3, r3, #1
+ uxth r3, r3
+ strh r3, [r4, #2] @ movhi
+ cmp r3, #1
+ beq .L1703
+ ldr r3, [r5, #168]
+ cmn r3, #1
+ beq .L1703
+ ldr r2, [r7, #172]
+ mov r0, #0
+ ldr r3, [r4, #24]
+ str r2, [r3, r6, asl #2]
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1705:
+ .align 2
+.L1704:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .fnend
+ .size FtlMapWritePage, .-FtlMapWritePage
+ .align 2
+ .global flush_l2p_region
+ .type flush_l2p_region, %function
+flush_l2p_region:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r4, #12
+ ldr r5, .L1707
+ mul r4, r4, r0
+ sub r0, r5, #1088
+ ldr r2, [r5, #-1900]
+ add r3, r2, r4
+ ldrh r1, [r2, r4]
+ ldr r2, [r3, #8]
+ bl FtlMapWritePage
+ ldr r3, [r5, #-1900]
+ mov r0, #0
+ add r4, r3, r4
+ ldr r3, [r4, #4]
+ bic r3, r3, #-2147483648
+ str r3, [r4, #4]
+ ldmfd sp!, {r3, r4, r5, pc}
+.L1708:
+ .align 2
+.L1707:
+ .word .LANCHOR2
+ .fnend
+ .size flush_l2p_region, .-flush_l2p_region
+ .align 2
+ .global log2phys
+ .type log2phys, %function
+log2phys:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr}
+ .save {r3, r4, r5, r6, r7, r8, sl, lr}
+ mov r8, r2
+ ldr r3, .L1718
+ mov r2, #3920
+ mov r4, r1
+ ldrh r7, [r3, r2]
+ mvn r2, #0
+ add r7, r7, #7
+ mov r6, r0, lsr r7
+ bic r7, r0, r2, asl r7
+ movw r2, #3950
+ ldrh r2, [r3, r2]
+ uxth r6, r6
+ ldr r3, .L1718+4
+ uxth r7, r7
+ ldr sl, [r3, #-1900]
+ mov r3, #0
+ mov r5, r3
+ b .L1710
+.L1716:
+ add r3, r3, #12
+ add r1, sl, r3
+ ldrh r1, [r1, #-12]
+ cmp r1, r6
+ bne .L1711
+.L1712:
+ cmp r8, #0
+ ldr r3, .L1718+4
+ mov r2, #12
+ bne .L1713
+ ldr r3, [r3, #-1900]
+ mla r2, r2, r5, r3
+ ldr r3, [r2, #8]
+ ldr r3, [r3, r7, asl #2]
+ str r3, [r4, #0]
+ b .L1714
+.L1713:
+ mul r2, r2, r5
+ ldr r1, [r3, #-1900]
+ ldr r0, [r4, #0]
+ add r1, r1, r2
+ ldr r1, [r1, #8]
+ str r0, [r1, r7, asl #2]
+ ldr r1, [r3, #-1900]
+ add r2, r1, r2
+ ldr r1, [r2, #4]
+ orr r1, r1, #-2147483648
+ str r1, [r2, #4]
+ ldr r2, .L1718+8
+ strh r6, [r3, r2] @ movhi
+.L1714:
+ ldr r3, .L1718+4
+ mov r2, #12
+ mov r0, #0
+ ldr r3, [r3, #-1900]
+ mla r5, r2, r5, r3
+ ldr r3, [r5, #4]
+ cmn r3, #1
+ addne r3, r3, #1
+ strne r3, [r5, #4]
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, pc}
+.L1711:
+ add r5, r5, #1
+ uxth r5, r5
+.L1710:
+ cmp r5, r2
+ bne .L1716
+ bl select_l2p_ram_region
+ mov r3, #12
+ mul r3, r3, r0
+ mov r5, r0
+ add r2, sl, r3
+ ldrh r1, [sl, r3]
+ movw r3, #65535
+ cmp r1, r3
+ beq .L1717
+ ldr r3, [r2, #4]
+ cmp r3, #0
+ bge .L1717
+ bl flush_l2p_region
+.L1717:
+ mov r0, r6
+ mov r1, r5
+ bl load_l2p_region
+ b .L1712
+.L1719:
+ .align 2
+.L1718:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -1896
+ .fnend
+ .size log2phys, .-log2phys
+ .align 2
+ .global FtlReUsePrevPpa
+ .type FtlReUsePrevPpa, %function
+FtlReUsePrevPpa:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, lr}
+ mov r7, r0
+ ubfx r0, r1, #10, #16
+ str r1, [sp, #4]
+ bl P2V_block_in_plane
+ ldr r3, .L1726
+ ldr r1, [r3, #-2064]
+ mov r5, r0, asl #1
+ ldrh r2, [r1, r5]
+ cmp r2, #0
+ addne r2, r2, #1
+ strneh r2, [r1, r5] @ movhi
+ bne .L1722
+ ldr r4, [r3, #-2052]
+ cmp r4, #0
+ beq .L1722
+ ldr r1, .L1726+4
+ mov ip, #6
+ ldrh lr, [r3, r1]
+ ldr r3, [r3, #-2072]
+ ldr r1, .L1726+8
+ rsb r4, r3, r4
+ mov r4, r4, asr #1
+ mul r4, r1, r4
+ movw r1, #65535
+ uxth r4, r4
+ b .L1723
+.L1725:
+ cmp r4, r0
+ bne .L1724
+ mov r1, r4
+ ldr r0, .L1726+12
+ bl List_remove_node
+ ldr r6, .L1726
+ ldr r3, .L1726+4
+ mov r0, r4
+ ldrh r2, [r6, r3]
+ sub r2, r2, #1
+ strh r2, [r6, r3] @ movhi
+ bl INSERT_DATA_LIST
+ ldr r3, [r6, #-2064]
+ ldrh r2, [r3, r5]
+ add r2, r2, #1
+ strh r2, [r3, r5] @ movhi
+ b .L1722
+.L1724:
+ mul r4, ip, r4
+ ldrh r4, [r3, r4]
+ cmp r4, r1
+ beq .L1722
+ add r2, r2, #1
+ uxth r2, r2
+.L1723:
+ cmp r2, lr
+ bne .L1725
+.L1722:
+ mov r0, r7
+ add r1, sp, #4
+ mov r2, #1
+ bl log2phys
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, pc}
+.L1727:
+ .align 2
+.L1726:
+ .word .LANCHOR2
+ .word -2048
+ .word -1431655765
+ .word .LANCHOR2-2052
+ .fnend
+ .size FtlReUsePrevPpa, .-FtlReUsePrevPpa
+ .align 2
+ .global FtlMapBlkWriteDumpData
+ .type FtlMapBlkWriteDumpData, %function
+FtlMapBlkWriteDumpData:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ mov r4, r0
+ ldr r2, [r0, #36]
+ ldrh r6, [r0, #6]
+ cmp r2, #0
+ ldr r3, [r0, #24]
+ ldmeqfd sp!, {r4, r5, r6, pc}
+ ldr r5, .L1732
+ sub r6, r6, #1
+ mov r2, #0
+ str r2, [r0, #36]
+ uxth r6, r6
+ ldr r0, [r5, #-972]
+ ldr r2, [r5, #-952]
+ str r0, [r5, #176]
+ str r2, [r5, #180]
+ ldr r3, [r3, r6, asl #2]
+ cmp r3, #0
+ str r3, [r5, #172]
+ beq .L1730
+ mov r1, #1
+ add r0, r5, #168
+ mov r2, r1
+ bl FlashReadPages
+ b .L1731
+.L1730:
+ ldr r2, .L1732+4
+ movw r3, #3922
+ mov r1, #255
+ ldrh r2, [r2, r3]
+ bl ftl_memset
+.L1731:
+ mov r0, r4
+ mov r1, r6
+ ldr r2, [r5, #176]
+ ldmfd sp!, {r4, r5, r6, lr}
+ b FtlMapWritePage
+.L1733:
+ .align 2
+.L1732:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .fnend
+ .size FtlMapBlkWriteDumpData, .-FtlMapBlkWriteDumpData
+ .align 2
+ .global FtlVendorPartWrite
+ .type FtlVendorPartWrite, %function
+FtlVendorPartWrite:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 56
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L1744
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r9, r2
+ mov r2, #3920
+ mov r4, r1
+ ldrh r8, [r3, r2]
+ movw r2, #3906
+ ldrh r2, [r3, r2]
+ add r1, r1, r0
+ .pad #60
+ sub sp, sp, #60
+ mov r6, r0
+ cmp r1, r2
+ mvnhi r7, #0
+ bhi .L1735
+ mov r8, r0, lsr r8
+ mov r7, #0
+ ldr sl, .L1744+4
+ mov ip, r8, asl #2
+ str ip, [sp, #8]
+ b .L1736
+.L1741:
+ ldr r1, .L1744
+ movw r2, #3918
+ ldr ip, [sp, #8]
+ mov r0, r6
+ ldr r3, [sl, #-920]
+ ldrh fp, [r1, r2]
+ ldr r3, [r3, ip]
+ mov r1, fp
+ str r3, [sp, #4]
+ bl __aeabi_uidivmod
+ ldr r3, [sp, #4]
+ ldr r2, .L1744+4
+ uxth r1, r1
+ str r1, [sp, #12]
+ rsb r5, r1, fp
+ uxth r5, r5
+ cmp r5, r4
+ uxthhi r5, r4
+ cmp r3, #0
+ beq .L1738
+ cmp r5, fp
+ beq .L1738
+ str r3, [sp, #24]
+ mov r1, #1
+ ldr r3, [r2, #-968]
+ add r0, sp, #20
+ mov r2, r1
+ str r3, [sp, #28]
+ mov r3, #0
+ str r3, [sp, #32]
+ bl FlashReadPages
+ b .L1739
+.L1738:
+ ldr ip, .L1744
+ movw r3, #3922
+ ldr r0, [r2, #-968]
+ mov r1, #0
+ ldrh r2, [ip, r3]
+ bl ftl_memset
+.L1739:
+ ldr r3, [sp, #12]
+ mov fp, r5, asl #9
+ ldr r0, [sl, #-968]
+ mov r1, r9
+ mov r2, fp
+ rsb r4, r5, r4
+ add r0, r0, r3, asl #9
+ add r6, r6, r5
+ bl memcpy
+ mov r1, r8
+ ldr r0, .L1744+8
+ add r8, r8, #1
+ ldr r2, [sl, #-968]
+ add r9, r9, fp
+ bl FtlMapWritePage
+ ldr ip, [sp, #8]
+ add ip, ip, #4
+ str ip, [sp, #8]
+ cmn r0, #1
+ moveq r7, r0
+.L1736:
+ cmp r4, #0
+ bne .L1741
+.L1735:
+ mov r0, r7
+ add sp, sp, #60
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1745:
+ .align 2
+.L1744:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LANCHOR2+224
+ .fnend
+ .size FtlVendorPartWrite, .-FtlVendorPartWrite
+ .align 2
+ .global Ftl_save_ext_data
+ .type Ftl_save_ext_data, %function
+Ftl_save_ext_data:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L1748
+ ldr r2, .L1748+4
+ ldr r1, [r3, #-1704]
+ cmp r1, r2
+ bxne lr
+ ldr r2, .L1748+8
+ mov r0, #0
+ mov r1, #1
+ str r2, [r3, #-1700]
+ ldr r2, [r3, #-1856]
+ str r2, [r3, #-1616]
+ ldr r2, [r3, #-1852]
+ str r2, [r3, #-1612]
+ ldr r2, [r3, #-1860]
+ str r2, [r3, #-1696]
+ ldr r2, [r3, #-1872]
+ str r2, [r3, #-1692]
+ ldr r2, [r3, #-1880]
+ str r2, [r3, #-1688]
+ ldr r2, [r3, #-1864]
+ str r2, [r3, #-1684]
+ ldr r2, [r3, #-1836]
+ str r2, [r3, #-1676]
+ ldr r2, [r3, #-2080]
+ str r2, [r3, #-1672]
+ ldr r2, [r3, #-1876]
+ str r2, [r3, #-1668]
+ ldr r2, [r3, #-1868]
+ str r2, [r3, #-1664]
+ ldr r2, [r3, #-1828]
+ str r2, [r3, #-1660]
+ ldr r2, [r3, #-1824]
+ str r2, [r3, #-1656]
+ ldr r2, [r3, #-1708]
+ str r2, [r3, #-1644]
+ ldr r2, [r3, #-1004]
+ str r2, [r3, #-1640]
+ ldr r2, .L1748+12
+ b FtlVendorPartWrite
+.L1749:
+ .align 2
+.L1748:
+ .word .LANCHOR2
+ .word 1179929683
+ .word 1342177334
+ .word .LANCHOR2-1704
+ .fnend
+ .size Ftl_save_ext_data, .-Ftl_save_ext_data
+ .align 2
+ .global FtlEctTblFlush
+ .type FtlEctTblFlush, %function
+FtlEctTblFlush:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r1, .L1757
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ ldr r3, [r1, #-1884]
+ cmp r3, #0
+ moveq r2, #32
+ beq .L1751
+ ldr r2, [r1, #-1824]
+ cmp r2, #29
+ movls r2, #4
+ movhi r2, #32
+.L1751:
+ mov r3, #264
+ ldrh r1, [r1, r3]
+ cmp r1, #31
+ addls r1, r1, #1
+ ldrls r2, .L1757
+ strlsh r1, [r2, r3] @ movhi
+ movls r2, #1
+ cmp r0, #0
+ ldr r3, .L1757
+ bne .L1753
+ ldr r1, [r3, #-936]
+ ldr r0, [r1, #20]
+ ldr r1, [r1, #16]
+ add r2, r2, r0
+ cmp r1, r2
+ bcc .L1754
+.L1753:
+ ldr r2, [r3, #-936]
+ mov r0, #64
+ ldr r1, [r2, #16]
+ str r1, [r2, #20]
+ ldr r1, .L1757+4
+ str r1, [r2, #0]
+ ldr r1, .L1757+8
+ ldr r2, [r3, #-936]
+ ldrh r1, [r3, r1]
+ mov r3, r1, asl #9
+ str r3, [r2, #12]
+ ldr r3, [r2, #8]
+ add r3, r3, #1
+ str r3, [r2, #8]
+ mov r3, #0
+ str r3, [r2, #4]
+ bl FtlVendorPartWrite
+ bl Ftl_save_ext_data
+.L1754:
+ mov r0, #0
+ ldmfd sp!, {r3, pc}
+.L1758:
+ .align 2
+.L1757:
+ .word .LANCHOR2
+ .word 1112818501
+ .word -940
+ .fnend
+ .size FtlEctTblFlush, .-FtlEctTblFlush
+ .align 2
+ .type FtlReadRefresh.part.15, %function
+FtlReadRefresh.part.15:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 40
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ .pad #40
+ sub sp, sp, #40
+ ldr r4, .L1764
+ mov r5, #2048
+ ldr r6, .L1764+4
+.L1762:
+ ldr r0, [r4, #-1620]
+ ldr r3, [r6, #3972]
+ cmp r0, r3
+ bcs .L1760
+ mov r2, #0
+ mov r1, sp
+ bl log2phys
+ ldr r2, [sp, #0]
+ ldr r3, [r4, #-1620]
+ cmn r2, #1
+ add r3, r3, #1
+ str r3, [r4, #-1620]
+ beq .L1761
+ add r0, sp, #40
+ str r2, [sp, #8]
+ mov r1, #1
+ mov r2, #0
+ str r2, [r0, #-36]!
+ str r3, [sp, #20]
+ str r2, [sp, #12]
+ str r2, [sp, #16]
+ bl FlashReadPages
+ ldr r3, [sp, #4]
+ cmp r3, #256
+ bne .L1760
+ ldr r0, [sp, #0]
+ ubfx r0, r0, #10, #16
+ bl P2V_block_in_plane
+ bl FtlGcRefreshBlock
+ b .L1760
+.L1761:
+ subs r5, r5, #1
+ bne .L1762
+.L1760:
+ mvn r0, #0
+ add sp, sp, #40
+ ldmfd sp!, {r4, r5, r6, pc}
+.L1765:
+ .align 2
+.L1764:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .fnend
+ .size FtlReadRefresh.part.15, .-FtlReadRefresh.part.15
+ .align 2
+ .global FtlReadRefresh
+ .type FtlReadRefresh, %function
+FtlReadRefresh:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L1775
+ ldr r0, .L1775+4
+ ldr r2, [r3, #-1624]
+ cmp r2, #0
+ mov r2, r3
+ beq .L1767
+ ldr r1, [r3, #-1620]
+ ldr r2, [r0, #3972]
+ cmp r1, r2
+ bcs .L1768
+ b FtlReadRefresh.part.15
+.L1768:
+ mov r2, #0
+ str r2, [r3, #-1624]
+ str r2, [r3, #-1620]
+ ldr r2, [r3, #-1880]
+ b .L1774
+.L1767:
+ ldrb r0, [r0, #80] @ zero_extendqisi2
+ ldr r1, [r3, #-1828]
+ cmp r0, #0
+ ldr r3, [r3, #-1884]
+ addeq r1, r3, r1, lsr #10
+ moveq r3, #33554432
+ moveq r1, r3, asr r1
+ ldr r3, [r2, #-1628]
+ ldr r2, [r2, #-1880]
+ movne r1, #1048576
+ add r0, r2, #1048576
+ cmp r3, r0
+ bhi .L1771
+ add r3, r1, r3
+ cmp r3, r2
+ bcs .L1769
+.L1771:
+ ldr r3, .L1775
+ mov r1, #1
+ str r1, [r3, #-1624]
+ mov r1, #0
+ str r1, [r3, #-1620]
+.L1774:
+ str r2, [r3, #-1628]
+.L1769:
+ mov r0, #0
+ bx lr
+.L1776:
+ .align 2
+.L1775:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .fnend
+ .size FtlReadRefresh, .-FtlReadRefresh
+ .align 2
+ .global FtlMapTblRecovery
+ .type FtlMapTblRecovery, %function
+FtlMapTblRecovery:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 24
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #28
+ sub sp, sp, #28
+ ldr r3, [r0, #16]
+ mov r4, r0
+ ldrh sl, [r0, #6]
+ mov r1, #0
+ ldr r8, [r0, #24]
+ mov r9, #0
+ ldr r5, .L1797
+ str r3, [sp, #16]
+ mov r2, sl, asl #2
+ ldrh r3, [r0, #8]
+ ldr r7, [r0, #12]
+ mov r0, r8
+ str r3, [sp, #8]
+ bl ftl_memset
+ ldr r3, [r5, #-2076]
+ ldr r6, [r5, #-952]
+ str r9, [r4, #32]
+ str r3, [r5, #176]
+ mvn r3, #0
+ str r6, [r5, #180]
+ strh r3, [r4, #0] @ movhi
+ strh r3, [r4, #2] @ movhi
+ mov r3, #1
+ str r3, [r4, #36]
+ ldr r3, [sp, #8]
+ str r9, [r4, #28]
+ sub r3, r3, #1
+ str r3, [sp, #12]
+ b .L1778
+.L1792:
+ ldr r0, [sp, #12]
+ cmp r3, r0
+ mov r3, r3, asl #1
+ bne .L1779
+ ldrh r0, [r7, r3]
+ mov r1, #1
+ add fp, r7, r3
+ bl FtlGetLastWrittenPage
+ ldr r1, [sp, #12]
+ mov r7, #0
+ ldr r2, [sp, #16]
+ strh r9, [r4, #0] @ movhi
+ ldr r5, .L1797
+ uxth r0, r0
+ add r3, r0, #1
+ strh r3, [r4, #2] @ movhi
+ ldr r3, [r2, r1, asl #2]
+ sxth r9, r0
+ str r7, [r5, #176]
+ add r9, r9, #1
+ str r3, [r4, #28]
+ b .L1780
+.L1782:
+ ldrh r2, [fp, #0]
+ mov r1, #1
+ ldr r0, .L1797+4
+ orr r3, r3, r2, asl #10
+ mov r2, r1
+ str r3, [r5, #172]
+ bl FlashReadPages
+ ldr r3, [r5, #168]
+ cmn r3, #1
+ beq .L1781
+ ldrh r3, [r6, #8]
+ cmp r3, sl
+ bcs .L1781
+ ldrh r2, [r4, #4]
+ ldrh r1, [r6, #0]
+ cmp r1, r2
+ ldreq r2, [r5, #172]
+ streq r2, [r8, r3, asl #2]
+.L1781:
+ add r7, r7, #1
+ uxth r7, r7
+.L1780:
+ sxth r3, r7
+ cmp r3, r9
+ blt .L1782
+ b .L1783
+.L1779:
+ ldr r2, [r5, #-2076]
+ add r0, r7, r3
+ ldr fp, .L1797+8
+ str r0, [sp, #20]
+ str r2, [r5, #176]
+ ldrh r1, [r7, r3]
+ movw r3, #3914
+ ldrh r2, [fp, r3]
+ ldr r0, .L1797+4
+ sub r2, r2, #1
+ str r3, [sp, #0]
+ orr r2, r2, r1, asl #10
+ mov r1, #1
+ str r2, [r5, #172]
+ mov r2, r1
+ bl FlashReadPages
+ ldr r2, [r5, #168]
+ ldr r3, [sp, #0]
+ cmn r2, #1
+ beq .L1784
+ ldrh r1, [r6, #0]
+ ldrh r2, [r4, #4]
+ cmp r1, r2
+ bne .L1784
+ ldrh r1, [r6, #8]
+ movw r2, #64245
+ cmp r1, r2
+ bne .L1784
+ b .L1796
+.L1787:
+ ldr r0, [r5, #-2076]
+ mov ip, r1, asl #3
+ add r2, r2, #1
+ ldr r1, [r0, r1, asl #3]
+ uxth r2, r2
+ uxth r1, r1
+ cmp r1, sl
+ addcc r0, r0, ip
+ ldrcc r0, [r0, #4]
+ strcc r0, [r8, r1, asl #2]
+ b .L1785
+.L1796:
+ mov r2, #0
+.L1785:
+ ldrh r0, [fp, r3]
+ sxth r1, r2
+ sub r0, r0, #1
+ cmp r1, r0
+ blt .L1787
+ b .L1788
+.L1784:
+ ldr r1, .L1797
+ mov fp, #0
+ ldr r3, .L1797+8
+ add ip, r1, #168
+ str fp, [r1, #176]
+ b .L1789
+.L1791:
+ ldr r0, [sp, #20]
+ ldrh r1, [r0, #0]
+ mov r0, ip
+ stmia sp, {r3, ip}
+ orr r2, r2, r1, asl #10
+ mov r1, #1
+ str r2, [r5, #172]
+ mov r2, r1
+ bl FlashReadPages
+ ldr r2, [r5, #168]
+ ldmia sp, {r3, ip}
+ cmn r2, #1
+ beq .L1790
+ ldrh r2, [r6, #8]
+ cmp r2, sl
+ bcs .L1790
+ ldrh r1, [r4, #4]
+ ldrh r0, [r6, #0]
+ cmp r0, r1
+ ldreq r1, [r5, #172]
+ streq r1, [r8, r2, asl #2]
+.L1790:
+ add fp, fp, #1
+ uxth fp, fp
+.L1789:
+ movw r1, #3914
+ sxth r2, fp
+ ldrh r1, [r3, r1]
+ cmp r2, r1
+ blt .L1791
+.L1788:
+ add r9, r9, #1
+ uxth r9, r9
+.L1778:
+ ldr r1, [sp, #8]
+ sxth r3, r9
+ cmp r3, r1
+ blt .L1792
+.L1783:
+ mov r0, r4
+ bl ftl_free_no_use_map_blk
+ ldr r1, .L1797+8
+ movw r3, #3914
+ ldrh r2, [r4, #2]
+ ldrh r3, [r1, r3]
+ cmp r2, r3
+ bne .L1793
+ mov r0, r4
+ bl ftl_map_blk_alloc_new_blk
+.L1793:
+ ldrh r2, [r4, #8]
+ ldrh r3, [r4, #10]
+ cmp r2, r3
+ bcc .L1794
+ mov r0, r4
+ bl ftl_map_blk_gc
+.L1794:
+ mov r0, #0
+ add sp, sp, #28
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1798:
+ .align 2
+.L1797:
+ .word .LANCHOR2
+ .word .LANCHOR2+168
+ .word .LANCHOR0
+ .fnend
+ .size FtlMapTblRecovery, .-FtlMapTblRecovery
+ .align 2
+ .global FtlLoadMapInfo
+ .type FtlLoadMapInfo, %function
+FtlLoadMapInfo:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ bl FtlL2PDataInit
+ ldr r0, .L1800
+ bl FtlMapTblRecovery
+ mov r0, #0
+ ldmfd sp!, {r3, pc}
+.L1801:
+ .align 2
+.L1800:
+ .word .LANCHOR2-1088
+ .fnend
+ .size FtlLoadMapInfo, .-FtlLoadMapInfo
+ .align 2
+ .global FtlLoadVonderInfo
+ .type FtlLoadVonderInfo, %function
+FtlLoadVonderInfo:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ movw r2, #3932
+ ldr r3, .L1803
+ ldr r0, .L1803+4
+ ldrh r2, [r3, r2]
+ strh r2, [r0, #234] @ movhi
+ ldr r2, .L1803+8
+ strh r2, [r0, #228] @ movhi
+ movw r2, #3956
+ ldrh r2, [r3, r2]
+ strh r2, [r0, #232] @ movhi
+ movw r2, #3934
+ ldrh r2, [r3, r2]
+ ldr r3, [r3, #3960]
+ strh r2, [r0, #230] @ movhi
+ str r3, [r0, #236]
+ ldr r3, [r0, #-924]
+ str r3, [r0, #240]
+ ldr r3, [r0, #-928]
+ str r3, [r0, #244]
+ ldr r3, [r0, #-920]
+ str r3, [r0, #248]
+ add r0, r0, #224
+ bl FtlMapTblRecovery
+ mov r0, #0
+ ldmfd sp!, {r3, pc}
+.L1804:
+ .align 2
+.L1803:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -3962
+ .fnend
+ .size FtlLoadVonderInfo, .-FtlLoadVonderInfo
+ .align 2
+ .global FtlRecoverySuperblock
+ .type FtlRecoverySuperblock, %function
+FtlRecoverySuperblock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 64
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #68
+ sub sp, sp, #68
+ ldrh r3, [r0, #2]
+ mov r4, r0
+ ldr r2, .L1890
+ ldrb fp, [r0, #6] @ zero_extendqisi2
+ str r3, [sp, #20]
+ movw r3, #3912
+ ldrh r3, [r2, r3]
+ ldr ip, [sp, #20]
+ str fp, [sp, #32]
+ cmp r3, ip
+ mov r3, #0
+ streqh r3, [r0, #4] @ movhi
+ moveq r2, r3 @ movhi
+ ldrneh r0, [r0, #16]
+ movwne r2, #65535
+ bne .L1808
+ b .L1887
+.L1809:
+ add r3, r3, #1
+ uxth r3, r3
+ add r1, r4, r3, asl #1
+ ldrh r0, [r1, #16]
+.L1808:
+ cmp r0, r2
+ beq .L1809
+ ldrb r1, [r4, #8] @ zero_extendqisi2
+ cmp r1, #1
+ bne .L1810
+ bl FtlGetLastWrittenPage
+ cmn r0, #1
+ mov r7, r0
+ beq .L1811
+ ldr r3, .L1890
+ ldrb r2, [r3, #80] @ zero_extendqisi2
+ cmp r2, #0
+ bne .L1880
+ add r3, r3, r0, asl #1
+ movw r2, #2228
+ ldrh r5, [r3, r2]
+ b .L1874
+.L1810:
+ mov r1, #0
+ bl FtlGetLastWrittenPage
+ cmn r0, #1
+ mov r7, r0
+ beq .L1811
+.L1880:
+ mov r5, r7
+.L1874:
+ ldr r3, .L1890
+ movw r2, #3844
+ mov r6, #0
+ str r4, [sp, #40]
+ movw ip, #65535
+ ldrh r9, [r3, r2]
+ ldr r2, .L1890+4
+ ldr sl, [r2, #-984]
+ ldr r8, [r2, #-1164]
+ movw r2, #3924
+ ldrh lr, [r3, r2]
+ mov r2, r4
+ mov r3, r6
+ b .L1813
+.L1811:
+ mov r3, #0
+ strh r3, [r4, #2] @ movhi
+ mov r2, r3 @ movhi
+.L1887:
+ strb r2, [r4, #6]
+ b .L1807
+.L1815:
+ ldrh r0, [r2, #16]
+ cmp r0, ip
+ beq .L1814
+ mov fp, #36
+ orr r0, r5, r0, asl #10
+ mla r1, fp, r6, sl
+ str r0, [r1, #4]
+ mov r0, #0
+ str r0, [r1, #8]
+ mul r0, lr, r6
+ add r6, r6, #1
+ uxth r6, r6
+ add fp, r0, #3
+ cmp r0, #0
+ movlt r0, fp
+ bic r0, r0, #3
+ add r0, r8, r0
+ str r0, [r1, #12]
+.L1814:
+ add r3, r3, #1
+ add r2, r2, #2
+ uxth r3, r3
+.L1813:
+ cmp r3, r9
+ bne .L1815
+ ldrb r3, [r4, #8] @ zero_extendqisi2
+ cmp r3, #1
+ movne r3, #0
+ bne .L1881
+ ldr r3, .L1890
+ ldrb r3, [r3, #80] @ zero_extendqisi2
+ adds r3, r3, #0
+ movne r3, #1
+.L1881:
+ ldr r8, .L1890+4
+ mov r1, r6
+ str r3, [sp, #28]
+ mov sl, #0
+ ldr r2, [sp, #28]
+ ldr r0, [r8, #-984]
+ bl FlashReadPages
+ ldr fp, [r8, #-1844]
+ uxth r2, r5
+ ldr r9, [r8, #-984]
+ movw ip, #65535
+ mov r3, r8
+ str fp, [sp, #16]
+ mov r8, r2
+ str ip, [sp, #12]
+ mov fp, r7
+ b .L1817
+.L1822:
+ ldr r2, [r9, #0]
+ cmp r2, #0
+ strne r8, [sp, #12]
+ bne .L1820
+ ldr r2, [r9, #12]
+ ldr r7, [r2, #4]
+ cmn r7, #1
+ beq .L1819
+ ldr r1, [r3, #-1844]
+ mov r0, r7
+ str r2, [sp, #8]
+ str r3, [sp, #4]
+ bl ftl_cmp_data_ver
+ ldr r3, [sp, #4]
+ ldr r2, [sp, #8]
+ cmp r0, #0
+ addne r7, r7, #1
+ strne r7, [r3, #-1844]
+.L1819:
+ ldr r2, [r2, #0]
+ cmn r2, #1
+ bne .L1820
+ ldr r3, .L1890+4
+ mov r2, #36
+ uxth r7, fp
+ ldr r3, [r3, #-984]
+ mla sl, r2, sl, r3
+ ldr r0, [sl, #4]
+ b .L1882
+.L1820:
+ add sl, sl, #1
+ add r9, r9, #36
+ uxth sl, sl
+.L1817:
+ cmp sl, r6
+ bne .L1822
+ ldr r3, .L1890+4
+ add r7, fp, #1
+ uxth r7, r7
+ ldr r3, [r3, #-984]
+ ldr r0, [r3, #4]
+.L1882:
+ ubfx r0, r0, #10, #16
+ bl P2V_plane
+ ldrb r2, [r4, #8] @ zero_extendqisi2
+ ldr r3, .L1890
+ cmp r2, #1
+ str r0, [sp, #24]
+ bne .L1823
+ ldrb r1, [r3, #80] @ zero_extendqisi2
+ cmp r1, #0
+ addeq r7, r3, r7, asl #1
+ movweq r1, #2228
+ ldreqh r7, [r7, r1]
+.L1823:
+ movw r1, #3912
+ ldr fp, [sp, #24]
+ ldrh r3, [r3, r1]
+ ldr ip, [sp, #32]
+ cmp r3, r7
+ streqh r7, [r4, #2] @ movhi
+ moveq r3, #0
+ streqb r3, [r4, #6]
+ streqh r3, [r4, #4] @ movhi
+ ldr r3, [sp, #20]
+ cmp r7, r3
+ cmpeq fp, ip
+ beq .L1888
+.L1825:
+ ldr r3, [sp, #16]
+ ldr fp, [sp, #12]
+ sub r6, r3, #1
+ movw r3, #65535
+ cmp fp, r3
+ bne .L1826
+ cmp r2, #0
+ bne .L1827
+.L1826:
+ ldr r2, .L1890+4
+ uxth r3, r5
+ ldr ip, [sp, #20]
+ mvn fp, #0
+ mov sl, r3
+ mov r9, fp
+ ldr r1, [r2, #-1012]
+ ldr r8, .L1890+4
+ cmn r1, #1
+ streq r6, [r2, #-1012]
+ ldr r2, [r2, #-1012]
+ str r2, [sp, #12]
+ add r2, ip, #7
+ cmp r3, r2
+ subgt r5, r3, #7
+ mov r3, r7
+ ldrle r5, [sp, #20]
+ mov r7, r6
+ uxthgt r5, r5
+ b .L1830
+.L1832:
+ ldrh r0, [r1, #16]
+ movw lr, #65535
+ cmp r0, lr
+ beq .L1831
+ ldr ip, [sp, #16]
+ mov r3, #36
+ orr r0, r5, r0, asl #10
+ mla lr, r3, r6, ip
+ add r6, r6, #1
+ uxth r6, r6
+ str r0, [lr, #4]
+.L1831:
+ add r2, r2, #1
+ add r1, r1, #2
+ uxth r2, r2
+.L1843:
+ ldr lr, [sp, #44]
+ cmp r2, lr
+ bne .L1832
+ ldr r3, [sp, #36]
+ mov r1, r6
+ ldr r0, [r8, #-984]
+ ldr r2, [sp, #28]
+ str r3, [sp, #4]
+ bl FlashReadPages
+ ldr r2, .L1890
+ add r0, r8, r5, asl #1
+ mov r1, #0
+ str r0, [sp, #16]
+ ldr r3, [sp, #4]
+ ldrb ip, [r2, #80] @ zero_extendqisi2
+ ldr r2, [r8, #-984]
+ str ip, [sp, #36]
+ b .L1833
+.L1841:
+ ldr r0, [r2, #0]
+ cmp r0, #0
+ bne .L1834
+ ldr r0, [r2, #12]
+ movw ip, #65535
+ ldrh lr, [r0, #0]
+ cmp lr, ip
+ beq .L1835
+ ldr r0, [r0, #4]
+ cmn r0, #1
+ beq .L1835
+ cmn fp, #1
+ ldr r9, [r8, #-1012]
+ str r0, [r8, #-1012]
+ bne .L1835
+ ldr lr, [sp, #16]
+ sub r0, lr, #912
+ ldrh r0, [r0, #0]
+ cmp r0, ip
+ bne .L1836
+ ldr r0, [sp, #36]
+ cmp r0, #0
+ beq .L1835
+.L1836:
+ cmp r9, r7
+ mvneq fp, #0
+ movne fp, r9
+ b .L1835
+.L1834:
+ mov r6, r7
+ mov r7, r3
+ ldrb r3, [r4, #8] @ zero_extendqisi2
+ cmp r3, #0
+ bne .L1827
+ ldr r3, .L1890+4
+ movw r2, #65535
+ add r5, r3, r5, asl #1
+ sub r5, r5, #912
+ ldrh r1, [r5, #0]
+ cmp r1, r2
+ bne .L1837
+ cmn fp, #1
+ bne .L1883
+.L1838:
+ ldr fp, [sp, #12]
+ cmp fp, r6
+ beq .L1839
+.L1883:
+ str fp, [r3, #-1012]
+ b .L1827
+.L1839:
+ ldr r2, [r3, #-1012]
+ b .L1889
+.L1837:
+ cmp r9, r6
+ beq .L1840
+ cmn r9, #1
+ strne r9, [r3, #-1012]
+ b .L1827
+.L1840:
+ ldr r2, [r3, #-1012]
+ cmp r2, r6
+ beq .L1827
+.L1889:
+ sub r2, r2, #1
+ b .L1884
+.L1835:
+ add r1, r1, #1
+ add r2, r2, #36
+ uxth r1, r1
+.L1833:
+ cmp r1, r6
+ bne .L1841
+ add r5, r5, #1
+ uxth r5, r5
+.L1830:
+ cmp r5, sl
+ bhi .L1842
+ ldr r1, .L1890
+ movw r2, #3844
+ ldr lr, [r8, #-984]
+ mov r6, #0
+ str r3, [sp, #36]
+ ldrh ip, [r1, r2]
+ mov r1, r4
+ str lr, [sp, #16]
+ mov r2, r6
+ str ip, [sp, #44]
+ b .L1843
+.L1842:
+ mov r6, r7
+ mov r7, r3
+ ldr r3, .L1890+4
+ mvn r2, #0
+.L1884:
+ str r2, [r3, #-1012]
+.L1827:
+ ldr r5, .L1890+4
+ movw r3, #266
+ mov r2, #1
+ sub r0, r5, #1088
+ strh r2, [r5, r3] @ movhi
+ bl FtlMapBlkWriteDumpData
+ ldr r9, [sp, #20]
+ str r7, [sp, #36]
+.L1844:
+ ldr r3, .L1890
+ movw r2, #3844
+ mov r7, #0
+ ldr lr, [r5, #-984]
+ mov fp, #36
+ ldrh r8, [r3, r2]
+ mov r2, r4
+ ldrb ip, [r3, #80] @ zero_extendqisi2
+ mov r3, r7
+ b .L1845
+.L1848:
+ ldrh r0, [r2, #16]
+ movw r1, #65535
+ cmp r0, r1
+ beq .L1846
+ mla r1, fp, r7, lr
+ orr r0, r9, r0, asl #10
+ str r0, [r1, #4]
+ ldrb sl, [r4, #8] @ zero_extendqisi2
+ cmp sl, #1
+ bne .L1847
+ cmp ip, #0
+ orrne r0, r0, #-2147483648
+ strne r0, [r1, #4]
+.L1847:
+ add r7, r7, #1
+ uxth r7, r7
+.L1846:
+ add r3, r3, #1
+ add r2, r2, #2
+ uxth r3, r3
+.L1845:
+ cmp r3, r8
+ bne .L1848
+ mov r1, r7
+ ldr r0, [r5, #-984]
+ ldr r2, [sp, #28]
+ bl FlashReadPages
+ mov r3, #36
+ mul r3, r3, r7
+ mov r7, #0
+ str r3, [sp, #44]
+ b .L1849
+.L1870:
+ ldr sl, [r5, #-984]
+ add sl, sl, r7
+ ldr r8, [sl, #4]
+ ubfx r0, r8, #10, #16
+ str r8, [sp, #60]
+ bl P2V_plane
+ ldr r3, [sp, #20]
+ cmp r9, r3
+ bcc .L1850
+ ldr fp, [sp, #32]
+ mov ip, r3
+ cmp r0, fp
+ movcs r3, #0
+ movcc r3, #1
+ cmp r9, ip
+ movne r3, #0
+ cmp r3, #0
+ bne .L1850
+ ldr r3, [sp, #24]
+ ldr ip, [sp, #36]
+ cmp r0, r3
+ cmpeq r9, ip
+ beq .L1851
+ ldr r3, [sl, #0]
+ cmn r3, #1
+ beq .L1852
+ ldr r8, [sl, #12]
+ movw lr, #61589
+ ldrh r3, [r8, #0]
+ cmp r3, lr
+ bne .L1859
+.L1853:
+ ldr r6, [r8, #4]
+ cmn r6, #1
+ beq .L1854
+ ldr r1, [r5, #-1844]
+ mov r0, r6
+ bl ftl_cmp_data_ver
+ cmp r0, #0
+ addne r3, r6, #1
+ strne r3, [r5, #-1844]
+.L1854:
+ ldr sl, [r8, #8]
+ add r1, sp, #56
+ ldr r3, [r8, #12]
+ mov r2, #0
+ mov r0, sl
+ str r3, [sp, #52]
+ bl log2phys
+ ldr r1, [r5, #-1012]
+ cmn r1, #1
+ beq .L1855
+ mov r0, r6
+ bl ftl_cmp_data_ver
+ cmp r0, #0
+ beq .L1855
+ ldr r3, [sp, #52]
+ cmn r3, #1
+ beq .L1856
+ ldr r0, [r5, #-984]
+ mov r1, #1
+ mov r2, #0
+ add r0, r0, r7
+ ldr fp, [r0, #12]
+ str r3, [r0, #4]
+ str fp, [sp, #12]
+ bl FlashReadPages
+ ldr r3, [r5, #-984]
+ ldr ip, [fp, #4]
+ add fp, r3, r7
+ ldr r3, [r3, r7]
+ str ip, [sp, #16]
+ cmn r3, #1
+ bne .L1857
+ b .L1858
+.L1856:
+ ldr r3, [sp, #60]
+ ldr r2, [sp, #56]
+ cmp r2, r3
+ bne .L1859
+ mov r0, sl
+ add r1, sp, #52
+ mov r2, #1
+ bl log2phys
+.L1859:
+ ldrh r0, [r4, #0]
+ b .L1886
+.L1857:
+ ldr r3, [sp, #12]
+ ldr r8, [r3, #8]
+ cmp r8, sl
+ bne .L1858
+ ldr r0, [r5, #-1012]
+ ldr r1, [sp, #16]
+ bl ftl_cmp_data_ver
+ cmp r0, #0
+ beq .L1858
+ ldr r3, [sp, #56]
+ ldr r2, [sp, #60]
+ cmp r3, r2
+ beq .L1863
+.L1860:
+ ldr r2, [sp, #52]
+ cmp r3, r2
+ beq .L1858
+ cmn r3, #1
+ streq r3, [fp, #0]
+ beq .L1862
+ ldr ip, [fp, #12]
+ mov r0, fp
+ str r3, [fp, #4]
+ mov r1, #1
+ mov r2, #0
+ str ip, [sp, #12]
+ bl FlashReadPages
+.L1862:
+ ldr r3, [r5, #-984]
+ ldr r3, [r3, r7]
+ cmn r3, #1
+ beq .L1863
+ ldr r3, [sp, #12]
+ ldr r0, [r5, #-1012]
+ ldr sl, [r3, #4]
+ mov r1, sl
+ bl ftl_cmp_data_ver
+ cmp r0, #0
+ beq .L1863
+ ldr r0, [sp, #16]
+ mov r1, sl
+ bl ftl_cmp_data_ver
+ cmp r0, #0
+ beq .L1858
+.L1863:
+ mov r0, r8
+ ldr r1, [sp, #52]
+ bl FtlReUsePrevPpa
+.L1858:
+ ldrh r0, [r4, #0]
+ mvn r3, #0
+ str r3, [sp, #52]
+ bl decrement_vpc_count
+ b .L1865
+.L1855:
+ ldr r3, [sp, #60]
+ ldr r2, [sp, #56]
+ cmp r2, r3
+ beq .L1865
+ mov r0, sl
+ add r1, sp, #60
+ mov r2, #1
+ bl log2phys
+ ldr fp, [sp, #56]
+ cmn fp, #1
+ beq .L1865
+ ldr r3, [sp, #52]
+ cmp fp, r3
+ beq .L1865
+ ubfx r0, fp, #10, #16
+ bl P2V_block_in_plane
+ ldr r3, .L1890+8
+ ldrh r3, [r5, r3]
+ cmp r3, r0
+ beq .L1866
+ ldr r3, .L1890+12
+ ldrh r3, [r5, r3]
+ cmp r3, r0
+ beq .L1866
+ ldr r3, .L1890+16
+ ldrh r3, [r5, r3]
+ cmp r3, r0
+ bne .L1865
+.L1866:
+ ldr ip, .L1890+4
+ mov r1, #1
+ mov r2, #0
+ ldr r0, [ip, #-984]
+ str fp, [r0, #4]
+ ldr r8, [r0, #12]
+ bl FlashReadPages
+ ldr r0, .L1890+4
+ ldr r1, [r8, #4]
+ ldr r3, [r0, #-984]
+ ldr r3, [r3, #0]
+ cmn r3, #1
+ beq .L1865
+ mov r0, r6
+ bl ftl_cmp_data_ver
+ cmp r0, #0
+ bne .L1865
+ mov r0, sl
+ add r1, sp, #56
+ mov r2, #1
+ bl log2phys
+.L1865:
+ ldr r0, [sp, #52]
+ cmn r0, #1
+ beq .L1850
+ ubfx r0, r0, #10, #16
+ bl P2V_block_in_plane
+ ldr r2, [r5, #-2064]
+ mov r3, r0, asl #1
+ mov r1, r0
+ ldrh r3, [r2, r3]
+ cmp r3, #0
+ beq .L1867
+.L1886:
+ bl decrement_vpc_count
+ b .L1850
+.L1867:
+ ldr r0, .L1890+20
+ bl printk
+ b .L1850
+.L1852:
+ ldr r3, [r5, #268]
+ cmp r3, #31
+ addls r2, r5, r3, asl #2
+ addls r3, r3, #1
+ strls r3, [r5, #268]
+ strls r8, [r2, #272]
+ ldrh r0, [r4, #0]
+ bl decrement_vpc_count
+ ldr r3, [r5, #-1012]
+ cmn r3, #1
+ beq .L1885
+.L1869:
+ cmp r3, r6
+ bls .L1850
+.L1885:
+ str r6, [r5, #-1012]
+.L1850:
+ add r7, r7, #36
+.L1849:
+ ldr r3, [sp, #44]
+ cmp r7, r3
+ bne .L1870
+ ldr r3, .L1890
+ add r9, r9, #1
+ movw r2, #3912
+ uxth r9, r9
+ ldrh r2, [r3, r2]
+ cmp r9, r2
+ bne .L1844
+ mov r2, #0
+ movw r1, #3844
+ strh r2, [r4, #4] @ movhi
+ ldrh r1, [r3, r1]
+ mov r3, r2
+ strh r9, [r4, #2] @ movhi
+ movw r2, #65535
+ ldr r0, [sp, #40]
+ b .L1871
+.L1873:
+ add r0, r0, #2
+ ldrh ip, [r0, #14]
+ cmp ip, r2
+ strneb r3, [r4, #6]
+ bne .L1807
+.L1872:
+ add r3, r3, #1
+ uxth r3, r3
+.L1871:
+ cmp r3, r1
+ bne .L1873
+ b .L1807
+.L1851:
+ ldr r7, [sp, #36]
+ ldr fp, [sp, #24]
+ strh r7, [r4, #2] @ movhi
+ strb fp, [r4, #6]
+.L1888:
+ mov r0, r4
+ mov r1, r7
+ mov r2, fp
+ bl ftl_sb_update_avl_pages
+.L1807:
+ mov r0, #0
+ add sp, sp, #68
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L1891:
+ .align 2
+.L1890:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -2044
+ .word -1996
+ .word -1948
+ .word .LC113
+ .fnend
+ .size FtlRecoverySuperblock, .-FtlRecoverySuperblock
+ .align 2
+ .global FtlWriteDumpData
+ .type FtlWriteDumpData, %function
+FtlWriteDumpData:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 40
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, sl, lr}
+ .save {r4, r5, r6, r7, r8, sl, lr}
+ .pad #44
+ sub sp, sp, #44
+ ldr r4, .L1901
+ ldr r3, .L1901+4
+ mov r2, r4
+ ldrh r3, [r4, r3]
+ cmp r3, #0
+ beq .L1893
+ ldrb r1, [r4, #-2036] @ zero_extendqisi2
+ cmp r1, #0
+ bne .L1893
+ ldr r5, .L1901+8
+ movw r0, #3912
+ ldrb r1, [r4, #-2037] @ zero_extendqisi2
+ ldrh r0, [r5, r0]
+ mul r1, r0, r1
+ cmp r3, r1
+ beq .L1893
+ ldrb r8, [r4, #-2034] @ zero_extendqisi2
+ movw r3, #3844
+ ldr r7, [r5, #3972]
+ cmp r8, #0
+ ldrh r6, [r5, r3]
+ bne .L1892
+ sub r7, r7, #1
+ mov r1, sp
+ mov r2, r8
+ mov r0, r7
+ bl log2phys
+ ldr r3, [sp, #0]
+ ldr r0, [r4, #-2076]
+ ldr r4, [r4, #-952]
+ cmn r3, #1
+ str r3, [sp, #8]
+ str r7, [sp, #20]
+ str r0, [sp, #12]
+ str r4, [sp, #16]
+ str r8, [r4, #4]
+ beq .L1895
+ add r0, sp, #4
+ mov r1, #1
+ mov r2, r8
+ bl FlashReadPages
+ b .L1896
+.L1895:
+ movw r3, #3922
+ mov r1, #255
+ ldrh r2, [r5, r3]
+ bl ftl_memset
+.L1896:
+ ldr r3, .L1901+12
+ mov r6, r6, asl #2
+ ldr r5, .L1901
+ ldr sl, .L1901+4
+ strh r3, [r4, #0] @ movhi
+ ldr r8, .L1901+16
+ b .L1897
+.L1900:
+ ldrh r3, [r5, sl]
+ cmp r3, #0
+ beq .L1898
+ ldr r3, [sp, #8]
+ sub r6, r6, #1
+ str r7, [r4, #8]
+ ldr r0, .L1901+20
+ str r3, [r4, #12]
+ ldrh r3, [r5, r8]
+ strh r3, [r4, #2] @ movhi
+ bl get_new_active_ppa
+ ldr r3, [r5, #-1844]
+ mov r2, #0
+ mov r1, #1
+ str r0, [sp, #8]
+ add r0, sp, #4
+ str r3, [r4, #4]
+ add r3, r3, #1
+ cmn r3, #1
+ str r3, [r5, #-1844]
+ moveq r3, #0
+ streq r3, [r5, #-1844]
+ mov r3, r2
+ bl FlashProgPages
+ ldrh r0, [r5, r8]
+ bl decrement_vpc_count
+.L1897:
+ cmp r6, #0
+ bne .L1900
+.L1898:
+ ldr r3, .L1901
+ mov r2, #1
+ strb r2, [r3, #-2034]
+ b .L1892
+.L1893:
+ mov r3, #0
+ strb r3, [r2, #-2034]
+.L1892:
+ add sp, sp, #44
+ ldmfd sp!, {r4, r5, r6, r7, r8, sl, pc}
+.L1902:
+ .align 2
+.L1901:
+ .word .LANCHOR2
+ .word -2040
+ .word .LANCHOR0
+ .word -3947
+ .word -2044
+ .word .LANCHOR2-2044
+ .fnend
+ .size FtlWriteDumpData, .-FtlWriteDumpData
+ .align 2
+ .global l2p_flush
+ .type l2p_flush, %function
+l2p_flush:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ bl FtlWriteDumpData
+ mov r4, #0
+ ldr r7, .L1907
+ movw r6, #3950
+ ldr r5, .L1907+4
+ b .L1904
+.L1906:
+ ldr r3, [r5, #-1900]
+ mov r2, #12
+ mla r3, r2, r4, r3
+ ldr r3, [r3, #4]
+ cmp r3, #0
+ bge .L1905
+ mov r0, r4
+ bl flush_l2p_region
+.L1905:
+ add r4, r4, #1
+ uxth r4, r4
+.L1904:
+ ldrh r3, [r7, r6]
+ cmp r3, r4
+ bhi .L1906
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L1908:
+ .align 2
+.L1907:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size l2p_flush, .-l2p_flush
+ .align 2
+ .global FtlVpcCheckAndModify
+ .type FtlVpcCheckAndModify, %function
+FtlVpcCheckAndModify:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r4, r5, r6, r7, r8, lr}
+ .save {r0, r1, r4, r5, r6, r7, r8, lr}
+ mov r4, #0
+ ldr r6, .L1916
+ ldr r1, .L1916+4
+ ldr r0, .L1916+8
+ bl printk
+ movw r3, #3854
+ ldrh r2, [r6, r3]
+ mov r1, #0
+ ldr r5, .L1916+12
+ mov r2, r2, asl #1
+ ldr r0, [r5, #-932]
+ bl ftl_memset
+ b .L1910
+.L1912:
+ mov r0, r4
+ add r1, sp, #4
+ mov r2, #0
+ bl log2phys
+ ldr r0, [sp, #4]
+ cmn r0, #1
+ beq .L1911
+ ubfx r0, r0, #10, #16
+ bl P2V_block_in_plane
+ ldr r3, [r5, #-932]
+ mov r0, r0, asl #1
+ ldrh r2, [r3, r0]
+ add r2, r2, #1
+ strh r2, [r3, r0] @ movhi
+.L1911:
+ add r4, r4, #1
+.L1910:
+ ldr r3, [r6, #3972]
+ cmp r4, r3
+ bcc .L1912
+ mov r4, #0
+ ldr r7, .L1916
+ movw r8, #3852
+ ldr r5, .L1916+12
+ b .L1913
+.L1915:
+ ldr r3, [r5, #-2064]
+ mov r6, r4, asl #1
+ ldrh r2, [r3, r6]
+ ldr r3, [r5, #-932]
+ ldrh r3, [r3, r6]
+ cmp r2, r3
+ beq .L1914
+ movw r1, #65535
+ cmp r2, r1
+ beq .L1914
+ ldr r0, .L1916+16
+ mov r1, r4
+ bl printk
+ ldr r3, .L1916+20
+ ldrh r3, [r5, r3]
+ cmp r3, r4
+ beq .L1914
+ ldr r3, .L1916+24
+ ldrh r3, [r5, r3]
+ cmp r3, r4
+ beq .L1914
+ ldr r3, .L1916+28
+ ldrh r3, [r5, r3]
+ cmp r3, r4
+ beq .L1914
+ ldr r3, [r5, #-932]
+ mov r0, r4
+ ldrh r2, [r3, r6]
+ ldr r3, [r5, #-2064]
+ strh r2, [r3, r6] @ movhi
+ bl update_vpc_list
+ bl l2p_flush
+ bl FtlVpcTblFlush
+.L1914:
+ add r4, r4, #1
+ uxth r4, r4
+.L1913:
+ ldrh r3, [r7, r8]
+ cmp r3, r4
+ bhi .L1915
+ ldmfd sp!, {r2, r3, r4, r5, r6, r7, r8, pc}
+.L1917:
+ .align 2
+.L1916:
+ .word .LANCHOR0
+ .word .LANCHOR3+15
+ .word .LC114
+ .word .LANCHOR2
+ .word .LC115
+ .word -2044
+ .word -1948
+ .word -1996
+ .fnend
+ .size FtlVpcCheckAndModify, .-FtlVpcCheckAndModify
+ .align 2
+ .global allocate_new_data_superblock
+ .type allocate_new_data_superblock, %function
+allocate_new_data_superblock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ movw r3, #65535
+ ldrh r5, [r0, #0]
+ mov r4, r0
+ cmp r5, r3
+ beq .L1919
+ ldr r3, .L1929
+ mov r0, r5
+ ldr r2, [r3, #-2064]
+ mov r3, r5, asl #1
+ ldrh r3, [r2, r3]
+ cmp r3, #0
+ beq .L1920
+ bl INSERT_DATA_LIST
+ b .L1919
+.L1920:
+ bl INSERT_FREE_LIST
+.L1919:
+ mov r3, #0
+ strb r3, [r4, #8]
+ ldr r3, .L1929+4
+ cmp r4, r3
+ beq .L1921
+ ldr r2, .L1929+8
+ movw r3, #3864
+ ldrh r3, [r2, r3]
+ cmp r3, #1
+ beq .L1921
+ ldrb r2, [r2, #80] @ zero_extendqisi2
+ cmp r2, #0
+ beq .L1922
+.L1921:
+ mov r3, #1
+ strb r3, [r4, #8]
+ b .L1923
+.L1922:
+ ldr r2, .L1929+12
+ cmp r4, r2
+ bne .L1923
+ cmp r3, #3
+ ldr r3, .L1929
+ beq .L1924
+ ldr r2, [r3, #-1708]
+ cmp r2, #1
+ bne .L1925
+.L1924:
+ mov r2, #1
+ strb r2, [r3, #-2036]
+.L1925:
+ ldr r3, [r3, #-1884]
+ ldr r2, .L1929
+ cmp r3, #0
+ beq .L1923
+ ldr r3, [r2, #-1824]
+ cmp r3, #29
+ movls r3, #1
+ strlsb r3, [r2, #-2036]
+.L1923:
+ ldr r3, .L1929+16
+ ldr r6, .L1929
+ ldrh r0, [r6, r3]
+ movw r3, #65535
+ cmp r0, r3
+ beq .L1926
+ cmp r5, r0
+ bne .L1927
+ ldr r2, [r6, #-2064]
+ mov r3, r0, asl #1
+ ldrh r3, [r2, r3]
+ cmp r3, #0
+ beq .L1928
+.L1927:
+ bl update_vpc_list
+.L1928:
+ ldr r3, .L1929+16
+ mvn r2, #0
+ strh r2, [r6, r3] @ movhi
+.L1926:
+ mov r0, r4
+ bl allocate_data_superblock
+ bl l2p_flush
+ bl FtlVpcTblFlush
+ mov r0, #0
+ bl FtlEctTblFlush
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, pc}
+.L1930:
+ .align 2
+.L1929:
+ .word .LANCHOR2
+ .word .LANCHOR2-1996
+ .word .LANCHOR0
+ .word .LANCHOR2-2044
+ .word -1024
+ .fnend
+ .size allocate_new_data_superblock, .-allocate_new_data_superblock
+ .align 2
+ .type rk_ftl_garbage_collect.part.19, %function
+rk_ftl_garbage_collect.part.19:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 24
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L2027
+ movw ip, #65535
+ ldr r2, .L2027+4
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r7, r0
+ ldrh r0, [r3, r2]
+ .pad #36
+ sub sp, sp, #36
+ cmp r0, ip
+ str r1, [sp, #20]
+ beq .L1932
+ ldr r1, .L2027+8
+ ldrh r4, [r3, r1]
+ cmp r4, ip
+ streqh r0, [r3, r1] @ movhi
+ mvneq r1, #0
+ streqh r1, [r3, r2] @ movhi
+.L1932:
+ ldr r2, [r3, #-1188]
+ cmp r7, #1
+ ldr r5, .L2027
+ add r2, r2, #1
+ add r2, r2, r7, asl #7
+ str r2, [r3, #-1188]
+ bne .L2007
+ ldr r3, [r5, #-1884]
+ cmp r3, #0
+ beq .L2007
+ ldr r3, [r5, #-1824]
+ cmp r3, #29
+ bhi .L2007
+ mov r6, #400
+ movw r4, #65535
+ ldrh r3, [r5, r6]
+ add r2, r2, r3
+ str r2, [r5, #-1188]
+ bl FtlGcReFreshBadBlk
+ ldr r3, .L2027+12
+ ldrh r3, [r5, r3]
+ cmp r3, r4
+ bne .L1933
+ ldr r2, .L2027+8
+ ldrh r4, [r5, r2]
+ cmp r4, r3
+ movne r4, r3
+ bne .L1933
+ ldr r3, [r5, #-1188]
+ cmp r3, #1024
+ bls .L1933
+ mov r3, #0
+ str r3, [r5, #-1188]
+ strh r3, [r5, r6] @ movhi
+ ldr r3, [r5, #-1824]
+ cmp r3, #0
+ moveq r3, #6
+ beq .L2022
+ cmp r3, #5
+ bhi .L1935
+ mov r3, #18
+.L2022:
+ strh r3, [r5, r6] @ movhi
+.L1935:
+ mov r0, #32
+ movw r8, #65535
+ bl List_get_gc_head_node
+ uxth r2, r0
+ cmp r2, r8
+ beq .L1936
+ ldr r5, .L2027
+ ldr r6, .L2027+16
+ ldrh r0, [r5, r6]
+ cmp r0, #0
+ moveq r3, #1
+ streqh r3, [r5, r6] @ movhi
+ beq .L1936
+ ldr r3, .L2027+20
+ movw ip, #3914
+ movw lr, #3844
+ ldr r9, [r5, #-2064]
+ mov r2, r2, asl #1
+ ldrh ip, [r3, ip]
+ ldrh r3, [r3, lr]
+ ldrh r1, [r9, r2]
+ mul r3, r3, ip
+ add r3, r3, #1
+ cmp r1, r3
+ bgt .L1936
+ add fp, r0, #1
+ mov sl, #0
+ str sl, [r5, #-1180]
+ uxth fp, fp
+ strh fp, [r5, r6] @ movhi
+ str r2, [sp, #12]
+ bl List_get_gc_head_node
+ ldr r2, [sp, #12]
+ uxth r4, r0
+ cmp r4, r8
+ beq .L1936
+ ldrh r2, [r9, r2]
+ mov r8, r4, asl #1
+ ldr r0, .L2027+24
+ mov r1, fp
+ ldrh r3, [r9, r8]
+ str r2, [sp, #0]
+ mov r2, r4
+ bl printk
+ ldrh r3, [r5, r6]
+ cmp r3, #40
+ bls .L1938
+ ldr r3, [r5, #-2064]
+ ldrh r3, [r3, r8]
+ cmp r3, #32
+ strhih sl, [r5, r6] @ movhi
+.L1938:
+ mov r1, #6
+ b .L2023
+.L1936:
+ bl GetSwlReplaceBlock
+ movw r3, #65535
+ cmp r0, r3
+ mov r4, r0
+ bne .L1933
+ mov r1, #0
+.L2023:
+ ldr r2, .L2027
+ mov r3, #400
+ strh r1, [r2, r3] @ movhi
+ b .L1933
+.L2007:
+ movw r4, #65535
+.L1933:
+ ldr r3, .L2027+12
+ ldr r6, .L2027
+ ldrh r2, [r6, r3]
+ movw r3, #65535
+ cmp r2, r3
+ bne .L1939
+ ldr r3, .L2027+28
+ ldrh r3, [r6, r3]
+ cmp r3, r2
+ bne .L1939
+ ldr r2, .L2027+8
+ ldrh sl, [r6, r2]
+ cmp sl, r3
+ bne .L1939
+ ldr r8, .L2027+32
+ ldr r2, [r6, #-1188]
+ ldrh r3, [r6, r8]
+ cmp r3, #23
+ movhi r3, #1024
+ movls r3, #5120
+ cmp r2, r3
+ bls .L1939
+ mov r2, #400
+ mov r3, #0
+ str r3, [r6, #-1188]
+ strh r3, [r6, r2] @ movhi
+ bl GetSwlReplaceBlock
+ cmp r0, sl
+ mov r4, r0
+ bne .L1941
+ ldr r3, .L2027+36
+ ldrh r1, [r6, r8]
+ ldrh r2, [r6, r3]
+ cmp r1, r2
+ movcs r2, #80
+ strcsh r2, [r6, r3] @ movhi
+ bcs .L1951
+ mov r0, #64
+ bl List_get_gc_head_node
+ uxth r3, r0
+ cmp r3, r4
+ beq .L1951
+ ldr r2, [r6, #-1004]
+ cmp r2, #0
+ bne .L1944
+ ldr r2, .L2027+20
+ movw r1, #3864
+ ldrh r1, [r2, r1]
+ cmp r1, #3
+ beq .L1944
+ ldr r1, [r6, #-1708]
+ cmp r1, #0
+ bne .L1944
+ ldr r1, [r6, #-1884]
+ cmp r1, #0
+ bne .L1944
+ ldrb r0, [r2, #80] @ zero_extendqisi2
+ cmp r0, #0
+ beq .L1945
+.L1944:
+ ldr r1, .L2027
+ mov r3, r3, asl #1
+ movw ip, #3844
+ movw lr, #3864
+ ldr r2, [r1, #-2064]
+ ldrh r0, [r2, r3]
+ movw r2, #3914
+ ldr r3, .L2027+20
+ ldrh r2, [r3, r2]
+ ldrh ip, [r3, ip]
+ ldrh r3, [r3, lr]
+ mul ip, ip, r2
+ cmp r3, #3
+ moveq r3, r2, lsr #1
+ movne r3, #0
+ add r3, ip, r3
+ cmp r0, r3
+ bgt .L1947
+ mov r0, #0
+ bl List_get_gc_head_node
+ ldr r2, .L2027+20
+ ldr r3, .L2027
+ ldr r2, [r2, #3972]
+ ldr r1, [r3, #-1892]
+ add r2, r2, r2, asl #1
+ cmp r1, r2, lsr #2
+ ldr r2, .L2027+36
+ movhi r1, #128
+ movls r1, #160
+ strh r1, [r3, r2] @ movhi
+ uxth r4, r0
+ b .L1949
+.L1947:
+ ldr r3, .L2027+36
+ mov r2, #128
+ strh r2, [r1, r3] @ movhi
+ b .L1951
+.L1945:
+ ldr r2, [r6, #-2064]
+ mov r3, r3, asl #1
+ ldr r6, .L2027
+ ldr r5, .L2027+36
+ ldrh r3, [r2, r3]
+ cmp r3, #7
+ movhi r3, #64
+ strhih r3, [r6, r5] @ movhi
+ bhi .L1951
+ bl List_get_gc_head_node
+ mov r3, #128
+ strh r3, [r6, r5] @ movhi
+ uxth r4, r0
+.L1949:
+ movw r3, #65535
+ cmp r4, r3
+ beq .L1951
+.L1941:
+ ldr r1, .L2027
+ mov r0, r4, asl #1
+ ldr r3, .L2027+32
+ ldr ip, [r1, #-2084]
+ ldrh r2, [r1, r3]
+ ldr r3, [r1, #-2064]
+ ldrh r3, [r3, r0]
+ ldrh r0, [ip, r0]
+ str r0, [sp, #0]
+ ldr r0, .L2027+40
+ ldrh r1, [r1, r0]
+ ldr r0, .L2027+44
+ str r1, [sp, #4]
+ mov r1, r4
+ bl printk
+.L1951:
+ bl FtlGcReFreshBadBlk
+.L1939:
+ movw r1, #65535
+ rsb ip, r1, r4
+ rsbs r2, ip, #0
+ ldr r5, .L2027
+ adc r2, r2, ip
+ cmp r7, #0
+ movne r7, #0
+ andeq r7, r2, #1
+ cmp r7, #0
+ beq .L1952
+ ldr r3, .L2027+32
+ ldrh r2, [r5, r3]
+ cmp r2, #24
+ movhi r6, #1
+ bhi .L1953
+ ldr r1, .L2027+20
+ movw r3, #3912
+ cmp r2, #16
+ ldrh r6, [r1, r3]
+ movhi r6, r6, lsr #5
+ bhi .L1953
+ cmp r2, #12
+ movhi r6, r6, lsr #4
+ bhi .L1953
+ cmp r2, #8
+ movhi r6, r6, lsr #2
+.L1953:
+ ldr r1, .L2027+40
+ ldr r3, .L2027
+ ldrh r0, [r5, r1]
+ cmp r0, r2
+ mov r0, r1
+ bcs .L1957
+ ldr r2, .L2027+28
+ movw ip, #65535
+ ldrh r2, [r3, r2]
+ cmp r2, ip
+ bne .L1958
+ ldr ip, .L2027+8
+ ldrh ip, [r3, ip]
+ cmp ip, r2
+ bne .L1958
+ mov r2, #400
+ ldrh r0, [r3, r2]
+ cmp r0, #0
+ bne .L1959
+ ldr r2, .L2027+20
+ ldr ip, [r3, #-1892]
+ ldr r2, [r2, #3972]
+ add r2, r2, r2, asl #1
+ cmp ip, r2, lsr #2
+ movcs r2, #18
+ bcs .L2025
+.L1959:
+ ldr r3, .L2027
+ ldr r2, .L2027+48
+ ldr r1, .L2027+40
+ ldrh r2, [r3, r2]
+ add r2, r2, r2, asl #1
+ mov r2, r2, asr #2
+.L2025:
+ strh r2, [r3, r1] @ movhi
+ mov r2, #0
+ ldr r3, .L2027
+ str r2, [r3, #-1180]
+ b .L1962
+.L1958:
+ ldr r3, .L2027
+ ldr r2, .L2027+48
+ ldrh r2, [r3, r2]
+ add r2, r2, r2, asl #1
+ mov r2, r2, asr #2
+ strh r2, [r3, r0] @ movhi
+.L1957:
+ ldr r3, .L2027
+ movw r4, #65535
+ ldr r8, [sp, #20]
+ ldr r2, [r3, #-1884]
+ cmp r8, #2
+ movhi r3, #0
+ movls r3, #1
+ cmp r2, #0
+ moveq r3, #0
+ cmp r3, #0
+ addne r6, r6, #1
+ uxthne r6, r6
+ b .L1963
+.L1952:
+ ldr r3, .L2027+28
+ ldrh r3, [r5, r3]
+ cmp r3, r1
+ bne .L1964
+ ldr r1, .L2027+8
+ ldrh r1, [r5, r1]
+ cmp r1, r3
+ movne r2, #0
+ andeq r2, r2, #1
+ cmp r2, #0
+ beq .L1964
+ ldr r2, .L2027+12
+ ldrh r4, [r5, r2]
+ cmp r4, r3
+ movne r4, r3
+ bne .L1964
+ ldr r3, .L2027+32
+ mov r6, #400
+ str r7, [r5, #-1180]
+ ldrh r7, [r5, r3]
+ add r3, r3, #856
+ ldrh r2, [r5, r3]
+ cmp r2, r7
+ bcs .L1965
+ ldrh r2, [r5, r6]
+ cmp r2, #0
+ bne .L1966
+ ldr r2, .L2027+20
+ ldr r1, [r5, #-1892]
+ ldr r2, [r2, #3972]
+ add r2, r2, r2, asl #1
+ cmp r1, r2, lsr #2
+ movcs r2, #18
+ strcsh r2, [r5, r3] @ movhi
+ bcs .L1968
+.L1966:
+ ldr r3, .L2027
+ ldr r2, .L2027+48
+ ldr r1, .L2027+40
+ ldrh r2, [r3, r2]
+ add r2, r2, r2, asl #1
+ mov r2, r2, asr #2
+ strh r2, [r3, r1] @ movhi
+.L1968:
+ bl FtlReadRefresh
+ mov r3, #400
+ ldr r2, .L2027
+ b .L2026
+.L1965:
+ ldrh r0, [r5, r6]
+ cmp r0, #0
+ bne .L1964
+ ldr r2, .L2027+48
+ ldrh r4, [r5, r2]
+ add r2, r4, r4, asl #1
+ mov r2, r2, asr #2
+ strh r2, [r5, r3] @ movhi
+ bl List_get_gc_head_node
+ ldr r3, [r5, #-2064]
+ ldr r1, .L2027+20
+ movw r2, #3914
+ ldrh r2, [r1, r2]
+ uxth r0, r0
+ mov r0, r0, asl #1
+ ldrh r3, [r3, r0]
+ movw r0, #3844
+ ldrh r1, [r1, r0]
+ mul r2, r1, r2
+ add r2, r2, r2, lsr #31
+ cmp r3, r2, asr #1
+ ble .L1969
+ sub r4, r4, #1
+ cmp r7, r4
+ blt .L1969
+ bl FtlReadRefresh
+ ldrh r0, [r5, r6]
+ b .L1962
+.L1969:
+ cmp r3, #0
+ movwne r4, #65535
+ bne .L1964
+ movw r0, #65535
+ bl decrement_vpc_count
+ ldr r3, .L2027+32
+ ldr r2, .L2027
+ ldrh r0, [r2, r3]
+ add r0, r0, #1
+ b .L1962
+.L1964:
+ ldr r3, .L2027
+ ldr r6, [r3, #-1884]
+ cmp r6, #0
+ movne r6, #2
+ moveq r6, #1
+.L1963:
+ ldr r3, .L2027
+ movw r0, #65535
+ ldr r2, .L2027+12
+ ldrh r1, [r3, r2]
+ cmp r1, r0
+ bne .L1970
+ cmp r4, r1
+ strneh r4, [r3, r2] @ movhi
+ bne .L1972
+ ldr r1, .L2027+8
+ ldrh r0, [r3, r1]
+ cmp r0, r4
+ strneh r0, [r3, r2] @ movhi
+ mvnne r2, #0
+ strneh r2, [r3, r1] @ movhi
+.L1972:
+ mov r2, #0
+ strb r2, [r3, #-1748]
+ ldr r3, .L2027+20
+ ldr r5, .L2027
+ ldr r7, .L2027+12
+ ldrb r3, [r3, #80] @ zero_extendqisi2
+ cmp r3, r2
+ beq .L1973
+ ldrh r0, [r5, r7]
+ bl ftl_get_blk_mode
+ strb r0, [r5, #-1748]
+.L1973:
+ ldr r5, .L2027
+ ldrh r0, [r5, r7]
+ bl IsBlkInGcList
+ ldr r7, .L2027+12
+ mov r3, r5
+ cmp r0, #0
+ ldrne r2, .L2027+12
+ mvnne r1, #0
+ strneh r1, [r5, r2] @ movhi
+ ldrh r2, [r3, r7]
+ movw r3, #65535
+ ldr r5, .L2027
+ cmp r2, r3
+ beq .L1970
+ ldr r0, .L2027+52
+ bl make_superblock
+ ldr r1, .L2027+56
+ movw r2, #402
+ mov r3, #0
+ strh r3, [r5, r2] @ movhi
+ strh r3, [r5, r1] @ movhi
+ strb r3, [r5, #-1750]
+ ldrh r3, [r5, r7]
+ ldr r2, [r5, #-2064]
+ mov r3, r3, asl #1
+ ldrh r2, [r2, r3]
+ mov r3, #404
+ strh r2, [r5, r3] @ movhi
+.L1970:
+ ldr r3, .L2027
+ ldr r0, .L2027+12
+ ldr r2, .L2027+60
+ ldrh r1, [r3, r0]
+ ldrh r2, [r3, r2]
+ cmp r2, r1
+ mov r2, r3
+ beq .L1975
+ ldr ip, .L2027+64
+ ldrh r3, [r3, ip]
+ cmp r3, r1
+ strne r4, [sp, #20]
+ bne .L2021
+.L1976:
+.L1975:
+ mvn r3, #0
+ strh r3, [r2, r0] @ movhi
+ mov r3, #400
+.L2026:
+ ldrh r0, [r2, r3]
+ b .L1962
+.L2021:
+ ldr r4, .L2027
+ movw r0, #65535
+ ldr r9, .L2027+12
+ ldrh r3, [r4, r9]
+ cmp r3, r0
+ bne .L1978
+ mov r3, #0
+ str r3, [r4, #-1180]
+.L2020:
+ ldr r8, .L2027+16
+ ldrh r7, [r4, r8]
+ mov r0, r7
+ bl List_get_gc_head_node
+ movw r1, #65535
+ uxth r5, r0
+ strh r5, [r4, r9] @ movhi
+ cmp r5, r1
+ ldreq r3, .L2027
+ moveq r2, #0
+ moveq r0, #8
+ streqh r2, [r3, r8] @ movhi
+ beq .L1962
+.L1980:
+ mov r0, r5
+ add r7, r7, #1
+ bl IsBlkInGcList
+ cmp r0, #0
+ strneh r7, [r4, r8] @ movhi
+ bne .L2020
+ ldr ip, .L2027+20
+ uxth r7, r7
+ movw r3, #3912
+ strh r7, [r4, r8] @ movhi
+ movw r8, #3844
+ ldr r1, [r4, #-2064]
+ ldrh r3, [ip, r3]
+ mov r2, r5, asl #1
+ ldrh ip, [ip, r8]
+ ldrh r0, [r1, r2]
+ mul r3, ip, r3
+ add ip, r3, r3, lsr #31
+ cmp r0, ip, asr #1
+ bgt .L1983
+ cmp r7, #48
+ bls .L1984
+ cmp r0, #8
+ bls .L1984
+ ldr r0, .L2027+68
+ ldrh r0, [r4, r0]
+ cmp r0, #35
+ bhi .L1984
+.L1983:
+ ldr r0, .L2027+16
+ mov ip, #0
+ strh ip, [r4, r0] @ movhi
+.L1984:
+ ldrh r2, [r1, r2]
+ movw r0, #65535
+ ldr r8, [sp, #20]
+ ldr sl, .L2027
+ cmp r2, r3
+ cmpge r8, r0
+ movne r3, #0
+ moveq r3, #1
+ bne .L1985
+ ldr r3, .L2027+12
+ mvn r2, #0
+ strh r2, [sl, r3] @ movhi
+ add r3, r3, #572
+ mov r2, #0
+ strh r2, [sl, r3] @ movhi
+ mov r3, #400
+ ldrh r0, [sl, r3]
+ b .L1962
+.L1985:
+ cmp r2, #0
+ bne .L1986
+ movw r0, #65535
+ bl decrement_vpc_count
+ ldr r3, .L2027+16
+ ldrh r2, [r4, r3]
+ add r2, r2, #1
+ strh r2, [r4, r3] @ movhi
+ b .L2020
+.L1986:
+ strb r3, [sl, #-1748]
+ ldr r3, .L2027+20
+ ldrb r3, [r3, #80] @ zero_extendqisi2
+ cmp r3, #0
+ beq .L1987
+ mov r0, r5
+ bl ftl_get_blk_mode
+ strb r0, [sl, #-1748]
+.L1987:
+ ldr r4, .L2027
+ ldr r0, .L2027+52
+ bl make_superblock
+ movw r1, #402
+ mov r3, #0
+ strh r3, [r4, r1] @ movhi
+ ldr r1, .L2027+12
+ ldr r0, [r4, #-2064]
+ ldrh r1, [r4, r1]
+ mov r1, r1, asl #1
+ ldrh r0, [r0, r1]
+ mov r1, #404
+ strb r3, [r4, #-1750]
+ strh r0, [r4, r1] @ movhi
+ ldr r1, .L2027+56
+ strh r3, [r4, r1] @ movhi
+.L1978:
+ bl FtlReadRefresh
+ ldr r3, .L2027
+ mov r2, #1
+ movw r1, #3912
+ str r2, [r3, #-1000]
+ ldr r2, .L2027+20
+ ldrh r9, [r2, r1]
+ ldrb r1, [r2, #80] @ zero_extendqisi2
+ cmp r1, #0
+ beq .L1988
+ ldrb r1, [r3, #-1748] @ zero_extendqisi2
+ cmp r1, #1
+ movweq r1, #3914
+ ldreqh r9, [r2, r1]
+.L1988:
+ ldr r2, .L2027+56
+ mov sl, #0
+ ldr r4, .L2027
+ mov fp, r9
+ ldrh r3, [r3, r2]
+ add r2, r3, r6
+ cmp r2, r9
+ rsbgt r6, r3, r9
+ uxthgt r6, r6
+ b .L1990
+.L1992:
+ ldrh r1, [r2, #2]!
+ movw r8, #65535
+ add r3, r3, #1
+ cmp r1, r8
+ uxth r3, r3
+ orrne r1, ip, r1, asl #10
+ mlane r8, r0, r7, lr
+ addne r7, r7, #1
+ uxthne r7, r7
+ strne r1, [r8, #4]
+.L1998:
+ cmp r3, r5
+ bne .L1992
+ ldr r0, [r4, #-1160]
+ mov r1, r7
+ ldrb r2, [r4, #-1748] @ zero_extendqisi2
+ mov r5, #0
+ bl FlashReadPages
+ mov r9, r5
+ mov r8, r6
+ b .L1993
+.L1996:
+ ldr r3, [r4, #-1160]
+ add r2, r3, r5
+ ldr r3, [r3, r5]
+ ldr r6, [r2, #12]
+ cmn r3, #1
+ beq .L1994
+ ldrh r3, [r6, #0]
+ movw r0, #61589
+ cmp r3, r0
+ bne .L1994
+ add r1, sp, #28
+ mov r2, #0
+ ldr r0, [r6, #8]
+ bl log2phys
+ ldr r1, [r4, #-1160]
+ ldr r2, [sp, #28]
+ add r1, r1, r5
+ bic r2, r2, #-2147483648
+ ldr r3, [r1, #4]
+ cmp r2, r3
+ bne .L1994
+ movw r3, #402
+ ldr r0, [r4, #-1176]
+ ldrh r2, [r4, r3]
+ ldr r1, [r1, #16]
+ add r2, r2, #1
+ strh r2, [r4, r3] @ movhi
+ ldr r2, [r4, #-980]
+ mov r3, #36
+ mla r2, r3, r0, r2
+ str r1, [r2, #16]
+ str r2, [sp, #12]
+ str r3, [sp, #16]
+ bl Ftl_get_new_temp_ppa
+ ldr r2, [sp, #12]
+ ldr r1, [r4, #-1176]
+ str r0, [r2, #4]
+ ldr r3, [sp, #16]
+ ldr r2, [r4, #-980]
+ mla r3, r3, r1, r2
+ ldr r2, [r4, #-1160]
+ add r2, r2, r5
+ ldr r1, [r2, #8]
+ str r1, [r3, #8]
+ mov r1, #1
+ ldr r2, [r2, #12]
+ str r2, [r3, #12]
+ ldr r3, [sp, #28]
+ str r3, [r6, #12]
+ ldr r3, .L2027+28
+ ldrh r3, [r4, r3]
+ strh r3, [r6, #2] @ movhi
+ ldr r3, [r4, #-1844]
+ ldr r0, [r4, #-1160]
+ str r3, [r6, #4]
+ add r0, r0, r5
+ ldr r3, [r4, #-1176]
+ add r3, r3, #1
+ str r3, [r4, #-1176]
+ bl FtlGcBufAlloc
+ ldr r3, .L2027+20
+ ldrb r3, [r3, #80] @ zero_extendqisi2
+ cmp r3, #0
+ bne .L1995
+ ldrb r3, [r4, #-1941] @ zero_extendqisi2
+ ldr r2, [r4, #-1176]
+ cmp r2, r3
+ beq .L1995
+ ldr r3, .L2027+72
+ ldrh r3, [r4, r3]
+ cmp r3, #0
+ bne .L1994
+.L1995:
+ bl Ftl_gc_temp_data_write_back
+ cmp r0, #0
+ ldrne r3, .L2027
+ movne r2, #0
+ strne r2, [r3, #-1000]
+ movne r2, #400
+ bne .L2026
+.L1994:
+ add r9, r9, #1
+ add r5, r5, #36
+ uxth r9, r9
+.L1993:
+ cmp r9, r7
+ bne .L1996
+ add sl, sl, #1
+ mov r6, r8
+.L1990:
+ uxth r3, sl
+ ldr r2, .L2027+56
+ cmp r3, r6
+ ldr r3, .L2027
+ bcs .L1997
+ ldr r1, .L2027+20
+ movw r3, #3844
+ ldrh ip, [r4, r2]
+ mov r7, #0
+ ldr lr, [r4, #-1160]
+ mov r0, #36
+ ldrh r5, [r1, r3]
+ add ip, ip, sl
+ ldr r2, .L2027+76
+ mov r3, r7
+ b .L1998
+.L1997:
+ ldrh r1, [r3, r2]
+ mov r9, fp
+ add r6, r6, r1
+ uxth r6, r6
+ strh r6, [r3, r2] @ movhi
+ cmp r6, fp
+ bcs .L1999
+ movw r2, #402
+ mov r1, #404
+ ldrh r2, [r3, r2]
+ ldrh r3, [r3, r1]
+ cmp r2, r3
+ bne .L2000
+.L1999:
+ ldr r5, .L2027
+ ldr r3, [r5, #-1176]
+ cmp r3, #0
+ beq .L2001
+ bl Ftl_gc_temp_data_write_back
+ cmp r0, #0
+ movne r3, #0
+ strne r3, [r5, #-1000]
+ movne r3, #400
+ ldrneh r0, [r5, r3]
+ bne .L1962
+.L2001:
+ movw r2, #402
+ ldr r3, .L2027
+ ldrh ip, [r5, r2]
+ cmp ip, #0
+ bne .L2002
+ ldr r2, .L2027+12
+ ldr r0, [r3, #-2064]
+ ldrh r1, [r3, r2]
+ mov r1, r1, asl #1
+ ldrh r4, [r0, r1]
+ cmp r4, #0
+ beq .L2002
+ strh ip, [r0, r1] @ movhi
+ ldrh r0, [r3, r2]
+ bl update_vpc_list
+ bl FtlCacheWriteBack
+ bl l2p_flush
+ bl FtlVpcTblFlush
+.L2002:
+ ldr r3, .L2027+12
+ mvn r1, #0
+ ldr r2, .L2027
+ strh r1, [r2, r3] @ movhi
+.L2000:
+ ldr r3, .L2027
+ ldr r2, .L2027+32
+ ldrh r2, [r3, r2]
+ cmp r2, #2
+ ldrls r2, .L2027+20
+ movwls r3, #3912
+ ldrlsh r6, [r2, r3]
+ bls .L2021
+.L2003:
+ mov r1, #0
+ str r1, [r3, #-1000]
+ mov r1, #400
+ ldrh r0, [r3, r1]
+ cmp r0, #0
+ addeq r0, r2, #1
+.L1962:
+ add sp, sp, #36
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L2028:
+ .align 2
+.L2027:
+ .word .LANCHOR2
+ .word -1136
+ .word -1138
+ .word -1756
+ .word -1184
+ .word .LANCHOR0
+ .word .LC116
+ .word -1948
+ .word -2048
+ .word -1190
+ .word -1192
+ .word .LC117
+ .word -1772
+ .word .LANCHOR2-1756
+ .word -1754
+ .word -2044
+ .word -1996
+ .word -1152
+ .word -1944
+ .word .LANCHOR2-1742
+ .fnend
+ .size rk_ftl_garbage_collect.part.19, .-rk_ftl_garbage_collect.part.19
+ .align 2
+ .global rk_ftl_garbage_collect
+ .type rk_ftl_garbage_collect, %function
+rk_ftl_garbage_collect:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r4, r0
+ ldr r3, .L2035
+ mov r5, r1
+ ldr r0, [r3, #-1000]
+ cmp r0, #0
+ movne r0, #0
+ ldmnefd sp!, {r3, r4, r5, pc}
+ ldr r2, .L2035+4
+ ldrh r2, [r3, r2]
+ cmp r2, #47
+ ldmlsfd sp!, {r3, r4, r5, pc}
+ ldr r1, .L2035+8
+ movw r2, #3000
+ ldrh r1, [r1, r2]
+ movw r2, #65535
+ cmp r1, r2
+ beq .L2031
+ ldr r1, .L2035+12
+ ldrh r3, [r3, r1]
+ cmp r3, r2
+ beq .L2031
+ mov r0, #1
+ bl FtlGcFreeTempBlock
+ cmp r0, #0
+ bne .L2034
+.L2031:
+ mov r0, r4
+ mov r1, r5
+ ldmfd sp!, {r3, r4, r5, lr}
+ b rk_ftl_garbage_collect.part.19
+.L2034:
+ mov r0, #1
+ ldmfd sp!, {r3, r4, r5, pc}
+.L2036:
+ .align 2
+.L2035:
+ .word .LANCHOR2
+ .word -2056
+ .word .LANCHOR1
+ .word -1948
+ .fnend
+ .size rk_ftl_garbage_collect, .-rk_ftl_garbage_collect
+ .align 2
+ .global FtlCacheWriteBack
+ .type FtlCacheWriteBack, %function
+FtlCacheWriteBack:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L2059
+ stmfd sp!, {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr}
+ ldr r4, [r3, #408]
+ ldr r3, .L2059+4
+ ldr r1, [r3, #3964]
+ cmp r1, #0
+ beq .L2038
+ ldrb r8, [r3, #80] @ zero_extendqisi2
+ cmp r8, #0
+ beq .L2039
+ ldrb r8, [r4, #8] @ zero_extendqisi2
+ sub lr, r8, #1
+ rsbs r8, lr, #0
+ adc r8, r8, lr
+.L2039:
+ ldr r0, [r3, #3968]
+ mov r2, r8
+ ldrb r3, [r4, #9] @ zero_extendqisi2
+ mov r5, #0
+ bl FlashProgPages
+ mov r7, r5
+ ldr r6, .L2059+4
+ ldr r9, .L2059
+ b .L2040
+.L2045:
+ ldr r2, [r6, #3968]
+ add r3, r2, r5
+ ldr r2, [r2, r5]
+ cmn r2, #1
+ beq .L2058
+ ldr r2, [r3, #4]
+ cmp r8, #0
+ ldr r0, [r3, #16]
+ add r1, sp, #4
+ str r2, [sp, #4]
+ orrne r2, r2, #-2147483648
+ strne r2, [sp, #4]
+ mov r2, #1
+ bl log2phys
+ ldr r3, [r6, #3968]
+ add r3, r3, r5
+ ldr r3, [r3, #12]
+ ldr r0, [r3, #12]
+ cmn r0, #1
+ beq .L2043
+ ubfx r0, r0, #10, #16
+ bl P2V_block_in_plane
+ ldr r2, [r9, #-2064]
+ mov r3, r0, asl #1
+ mov sl, r0
+ ldrh r2, [r2, r3]
+ cmp r2, #0
+ bne .L2044
+ ldr r0, .L2059+8
+ mov r1, sl
+ bl printk
+.L2044:
+ mov r0, sl
+ bl decrement_vpc_count
+.L2043:
+ add r7, r7, #1
+ add r5, r5, #36
+.L2040:
+ ldr r3, [r6, #3964]
+ cmp r7, r3
+ bcc .L2045
+ b .L2046
+.L2054:
+ ldr r3, [r6, #3968]
+ mvn r2, #0
+ movw sl, #3912
+ str r2, [r3, r5]
+ b .L2047
+.L2050:
+ ldr r0, [r3, #4]
+ ubfx r0, r0, #10, #16
+ bl P2V_block_in_plane
+ ldrh r3, [r4, #0]
+ cmp r3, r0
+ bne .L2048
+ ldr r2, [r7, #-2064]
+ mov r3, r3, asl #1
+ ldrh r1, [r4, #4]
+ ldrh r0, [r2, r3]
+ rsb r1, r1, r0
+ strh r1, [r2, r3] @ movhi
+ ldrh r3, [r6, sl]
+ strh r3, [r4, #2] @ movhi
+ mov r3, #0
+ strb r3, [r4, #6]
+ strh r3, [r4, #4] @ movhi
+.L2048:
+ ldrh r3, [r4, #4]
+ cmp r3, #0
+ bne .L2049
+ mov r0, r4
+ bl allocate_new_data_superblock
+.L2049:
+ ldr r3, [r7, #-1608]
+ add r3, r3, #1
+ str r3, [r7, #-1608]
+ ldr r3, [r6, #3968]
+ add r3, r3, r5
+ ldr r0, [r3, #4]
+ ubfx r0, r0, #10, #16
+ bl FtlGcMarkBadPhyBlk
+ mov r0, r4
+ bl get_new_active_ppa
+ mov r1, #1
+ mov r2, r8
+ mov r3, r0
+ str r0, [sp, #4]
+ ldr r0, [r6, #3968]
+ add r0, r0, r5
+ str r3, [r0, #4]
+ ldrb r3, [r4, #9] @ zero_extendqisi2
+ bl FlashProgPages
+.L2047:
+ ldr r2, [r6, #3968]
+ add r3, r2, r5
+ ldr r2, [r2, r5]
+ cmn r2, #1
+ beq .L2050
+ ldr r2, [r3, #4]
+ cmp r8, #0
+ ldr r0, [r3, #16]
+ add r1, sp, #4
+ str r2, [sp, #4]
+ orrne r2, r2, #-2147483648
+ strne r2, [sp, #4]
+ mov r2, #1
+ bl log2phys
+ ldr r3, [r6, #3968]
+ add r3, r3, r5
+ ldr r3, [r3, #12]
+ ldr r0, [r3, #12]
+ cmn r0, #1
+ beq .L2052
+ ubfx r0, r0, #10, #16
+ bl P2V_block_in_plane
+ ldr r2, [r7, #-2064]
+ mov r3, r0, asl #1
+ mov sl, r0
+ ldrh r2, [r2, r3]
+ cmp r2, #0
+ bne .L2053
+ ldr r0, .L2059+8
+ mov r1, sl
+ bl printk
+.L2053:
+ mov r0, sl
+ bl decrement_vpc_count
+.L2052:
+ add r9, r9, #1
+ add r5, r5, #36
+ b .L2041
+.L2058:
+ ldr r6, .L2059+4
+ mov r5, #0
+ ldr r7, .L2059
+ mov r9, r5
+.L2041:
+ ldr r3, [r6, #3964]
+ cmp r9, r3
+ bcc .L2054
+ movw r4, #16386
+ ldr r6, .L2059
+ ldr r5, .L2059+12
+ b .L2055
+.L2056:
+ mov r0, #1
+ mov r1, r0
+ bl rk_ftl_garbage_collect
+ subs r4, r4, #1
+ beq .L2046
+.L2055:
+ ldrh r3, [r6, r5]
+ cmp r3, #0
+ bne .L2056
+.L2046:
+ ldr r3, .L2059+4
+ mov r2, #0
+ str r2, [r3, #3964]
+.L2038:
+ mov r0, #0
+ ldmfd sp!, {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}
+.L2060:
+ .align 2
+.L2059:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .word .LC118
+ .word -1134
+ .fnend
+ .size FtlCacheWriteBack, .-FtlCacheWriteBack
+ .align 2
+ .global rk_ftl_cache_write_back
+ .type rk_ftl_cache_write_back, %function
+rk_ftl_cache_write_back:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ b FtlCacheWriteBack
+ .fnend
+ .size rk_ftl_cache_write_back, .-rk_ftl_cache_write_back
+ .align 2
+ .global FtlGcFreeTempBlock
+ .type FtlGcFreeTempBlock, %function
+FtlGcFreeTempBlock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr}
+ movw r3, #3912
+ ldr r2, .L2083
+ ldrh r1, [r2, r3]
+ ldr r2, .L2083+4
+ ldr r3, .L2083+8
+ ldrh r4, [r3, r2]
+ movw r2, #65535
+ cmp r4, r2
+ beq .L2063
+ cmp r0, #0
+ beq .L2064
+ ldr ip, .L2083+12
+ movw r0, #3000
+ ldrh lr, [ip, r0]
+ cmp lr, r2
+ movne r1, #2
+ bne .L2064
+ mov r2, #0
+ strh r2, [ip, r0] @ movhi
+ sub r2, r2, #2048
+ ldrh r3, [r3, r2]
+ cmp r3, #17
+ movhi r1, #2
+.L2064:
+ ldr r0, .L2083+16
+ bl FtlGcScanTempBlk
+ cmn r0, #1
+ str r0, [sp, #4]
+ beq .L2065
+ ldr r3, .L2083+8
+ mov r4, r4, asl #1
+ ldr r3, [r3, #-2084]
+ ldrh r2, [r3, r4]
+ cmp r2, #4
+ bls .L2066
+ sub r2, r2, #5
+ mov r0, #1
+ strh r2, [r3, r4] @ movhi
+ bl FtlEctTblFlush
+.L2066:
+ ldr r3, .L2083+8
+ ldr r2, [r3, #-1016]
+ cmp r2, #0
+ bne .L2067
+ ldr r2, [r3, #-1608]
+ ldr r0, [sp, #4]
+ add r2, r2, #1
+ str r2, [r3, #-1608]
+ ubfx r0, r0, #10, #16
+ bl FtlBbmMapBadBlock
+ bl FtlBbmTblFlush
+.L2067:
+ ldr r3, .L2083+8
+ mov r2, #0
+ str r2, [r3, #-1016]
+ b .L2078
+.L2065:
+ ldr r2, .L2083+12
+ movw r3, #3000
+ ldrh r2, [r2, r3]
+ movw r3, #65535
+ cmp r2, r3
+ bne .L2078
+.L2063:
+ ldr r6, .L2083+8
+ movw r3, #65535
+ ldr r5, .L2083+4
+ mov r4, #0
+ str r4, [r6, #-1016]
+ ldrh r2, [r6, r5]
+ cmp r2, r3
+ moveq r0, r4
+ beq .L2068
+ bl FtlCacheWriteBack
+ ldr ip, .L2083
+ movw r0, #3912
+ ldrb r1, [r6, #-1941] @ zero_extendqisi2
+ ldrh r3, [r6, r5]
+ ldrh r0, [ip, r0]
+ ldr r2, [r6, #-2064]
+ ldr sl, .L2083+20
+ mov r3, r3, asl #1
+ mul r1, r0, r1
+ strh r1, [r2, r3] @ movhi
+ ldr r3, [r6, #-1860]
+ ldrh r2, [r6, sl]
+ add r3, r2, r3
+ str r3, [r6, #-1860]
+ b .L2069
+.L2072:
+ mov r7, #12
+ ldr r8, [r6, #-1144]
+ mul r7, r7, r4
+ add r1, sp, #4
+ mov r2, #0
+ add r5, r8, r7
+ ldr r0, [r5, #8]
+ bl log2phys
+ ldr r0, [sp, #4]
+ ldr r3, [r8, r7]
+ cmp r0, r3
+ bne .L2070
+ ubfx r0, r0, #10, #16
+ bl P2V_block_in_plane
+ add r1, r5, #4
+ mov r2, #1
+ mov r7, r0
+ ldr r0, [r5, #8]
+ bl log2phys
+ mov r0, r7
+ b .L2081
+.L2070:
+ ldr r3, [r5, #4]
+ cmp r0, r3
+ beq .L2071
+ ldr r3, .L2083+4
+ ldrh r0, [r6, r3]
+.L2081:
+ bl decrement_vpc_count
+.L2071:
+ add r4, r4, #1
+ uxth r4, r4
+.L2069:
+ ldrh r3, [r6, sl]
+ ldr r5, .L2083+8
+ cmp r3, r4
+ bhi .L2072
+ movw r0, #65535
+ bl decrement_vpc_count
+ ldr r3, .L2083+4
+ ldr r1, [r5, #-2064]
+ ldrh r0, [r5, r3]
+ mov r5, r3
+ mov r2, r0, asl #1
+ ldrh r2, [r1, r2]
+ cmp r2, #0
+ beq .L2073
+ bl INSERT_DATA_LIST
+ b .L2074
+.L2073:
+ bl INSERT_FREE_LIST
+.L2074:
+ ldr r4, .L2083+8
+ mvn r3, #0
+ ldr r2, .L2083+20
+ strh r3, [r4, r5] @ movhi
+ mov r3, #0
+ strh r3, [r4, r2] @ movhi
+ ldr r2, .L2083+24
+ strh r3, [r4, r2] @ movhi
+ bl l2p_flush
+ bl FtlVpcTblFlush
+ ldr r3, [r4, #-1884]
+ mov r1, r4
+ ldr r2, .L2083+28
+ cmp r3, #0
+ beq .L2075
+ ldr r3, [r4, #-1824]
+ cmp r3, #29
+ bhi .L2075
+ ldrh r3, [r4, r2]
+ sub r2, r2, #276
+ mvn r1, #0
+ ldrh r2, [r4, r2]
+ cmp r2, r3
+ movcc r3, r3, asl #1
+ ldrcc r2, .L2083+32
+ strcch r3, [r4, r2] @ movhi
+ ldr r3, .L2083+36
+ ldr r2, .L2083+8
+ b .L2082
+.L2075:
+ ldr r0, .L2083+40
+ ldrh r2, [r1, r2]
+ ldr r3, .L2083+8
+ ldrh r0, [r1, r0]
+ add r2, r2, r2, asl #1
+ cmp r0, r2, lsr #2
+ ble .L2080
+ ldr r2, .L2083+36
+ mvn r1, #0
+ strh r1, [r3, r2] @ movhi
+ add r2, r2, #564
+ mov r1, #20
+.L2082:
+ strh r1, [r3, r2] @ movhi
+ b .L2080
+.L2078:
+ mov r0, #1
+ b .L2068
+.L2080:
+ mov r0, #0
+.L2068:
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc}
+.L2084:
+ .align 2
+.L2083:
+ .word .LANCHOR0
+ .word -1948
+ .word .LANCHOR2
+ .word .LANCHOR1
+ .word .LANCHOR2-1948
+ .word -1140
+ .word -1152
+ .word -1772
+ .word -1192
+ .word -1756
+ .word -2048
+ .fnend
+ .size FtlGcFreeTempBlock, .-FtlGcFreeTempBlock
+ .align 2
+ .global Ftl_gc_temp_data_write_back
+ .type Ftl_gc_temp_data_write_back, %function
+Ftl_gc_temp_data_write_back:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ ldr r3, .L2094
+ ldrb r3, [r3, #80] @ zero_extendqisi2
+ cmp r3, #0
+ ldr r3, .L2094+4
+ beq .L2086
+ ldr r2, [r3, #-1176]
+ tst r2, #1
+ beq .L2086
+ ldr r2, .L2094+8
+ ldrh r2, [r3, r2]
+ cmp r2, #0
+ bne .L2091
+.L2086:
+ mov r2, #0
+ ldr r0, [r3, #-980]
+ ldr r1, [r3, #-1176]
+ mov r3, r2
+ bl FlashProgPages
+ mov r4, #0
+ ldr r5, .L2094+4
+ mov r6, #36
+ b .L2088
+.L2090:
+ mul r3, r6, r4
+ ldr r1, [r5, #-980]
+ add r2, r1, r3
+ ldr r1, [r1, r3]
+ cmn r1, #1
+ bne .L2089
+ ldr r2, .L2094+12
+ mov lr, #0
+ ldr ip, [r7, #-2064]
+ ldrh r0, [r7, r2]
+ mov r0, r0, asl #1
+ strh lr, [ip, r0] @ movhi
+ strh r1, [r7, r2] @ movhi
+ ldr r2, [r7, #-1608]
+ add r2, r2, #1
+ str r2, [r7, #-1608]
+ ldr r2, [r7, #-980]
+ add r3, r2, r3
+ ldr r0, [r3, #4]
+ ubfx r0, r0, #10, #16
+ bl FtlBbmMapBadBlock
+ bl FtlBbmTblFlush
+ bl FtlGcPageVarInit
+ b .L2093
+.L2089:
+ ldr r3, [r2, #12]
+ add r4, r4, #1
+ ldr r1, [r2, #4]
+ uxth r4, r4
+ ldr r0, [r3, #12]
+ ldr r2, [r3, #8]
+ bl FtlGcUpdatePage
+.L2088:
+ ldr r1, [r5, #-1176]
+ ldr r7, .L2094+4
+ cmp r4, r1
+ bcc .L2090
+ ldr r0, [r7, #-980]
+ bl FtlGcBufFree
+ ldr r3, .L2094+8
+ mov r0, #0
+ str r0, [r7, #-1176]
+ ldrh r3, [r7, r3]
+ cmp r3, r0
+ ldmnefd sp!, {r3, r4, r5, r6, r7, pc}
+ mov r0, #1
+ bl FtlGcFreeTempBlock
+.L2093:
+ mov r0, #1
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L2091:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, r6, r7, pc}
+.L2095:
+ .align 2
+.L2094:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -1944
+ .word -1948
+ .fnend
+ .size Ftl_gc_temp_data_write_back, .-Ftl_gc_temp_data_write_back
+ .align 2
+ .global FtlGcPageRecovery
+ .type FtlGcPageRecovery, %function
+FtlGcPageRecovery:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ movw r5, #3912
+ ldr r6, .L2098
+ ldr r0, .L2098+4
+ ldr r4, .L2098+8
+ ldrh r1, [r6, r5]
+ bl FtlGcScanTempBlk
+ ldr r3, .L2098+12
+ ldrh r2, [r4, r3]
+ ldrh r3, [r6, r5]
+ cmp r2, r3
+ ldmccfd sp!, {r4, r5, r6, pc}
+ sub r0, r4, #1088
+ bl FtlMapBlkWriteDumpData
+ mov r0, #0
+ bl FtlGcFreeTempBlock
+ mov r3, #0
+ str r3, [r4, #-1016]
+ ldmfd sp!, {r4, r5, r6, pc}
+.L2099:
+ .align 2
+.L2098:
+ .word .LANCHOR0
+ .word .LANCHOR2-1948
+ .word .LANCHOR2
+ .word -1946
+ .fnend
+ .size FtlGcPageRecovery, .-FtlGcPageRecovery
+ .align 2
+ .global FtlPowerLostRecovery
+ .type FtlPowerLostRecovery, %function
+FtlPowerLostRecovery:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ movw r2, #266
+ ldr r3, .L2101
+ mov r4, #0
+ ldr r5, .L2101+4
+ strh r4, [r3, r2] @ movhi
+ str r4, [r3, #268]
+ mov r0, r5
+ bl FtlRecoverySuperblock
+ mov r0, r5
+ add r5, r5, #48
+ bl FtlSlcSuperblockCheck
+ mov r0, r5
+ bl FtlRecoverySuperblock
+ mov r0, r5
+ bl FtlSlcSuperblockCheck
+ bl FtlGcPageRecovery
+ movw r0, #65535
+ bl decrement_vpc_count
+ mov r0, r4
+ ldmfd sp!, {r3, r4, r5, pc}
+.L2102:
+ .align 2
+.L2101:
+ .word .LANCHOR2
+ .word .LANCHOR2-2044
+ .fnend
+ .size FtlPowerLostRecovery, .-FtlPowerLostRecovery
+ .align 2
+ .global FtlSysBlkInit
+ .type FtlSysBlkInit, %function
+FtlSysBlkInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ ldr r5, .L2114
+ ldr r4, .L2114+4
+ ldr r0, [r5, #3848]
+ uxth r0, r0
+ bl FtlFreeSysBlkQueueInit
+ bl FtlScanSysBlk
+ ldr r3, .L2114+8
+ ldrh r2, [r4, r3]
+ movw r3, #65535
+ cmp r2, r3
+ beq .L2112
+ bl FtlLoadSysInfo
+ subs r6, r0, #0
+ bne .L2112
+ bl FtlLoadMapInfo
+ bl FtlLoadVonderInfo
+ bl Ftl_load_ext_data
+ bl FtlLoadEctTbl
+ bl FtlFreeSysBLkSort
+ bl SupperBlkListInit
+ bl FtlPowerLostRecovery
+ movw r3, #3950
+ ldrh r2, [r5, r3]
+ mov r3, r6
+ ldr r1, [r4, #-1900]
+ b .L2105
+.L2107:
+ add r0, r1, r6
+ add r6, r6, #12
+ ldr r0, [r0, #4]
+ cmp r0, #0
+ blt .L2106
+ add r3, r3, #1
+.L2105:
+ cmp r3, r2
+ blt .L2107
+.L2106:
+ ldr r4, .L2114+4
+ cmp r3, r2
+ ldr r1, .L2114+12
+ ldrh r0, [r4, r1]
+ add r0, r0, #1
+ strh r0, [r4, r1] @ movhi
+ blt .L2108
+ movw r3, #266
+ ldrh r3, [r4, r3]
+ cmp r3, #0
+ beq .L2109
+.L2108:
+ ldr r0, .L2114+16
+ bl FtlSuperblockPowerLostFix
+ ldr r0, .L2114+20
+ bl FtlSuperblockPowerLostFix
+ ldr r0, .L2114+24
+ bl FtlMapBlkWriteDumpData
+ ldr r0, .L2114+28
+ bl FtlMapBlkWriteDumpData
+ ldr r3, .L2114+32
+ ldrh r2, [r4, r3]
+ add r2, r2, #1
+ strh r2, [r4, r3] @ movhi
+ bl l2p_flush
+ bl FtlVpcTblFlush
+ bl FtlVpcTblFlush
+.L2109:
+ mov r0, #1
+ ldr r4, .L2114+4
+ bl FtlUpdateVaildLpn
+ ldr r3, .L2114+36
+ ldrh r0, [r4, r3]
+ movw r3, #65535
+ cmp r0, r3
+ beq .L2110
+ ldr r3, .L2114+40
+ ldrh r3, [r4, r3]
+ cmp r3, #0
+ bne .L2110
+ ldr r3, .L2114+44
+ ldrh r3, [r4, r3]
+ cmp r3, #0
+ bne .L2110
+ bl FtlGcRefreshBlock
+ ldr r3, .L2114+48
+ ldrh r0, [r4, r3]
+ bl FtlGcRefreshBlock
+ ldr r0, .L2114+16
+ bl allocate_new_data_superblock
+ ldr r0, .L2114+20
+ bl allocate_new_data_superblock
+ add r0, r4, #224
+ bl FtlMapBlkWriteDumpData
+.L2110:
+ ldr r3, .L2114+12
+ ldr r2, .L2114+4
+ ldrh r0, [r2, r3]
+ ands r4, r0, #31
+ bne .L2113
+ bl FtlVpcCheckAndModify
+ mov r0, r4
+ ldmfd sp!, {r4, r5, r6, pc}
+.L2112:
+ mvn r0, #0
+ ldmfd sp!, {r4, r5, r6, pc}
+.L2113:
+ mov r0, #0
+ ldmfd sp!, {r4, r5, r6, pc}
+.L2115:
+ .align 2
+.L2114:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -1768
+ .word -1792
+ .word .LANCHOR2-2044
+ .word .LANCHOR2-1996
+ .word .LANCHOR2-1088
+ .word .LANCHOR2+224
+ .word -1790
+ .word -2044
+ .word -2040
+ .word -1992
+ .word -1996
+ .fnend
+ .size FtlSysBlkInit, .-FtlSysBlkInit
+ .align 2
+ .global FtlInit
+ .type FtlInit, %function
+FtlInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+.L2117:
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mvn r3, #0
+ ldr r4, .L2119
+ mov r2, #0
+ ldr r1, .L2119+4
+ mov r5, r0
+ ldr r0, .L2119+8
+ str r3, [r4, #2960]
+ ldr r3, .L2119+12
+ str r2, [r3, #412]
+ bl printk
+ mov r0, r5
+ bl FtlConstantsInit
+ bl FtlMemInit
+ bl FtlVariablesInit
+ ldr r3, .L2119+16
+ ldr r0, [r3, #3848]
+ uxth r0, r0
+ bl FtlFreeSysBlkQueueInit
+ bl FtlLoadBbt
+ cmp r0, #0
+ bne .L2118
+ bl FtlSysBlkInit
+ cmp r0, #0
+ moveq r3, #1
+ streq r3, [r4, #2960]
+.L2118:
+ mov r0, #0
+ ldmfd sp!, {r3, r4, r5, pc}
+.L2120:
+ .align 2
+.L2119:
+ .word .LANCHOR1
+ .word .LC76
+ .word .LC75
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .fnend
+ .size FtlInit, .-FtlInit
+ .align 2
+ .global rk_ftl_init
+ .type rk_ftl_init, %function
+rk_ftl_init:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r0, #2048
+ bl ftl_malloc
+ ldr r4, .L2125
+ mov r5, #0
+ add r1, r4, #420
+ str r5, [r4, #112]
+ str r5, [r4, #420]
+ str r0, [r4, #416]
+ add r0, r4, #112
+ bl rknand_get_reg_addr
+ ldr r3, [r4, #112]
+ cmp r3, r5
+ mvneq r4, #0
+ beq .L2122
+ bl rk_nandc_irq_init
+ ldr r0, [r4, #416]
+ mov r1, r5
+ mov r2, r5
+ mov r3, #2048
+ bl FlashSramLoadStore
+ bl rknand_flash_cs_init
+ ldr r0, [r4, #112]
+ bl FlashInit
+ subs r4, r0, #0
+ bne .L2123
+ ldr r0, .L2125+4
+ bl FtlInit
+.L2123:
+ ldr r0, .L2125+8
+ mov r1, r4
+ bl printk
+.L2122:
+ mov r0, r4
+ ldmfd sp!, {r3, r4, r5, pc}
+.L2126:
+ .align 2
+.L2125:
+ .word .LANCHOR2
+ .word .LANCHOR0+2200
+ .word .LC119
+ .fnend
+ .size rk_ftl_init, .-rk_ftl_init
+ .align 2
+ .global Ftl_get_new_temp_ppa
+ .type Ftl_get_new_temp_ppa, %function
+Ftl_get_new_temp_ppa:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ ldr r3, .L2130
+ ldr r5, .L2130+4
+ ldrh r2, [r5, r3]
+ movw r3, #65535
+ cmp r2, r3
+ beq .L2128
+ ldr r3, .L2130+8
+ ldrh r3, [r5, r3]
+ cmp r3, #0
+ bne .L2129
+.L2128:
+ bl FtlCacheWriteBack
+ mov r0, #0
+ bl FtlGcFreeTempBlock
+ ldr r0, .L2130+12
+ mov r4, #0
+ strb r4, [r5, #-1940]
+ bl allocate_data_superblock
+ ldr r3, .L2130+16
+ strh r4, [r5, r3] @ movhi
+ add r3, r3, #12
+ strh r4, [r5, r3] @ movhi
+ bl l2p_flush
+ bl FtlVpcTblFlush
+ mov r0, r4
+ bl FtlEctTblFlush
+.L2129:
+ ldr r0, .L2130+12
+ ldmfd sp!, {r3, r4, r5, lr}
+ b get_new_active_ppa
+.L2131:
+ .align 2
+.L2130:
+ .word -1948
+ .word .LANCHOR2
+ .word -1944
+ .word .LANCHOR2-1948
+ .word -1152
+ .fnend
+ .size Ftl_get_new_temp_ppa, .-Ftl_get_new_temp_ppa
+ .align 2
+ .global FtlDiscard
+ .type FtlDiscard, %function
+FtlDiscard:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r4, r5, r6, r7, lr}
+ .save {r0, r1, r2, r4, r5, r6, r7, lr}
+ add r2, r1, r0
+ ldr r5, .L2141
+ mov r7, r0
+ mov r4, r1
+ ldr r3, [r5, #3952]
+ cmp r2, r3
+ mvnhi r0, #0
+ bhi .L2133
+ cmp r1, #31
+ movls r0, #0
+ bls .L2133
+ bl FtlCacheWriteBack
+ movw r3, #3918
+ ldrh r6, [r5, r3]
+ mov r0, r7
+ mov r1, r6
+ bl __aeabi_uidiv
+ mls r7, r0, r6, r7
+ mov r5, r0
+ uxth r7, r7
+ cmp r7, #0
+ beq .L2134
+ rsb r6, r7, r6
+ add r5, r0, #1
+ cmp r6, r4
+ movcs r6, r4
+ uxth r6, r6
+ rsb r4, r6, r4
+.L2134:
+ mvn r3, #0
+ ldr r7, .L2141
+ str r3, [sp, #4]
+ movw r6, #3918
+ b .L2135
+.L2137:
+ mov r0, r5
+ mov r1, sp
+ mov r2, #0
+ bl log2phys
+ ldr r3, [sp, #0]
+ cmn r3, #1
+ beq .L2136
+ ldr r3, .L2141+4
+ add r1, sp, #4
+ mov r0, r5
+ ldr r2, [r3, #424]
+ add r2, r2, #1
+ str r2, [r3, #424]
+ ldr r2, [r3, #-1876]
+ add r2, r2, #1
+ str r2, [r3, #-1876]
+ mov r2, #1
+ bl log2phys
+ ldr r0, [sp, #0]
+ ubfx r0, r0, #10, #16
+ bl P2V_block_in_plane
+ bl decrement_vpc_count
+.L2136:
+ ldrh r3, [r7, r6]
+ add r5, r5, #1
+ rsb r4, r3, r4
+.L2135:
+ ldrh r3, [r7, r6]
+ cmp r4, r3
+ bcs .L2137
+ ldr r3, .L2141+4
+ mov r4, #0
+ ldr r2, [r3, #424]
+ cmp r2, #32
+ bls .L2140
+ str r4, [r3, #424]
+ bl l2p_flush
+ bl FtlVpcTblFlush
+.L2140:
+ mov r0, r4
+.L2133:
+ ldmfd sp!, {r1, r2, r3, r4, r5, r6, r7, pc}
+.L2142:
+ .align 2
+.L2141:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size FtlDiscard, .-FtlDiscard
+ .align 2
+ .global FtlSysFlush
+ .type FtlSysFlush, %function
+FtlSysFlush:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ bl FtlCacheWriteBack
+ bl l2p_flush
+ bl FtlVpcTblFlush
+ mov r0, #1
+ bl FtlEctTblFlush
+ mov r0, #0
+ ldmfd sp!, {r3, pc}
+ .fnend
+ .size FtlSysFlush, .-FtlSysFlush
+ .align 2
+ .global FtlDeInit
+ .type FtlDeInit, %function
+FtlDeInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ ldr r3, .L2146
+ ldr r3, [r3, #2960]
+ cmp r3, #1
+ bne .L2145
+ bl FtlSysFlush
+.L2145:
+ mov r0, #0
+ ldmfd sp!, {r3, pc}
+.L2147:
+ .align 2
+.L2146:
+ .word .LANCHOR1
+ .fnend
+ .size FtlDeInit, .-FtlDeInit
+ .align 2
+ .global rk_ftl_de_init
+ .type rk_ftl_de_init, %function
+rk_ftl_de_init:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ bl rk_nand_de_init
+ bl FtlDeInit
+ ldmfd sp!, {r3, lr}
+ b rk_nand_de_init
+ .fnend
+ .size rk_ftl_de_init, .-rk_ftl_de_init
+ .align 2
+ .global FtlWrite
+ .type FtlWrite, %function
+FtlWrite:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 96
+ @ frame_needed = 0, uses_anonymous_args = 0
+ cmp r0, #16
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r4, r1
+ .pad #100
+ sub sp, sp, #100
+ mov r5, r2
+ mov r8, r3
+ bne .L2150
+ add r0, r1, #256
+ mov r1, r2
+ mov r2, r3
+ bl FtlVendorPartWrite
+ b .L2151
+.L2150:
+ ldr r9, .L2199
+ add r7, r2, r1
+ ldr r3, [r9, #3952]
+ cmp r7, r3
+ mvnhi r0, #0
+ bhi .L2151
+ ldr r6, .L2199+4
+ mov r3, #2048
+ mov r0, r1
+ str r3, [r6, #428]
+ movw r3, #3918
+ ldrh sl, [r9, r3]
+ mov r1, sl
+ bl __aeabi_uidiv
+ mov r1, sl
+ str r0, [sp, #20]
+ sub r0, r7, #1
+ bl __aeabi_uidiv
+ ldr r3, [sp, #20]
+ cmp r5, #8
+ rsb fp, r3, r0
+ ldr r3, [r6, #-1872]
+ add r7, fp, #1
+ str r7, [sp, #16]
+ add r3, r7, r3
+ str r3, [r6, #-1872]
+ ldr r3, [r6, #-1856]
+ str r0, [sp, #44]
+ add r3, r5, r3
+ str r3, [r6, #-1856]
+ ldr r3, .L2199+8
+ add r7, r3, #48
+ movhi r7, r3
+ ldr r3, [r9, #3964]
+ cmp r3, #0
+ beq .L2185
+ ldr r2, [r9, #3968]
+ sub r3, r3, #1
+ mov r7, #36
+ ldr lr, [sp, #20]
+ mla r7, r7, r3, r2
+ ldr r3, [r7, #16]
+ cmp lr, r3
+ strne r5, [sp, #32]
+ bne .L2154
+ ldr r3, [r6, #-1868]
+ mov r0, r4
+ mov r1, sl
+ add r3, r3, #1
+ str r3, [r6, #-1868]
+ ldr r3, [r6, #432]
+ add r3, r3, #1
+ str r3, [r6, #432]
+ bl __aeabi_uidivmod
+ ldr r0, [r7, #8]
+ rsb r9, r1, sl
+ add r0, r0, r1, asl #9
+ cmp r9, r5
+ movcs r9, r5
+ mov r1, r8
+ mov r3, r9, asl #9
+ str r3, [sp, #4]
+ mov r2, r3
+ bl memcpy
+ cmp fp, #0
+ ldr r3, [sp, #4]
+ bne .L2155
+ ldr r2, [r6, #432]
+ cmp r2, #2
+ movle r0, fp
+ ble .L2151
+.L2155:
+ add r8, r8, r3
+ add r4, r4, r9
+ ldr r3, [sp, #20]
+ rsb r7, r9, r5
+ str fp, [sp, #16]
+ add r3, r3, #1
+ str r7, [sp, #32]
+ str r3, [sp, #20]
+.L2154:
+ ldr r3, .L2199+4
+ mov r2, #0
+ ldr r7, [r3, #408]
+ str r2, [r3, #432]
+ b .L2153
+.L2185:
+ str r5, [sp, #32]
+.L2153:
+ ldr r0, [sp, #20]
+ ldr r1, [sp, #44]
+ bl FtlCacheMetchLpa
+ cmp r0, #0
+ beq .L2156
+ bl FtlCacheWriteBack
+.L2156:
+ cmp r5, sl, asl #1
+ ldr r5, .L2199
+ mov fp, #0
+ ldr r6, [sp, #20]
+ movcc r3, #0
+ movcs r3, #1
+ str r3, [sp, #24]
+ ldr r3, .L2199+4
+ mov sl, r5
+ str fp, [sp, #40]
+ mov r9, r8
+ str r7, [r3, #408]
+ b .L2196
+.L2182:
+ ldrh r1, [r7, #4]
+ cmp r1, #0
+ bne .L2158
+ ldr r3, .L2199+8
+ ldr r2, .L2199+4
+ cmp r7, r3
+ ldr r8, .L2199+12
+ bne .L2159
+ ldr r3, .L2199+16
+ ldrh r3, [r2, r3]
+ cmp r3, #0
+ bne .L2160
+ ldr r0, .L2199+20
+ str r3, [sp, #4]
+ bl allocate_new_data_superblock
+ ldr r3, [sp, #4]
+ str r3, [r8, #3004]
+.L2160:
+ ldr r0, .L2199+8
+ bl allocate_new_data_superblock
+ ldr r2, [r8, #3004]
+ ldr r3, .L2199+20
+ cmp r2, #0
+ movne r7, r3
+ b .L2161
+.L2159:
+ str r1, [r8, #3004]
+ ldr r1, .L2199+24
+ ldrh r2, [r2, r1]
+ cmp r2, #0
+ movne r7, r3
+ bne .L2161
+ mov r0, r7
+ bl allocate_new_data_superblock
+.L2161:
+ ldrh r3, [r7, #4]
+ cmp r3, #0
+ bne .L2162
+ mov r0, r7
+ bl allocate_new_data_superblock
+.L2162:
+ ldr r3, .L2199+4
+ str r7, [r3, #408]
+.L2158:
+ ldr r2, .L2199+4
+ mov r8, r7
+ ldrh r3, [r7, #4]
+ ldr r1, [r2, #-988]
+ ldr r2, [r5, #3964]
+ rsb r2, r2, r1
+ cmp r3, r2
+ movcc r2, r3
+ ldr r3, [sp, #16]
+ cmp r2, r3
+ movcc r3, r2
+ str r3, [sp, #36]
+ mov r3, #0
+ str r3, [sp, #28]
+ b .L2163
+.L2179:
+ ldrh r3, [r8, #4]
+ cmp r3, #0
+ beq .L2191
+ ldr r7, [sp, #44]
+ rsb r2, r7, r6
+ ldr r7, [sp, #24]
+ rsbs r3, r2, #0
+ adc r3, r3, r2
+ tst r3, r7
+ beq .L2165
+ ldr r7, [sp, #28]
+ cmp r7, #0
+ beq .L2165
+ movw lr, #3918
+ ldr r7, [sp, #32]
+ ldrh r2, [r5, lr]
+ add r1, r7, r4
+ mls r1, r2, r6, r1
+ cmp r1, r2
+ bne .L2191
+.L2165:
+ add r1, sp, #56
+ mov r2, #0
+ mov r0, r6
+ str r3, [sp, #4]
+ bl log2phys
+ mov r0, r8
+ bl get_new_active_ppa
+ ldr lr, [r5, #3964]
+ ldr r1, [r5, #3968]
+ movw r2, #3924
+ mov ip, #36
+ ldrh r2, [r5, r2]
+ ldr r7, .L2199+4
+ mla r1, ip, lr, r1
+ mul lr, lr, r2
+ ldr r7, [r7, #-944]
+ bic lr, lr, #3
+ str r7, [sp, #52]
+ str lr, [sp, #48]
+ add r7, r7, lr
+ str r6, [r1, #16]
+ str r7, [r1, #12]
+ str r0, [r1, #4]
+ movw r0, #3922
+ ldrh lr, [r5, r0]
+ ldr r0, [r5, #3964]
+ mul lr, r0, lr
+ ldr r0, .L2199+4
+ bic lr, lr, #3
+ str lr, [sp, #12]
+ ldr lr, [r0, #-964]
+ ldr r0, [sp, #12]
+ add lr, lr, r0
+ mov r0, r7
+ str lr, [r1, #8]
+ mov r1, #0
+ str ip, [sp, #8]
+ bl ftl_memset
+ ldr r1, [sp, #20]
+ ldr ip, [sp, #8]
+ rsb r3, r1, r6
+ rsbs r1, r3, #0
+ adc r1, r1, r3
+ ldr r3, [sp, #4]
+ str r1, [sp, #12]
+ orrs r1, r1, r3
+ beq .L2166
+ ldr r2, [sp, #12]
+ cmp r2, #0
+ beq .L2167
+ movw r3, #3918
+ mov r0, r4
+ ldrh fp, [r5, r3]
+ mov r1, fp
+ bl __aeabi_uidivmod
+ ldr r3, [sp, #32]
+ rsb fp, r1, fp
+ str r1, [sp, #40]
+ cmp fp, r3
+ movcs fp, r3
+ b .L2168
+.L2167:
+ cmp r3, #0
+ beq .L2168
+ ldr r3, [sp, #32]
+ movw lr, #3918
+ add fp, r3, r4
+ ldrh r3, [r5, lr]
+ mls fp, r3, r6, fp
+ ldr r3, [sp, #12]
+ str r3, [sp, #40]
+ uxth fp, fp
+.L2168:
+ movw lr, #3918
+ ldrh r3, [r5, lr]
+ cmp fp, r3
+ bne .L2169
+ ldr r3, [sp, #12]
+ ldr r0, [sl, #3964]
+ cmp r3, #0
+ ldr r2, [sl, #3968]
+ ldr r3, [sp, #24]
+ muleq r1, r6, fp
+ movne r1, r9
+ rsbeq r1, r4, r1
+ addeq r1, r9, r1, asl #9
+ cmp r3, #0
+ mov r3, #36
+ mla r3, r3, r0, r2
+ strne r1, [r3, #8]
+ bne .L2172
+ ldr r0, [r3, #8]
+ movw r3, #3922
+ ldrh r2, [sl, r3]
+ b .L2197
+.L2169:
+ ldr r2, [sp, #56]
+ mov r3, #36
+ cmn r2, #1
+ beq .L2173
+ ldr r1, [r5, #3964]
+ add r0, sp, #60
+ str r2, [sp, #64]
+ ldr r2, [r5, #3968]
+ str r6, [sp, #76]
+ mla r3, r3, r1, r2
+ mov r1, #1
+ ldr r2, [r3, #8]
+ ldr r3, [r3, #12]
+ str r2, [sp, #68]
+ mov r2, #0
+ str r3, [sp, #72]
+ bl FlashReadPages
+ ldr r3, [sp, #60]
+ cmn r3, #1
+ ldr r3, .L2199+4
+ ldreq r2, [r3, #-1632]
+ addeq r2, r2, #1
+ streq r2, [r3, #-1632]
+ beq .L2175
+ ldr r2, [r7, #8]
+ cmp r2, r6
+ beq .L2175
+ ldr r2, [r3, #-1632]
+ ldr r0, .L2199+28
+ add r2, r2, #1
+ str r2, [r3, #-1632]
+ mov r2, r6
+ ldr r1, [r7, #8]
+ bl printk
+ b .L2175
+.L2173:
+ ldr r1, [r5, #3964]
+ ldr r2, [r5, #3968]
+ mla r3, r3, r1, r2
+ mov r1, #0
+ ldr r0, [r3, #8]
+ movw r3, #3922
+ ldrh r2, [r5, r3]
+ bl ftl_memset
+.L2175:
+ ldr r3, [sp, #12]
+ ldr r1, [r5, #3964]
+ cmp r3, #0
+ ldr r2, [r5, #3968]
+ mov r3, #36
+ movweq lr, #3918
+ mla r3, r3, r1, r2
+ ldreqh r1, [r5, lr]
+ movne r1, r9
+ mov r2, fp, asl #9
+ muleq r1, r1, r6
+ ldrne r0, [r3, #8]
+ ldrne r3, [sp, #40]
+ rsbeq r1, r4, r1
+ ldreq r0, [r3, #8]
+ addne r0, r0, r3, asl #9
+ addeq r1, r9, r1, asl #9
+ b .L2197
+.L2166:
+ ldr r3, [sp, #24]
+ ldr r2, [r5, #3964]
+ cmp r3, #0
+ ldr r3, [r5, #3968]
+ mla ip, ip, r2, r3
+ beq .L2177
+ movw lr, #3918
+ ldrh r3, [r5, lr]
+ mul r3, r3, r6
+ rsb r3, r4, r3
+ add r3, r9, r3, asl #9
+ str r3, [ip, #8]
+ b .L2172
+.L2177:
+ movw r0, #3918
+ movw r3, #3922
+ ldrh r1, [r5, r0]
+ ldrh r2, [r5, r3]
+ ldr r0, [ip, #8]
+ mul r1, r1, r6
+ rsb r1, r4, r1
+ add r1, r9, r1, asl #9
+.L2197:
+ bl memcpy
+.L2172:
+ ldr r3, .L2199+32
+ ldr r0, [sp, #52]
+ ldr lr, [sp, #48]
+ strh r3, [r0, lr] @ movhi
+ ldr r3, .L2199+4
+ str r6, [r7, #8]
+ add r6, r6, #1
+ ldr r2, [r3, #-1844]
+ str r2, [r7, #4]
+ add r2, r2, #1
+ cmn r2, #1
+ str r2, [r3, #-1844]
+ moveq r2, #0
+ streq r2, [r3, #-1844]
+ ldr r3, [sp, #56]
+ str r3, [r7, #12]
+ ldrh r3, [r8, #0]
+ strh r3, [r7, #2] @ movhi
+ ldr r3, [r5, #3964]
+ add r3, r3, #1
+ str r3, [r5, #3964]
+ ldr r3, [sp, #28]
+ add r3, r3, #1
+ str r3, [sp, #28]
+.L2163:
+ ldr r7, [sp, #28]
+ ldr r3, [sp, #36]
+ cmp r7, r3
+ bne .L2179
+ mov r7, r8
+ b .L2164
+.L2191:
+ ldr r3, [sp, #28]
+ mov r7, r8
+ str r3, [sp, #36]
+.L2164:
+ ldr r3, [sp, #16]
+ ldr lr, [sp, #36]
+ ldr r2, [r5, #3964]
+ rsb r3, lr, r3
+ str r3, [sp, #16]
+ ldr r3, .L2199+4
+ ldr r0, [sp, #24]
+ ldr r3, [r3, #-988]
+ cmp r2, r3
+ orrcs r0, r0, #1
+ uxtb r3, r0
+ cmp r3, #0
+ bne .L2180
+ ldrh r2, [r7, #4]
+ cmp r2, #0
+ bne .L2194
+.L2180:
+ bl FtlCacheWriteBack
+ ldr lr, [sp, #16]
+ mov r3, #0
+ str r3, [sl, #3964]
+ cmp lr, #3
+ ldr r3, [sp, #24]
+ movls r3, #0
+.L2194:
+ str r3, [sp, #24]
+.L2196:
+ ldr r3, [sp, #16]
+ cmp r3, #0
+ bne .L2182
+ mov r0, r3
+ ldr r7, [sp, #44]
+ ldr r3, [sp, #20]
+ rsb r1, r3, r7
+ bl rk_ftl_garbage_collect
+ ldr r0, [sp, #16]
+.L2151:
+ add sp, sp, #100
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L2200:
+ .align 2
+.L2199:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LANCHOR2-2044
+ .word .LANCHOR1
+ .word -1992
+ .word .LANCHOR2-1996
+ .word -2040
+ .word .LC120
+ .word -3947
+ .fnend
+ .size FtlWrite, .-FtlWrite
+ .align 2
+ .global StorageSysDataStore
+ .type StorageSysDataStore, %function
+StorageSysDataStore:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r4, r1
+ mov r5, r0
+ bl rknand_device_lock
+ mov r3, r4
+ add r1, r5, #256
+ mov r2, #1
+ mov r0, #16
+ bl FtlWrite
+ mov r4, r0
+ bl rknand_device_unlock
+ mov r0, r4
+ ldmfd sp!, {r3, r4, r5, pc}
+ .fnend
+ .size StorageSysDataStore, .-StorageSysDataStore
+ .align 2
+ .global FtlRead
+ .type FtlRead, %function
+FtlRead:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 64
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ cmp r0, #16
+ .pad #68
+ sub sp, sp, #68
+ mov r4, r1
+ mov r8, r3
+ str r2, [sp, #28]
+ bne .L2203
+ add r0, r1, #256
+ mov r1, r2
+ mov r2, r3
+ bl FtlVendorPartRead
+ str r0, [sp, #16]
+ b .L2204
+.L2203:
+ ldr r3, [sp, #28]
+ add r3, r3, r1
+ str r3, [sp, #20]
+ ldr r3, .L2233
+ ldr r1, [sp, #20]
+ ldr r2, [r3, #3952]
+ cmp r1, r2
+ mvnhi r3, #0
+ strhi r3, [sp, #16]
+ bhi .L2204
+ movw r2, #3918
+ mov r0, r4
+ ldrh r5, [r3, r2]
+ mov r1, r5
+ bl __aeabi_uidiv
+ ldr r3, [sp, #20]
+ mov r1, r5
+ str r0, [sp, #12]
+ sub r0, r3, #1
+ bl __aeabi_uidiv
+ ldr r1, [sp, #12]
+ rsb r3, r1, #1
+ ldr r1, [sp, #28]
+ add r3, r3, r0
+ str r3, [sp, #8]
+ ldr r3, .L2233+4
+ mov fp, r0
+ ldr r0, [sp, #12]
+ ldr r2, [r3, #-1852]
+ add r2, r1, r2
+ ldr r1, [sp, #8]
+ str r2, [r3, #-1852]
+ ldr r2, [r3, #-1880]
+ add r2, r1, r2
+ mov r1, fp
+ str r2, [r3, #-1880]
+ bl FtlCacheMetchLpa
+ cmp r0, #0
+ beq .L2205
+ bl FtlCacheWriteBack
+.L2205:
+ mov r9, #0
+ ldr r6, [sp, #12]
+ str r9, [sp, #32]
+ mov r5, r9
+ str r9, [sp, #16]
+ ldr r7, .L2233
+ b .L2228
+.L2222:
+ mov r2, #0
+ mov r0, r6
+ add r1, sp, #60
+ bl log2phys
+ ldr r2, [sp, #60]
+ cmn r2, #1
+ bne .L2229
+ b .L2232
+.L2210:
+ mla r0, r0, r6, sl
+ cmp r0, r4
+ bcc .L2209
+ ldr r2, [sp, #20]
+ cmp r0, r2
+ bcs .L2209
+ rsb r0, r4, r0
+ mov r1, #0
+ mov r2, #512
+ str r3, [sp, #4]
+ add r0, r8, r0, asl #9
+ bl ftl_memset
+ ldr r3, [sp, #4]
+.L2209:
+ add sl, sl, #1
+ b .L2207
+.L2232:
+ mov sl, #0
+ movw r3, #3918
+.L2207:
+ ldrh r0, [r7, r3]
+ cmp sl, r0
+ bcc .L2210
+ b .L2211
+.L2229:
+ ldr r3, .L2233+4
+ mov sl, #36
+ ldr r1, [r3, #-984]
+ mla sl, sl, r5, r1
+ ldr r1, [sp, #12]
+ cmp r6, r1
+ str r2, [sl, #4]
+ movw r2, #3918
+ bne .L2212
+ ldr r3, [r3, #-960]
+ mov r0, r4
+ str r3, [sl, #8]
+ ldrh r3, [r7, r2]
+ mov r1, r3
+ str r3, [sp, #4]
+ bl __aeabi_uidivmod
+ ldr r3, [sp, #4]
+ str r1, [sp, #36]
+ rsb r2, r1, r3
+ ldr r1, [sp, #28]
+ cmp r2, r1
+ movcc r1, r2
+ str r1, [sp, #32]
+ cmp r1, r3
+ streq r8, [sl, #8]
+ b .L2213
+.L2212:
+ cmp r6, fp
+ ldrneh r3, [r7, r2]
+ mulne r3, r3, r6
+ bne .L2230
+ ldr r3, [r3, #-956]
+ ldrh r2, [r7, r2]
+ ldr r1, [sp, #20]
+ str r3, [sl, #8]
+ mul r3, r2, r6
+ rsb r9, r3, r1
+ cmp r9, r2
+ bne .L2213
+.L2230:
+ rsb r3, r4, r3
+ add r3, r8, r3, asl #9
+ str r3, [sl, #8]
+.L2213:
+ movw r3, #3924
+ ldr r2, .L2233+4
+ ldrh r3, [r7, r3]
+ str r6, [sl, #16]
+ ldr r2, [r2, #-948]
+ mul r3, r3, r5
+ add r5, r5, #1
+ bic r3, r3, #3
+ add r3, r2, r3
+ str r3, [sl, #12]
+.L2211:
+ ldr r3, [sp, #8]
+ add r6, r6, #1
+ subs r3, r3, #1
+ str r3, [sp, #8]
+ beq .L2215
+ movw r3, #3844
+ ldrh r3, [r7, r3]
+ cmp r5, r3, asl #3
+ bne .L2228
+.L2215:
+ cmp r5, #0
+ beq .L2228
+ ldr sl, .L2233+4
+ mov r1, r5
+ mov r2, #0
+ ldr r0, [sl, #-984]
+ bl FlashReadPages
+ ldr r3, [sp, #36]
+ str r6, [sp, #52]
+ mov r6, r5
+ mov r3, r3, asl #9
+ str r3, [sp, #40]
+ ldr r3, [sp, #32]
+ mov r3, r3, asl #9
+ str r3, [sp, #44]
+ mov r3, r9, asl #9
+ str r3, [sp, #48]
+ mov r3, #0
+ str r3, [sp, #24]
+.L2221:
+ ldr r3, [sp, #24]
+ mov r5, #36
+ ldr r1, [sp, #12]
+ mul r5, r5, r3
+ ldr r3, [sl, #-984]
+ add r3, r3, r5
+ ldr r2, [r3, #16]
+ cmp r2, r1
+ bne .L2217
+ ldr r1, [r3, #8]
+ ldr r3, [sl, #-960]
+ cmp r1, r3
+ bne .L2218
+ ldr r3, [sp, #40]
+ mov r0, r8
+ ldr r2, [sp, #44]
+ add r1, r1, r3
+ b .L2231
+.L2217:
+ cmp r2, fp
+ bne .L2218
+ ldr r1, [r3, #8]
+ ldr r3, [sl, #-956]
+ cmp r1, r3
+ bne .L2218
+ movw r2, #3918
+ ldrh r0, [r7, r2]
+ ldr r2, [sp, #48]
+ mul r0, r0, fp
+ rsb r0, r4, r0
+ add r0, r8, r0, asl #9
+.L2231:
+ bl memcpy
+.L2218:
+ ldr r3, [sl, #-984]
+ add r0, r3, r5
+ ldr r2, [r3, r5]
+ cmn r2, #1
+ streq r2, [sp, #16]
+ ldreq r1, [sl, #-1632]
+ addeq r1, r1, #1
+ streq r1, [sl, #-1632]
+ ldr r3, [r3, r5]
+ cmp r3, #256
+ bne .L2220
+ ldr r0, [r0, #4]
+ ubfx r0, r0, #10, #16
+ bl P2V_block_in_plane
+ bl FtlGcRefreshBlock
+.L2220:
+ ldr r3, [sp, #24]
+ add r3, r3, #1
+ str r3, [sp, #24]
+ cmp r3, r6
+ bne .L2221
+ ldr r6, [sp, #52]
+ mov r5, #0
+.L2228:
+ ldr r3, [sp, #8]
+ cmp r3, #0
+ bne .L2222
+ ldr r3, .L2233+8
+ ldr r2, .L2233+4
+ ldrh r3, [r2, r3]
+ cmp r3, #0
+ beq .L2204
+ ldr r0, [sp, #8]
+ mov r1, #1
+ bl rk_ftl_garbage_collect
+.L2204:
+ ldr r0, [sp, #16]
+ add sp, sp, #68
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L2234:
+ .align 2
+.L2233:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word -1134
+ .fnend
+ .size FtlRead, .-FtlRead
+ .align 2
+ .global StorageSysDataLoad
+ .type StorageSysDataLoad, %function
+StorageSysDataLoad:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, lr}
+ .save {r3, r4, r5, lr}
+ mov r5, r0
+ mov r4, r1
+ mov r0, r1
+ mov r1, #512
+ bl __memzero
+ bl rknand_device_lock
+ mov r3, r4
+ add r1, r5, #256
+ mov r2, #1
+ mov r0, #16
+ bl FtlRead
+ mov r4, r0
+ bl rknand_device_unlock
+ mov r0, r4
+ ldmfd sp!, {r3, r4, r5, pc}
+ .fnend
+ .size StorageSysDataLoad, .-StorageSysDataLoad
+ .align 2
+ .global FlashLoadFactorBbt
+ .type FlashLoadFactorBbt, %function
+FlashLoadFactorBbt:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 48
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ movw r2, #2214
+ ldr r9, .L2245
+ movw r3, #2212
+ ldr r4, .L2245+4
+ .pad #52
+ sub sp, sp, #52
+ mov r1, #0
+ mvn r7, #0
+ ldrh r3, [r9, r3]
+ add r0, r4, #208
+ ldrh r8, [r9, r2]
+ mov r2, #16
+ mov r6, #0
+ mul r8, r8, r3
+ bl ftl_memset
+ ldr r3, [r4, #148]
+ str r6, [sp, #20]
+ mov r4, r6
+ str r3, [sp, #24]
+ uxth r8, r8
+ add r3, r8, r7
+ uxth r3, r3
+ str r3, [sp, #4]
+ b .L2237
+.L2243:
+ ldr r5, [sp, #4]
+ sub r3, r8, #8
+ mul fp, r8, r4
+ ldr sl, .L2245+4
+ b .L2238
+.L2241:
+ add r2, fp, r5
+ mov r1, #1
+ add r0, sp, #12
+ str r3, [sp, #0]
+ mov r2, r2, asl #10
+ str r2, [sp, #16]
+ mov r2, r1
+ bl FlashReadPages
+ ldr r2, [sp, #12]
+ ldr r3, [sp, #0]
+ cmn r2, #1
+ beq .L2239
+ ldr r2, [sl, #148]
+ ldrh r1, [r2, #0]
+ movw r2, #61664
+ cmp r1, r2
+ bne .L2239
+ ldr r0, .L2245+8
+ mov r1, r4
+ mov r2, r5
+ add r6, r6, #1
+ bl printk
+ ldr r3, .L2245+4
+ uxth r6, r6
+ add r3, r3, r4, asl #1
+ strh r5, [r3, #208] @ movhi
+ b .L2240
+.L2239:
+ sub r5, r5, #1
+ uxth r5, r5
+.L2238:
+ cmp r5, r3
+ bgt .L2241
+.L2240:
+ ldrb r3, [r9, #3766] @ zero_extendqisi2
+ add r4, r4, #1
+ cmp r3, r6
+ uxtb r4, r4
+ moveq r7, #0
+.L2237:
+ ldrb r3, [r9, #3766] @ zero_extendqisi2
+ cmp r3, r4
+ bhi .L2243
+ mov r0, r7
+ add sp, sp, #52
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L2246:
+ .align 2
+.L2245:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LC121
+ .fnend
+ .size FlashLoadFactorBbt, .-FlashLoadFactorBbt
+ .align 2
+ .global FlashReadFacBbtData
+ .type FlashReadFacBbtData, %function
+FlashReadFacBbtData:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 40
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L2257
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, lr}
+ mov r6, r1
+ mov r9, r2
+ movw r1, #2214
+ movw r2, #2212
+ ldrh r8, [r3, r1]
+ ldrh r2, [r3, r2]
+ .pad #40
+ sub sp, sp, #40
+ ldr r3, [r3, #3780]
+ mov r4, r0
+ ldr r7, .L2257+4
+ mul r8, r8, r2
+ str r3, [sp, #12]
+ ldr r3, [r7, #148]
+ str r3, [sp, #16]
+ uxth r8, r8
+ sub r5, r8, #1
+ mul sl, r8, r6
+ uxth r5, r5
+ sub r8, r8, #16
+ b .L2248
+.L2254:
+ mov r1, #1
+ add r3, r5, sl
+ add r0, sp, #4
+ mov r2, r1
+ mov r3, r3, asl #10
+ str r3, [sp, #8]
+ bl FlashReadPages
+ ldr r3, [sp, #4]
+ cmn r3, #1
+ beq .L2249
+ ldr r3, [r7, #148]
+ ldrh r2, [r3, #0]
+ movw r3, #61664
+ cmp r2, r3
+ bne .L2249
+ cmp r4, #0
+ moveq r0, r4
+ beq .L2250
+ cmp r6, #0
+ beq .L2256
+ b .L2252
+.L2253:
+ ldr r3, [r0, #3780]
+ ubfx r2, r6, #5, #16
+ and r5, r6, #31
+ add r6, r6, #1
+ ldr lr, [r3, r2, asl #2]
+ uxth r6, r6
+ orr lr, lr, r1, asl r5
+ str lr, [r3, r2, asl #2]
+ b .L2251
+.L2256:
+ ldr ip, .L2257+4
+ mov r1, #1
+ ldr r0, .L2257
+.L2251:
+ ldr r3, [ip, #132]
+ cmp r6, r3
+ bcc .L2253
+.L2252:
+ ldr r3, .L2257
+ mov r2, r9
+ mov r0, r4
+ ldr r1, [r3, #3780]
+ bl memcpy
+ mov r2, #4
+ ldr r0, .L2257+8
+ mov r1, r4
+ mov r3, r2
+ bl rknand_print_hex
+ mov r0, #0
+ b .L2250
+.L2249:
+ sub r5, r5, #1
+ uxth r5, r5
+.L2248:
+ cmp r5, r8
+ bgt .L2254
+ mvn r0, #0
+.L2250:
+ add sp, sp, #40
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
+.L2258:
+ .align 2
+.L2257:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LC122
+ .fnend
+ .size FlashReadFacBbtData, .-FlashReadFacBbtData
+ .align 2
+ .global FlashGetBadBlockList
+ .type FlashGetBadBlockList, %function
+FlashGetBadBlockList:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L2266
+ stmfd sp!, {r4, r5, r6, r7, r8, lr}
+ .save {r4, r5, r6, r7, r8, lr}
+ mov r5, r0
+ ldr r3, [r3, #2776]
+ ldr r6, .L2266+4
+ ldrb r2, [r3, #13] @ zero_extendqisi2
+ ldrh r4, [r3, #14]
+ ldr r0, [r6, #116]
+ mul r4, r4, r2
+ uxth r4, r4
+ add r2, r4, #7
+ mov r2, r2, lsr #3
+ bl FlashReadFacBbtData
+ cmn r0, #1
+ beq .L2265
+ mov r2, #0
+ mov r0, r4, lsr #4
+ mov r3, r2
+ sub r4, r4, #1
+ mov r1, #1
+ b .L2261
+.L2263:
+ ldr ip, [r6, #116]
+ mov r8, r2, lsr #5
+ and r7, r2, #31
+ ldr ip, [ip, r8, asl #2]
+ ands ip, ip, r1, asl r7
+ movne ip, r3, asl #1
+ addne r3, r3, #1
+ uxthne r3, r3
+ strneh r2, [r5, ip] @ movhi
+ cmp r3, r0
+ bcs .L2265
+ add r2, r2, #1
+ uxth r2, r2
+.L2261:
+ cmp r2, r4
+ blt .L2263
+ b .L2260
+.L2265:
+ mov r3, #0
+.L2260:
+ mov r3, r3, asl #1
+ mvn r2, #0
+ mov r0, #0
+ strh r2, [r5, r3] @ movhi
+ ldmfd sp!, {r4, r5, r6, r7, r8, pc}
+.L2267:
+ .align 2
+.L2266:
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .fnend
+ .size FlashGetBadBlockList, .-FlashGetBadBlockList
+ .align 2
+ .global FtlMakeBbt
+ .type FtlMakeBbt, %function
+FtlMakeBbt:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ bl FtlBbtMemInit
+ mov r5, #0
+ ldr r7, .L2285
+ bl FtlLoadFactoryBbt
+ ldr r6, .L2285+4
+ add sl, r7, #12
+ ldr r4, .L2285+8
+ b .L2269
+.L2275:
+ ldrh r3, [sl], #2
+ movw r2, #65535
+ ldr r0, [r4, #-2076]
+ movw fp, #3908
+ ldr r9, [r4, #-952]
+ cmp r3, r2
+ str r0, [r4, #176]
+ str r9, [r4, #180]
+ beq .L2270
+ ldrh r8, [r6, fp]
+ mov r1, #1
+ mov r2, r1
+ ldr r0, .L2285+12
+ mla r8, r8, r5, r3
+ mov r3, r8, asl #10
+ str r3, [r4, #172]
+ bl FlashReadPages
+ ldrh r2, [r6, fp]
+ ldr r0, [r7, #28]
+ add r2, r2, #7
+ ldr r1, [r4, #176]
+ mov r2, r2, lsr #3
+ bl memcpy
+ b .L2271
+.L2270:
+ mov r1, r5
+ bl FlashGetBadBlockList
+ ldr r0, [r4, #176]
+ ldr r1, [r7, #28]
+ bl FtlBbt2Bitmap
+ ldrh fp, [r6, fp]
+.L2273:
+ sub fp, fp, #1
+ uxth fp, fp
+.L2284:
+ movw r8, #3908
+ ldrh r0, [r6, r8]
+ mla r0, r0, r5, fp
+ uxth r0, r0
+ bl FtlBbmIsBadBlock
+ cmp r0, #1
+ beq .L2273
+ mov r1, #0
+ mov r2, #16
+ strh fp, [sl, #-2] @ movhi
+ ldr r0, [r4, #-952]
+ bl ftl_memset
+ ldr r3, .L2285+16
+ strh r3, [r9, #0] @ movhi
+ mov r3, #0
+ str r3, [r9, #4]
+ ldrh r3, [sl, #-2]
+ ldrh r8, [r6, r8]
+ strh r3, [r9, #2] @ movhi
+ ldrh r3, [sl, #-2]
+ ldr r1, [r7, #28]
+ ldr r0, [r4, #176]
+ mla r8, r8, r5, r3
+ mov r3, r8, asl #10
+ str r3, [r4, #172]
+ ldr r3, .L2285+20
+ ldrh r2, [r4, r3]
+ mov r2, r2, asl #2
+ bl memcpy
+ mov r1, #1
+ mov r2, r1
+ ldr r0, .L2285+12
+ bl FlashEraseBlocks
+ mov r1, #1
+ mov r3, r1
+ ldr r0, .L2285+12
+ mov r2, r1
+ bl FlashProgPages
+ ldr r3, [r4, #168]
+ cmn r3, #1
+ bne .L2271
+ uxth r0, r8
+ bl FtlBbmMapBadBlock
+ b .L2284
+.L2271:
+ uxth r0, r8
+ add r5, r5, #1
+ bl FtlBbmMapBadBlock
+ add r7, r7, #4
+.L2269:
+ movw r3, #3866
+ ldrh r3, [r6, r3]
+ cmp r5, r3
+ bcc .L2275
+ mov r4, #0
+ ldr r7, .L2285+4
+ movw r6, #3926
+ b .L2276
+.L2277:
+ mov r0, r4
+ add r4, r4, #1
+ bl FtlBbmMapBadBlock
+ uxth r4, r4
+.L2276:
+ ldrh r3, [r7, r6]
+ ldr r5, .L2285+4
+ cmp r3, r4
+ bhi .L2277
+ movw r7, #3992
+ movw r6, #3980
+ ldrh r4, [r5, r7]
+ sub r4, r4, #1
+ uxth r4, r4
+ b .L2278
+.L2283:
+ mov r0, r4
+ bl FtlBbmIsBadBlock
+ cmp r0, #1
+ beq .L2279
+ mov r0, r4
+ bl FlashTestBlk
+ cmp r0, #0
+ beq .L2280
+ mov r0, r4
+ bl FtlBbmMapBadBlock
+ b .L2279
+.L2280:
+ ldrh r2, [r5, r6]
+ movw r3, #65535
+ cmp r2, r3
+ streqh r4, [r5, r6] @ movhi
+.L2281:
+ ldrne r2, .L2285+4
+ movne r3, #3984
+ strneh r4, [r2, r3] @ movhi
+ bne .L2282
+.L2279:
+ sub r4, r4, #1
+ uxth r4, r4
+.L2278:
+ ldrh r3, [r5, r7]
+ sub r3, r3, #48
+ cmp r4, r3
+ bgt .L2283
+.L2282:
+ ldr r4, .L2285+4
+ movw r7, #3980
+ ldr r3, .L2285+8
+ mov r6, #3984
+ mov r5, #0
+ movw r8, #3982
+ str r5, [r4, #3988]
+ mov r1, #1
+ ldr r0, [r3, #-2088]
+ mov r2, #2
+ ldrh r3, [r4, r7]
+ strh r5, [r4, r8] @ movhi
+ mov r3, r3, asl #10
+ str r3, [r0, #4]
+ ldrh r3, [r4, r6]
+ mov r3, r3, asl #10
+ str r3, [r0, #40]
+ bl FlashEraseBlocks
+ ldrh r0, [r4, r7]
+ bl FtlBbmMapBadBlock
+ ldrh r0, [r4, r6]
+ bl FtlBbmMapBadBlock
+ bl FtlBbmTblFlush
+ ldr r3, [r4, #3988]
+ ldrh r2, [r4, r6]
+ add r3, r3, #1
+ str r3, [r4, #3988]
+ ldrh r3, [r4, r7]
+ strh r5, [r4, r8] @ movhi
+ strh r2, [r4, r7] @ movhi
+ strh r3, [r4, r6] @ movhi
+ bl FtlBbmTblFlush
+ mov r0, r5
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L2286:
+ .align 2
+.L2285:
+ .word .LANCHOR0+3980
+ .word .LANCHOR0
+ .word .LANCHOR2
+ .word .LANCHOR2+168
+ .word -3872
+ .word -1032
+ .fnend
+ .size FtlMakeBbt, .-FtlMakeBbt
+ .align 2
+ .global FtlLowFormat
+ .type FtlLowFormat, %function
+FtlLowFormat:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r2, #0
+ ldr r3, .L2307
+ str r2, [r3, #-1848]
+ str r2, [r3, #-1844]
+ ldr r3, .L2307+4
+ ldr r0, [r3, #3848]
+ uxth r0, r0
+ bl FtlFreeSysBlkQueueInit
+ bl FtlLoadBbt
+ cmp r0, #0
+ beq .L2288
+ bl FtlMakeBbt
+.L2288:
+ mov r3, #0
+ ldr ip, .L2307+4
+ movw r0, #3918
+ ldr r2, .L2307
+ ldr r1, .L2307+8
+ b .L2289
+.L2290:
+ ldr lr, [r2, #-960]
+ mvn r4, r3
+ orr r4, r3, r4, asl #16
+ str r4, [lr, r3, asl #2]
+ ldr lr, [r2, #-956]
+ str r1, [lr, r3, asl #2]
+ add r3, r3, #1
+ uxth r3, r3
+.L2289:
+ ldrh lr, [ip, r0]
+ ldr r8, .L2307+4
+ cmp r3, lr, asl #7
+ blt .L2290
+ movw r3, #3852
+ mov r5, #0
+ ldrh r6, [r8, r3]
+ movw r7, #3854
+ b .L2291
+.L2292:
+ mov r0, r6
+ mov r1, #1
+ bl FtlLowFormatEraseBlock
+ add r6, r6, #1
+ uxth r6, r6
+ add r5, r5, r0
+ uxth r5, r5
+.L2291:
+ ldrh r3, [r8, r7]
+ ldr r4, .L2307+4
+ cmp r3, r6
+ bhi .L2292
+ movw r3, #3844
+ ldrh r1, [r4, r3]
+ sub r3, r5, #3
+ cmp r3, r1, asl #1
+ bge .L2293
+.L2297:
+ mov r4, #0
+ ldr r8, .L2307+4
+ mov r6, r4
+ movw r7, #3852
+ b .L2294
+.L2293:
+ mov r0, r5
+ movw r6, #3854
+ bl __aeabi_uidiv
+ ldr r3, [r4, #3944]
+ add r0, r0, r3
+ uxth r0, r0
+ bl FtlSysBlkNumInit
+ ldr r0, [r4, #3848]
+ uxth r0, r0
+ bl FtlFreeSysBlkQueueInit
+ movw r3, #3852
+ ldrh r5, [r4, r3]
+ b .L2295
+.L2296:
+ mov r0, r5
+ mov r1, #1
+ bl FtlLowFormatEraseBlock
+ add r5, r5, #1
+ uxth r5, r5
+.L2295:
+ ldrh r3, [r4, r6]
+ cmp r3, r5
+ bhi .L2296
+ b .L2297
+.L2298:
+ mov r0, r6
+ mov r1, #0
+ bl FtlLowFormatEraseBlock
+ add r6, r6, #1
+ uxth r6, r6
+ add r4, r4, r0
+ uxth r4, r4
+.L2294:
+ ldrh r3, [r8, r7]
+ ldr r5, .L2307+4
+ cmp r3, r6
+ bhi .L2298
+ movw r3, #3854
+ ldr fp, [r5, #3856]
+ ldrh r3, [r5, r3]
+ ldr r9, .L2307
+ mov r0, fp
+ ldr sl, .L2307+12
+ str r3, [r5, #3976]
+ movw r3, #3844
+ ldrh r6, [r5, r3]
+ mov r1, r6
+ bl __aeabi_uidiv
+ ubfx r8, r0, #5, #16
+ mov r7, r0
+ add r3, r8, #36
+ strh r3, [r9, sl] @ movhi
+ mov r3, #24
+ str r0, [r5, #3972]
+ mul r3, r3, r6
+ cmp r4, r3
+ ble .L2299
+ rsb r0, r4, fp
+ mov r1, r6
+ bl __aeabi_uidiv
+ str r0, [r5, #3972]
+ mov r0, r0, lsr #5
+ add r0, r0, #24
+ strh r0, [r9, sl] @ movhi
+.L2299:
+ ldr r5, .L2307
+ ldr r3, [r5, #-1884]
+ cmp r3, #1
+ bne .L2300
+ mov r0, r4
+ mov r1, r6
+ bl __aeabi_uidiv
+ ldr sl, .L2307+12
+ ldrh r9, [r5, sl]
+ uxtah r0, r9, r0
+ add r9, r9, r0, lsr #2
+ strh r9, [r5, sl] @ movhi
+.L2300:
+ ldr r0, .L2307+4
+ mov r3, #3904
+ ldrh r3, [r0, r3]
+ cmp r3, #0
+ beq .L2301
+ ldr r1, .L2307
+ ldr r2, .L2307+12
+ ldrh ip, [r1, r2]
+ add ip, ip, r3, lsr #1
+ strh ip, [r1, r2] @ movhi
+ mul ip, r6, r3
+ cmp ip, r4
+ strgt r7, [r0, #3972]
+ addgt r3, r3, #32
+ addgt r8, r8, r3
+ strgth r8, [r1, r2] @ movhi
+.L2301:
+ ldr r4, .L2307
+ ldr r5, .L2307+4
+ ldr r3, .L2307+12
+ ldr r7, .L2307+16
+ ldr r2, [r5, #3972]
+ ldrh r3, [r4, r3]
+ rsb r3, r3, r2
+ mul r6, r6, r3
+ movw r3, #3912
+ ldrh r3, [r5, r3]
+ str r6, [r4, #204]
+ mul r6, r3, r6
+ movw r3, #3918
+ ldrh r3, [r5, r3]
+ str r6, [r5, #3972]
+ mul r6, r3, r6
+ str r6, [r5, #3952]
+ mvn r6, #0
+ bl FtlBbmTblFlush
+ movw r3, #3854
+ ldrh r2, [r5, r3]
+ mov r1, #0
+ ldr r0, [r4, #-2064]
+ mov r2, r2, asl #1
+ bl ftl_memset
+ ldr r1, .L2307+20
+ mov r3, #0
+ ldr r2, .L2307+24
+ str r3, [r4, #-1892]
+ strh r3, [r4, r1] @ movhi
+ sub r1, r1, #288
+ strb r3, [r4, #-1750]
+ strh r3, [r4, r1] @ movhi
+ mov r1, #255
+ strb r3, [r4, #-1748]
+ strb r3, [r4, #-2038]
+ strh r3, [r4, r7] @ movhi
+ mov r3, #1
+ strb r3, [r4, #-2036]
+ movw r3, #3852
+ strh r6, [r4, r2] @ movhi
+ ldrh r2, [r5, r3]
+ ldr r0, [r4, #-1888]
+ mov r2, r2, lsr #3
+ bl ftl_memset
+.L2302:
+ ldr r0, .L2307+28
+ bl make_superblock
+ ldrb r3, [r4, #-2037] @ zero_extendqisi2
+ ldr r5, .L2307
+ cmp r3, #0
+ ldr r3, .L2307+16
+ bne .L2303
+ ldrh r3, [r4, r7]
+ ldr r2, [r4, #-2064]
+ mov r3, r3, asl #1
+ strh r6, [r2, r3] @ movhi
+ ldrh r3, [r4, r7]
+ add r3, r3, #1
+ strh r3, [r4, r7] @ movhi
+ b .L2302
+.L2303:
+ ldr r2, [r5, #-1848]
+ mvn r7, #0
+ ldr r1, [r5, #-2064]
+ ldr r6, .L2307+32
+ str r2, [r5, #-2032]
+ add r2, r2, #1
+ str r2, [r5, #-1848]
+ ldr r2, .L2307+36
+ ldrh r0, [r5, r2]
+ ldrh r2, [r5, r3]
+ mov r2, r2, asl #1
+ strh r0, [r1, r2] @ movhi
+ mov r2, #0
+ ldr r0, .L2307+40
+ ldrh r3, [r5, r3]
+ strb r2, [r5, #-1990]
+ add r3, r3, #1
+ strh r2, [r5, r0] @ movhi
+ strh r3, [r5, r6] @ movhi
+ mov r3, #1
+ strb r3, [r5, #-1988]
+.L2304:
+ ldr r0, .L2307+44
+ bl make_superblock
+ ldrb r3, [r5, #-1989] @ zero_extendqisi2
+ ldr r4, .L2307
+ cmp r3, #0
+ bne .L2305
+ ldrh r3, [r5, r6]
+ ldr r2, [r5, #-2064]
+ mov r3, r3, asl #1
+ strh r7, [r2, r3] @ movhi
+ ldrh r3, [r5, r6]
+ add r3, r3, #1
+ strh r3, [r5, r6] @ movhi
+ b .L2304
+.L2305:
+ ldr r3, [r4, #-1848]
+ mvn r5, #0
+ ldr r2, [r4, #-2064]
+ str r3, [r4, #-1984]
+ add r3, r3, #1
+ str r3, [r4, #-1848]
+ ldr r3, .L2307+48
+ ldrh r1, [r4, r3]
+ sub r3, r3, #4
+ ldrh r3, [r4, r3]
+ mov r3, r3, asl #1
+ strh r1, [r2, r3] @ movhi
+ ldr r3, .L2307+52
+ strh r5, [r4, r3] @ movhi
+ bl FtlFreeSysBlkQueueOut
+ ldr r3, .L2307+56
+ mov r2, #0
+ strh r0, [r4, r3] @ movhi
+ add r3, r3, #2
+ strh r2, [r4, r3] @ movhi
+ add r3, r3, #2
+ ldr r2, [r4, #204]
+ strh r5, [r4, r3] @ movhi
+ add r3, r3, #2
+ strh r2, [r4, r3] @ movhi
+ ldr r3, [r4, #-1848]
+ str r3, [r4, #-1760]
+ add r3, r3, #1
+ str r3, [r4, #-1848]
+ bl FtlVpcTblFlush
+ bl FtlSysBlkInit
+ cmp r0, #0
+ mov r0, #0
+ ldreq r3, .L2307+60
+ moveq r2, #1
+ streq r2, [r3, #2960]
+ ldmfd sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L2308:
+ .align 2
+.L2307:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .word 168778952
+ .word -1772
+ .word -2044
+ .word -1754
+ .word -1756
+ .word .LANCHOR2-2044
+ .word -1996
+ .word -2040
+ .word -1994
+ .word .LANCHOR2-1996
+ .word -1992
+ .word -1948
+ .word -1768
+ .word .LANCHOR1
+ .fnend
+ .size FtlLowFormat, .-FtlLowFormat
+ .align 2
+ .global FtlReInitForSDUpdata
+ .type FtlReInitForSDUpdata, %function
+FtlReInitForSDUpdata:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 16
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r0, r1, r2, r3, r4, lr}
+ .save {r0, r1, r2, r3, r4, lr}
+ ldr r4, .L2333
+ ldr r0, [r4, #112]
+ bl FlashInit
+ cmp r0, #0
+ movne r0, #0
+ bne .L2310
+ bl FlashLoadFactorBbt
+ cmp r0, #0
+ beq .L2311
+ bl FlashMakeFactorBbt
+.L2311:
+ ldr r0, [r4, #116]
+ bl FlashReadIdbDataRaw
+ cmp r0, #0
+ beq .L2312
+ mov r1, #0
+ mov r2, #16
+ mov r0, sp
+ bl FlashReadFacBbtData
+ ldr r1, [sp, #0]
+ mov r3, #0
+ mov r0, #1
+ mov r2, r3
+.L2314:
+ ands ip, r1, r0, asl r2
+ add r2, r2, #1
+ addne r3, r3, #1
+ cmp r2, #16
+ bne .L2314
+ cmp r3, #6
+ ldrls r3, .L2333+4
+ bls .L2329
+ mov r2, #0
+ mov r0, #1
+.L2315:
+ ands ip, r1, r0, asl r2
+ add r2, r2, #1
+ addne r3, r3, #1
+ cmp r2, #24
+ bne .L2315
+ cmp r3, #17
+ ldr r3, .L2333+4
+ movhi r2, #36
+.L2329:
+ strb r2, [r3, #1]
+ movw r2, #2226
+ ldr r3, .L2333+4
+ ldrb r1, [r3, #1] @ zero_extendqisi2
+ strh r1, [r3, r2] @ movhi
+.L2312:
+ ldr r1, .L2333+8
+ mov r4, #1
+ ldr r0, .L2333+12
+ bl printk
+ ldr r0, .L2333+16
+ bl FtlConstantsInit
+ bl FtlVariablesInit
+ ldr r3, .L2333+4
+ ldr r0, [r3, #3848]
+ uxth r0, r0
+ bl FtlFreeSysBlkQueueInit
+ b .L2319
+.L2321:
+ add r4, r4, #1
+.L2319:
+ bl FtlLoadBbt
+ cmp r0, #0
+ bne .L2331
+.L2320:
+ bl FtlSysBlkInit
+ cmp r0, #0
+ beq .L2322
+.L2331:
+ bl FtlLowFormat
+ cmp r4, #3
+ bls .L2321
+ b .L2332
+.L2322:
+ ldr r3, .L2333+20
+ mov r2, #1
+ str r2, [r3, #2960]
+ b .L2310
+.L2332:
+ mvn r0, #0
+.L2310:
+ add sp, sp, #16
+ ldmfd sp!, {r4, pc}
+.L2334:
+ .align 2
+.L2333:
+ .word .LANCHOR2
+ .word .LANCHOR0
+ .word .LC76
+ .word .LC75
+ .word .LANCHOR0+2200
+ .word .LANCHOR1
+ .fnend
+ .size FtlReInitForSDUpdata, .-FtlReInitForSDUpdata
+ .align 2
+ .global flash_boot_enter_slc_mode
+ .type flash_boot_enter_slc_mode, %function
+flash_boot_enter_slc_mode:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L2337
+ ldr r2, [r3, #3788]
+ ldr r3, .L2337+4
+ cmp r2, r3
+ bxne lr
+ b flash_enter_slc_mode
+.L2338:
+ .align 2
+.L2337:
+ .word .LANCHOR0
+ .word 1446522928
+ .fnend
+ .size flash_boot_enter_slc_mode, .-flash_boot_enter_slc_mode
+ .align 2
+ .global flash_boot_exit_slc_mode
+ .type flash_boot_exit_slc_mode, %function
+flash_boot_exit_slc_mode:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+ ldr r3, .L2341
+ ldr r2, [r3, #3788]
+ ldr r3, .L2341+4
+ cmp r2, r3
+ bxne lr
+ b flash_exit_slc_mode
+.L2342:
+ .align 2
+.L2341:
+ .word .LANCHOR0
+ .word 1446522928
+ .fnend
+ .size flash_boot_exit_slc_mode, .-flash_boot_exit_slc_mode
+ .align 2
+ .global IdBlockReadData
+ .type IdBlockReadData, %function
+IdBlockReadData:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 24
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #28
+ sub sp, sp, #28
+ ldr r4, .L2348
+ mov r6, r0
+ str r2, [sp, #20]
+ mov sl, r1
+ ldr r0, .L2348+4
+ mov r1, r6
+ ldr r2, [r4, #2776]
+ ldr r3, [r4, #4]
+ ldr r8, .L2348+8
+ ldrb r5, [r2, #9] @ zero_extendqisi2
+ mov r2, sl
+ mul r5, r5, r3
+ bl printk
+ ldr r3, [r4, #2776]
+ mov r0, r6
+ ldrb r9, [r3, #9] @ zero_extendqisi2
+ uxth r5, r5
+ mov r1, r5
+ mov r5, #0
+ bl __aeabi_uidivmod
+ mul r2, r9, r1
+ rsb ip, r1, r6
+ mov r7, r1
+ str ip, [sp, #12]
+ ubfx r2, r2, #2, #2
+ b .L2344
+.L2346:
+ add r1, r5, r7
+ rsb r3, r2, #4
+ ubfx r1, r1, #2, #16
+ ldrb r0, [r4, #80] @ zero_extendqisi2
+ uxth r3, r3
+ str r3, [sp, #16]
+ add r3, r4, r1, asl #1
+ cmp r0, #0
+ add r3, r3, #2224
+ add r3, r3, #4
+ ldrh r3, [r3, #0]
+ beq .L2345
+ ldr r0, [r4, #3788]
+ ldr ip, .L2348+12
+ cmp r0, ip
+ moveq r3, r1
+.L2345:
+ ldr ip, [sp, #12]
+ ldrb r0, [r8, #128] @ zero_extendqisi2
+ add r2, r2, ip
+ ldrb ip, [r4, #3836] @ zero_extendqisi2
+ ldr fp, [r8, #116]
+ mla r2, r9, r3, r2
+ ldr r3, [r4, #2776]
+ ldrb r1, [r3, #9] @ zero_extendqisi2
+ str ip, [sp, #0]
+ stmib sp, {r1, r2}
+ bl FlashBchSel
+ mov r0, #0
+ bl flash_boot_enter_slc_mode
+ ldr r2, [sp, #8]
+ ldr r1, [sp, #4]
+ mov r0, r2
+ bl __aeabi_uidiv
+ mov r2, fp
+ mov r1, r0
+ mov r0, #0
+ mov r3, r0
+ bl FlashReadPage
+ mov r0, #0
+ bl flash_boot_exit_slc_mode
+ ldr ip, [sp, #0]
+ mov r0, ip
+ bl FlashBchSel
+ ldr ip, [sp, #20]
+ mov r2, #2048
+ ldr r1, [r8, #116]
+ add r0, ip, r5, asl #9
+ bl memcpy
+ ldr ip, [sp, #16]
+ mov r2, #0
+ add r5, ip, r5
+ uxth r5, r5
+.L2344:
+ cmp r5, sl
+ bcc .L2346
+ mov r1, r6
+ mov r2, sl
+ mov r3, #0
+ ldr r0, .L2348+16
+ bl printk
+ mov r0, #0
+ add sp, sp, #28
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L2349:
+ .align 2
+.L2348:
+ .word .LANCHOR0
+ .word .LC123
+ .word .LANCHOR2
+ .word 1446522928
+ .word .LC124
+ .fnend
+ .size IdBlockReadData, .-IdBlockReadData
+ .align 2
+ .global IDBlockWriteData
+ .type IDBlockWriteData, %function
+IDBlockWriteData:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 88
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .pad #92
+ sub sp, sp, #92
+ ldr r4, .L2357
+ mov r5, r0
+ str r2, [sp, #20]
+ mov r8, r1
+ ldr r0, .L2357+4
+ mov r1, r5
+ ldr r2, [r4, #2776]
+ mov r7, r5
+ ldr r3, [r4, #4]
+ ldr fp, .L2357+8
+ ldrb r6, [r2, #9] @ zero_extendqisi2
+ mov r2, r8
+ mul r6, r6, r3
+ bl printk
+ mov r0, #0
+ bl flash_boot_enter_slc_mode
+ movw r3, #2220
+ ldrh r1, [r4, r3]
+ mov r0, r5
+ bl __aeabi_uidiv
+ uxth r6, r6
+ mov r1, r0
+ mov r0, #0
+ mov r2, r0
+ bl FlashEraseBlock
+ mov r0, #0
+ bl flash_boot_exit_slc_mode
+ ldr r3, [r4, #2776]
+ mov r1, r6
+ mov r0, r5
+ mov r6, #0
+ ldrb sl, [r3, #9] @ zero_extendqisi2
+ bl __aeabi_uidivmod
+ mov r9, r1
+ rsb r1, r1, r5
+ str r1, [sp, #16]
+ b .L2351
+.L2355:
+ add r3, r6, r9
+ ubfx r3, r3, #2, #16
+ cmp r3, #0
+ beq .L2352
+ add r1, r3, #1
+ ldrb r0, [r4, #80] @ zero_extendqisi2
+ add r2, r4, r1, asl #1
+ cmp r0, #0
+ add r2, r2, #2224
+ add r2, r2, #4
+ ldrh r2, [r2, #0]
+ beq .L2353
+ ldr r0, [r4, #3788]
+ cmp r0, fp
+ uxtheq r2, r1
+.L2353:
+ sub r2, r2, #1
+ mov r2, r2, asl #2
+ str r2, [sp, #24]
+ mov r2, #0
+ str r2, [sp, #28]
+.L2352:
+ add r2, r4, r3, asl #1
+ add r2, r2, #2224
+ ldrh r5, [r2, #4]
+ ldrb r2, [r4, #80] @ zero_extendqisi2
+ cmp r2, #0
+ beq .L2354
+ ldr r2, [r4, #3788]
+ cmp r2, fp
+ moveq r5, r3
+.L2354:
+ ldr r2, [sp, #16]
+ ldr r1, [sp, #20]
+ ldrb ip, [r4, #3836] @ zero_extendqisi2
+ mla r3, sl, r5, r2
+ add r2, r1, r6, asl #9
+ ldr r1, .L2357+12
+ add r6, r6, #4
+ uxth r6, r6
+ ldrb r0, [r1, #128] @ zero_extendqisi2
+ str ip, [sp, #4]
+ str r2, [sp, #8]
+ str r3, [sp, #12]
+ bl FlashBchSel
+ mov r0, #0
+ bl flash_boot_enter_slc_mode
+ ldr r3, [sp, #12]
+ ldr r1, [r4, #2776]
+ mov r0, r3
+ ldrb r1, [r1, #9] @ zero_extendqisi2
+ bl __aeabi_uidiv
+ ldr r2, [sp, #8]
+ add r3, sp, #24
+ mov r1, r0
+ mov r0, #0
+ bl FlashProgPage
+ mov r0, #0
+ bl flash_boot_exit_slc_mode
+ ldr ip, [sp, #4]
+ mov r0, ip
+ bl FlashBchSel
+ ldr r0, [sp, #16]
+ mov r1, sl
+ bl __aeabi_uidiv
+ add r2, r5, #1
+ uxth r2, r2
+ mov r1, r0
+ mov r0, #0
+ bl FlashPageProgMsbFFData
+.L2351:
+ cmp r6, r8
+ bcc .L2355
+ mov r1, r7
+ mov r2, r8
+ mov r3, #0
+ ldr r0, .L2357+16
+ bl printk
+ mov r5, r7
+ mov r0, #0
+ add sp, sp, #92
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L2358:
+ .align 2
+.L2357:
+ .word .LANCHOR0
+ .word .LC125
+ .word 1446522928
+ .word .LANCHOR2
+ .word .LC126
+ .fnend
+ .size IDBlockWriteData, .-IDBlockWriteData
+ .align 2
+ .global write_idblock
+ .type write_idblock, %function
+write_idblock:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 8
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L2372
+ stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
+ mov r7, r2
+ ldr r2, [r3, #4]
+ .pad #20
+ sub sp, sp, #20
+ ldr r3, [r3, #2776]
+ mov r6, r0
+ mov r4, r1
+ mov r0, #256000
+ mov r1, #208
+ ldrb r3, [r3, #9] @ zero_extendqisi2
+ mul r3, r3, r2
+ mov r2, #6
+ uxth r3, r3
+ str r3, [sp, #8]
+ bl kmalloc_order_trace
+ subs r5, r0, #0
+ mvneq r0, #0
+ beq .L2360
+ add sl, r6, #508
+ add sl, sl, #3
+ mov sl, sl, lsr #9
+ cmp sl, #255
+ bhi .L2361
+ add r0, r4, sl, asl #9
+ mov r1, r4
+ rsb r2, sl, #256
+ bl memcpy
+.L2361:
+ ldr r8, .L2372
+ mov r3, #5
+ ldr r0, .L2372+4
+ mov r1, r7
+ mov r2, #4
+ add sl, sl, #128
+ bl rknand_print_hex
+ ldrb r2, [r8, #1] @ zero_extendqisi2
+ ldr r1, [r4, #512]
+ cmp sl, #256
+ movcs sl, #256
+ ldr r0, .L2372+8
+ mov fp, #0
+ bl printk
+ ldrb r3, [r8, #1] @ zero_extendqisi2
+ ldr r2, [r4, #512]
+ mov r1, sl
+ ldr r0, .L2372+12
+ mov r9, fp
+ cmp r2, r3
+ mov r8, r4
+ mov r2, r6
+ strhi r3, [r4, #512]
+ mov r6, r7
+ bl printk
+ mov r1, sl, asl #7
+ str r1, [sp, #12]
+.L2367:
+ ldr r1, .L2372
+ movw r2, #2226
+ ldr r3, [r6], #4
+ ldrh r2, [r1, r2]
+ cmp r3, r2
+ bcs .L2363
+ ldr r2, .L2372+16
+ ldr r2, [r2, #132]
+ cmp r3, r2
+ bcc .L2363
+ mov r0, r5
+ mov r1, #512
+ bl __memzero
+ ldr r2, [sp, #8]
+ ldr r0, [r6, #-4]
+ mov r1, sl
+ mul r0, r0, r2
+ mov r2, r8
+ bl IDBlockWriteData
+ ldr r3, [sp, #8]
+ ldr r0, [r6, #-4]
+ mov r1, sl
+ mov r2, r5
+ mul r0, r0, r3
+ bl IdBlockReadData
+ mov r3, #0
+ mov r7, r3
+.L2366:
+ ldr r1, [r5, r3]
+ add r3, r3, #4
+ add r2, r8, r3
+ ldr r2, [r2, #-4]
+ cmp r1, r2
+ beq .L2364
+ bic r4, r7, #255
+ stmia sp, {r1, r2}
+ mov r3, r7
+ mov r1, r9
+ ldr r2, [r6, #-4]
+ mov r4, r4, asl #2
+ ldr r0, .L2372+20
+ bl printk
+ ldr r0, .L2372+24
+ add r1, r8, r4
+ mov r2, #4
+ mov r3, #256
+ bl rknand_print_hex
+ mov r3, #256
+ mov r2, #4
+ ldr r0, .L2372+28
+ add r1, r5, r4
+ bl rknand_print_hex
+ mov r0, r5
+ mov r1, #512
+ bl __memzero
+ ldr r1, [sp, #8]
+ ldr r0, [r6, #-4]
+ mov r2, r5
+ mul r0, r0, r1
+ mov r1, #4
+ bl IDBlockWriteData
+ ldr r0, .L2372+32
+ bl printk
+ ldr r2, [sp, #12]
+ cmp r7, r2
+ bcc .L2363
+ b .L2365
+.L2364:
+ ldr r1, [sp, #12]
+ add r7, r7, #1
+ cmp r7, r1
+ bne .L2366
+.L2365:
+ add fp, fp, #1
+.L2363:
+ add r9, r9, #1
+ cmp r9, #5
+ bne .L2367
+ mov r0, r5
+ bl kfree
+ cmp fp, #0
+ mvneq r0, #0
+ movne r0, #0
+.L2360:
+ add sp, sp, #20
+ ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
+.L2373:
+ .align 2
+.L2372:
+ .word .LANCHOR0
+ .word .LC127
+ .word .LC128
+ .word .LC129
+ .word .LANCHOR2
+ .word .LC130
+ .word .LC131
+ .word .LC132
+ .word .LC133
+ .fnend
+ .size write_idblock, .-write_idblock
+ .align 2
+ .global CRC_32
+ .type CRC_32, %function
+CRC_32:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ mov r3, r0
+ mov r0, #0
+ stmfd sp!, {r4, lr}
+ .save {r4, lr}
+ mov r2, r0
+ ldr ip, .L2377
+ b .L2375
+.L2376:
+ ldrb r4, [r3, r2] @ zero_extendqisi2
+ add r2, r2, #1
+ eor r4, r4, r0, lsr #24
+ add r4, ip, r4, asl #2
+ ldr r4, [r4, #3008]
+ eor r0, r4, r0, asl #8
+.L2375:
+ cmp r2, r1
+ bne .L2376
+ ldmfd sp!, {r4, pc}
+.L2378:
+ .align 2
+.L2377:
+ .word .LANCHOR1
+ .fnend
+ .size CRC_32, .-CRC_32
+ .align 2
+ .type rknand_sys_storage_ioctl, %function
+rknand_sys_storage_ioctl:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 520
+ @ frame_needed = 0, uses_anonymous_args = 0
+ ldr r3, .L2488
+ stmfd sp!, {r4, r5, r6, lr}
+ .save {r4, r5, r6, lr}
+ cmp r1, r3
+ .pad #520
+ sub sp, sp, #520
+ mov r6, r1
+ mov r5, r2
+ ldr r4, [r0, #124]
+ beq .L2388
+ bhi .L2397
+ ldr r3, .L2488+4
+ cmp r1, r3
+ beq .L2385
+ bhi .L2398
+ sub r3, r3, #125
+ cmp r1, r3
+ beq .L2382
+ bhi .L2399
+ sub r3, r3, #237
+ cmp r1, r3
+ bne .L2431
+ b .L2484
+.L2399:
+ ldr r3, .L2488+8
+ cmp r1, r3
+ beq .L2383
+ add r3, r3, #1
+ cmp r1, r3
+ bne .L2431
+ b .L2485
+.L2398:
+ ldr r3, .L2488+12
+ cmp r1, r3
+ beq .L2387
+ bhi .L2400
+ ldr r3, .L2488+16
+ cmp r1, r3
+ bne .L2431
+ b .L2486
+.L2400:
+ ldr r3, .L2488+20
+ cmp r1, r3
+ beq .L2387
+ add r3, r3, #10
+ cmp r1, r3
+ bne .L2431
+ b .L2387
+.L2397:
+ ldr r3, .L2488+24
+ cmp r1, r3
+ beq .L2393
+ bhi .L2401
+ sub r3, r3, #78
+ cmp r1, r3
+ beq .L2390
+ bcc .L2389
+ add r3, r3, #21
+ cmp r1, r3
+ beq .L2391
+ add r3, r3, #56
+ cmp r1, r3
+ bne .L2431
+ b .L2487
+.L2401:
+ ldr r3, .L2488+28
+ cmp r1, r3
+ beq .L2396
+ bhi .L2402
+ sub r3, r3, #956
+ sub r3, r3, #1
+ cmp r1, r3
+ beq .L2394
+ add r3, r3, #956
+ cmp r1, r3
+ bne .L2431
+ b .L2395
+.L2402:
+ ldr r3, .L2488+32
+ cmp r1, r3
+ beq .L2395
+ add r3, r3, #1
+ cmp r1, r3
+ bne .L2431
+ b .L2396
+.L2389:
+ ldr r0, .L2488+36
+ bl printk
+ mov r0, r4
+ mov r1, r5
+ mov r2, #512
+ bl rk_copy_from_user
+ cmp r0, #0
+ bne .L2477
+.L2403:
+ ldr r0, .L2488+40
+ ldmia r4, {r1, r2}
+ bl printk
+ ldr r6, [r4, #4]
+ cmp r6, #8
+ bhi .L2470
+ bl rknand_device_unlock
+ mov r2, r4
+ mov r1, r6
+ ldr r0, [r4, #0]
+ bl IdBlockReadData
+ bl rknand_device_unlock
+ mov r1, r4
+ mov r0, r5
+ mov r2, r6, asl #9
+ bl rk_copy_to_user
+ subs r4, r0, #0
+ ldrne r0, .L2488+44
+ beq .L2404
+ b .L2479
+.L2390:
+ ldr r0, .L2488+48
+ bl printk
+ mov r0, r4
+ mov r1, r5
+ mov r2, #4096
+ bl rk_copy_from_user
+ cmp r0, #0
+ bne .L2477
+.L2405:
+ ldr r5, .L2488+52
+ ldr r0, .L2488+56
+ ldmia r4, {r1, r2}
+ bl printk
+ ldr r3, [r5, #436]
+ cmp r3, #0
+ bne .L2406
+ mov r0, #260096
+ mov r1, #208
+ mov r2, #6
+ bl kmalloc_order_trace
+ cmp r0, #0
+ str r0, [r5, #436]
+ beq .L2470
+.L2406:
+ ldr r2, [r4, #4]
+ movw r3, #4088
+ cmp r2, r3
+ bhi .L2470
+ ldr r3, [r4, #0]
+ cmp r3, #251904
+ bhi .L2470
+ ldr r1, .L2488+52
+ ldr r0, [r1, #436]
+ add r1, r4, #8
+ add r0, r0, r3
+ bl memcpy
+ b .L2475
+.L2487:
+ ldr r0, .L2488+60
+ bl printk
+ mov r0, r4
+ mov r1, r5
+ mov r2, #28
+ bl rk_copy_from_user
+ cmp r0, #0
+ bne .L2477
+.L2407:
+ ldmia r4, {r1, r2}
+ ldr r0, .L2488+64
+ bl printk
+ ldr r1, [r4, #0]
+ cmp r1, #256000
+ bhi .L2470
+ ldr r5, .L2488+52
+ ldr r0, [r5, #436]
+ cmp r0, #0
+ beq .L2470
+ bl CRC_32
+ ldr r3, [r4, #4]
+ cmp r3, r0
+ bne .L2450
+ bl rknand_device_unlock
+ add r2, r4, #8
+ ldr r1, [r5, #436]
+ ldr r0, [r4, #0]
+ mov r4, #0
+ bl write_idblock
+ bl rknand_device_unlock
+ ldr r0, [r5, #436]
+ bl kfree
+ str r4, [r5, #436]
+ b .L2404
+.L2391:
+ ldr r0, .L2488+68
+ bl printk
+ mov r0, r4
+ bl ReadFlashInfo
+ mov r0, r5
+ mov r1, r4
+ mov r2, #11
+ b .L2480
+.L2388:
+ ldr r0, .L2488+72
+ bl printk
+ bl rknand_device_unlock
+ bl FtlReInitForSDUpdata
+ mov r6, r0
+ bl rknand_device_unlock
+ cmp r6, #0
+ bne .L2470
+ bl nand_blk_add_whole_disk
+ bl rknand_device_unlock
+ mov r1, r6
+ mov r2, #64
+ mov r0, r4
+ bl FlashReadFacBbtData
+ bl rknand_device_unlock
+ ldr r0, .L2488+76
+ mov r1, r4
+ mov r2, #4
+ mov r3, #8
+ bl rknand_print_hex
+ mov r0, r5
+ mov r1, r4
+ mov r2, #64
+ b .L2480
+.L2393:
+ ldr r0, .L2488+80
+ bl printk
+ ldr r3, .L2488+52
+ mov r0, r5
+ mov r1, r4
+ mov r2, #4
+ ldr r3, [r3, #440]
+ ldr r3, [r3, #20]
+ str r3, [r4, #0]
+ b .L2480
+.L2394:
+ ldr r0, .L2488+84
+ bl printk
+ bl rknand_device_unlock
+ mov r1, #264
+ mov r2, #2
+ mov r3, r4
+ mov r0, #16
+ bl FtlRead
+ bl rknand_device_unlock
+ mov r0, r5
+ mov r1, r4
+ mov r2, #1024
+ b .L2480
+.L2382:
+ ldr r0, .L2488+88
+ bl printk
+ mov r0, sp
+ mov r1, r5
+ mov r2, #520
+ bl rk_copy_from_user
+ subs r4, r0, #0
+ bne .L2477
+.L2408:
+ ldr r2, [sp, #0]
+ ldr r3, .L2488+92
+ cmp r2, r3
+ bne .L2472
+ ldr r3, [sp, #4]
+ cmp r3, #512
+ bhi .L2472
+ ldr r6, .L2488+52
+ mov r2, #512
+ mov r0, sp
+ ldr r1, [r6, #440]
+ bl memcpy
+ ldr r2, [r6, #444]
+ ldr r3, .L2488+96
+ cmp r2, r3
+ beq .L2409
+ add r0, sp, #64
+ mov r1, #128
+ str r4, [sp, #8]
+ str r4, [sp, #12]
+ bl __memzero
+.L2409:
+ add r0, sp, #256
+ mov r1, #256
+ mov r3, #0
+ str r3, [sp, #16]
+ bl __memzero
+ mov r0, r5
+ mov r1, sp
+ mov r2, #520
+.L2480:
+ bl rk_copy_to_user
+ b .L2478
+.L2383:
+ ldr r0, .L2488+100
+ bl printk
+ mov r0, sp
+ mov r1, r5
+ mov r2, #520
+ bl rk_copy_from_user
+ cmp r0, #0
+ ldrne r0, .L2488+104
+ bne .L2479
+ ldr r2, [sp, #0]
+ ldr r3, .L2488+92
+ cmp r2, r3
+ bne .L2472
+ ldr r3, [sp, #4]
+ cmp r3, #512
+ bhi .L2472
+ ldr r4, .L2488+52
+ ldr r3, .L2488+96
+ ldr r2, [r4, #444]
+ cmp r2, r3
+ bne .L2450
+ ldr r3, [sp, #12]
+ sub r2, r3, #1
+ cmp r2, #127
+ mvnhi r4, #2
+ bhi .L2380
+ ldr r0, [r4, #440]
+ add r1, sp, #64
+ str r3, [r0, #12]
+ add r0, r0, #64
+ ldr r2, [sp, #12]
+ bl memcpy
+ mov r0, #1
+ ldr r1, [r4, #440]
+ b .L2476
+.L2486:
+ ldr r0, .L2488+108
+ bl printk
+ mov r0, sp
+ mov r1, r5
+ mov r2, #520
+ bl rk_copy_from_user
+ cmp r0, #0
+ bne .L2477
+.L2411:
+ ldr r2, [sp, #0]
+ ldr r3, .L2488+112
+ cmp r2, r3
+ bne .L2472
+ ldr r3, [sp, #4]
+ cmp r3, #512
+ bhi .L2472
+ ldr r5, .L2488+52
+ ldr r4, [r5, #448]
+ cmp r4, #0
+ beq .L2380
+ ldr r3, [r5, #452]
+ ldr r2, .L2488+116
+ ldr r1, [r3, #0]
+ cmp r1, r2
+ beq .L2412
+ str r2, [r3, #0]
+ mov r2, #504
+ ldr r3, [r5, #452]
+ str r2, [r3, #4]
+ mov r2, #0
+ str r2, [r3, #8]
+ str r2, [r3, #12]
+.L2412:
+ ldr r1, [r5, #452]
+ mov r4, #0
+ mov r0, r4
+ str r4, [r1, #16]
+ bl StorageSysDataStore
+ ldr r3, [r5, #440]
+ ldr r2, .L2488+92
+ ldr r5, .L2488+52
+ ldr r1, [r3, #0]
+ cmp r1, r2
+ strne r2, [r3, #0]
+ ldr r0, [r5, #440]
+ mov r1, #128
+ ldrne r3, .L2488+52
+ movne r2, #504
+ ldrne r3, [r3, #440]
+ stmneib r3, {r2, r4}
+ mov r4, #0
+ str r4, [r0, #12]
+ add r0, r0, #64
+ bl __memzero
+ mov r0, #1
+ ldr r1, [r5, #440]
+ bl StorageSysDataStore
+ str r4, [r5, #448]
+ str r4, [r5, #444]
+ b .L2404
+.L2385:
+ ldr r0, .L2488+120
+ bl printk
+ mov r0, sp
+ mov r1, r5
+ mov r2, #520
+ bl rk_copy_from_user
+ subs r4, r0, #0
+ bne .L2477
+.L2414:
+ ldr r2, [sp, #0]
+ ldr r3, .L2488+124
+ cmp r2, r3
+ bne .L2472
+ ldr r3, [sp, #4]
+ cmp r3, #512
+ bhi .L2472
+ ldr r5, .L2488+52
+ ldr r3, [r5, #448]
+ cmp r3, #1
+ beq .L2380
+ ldr r3, [r5, #452]
+ mov r0, #0
+ ldr r2, .L2488+116
+ ldr r1, [r3, #0]
+ cmp r1, r2
+ strne r2, [r3, #0]
+ ldr r1, [r5, #452]
+ ldrne r3, [r5, #452]
+ movne r2, #504
+ strne r4, [r3, #12]
+ stmneib r3, {r2, r4}
+ mov r3, #1
+ str r3, [r1, #16]
+ bl StorageSysDataStore
+ ldr r3, [r5, #440]
+ ldr r2, .L2488+92
+ ldr r1, [r3, #0]
+ cmp r1, r2
+ beq .L2416
+ str r2, [r3, #0]
+ mov r1, #504
+ ldr r3, .L2488+52
+ mov r2, #0
+ ldr r3, [r3, #440]
+ stmib r3, {r1, r2}
+.L2416:
+ ldr r5, .L2488+52
+ mov r1, #128
+ mov r4, #0
+ ldr r0, [r5, #440]
+ str r4, [r0, #12]
+ add r0, r0, #64
+ bl __memzero
+ mov r0, #1
+ ldr r1, [r5, #440]
+ bl StorageSysDataStore
+ mov r3, #1
+ str r3, [r5, #448]
+ b .L2404
+.L2485:
+ ldr r0, .L2488+128
+ bl printk
+ mov r0, sp
+ mov r1, r5
+ mov r2, #520
+ bl rk_copy_from_user
+ cmp r0, #0
+ bne .L2477
+.L2417:
+ ldr r2, [sp, #0]
+ ldr r3, .L2488+132
+ cmp r2, r3
+ bne .L2472
+ ldr r2, [sp, #4]
+ cmp r2, #512
+ addls r0, sp, #8
+ ldrls r1, .L2488+136
+ bls .L2483
+ b .L2472
+.L2387:
+ ldr r3, .L2488+20
+ cmp r6, r3
+ ldreq r0, .L2488+140
+ beq .L2473
+ ldr r3, .L2488+144
+ cmp r6, r3
+ ldreq r0, .L2488+148
+ ldrne r0, .L2488+152
+.L2473:
+ bl printk
+ mov r0, sp
+ mov r1, r5
+ mov r2, #520
+ bl rk_copy_from_user
+ cmp r0, #0
+ bne .L2477
+.L2421:
+ ldr r2, [sp, #0]
+ ldr r3, .L2488+156
+ cmp r2, r3
+ bne .L2470
+ ldr r3, .L2488+144
+ ldr r4, .L2488+52
+ cmp r6, r3
+ bne .L2422
+ ldr r3, [r4, #440]
+ mov r2, sp
+ ldr r3, [r3, #20]
+ strb r3, [sp, #8]
+ str r3, [sp, #4]
+ bic r3, r2, #8128
+ bic r3, r3, #63
+ ldr r3, [r3, #8]
+@ 444 "/home/zyf/rk30/rk3288_android4.4/kernel/arch/arm/include/asm/uaccess.h" 1
+ adds r2, r5, #16; sbcccs r2, r2, r3; movcc r3, #0
+@ 0 "" 2
+ cmp r3, #0
+ bne .L2470
+ mov r0, r5
+ mov r1, sp
+ mov r2, #16
+ bl __copy_to_user
+ cmp r0, #0
+ moveq r4, r0
+ mvnne r4, #13
+ b .L2380
+.L2422:
+ ldr r3, [r4, #968]
+ cmp r3, #10
+ bhi .L2470
+ ldr r3, [r4, #440]
+ ldr r1, [sp, #4]
+ ldr r2, [r3, #24]
+ cmp r2, r1
+ beq .L2423
+ cmp r2, #0
+ beq .L2423
+ ldr r0, .L2488+160
+ bl printk
+ ldr r3, [r4, #968]
+ add r3, r3, #1
+ str r3, [r4, #968]
+ b .L2470
+.L2423:
+ ldr r0, .L2488+52
+ mov r2, #0
+ str r2, [r0, #968]
+ ldr r0, .L2488+20
+ cmp r6, r0
+ mov r0, #1
+ strne r1, [r3, #24]
+ mov r1, r3
+ movne r2, #1
+ streq r2, [r3, #20]
+ streq r2, [r3, #24]
+ strne r2, [r3, #20]
+ bl StorageSysDataStore
+ cmn r0, #1
+ mvneq r4, #1
+ movne r4, #0
+ b .L2404
+.L2395:
+ ldr r0, .L2488+164
+ bl printk
+ mov r0, sp
+ mov r1, r5
+ mov r2, #520
+ bl rk_copy_from_user
+ cmp r0, #0
+ bne .L2477
+.L2426:
+ ldr r2, [sp, #0]
+ ldr r3, .L2488+168
+ cmp r2, r3
+ bne .L2472
+ ldr r2, [sp, #4]
+ cmp r2, #504
+ bhi .L2472
+ ldr r3, .L2488+172
+ add r0, sp, #8
+ cmp r6, r3
+ ldr r3, .L2488+52
+ ldreq r1, [r3, #972]
+ ldrne r1, [r3, #976]
+ add r1, r1, #8
+.L2483:
+ bl memcpy
+ mov r2, sp
+ bic r3, r2, #8128
+ bic r3, r3, #63
+ ldr r3, [r3, #8]
+@ 444 "/home/zyf/rk30/rk3288_android4.4/kernel/arch/arm/include/asm/uaccess.h" 1
+ adds r2, r5, #520; sbcccs r2, r2, r3; movcc r3, #0
+@ 0 "" 2
+ cmp r3, #0
+ bne .L2470
+ mov r0, r5
+ mov r1, sp
+ mov r2, #520
+ bl __copy_to_user
+.L2478:
+ subs r4, r0, #0
+ bne .L2470
+ b .L2404
+.L2396:
+ ldr r0, .L2488+176
+ bl printk
+ mov r0, sp
+ mov r1, r5
+ mov r2, #520
+ bl rk_copy_from_user
+ cmp r0, #0
+ beq .L2429
+.L2477:
+ ldr r0, .L2488+180
+.L2479:
+ bl printk
+ b .L2470
+.L2429:
+ ldr r2, [sp, #0]
+ ldr r3, .L2488+168
+ cmp r2, r3
+ bne .L2472
+ ldr r2, [sp, #4]
+ cmp r2, #504
+ bhi .L2472
+ ldr r3, .L2488+28
+ add r2, r2, #8
+ ldr r4, .L2488+52
+ cmp r6, r3
+ bne .L2430
+ mov r1, sp
+ ldr r0, [r4, #972]
+ bl memcpy
+ mov r0, #2
+ ldr r1, [r4, #972]
+ b .L2476
+.L2430:
+ mov r1, sp
+ ldr r0, [r4, #976]
+ bl memcpy
+ ldr r1, [r4, #976]
+ mov r0, #3
+.L2476:
+ bl StorageSysDataStore
+ mov r4, r0
+ b .L2404
+.L2484:
+ bl rknand_dev_flush
+.L2475:
+ mov r4, #0
+ b .L2404
+.L2472:
+ mvn r4, #0
+.L2404:
+ mov r1, r4
+ ldr r0, .L2488+184
+ bl printk
+ b .L2380
+.L2431:
+ mvn r4, #21
+ b .L2380
+.L2450:
+ mvn r4, #1
+ b .L2380
+.L2470:
+ mvn r4, #13
+.L2380:
+ mov r0, r4
+ add sp, sp, #520
+ ldmfd sp!, {r4, r5, r6, pc}
+.L2489:
+ .align 2
+.L2488:
+ .word 1074033155
+ .word 1074029694
+ .word 1074029570
+ .word 1074031656
+ .word 1074029695
+ .word 1074031666
+ .word 1074033235
+ .word 1074034193
+ .word 1074034194
+ .word .LC134
+ .word .LC136
+ .word .LC137
+ .word .LC138
+ .word .LANCHOR2
+ .word .LC139
+ .word .LC140
+ .word .LC141
+ .word .LC142
+ .word .LC143
+ .word .LC144
+ .word .LC145
+ .word .LC146
+ .word .LC147
+ .word 1263358532
+ .word -1067903959
+ .word .LC148
+ .word .LC149
+ .word .LC150
+ .word 1112753220
+ .word 1146313043
+ .word .LC151
+ .word 1112755781
+ .word .LC152
+ .word 1094995539
+ .word .LANCHOR2+456
+ .word .LC153
+ .word 1074031676
+ .word .LC154
+ .word .LC155
+ .word 1280262987
+ .word .LC156
+ .word .LC157
+ .word 1145980246
+ .word 1074034192
+ .word .LC158
+ .word .LC135
+ .word .LC159
+ .fnend
+ .size rknand_sys_storage_ioctl, .-rknand_sys_storage_ioctl
+ .align 2
+ .global rk_ftl_storage_sys_init
+ .type rk_ftl_storage_sys_init, %function
+rk_ftl_storage_sys_init:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, r4, r5, r6, r7, lr}
+ .save {r3, r4, r5, r6, r7, lr}
+ mov r2, #512
+ ldr r4, .L2493
+ mov r6, #0
+ add r0, r4, #456
+ ldr r5, [r4, #416]
+ str r6, [r4, #436]
+ add r1, r5, #1536
+ add r3, r5, #512
+ str r5, [r4, #452]
+ str r3, [r4, #440]
+ add r3, r5, #1024
+ str r1, [r4, #976]
+ str r3, [r4, #972]
+ bl memcpy
+ ldr r7, [r5, #508]
+ ldr r3, [r5, #16]
+ cmp r7, r6
+ str r6, [r4, #444]
+ str r6, [r4, #968]
+ str r3, [r4, #448]
+ beq .L2491
+ mov r0, r5
+ mov r1, #508
+ bl JSHash
+ cmp r7, r0
+ beq .L2491
+ str r6, [r5, #16]
+ ldr r0, .L2493+4
+ str r6, [r4, #448]
+ bl printk
+.L2491:
+ ldr r3, [r4, #448]
+ mov r0, #2
+ ldr r4, .L2493
+ cmp r3, #0
+ ldrne r2, .L2493+8
+ ldrne r3, .L2493
+ ldr r1, [r4, #972]
+ strne r2, [r3, #444]
+ bl StorageSysDataLoad
+ ldr r1, [r4, #976]
+ mov r0, #3
+ bl StorageSysDataLoad
+ ldr r0, .L2493+12
+ ldmfd sp!, {r3, r4, r5, r6, r7, lr}
+ b misc_register
+.L2494:
+ .align 2
+.L2493:
+ .word .LANCHOR2
+ .word .LC160
+ .word -1067903959
+ .word .LANCHOR1+4032
+ .fnend
+ .size rk_ftl_storage_sys_init, .-rk_ftl_storage_sys_init
+ .align 2
+ .global StorageSysDataDeInit
+ .type StorageSysDataDeInit, %function
+StorageSysDataDeInit:
+ .fnstart
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ stmfd sp!, {r3, lr}
+ .save {r3, lr}
+ ldr r0, .L2496
+ bl misc_deregister
+ mov r0, #0
+ ldmfd sp!, {r3, pc}
+.L2497:
+ .align 2
+.L2496:
+ .word .LANCHOR1+4032
+ .fnend
+ .size StorageSysDataDeInit, .-StorageSysDataDeInit
+ .global rknand_sys_storage_fops
+ .global gTable_Crc32
+ .global SecureBootUnlockTryCount
+ .global SecureBootCheckOK
+ .global SecureBootEn
+ .global gpVendor1Info
+ .global gpVendor0Info
+ .global g_idb_buffer
+ .global gSnSectorData
+ .global gpDrmKeyInfo
+ .global gpBootConfig
+ .global gLoaderBootInfo
+ .global RK29_NANDC1_REG_BASE
+ .global RK29_NANDC_REG_BASE
+ .global gc_ink_free_return_value
+ .global FtlUpdateVaildLpnCount
+ .global g_ect_tbl_power_up_flush
+ .global last_cache_match_count
+ .global power_up_flag
+ .global g_LowFormat
+ .global gFtlInitStatus
+ .global DeviceCapacity
+ .global ToshibaRefValue
+ .global Toshiba15RefValue
+ .global ToshibaA19RefValue
+ .global SamsungRefValue
+ .global refValueDefault
+ .global FbbtBlk
+ .global random_seed
+ .global gSlcNandParaInfo
+ .global gNandParaInfo
+ .global NandFlashParaTbl
+ .global g_power_lost_recovery_flag
+ .global c_mlc_erase_count_value
+ .global g_recovery_ppa_tbl
+ .global g_recovery_page_min_ver
+ .global g_recovery_page_num
+ .global g_cur_erase_blk
+ .global g_gc_skip_write_count
+ .global g_gc_head_data_block_count
+ .global g_gc_head_data_block
+ .global g_ftl_nand_free_count
+ .global g_in_swl_replace
+ .global g_in_gc_progress
+ .global g_all_blk_used_slc_mode
+ .global g_max_erase_count
+ .global g_totle_sys_slc_erase_count
+ .global g_totle_slc_erase_count
+ .global g_min_erase_count
+ .global g_totle_avg_erase_count
+ .global g_totle_mlc_erase_count
+ .global g_totle_l2p_write_count
+ .global g_totle_cache_write_count
+ .global g_tmp_data_superblock_id
+ .global g_totle_read_page_count
+ .global g_totle_discard_page_count
+ .global g_totle_read_sector
+ .global g_totle_write_sector
+ .global g_totle_write_page_count
+ .global g_totle_gc_page_count
+ .global g_gc_blk_index
+ .global g_gc_merge_free_blk_threshold
+ .global g_gc_free_blk_threshold
+ .global g_gc_bad_block_temp_tbl
+ .global g_gc_bad_block_gc_index
+ .global g_gc_bad_block_temp_num
+ .global g_gc_next_blk_1
+ .global g_gc_next_blk
+ .global g_gc_cur_blk_max_valid_pages
+ .global g_gc_cur_blk_valid_pages
+ .global g_gc_page_offset
+ .global g_gc_blk_num
+ .global p_gc_blk_tbl
+ .global p_gc_page_info
+ .global g_sys_ext_data
+ .global g_sys_save_data
+ .global gp_last_act_superblock
+ .global g_gc_superblock
+ .global g_gc_temp_superblock
+ .global g_buffer_superblock
+ .global g_active_superblock
+ .global g_num_data_superblocks
+ .global g_num_free_superblocks
+ .global p_data_block_list_tail
+ .global p_data_block_list_head
+ .global p_free_data_block_list_head
+ .global p_data_block_list_table
+ .global g_l2p_last_update_region_id
+ .global p_l2p_map_buf
+ .global p_l2p_ram_map
+ .global g_totle_vendor_block
+ .global p_vendor_region_ppn_table
+ .global p_vendor_block_ver_table
+ .global p_vendor_block_valid_page_count
+ .global p_vendor_block_table
+ .global g_totle_map_block
+ .global p_map_region_ppn_table
+ .global p_map_block_ver_table
+ .global p_map_block_valid_page_count
+ .global p_map_block_table
+ .global p_blk_mode_table
+ .global p_valid_page_count_check_table
+ .global p_valid_page_count_table
+ .global g_totle_swl_count
+ .global p_swl_mul_table
+ .global p_erase_count_table
+ .global g_ect_tbl_info_size
+ .global gp_ect_tbl_info
+ .global g_gc_num_req
+ .global c_gc_page_buf_num
+ .global gp_gc_page_buf_info
+ .global p_gc_data_buf
+ .global p_gc_spare_buf
+ .global p_io_spare_buf
+ .global p_io_data_buf_1
+ .global p_io_data_buf_0
+ .global p_sys_spare_buf
+ .global p_vendor_data_buf
+ .global p_sys_data_buf_1
+ .global p_sys_data_buf
+ .global g_wr_page_num
+ .global req_wr_io
+ .global c_wr_page_buf_num
+ .global p_wr_io_data_buf
+ .global p_wr_io_spare_buf
+ .global p_plane_order_table
+ .global g_req_cache
+ .global req_gc_dst
+ .global req_gc
+ .global req_erase
+ .global req_prgm
+ .global req_read
+ .global req_sys
+ .global gVendorBlkInfo
+ .global gL2pMapInfo
+ .global gSysFreeQueue
+ .global gSysInfo
+ .global gBbtInfo
+ .global g_inkDie_check_enable
+ .global g_SlcPartLbaEndSector
+ .global g_MaxLbn
+ .global g_VaildLpn
+ .global g_MaxLpn
+ .global g_MaxLbaSector
+ .global g_GlobalDataVersion
+ .global g_GlobalSysVersion
+ .global ftl_gc_temp_power_lost_recovery_flag
+ .global c_ftl_nand_max_data_blks
+ .global c_ftl_nand_data_op_blks_per_plane
+ .global c_ftl_nand_data_blks_per_plane
+ .global c_ftl_nand_max_sys_blks
+ .global c_ftl_nand_init_sys_blks_per_plane
+ .global c_ftl_nand_sys_blks_per_plane
+ .global c_ftl_vendor_part_size
+ .global c_ftl_nand_max_vendor_blks
+ .global c_ftl_nand_max_map_blks
+ .global c_ftl_nand_map_blks_per_plane
+ .global c_ftl_nand_vendor_region_num
+ .global c_ftl_nand_l2pmap_ram_region_num
+ .global c_ftl_nand_map_region_num
+ .global c_ftl_nand_totle_phy_blks
+ .global c_ftl_nand_reserved_blks
+ .global c_ftl_nand_byte_pre_oob
+ .global c_ftl_nand_byte_pre_page
+ .global c_ftl_nand_sec_pre_page_shift
+ .global c_ftl_nand_sec_pre_page
+ .global c_ftl_nand_page_pre_super_blk
+ .global c_ftl_nand_page_pre_slc_blk
+ .global c_ftl_nand_page_pre_blk
+ .global c_ftl_nand_bbm_buf_size
+ .global c_ftl_nand_ext_blk_pre_plane
+ .global c_ftl_nand_blk_pre_plane
+ .global c_ftl_nand_planes_num
+ .global c_ftl_nand_blks_per_die_shift
+ .global c_ftl_nand_blks_per_die
+ .global c_ftl_nand_planes_per_die
+ .global c_ftl_nand_die_num
+ .global c_ftl_nand_type
+ .global gMasterTempBuf
+ .global gMasterInfo
+ .global gNandcDumpWriteEn
+ .global gToggleModeClkDiv
+ .global gBootDdrMode
+ .global gNandcEccBits
+ .global gpNandc1
+ .global gpNandc
+ .global g_nandc_version_data
+ .global gNandcVer
+ .global gNandChipMap
+ .global gNandIDataBuf
+ .global FlashDdrTunningReadCount
+ .global FlashWaitBusyScheduleEn
+ .global gNandPhyInfo
+ .global gFlashProgCheckSpareBuffer
+ .global gFlashProgCheckBuffer
+ .global gFlashSpareBuffer
+ .global gFlashPageBuffer1
+ .global gFlashPageBuffer0
+ .global gpFlashSaveInfo
+ .global gReadRetryInfo
+ .global gpNandParaInfo
+ .global gNandOptPara
+ .global g_slc2KBNand
+ .global g_maxRetryCount
+ .global g_maxRegNum
+ .global g_retryMode
+ .global gNandIDBResBlkNumSaveInFlash
+ .global gNandIDBResBlkNum
+ .global gNandFlashResEndPageAddr
+ .global gNandFlashInfoBlockAddr
+ .global gNandFlashIdbBlockAddr
+ .global gNandFlashInfoBlockEcc
+ .global gNandFlashIDBEccBits
+ .global gNandFlashEccBits
+ .global gNandRandomizer
+ .global gBlockPageAlignSize
+ .global gTotleBlock
+ .global gNandMaxChip
+ .global gNandMaxDie
+ .global gFlashInterfaceMode
+ .global gFlashSlcMode
+ .global gFlashOnfiModeEn
+ .global gFlashToggleModeEn
+ .global gFlashSdrModeEn
+ .global gMultiPageProgEn
+ .global gMultiPageReadEn
+ .global gpReadRetrial
+ .global mlcPageToSlcPageTbl
+ .global slcPageToMlcPageTbl
+ .global DieAddrs
+ .global gDieOp
+ .global DieCsIndex
+ .global IDByte
+ .global read_retry_cur_offset
+ .section .rodata
+ .set .LANCHOR3,. + 0
+ .type __func__.14422, %object
+ .size __func__.14422, 11
+__func__.14422:
+ .ascii "FtlMemInit\000"
+.LC0:
+ .byte 60
+ .byte 40
+ .byte 24
+ .byte 16
+ .type __func__.15298, %object
+ .size __func__.15298, 21
+__func__.15298:
+ .ascii "FtlVpcCheckAndModify\000"
+ .section .rodata.str1.1,"aMS",%progbits,1
+.LC1:
+ .ascii "Context allocation failed\012\000"
+.LC2:
+ .ascii "FlashEraseBlocks pageAddr error %x \012\000"
+.LC3:
+ .ascii "No.%d FLASH ID:%x %x %x %x %x %x\012\000"
+.LC4:
+ .ascii "phyBlk = 0x%x die = %d block_in_die = 0x%x 0x%8x\012"
+ .ascii "\000"
+.LC5:
+ .ascii "FLASH INFO:\012\000"
+.LC6:
+ .ascii "FLASH ID: %x\012\000"
+.LC7:
+ .ascii "Device Capacity: %d MB\012\000"
+.LC8:
+ .ascii "FMWAIT: %x %x %x %x\012\000"
+.LC9:
+ .ascii "FTL INFO:\012\000"
+.LC10:
+ .ascii "g_MaxLpn = 0x%x\012\000"
+.LC11:
+ .ascii "g_VaildLpn = 0x%x\012\000"
+.LC12:
+ .ascii "read_page_count = 0x%x\012\000"
+.LC13:
+ .ascii "discard_page_count = 0x%x\012\000"
+.LC14:
+ .ascii "write_page_count = 0x%x\012\000"
+.LC15:
+ .ascii "cache_write_count = 0x%x\012\000"
+.LC16:
+ .ascii "l2p_write_count = 0x%x\012\000"
+.LC17:
+ .ascii "gc_page_count = 0x%x\012\000"
+.LC18:
+ .ascii "totle_write = %d MB\012\000"
+.LC19:
+ .ascii "totle_read = %d MB\012\000"
+.LC20:
+ .ascii "GSV = 0x%x\012\000"
+.LC21:
+ .ascii "GDV = 0x%x\012\000"
+.LC22:
+ .ascii "bad blk num = %d %d\012\000"
+.LC23:
+ .ascii "free_superblocks = 0x%x\012\000"
+.LC24:
+ .ascii "mlc_EC = 0x%x\012\000"
+.LC25:
+ .ascii "slc_EC = 0x%x\012\000"
+.LC26:
+ .ascii "avg_EC = 0x%x\012\000"
+.LC27:
+ .ascii "sys_EC = 0x%x\012\000"
+.LC28:
+ .ascii "max_EC = 0x%x\012\000"
+.LC29:
+ .ascii "min_EC = 0x%x\012\000"
+.LC30:
+ .ascii "PLT = 0x%x\012\000"
+.LC31:
+ .ascii "POT = 0x%x\012\000"
+.LC32:
+ .ascii "MaxSector = 0x%x\012\000"
+.LC33:
+ .ascii "init_sys_blks_pp = 0x%x\012\000"
+.LC34:
+ .ascii "sys_blks_pp = 0x%x\012\000"
+.LC35:
+ .ascii "free sysblock = 0x%x\012\000"
+.LC36:
+ .ascii "data_blks_pp = 0x%x\012\000"
+.LC37:
+ .ascii "data_op_blks_pp = 0x%x\012\000"
+.LC38:
+ .ascii "max_data_blks = 0x%x\012\000"
+.LC39:
+ .ascii "Sys.id = 0x%x\012\000"
+.LC40:
+ .ascii "Bbt.id = 0x%x\012\000"
+.LC41:
+ .ascii "ACT.page = 0x%x\012\000"
+.LC42:
+ .ascii "ACT.plane = 0x%x\012\000"
+.LC43:
+ .ascii "ACT.id = 0x%x\012\000"
+.LC44:
+ .ascii "ACT.mode = 0x%x\012\000"
+.LC45:
+ .ascii "ACT.a_pages = 0x%x\012\000"
+.LC46:
+ .ascii "ACT VPC = 0x%x\012\000"
+.LC47:
+ .ascii "BUF.page = 0x%x\012\000"
+.LC48:
+ .ascii "BUF.plane = 0x%x\012\000"
+.LC49:
+ .ascii "BUF.id = 0x%x\012\000"
+.LC50:
+ .ascii "BUF.mode = 0x%x\012\000"
+.LC51:
+ .ascii "BUF.a_pages = 0x%x\012\000"
+.LC52:
+ .ascii "BUF VPC = 0x%x\012\000"
+.LC53:
+ .ascii "TMP.page = 0x%x\012\000"
+.LC54:
+ .ascii "TMP.plane = 0x%x\012\000"
+.LC55:
+ .ascii "TMP.id = 0x%x\012\000"
+.LC56:
+ .ascii "TMP.mode = 0x%x\012\000"
+.LC57:
+ .ascii "TMP.a_pages = 0x%x\012\000"
+.LC58:
+ .ascii "GC.page = 0x%x\012\000"
+.LC59:
+ .ascii "GC.plane = 0x%x\012\000"
+.LC60:
+ .ascii "GC.id = 0x%x\012\000"
+.LC61:
+ .ascii "GC.mode = 0x%x\012\000"
+.LC62:
+ .ascii "GC.a_pages = 0x%x\012\000"
+.LC63:
+ .ascii "WR_CHK = 0x%x %x %x %x\012\000"
+.LC64:
+ .ascii "Read Err Cnt = 0x%x\012\000"
+.LC65:
+ .ascii "Prog Err Cnt = 0x%x\012\000"
+.LC66:
+ .ascii "gc_free_blk_th= 0x%x\012\000"
+.LC67:
+ .ascii "gc_merge_free_blk_th= 0x%x\012\000"
+.LC68:
+ .ascii "gc_skip_write_count= 0x%x\012\000"
+.LC69:
+ .ascii "gc_blk_index= 0x%x\012\000"
+.LC70:
+ .ascii "free min EC= 0x%x\012\000"
+.LC71:
+ .ascii "free max EC= 0x%x\012\000"
+.LC72:
+ .ascii "GC__SB VPC = 0x%x\012\000"
+.LC73:
+ .ascii "%d. [0x%x]=0x%x 0x%x 0x%x\012\000"
+.LC74:
+ .ascii "free %d. [0x%x] 0x%x 0x%x\012\000"
+.LC75:
+ .ascii "%s\012\000"
+.LC76:
+ .ascii "FTL version: 5.0.36 20170316\000"
+.LC77:
+ .ascii "GetSwlReplaceBlock min_ec_id =%x %x\012\000"
+.LC78:
+ .ascii "swblk %x ,avg = %x max= %x vpc= %x,ec=%x ,max ec=%x"
+ .ascii "\012\000"
+.LC79:
+ .ascii "FtlGcRefreshBlock 0x%x \012\000"
+.LC80:
+ .ascii "FtlGcMarkBadPhyBlk %d 0x%x\012\000"
+.LC81:
+ .ascii "%s error allocating memory. return -1\012\000"
+.LC82:
+ .ascii "%s 0x%x:\000"
+.LC83:
+ .ascii "%x \000"
+.LC84:
+ .ascii "\000"
+.LC85:
+ .ascii "%d statReg->V6.mtrans_cnt=%d flReg.V6.page_num=%d\012"
+ .ascii "\000"
+.LC86:
+ .ascii "nandc:\000"
+.LC87:
+ .ascii "%d flReg.d32=%x %x\012\000"
+.LC88:
+ .ascii "ECC:%d\012\000"
+.LC89:
+ .ascii "sdr read ok %x ecc=%d\012\000"
+.LC90:
+ .ascii "sync para %d\012\000"
+.LC91:
+ .ascii "TOG mode Read error %x %x\012\000"
+.LC92:
+ .ascii "FlashLoadPhyInfo fail %x!!\012\000"
+.LC93:
+ .ascii "read retry status %x %x %x\012\000"
+.LC94:
+ .ascii "Read pageadd=%x ecc=%x err=%x\012\000"
+.LC95:
+ .ascii "data:\000"
+.LC96:
+ .ascii "spare:\000"
+.LC97:
+ .ascii "ReadRetry pageadd=%x ecc=%x err=%x\012\000"
+.LC98:
+ .ascii "slc mode\000"
+.LC99:
+ .ascii "no ect\000"
+.LC100:
+ .ascii "prog error: = %x\012\000"
+.LC101:
+ .ascii "prog read error: = %x\012\000"
+.LC102:
+ .ascii "prog read s error: = %x %x %x\012\000"
+.LC103:
+ .ascii "prog read d error: = %x %x %x\012\000"
+.LC104:
+ .ascii "FtlBbmTblFlush id=%x,page=%x,previd=%x cnt=%d\012\000"
+.LC105:
+ .ascii "FtlBbmTblFlush error:%x\012\000"
+.LC106:
+ .ascii "FtlGcFreeBadSuperBlk 0x%x\012\000"
+.LC107:
+ .ascii "decrement_vpc_count %x = %d\012\000"
+.LC108:
+ .ascii "FlashMakeFactorBbt %d\012\000"
+.LC109:
+ .ascii "bad block:%d %d\012\000"
+.LC110:
+ .ascii "FMFB:%d %d\012\000"
+.LC111:
+ .ascii "E:bad block:%d\012\000"
+.LC112:
+ .ascii "FMFB:Save %d %d\012\000"
+.LC113:
+ .ascii "spuer block %x vpn is 0\012 \000"
+.LC114:
+ .ascii "...%s enter...\012\000"
+.LC115:
+ .ascii "FtlCheckVpc %x = %x %x\012\000"
+.LC116:
+ .ascii "%d GC datablk = %x vpc %x %x\012\000"
+.LC117:
+ .ascii "SWL %x, FSB = %x vpc= %x,ec=%x th=%x\012\000"
+.LC118:
+ .ascii "Ftlwrite decrement_vpc_count %x = %d\012\000"
+.LC119:
+ .ascii "FtlInit %x\012\000"
+.LC120:
+ .ascii "FtlWrite: lpa error:%x %x\012\000"
+.LC121:
+ .ascii "FLFB:%d %d\012\000"
+.LC122:
+ .ascii "BBT:\000"
+.LC123:
+ .ascii "IdBlockReadData %x %x\012\000"
+.LC124:
+ .ascii "IdBlockReadData %x %x ret= %x\012\000"
+.LC125:
+ .ascii "IDBlockWriteData %x %x\012\000"
+.LC126:
+ .ascii "IDBlockWriteData %x %x ret= %x\012\000"
+.LC127:
+ .ascii "idblk:\000"
+.LC128:
+ .ascii "idb reverse %x %x\012\000"
+.LC129:
+ .ascii "write_idblock totle_sec %x %x\012\000"
+.LC130:
+ .ascii "write and check error:%d idb=%x,offset=%x,r=%x,w=%x"
+ .ascii " \012\000"
+.LC131:
+ .ascii "write\000"
+.LC132:
+ .ascii "read\000"
+.LC133:
+ .ascii "write_idblock error\012\000"
+.LC134:
+ .ascii "READ_SECTOR_IO\012\000"
+.LC135:
+ .ascii "rk_copy_from_user error \012\000"
+.LC136:
+ .ascii "READ_SECTOR_IO %x %x\012\000"
+.LC137:
+ .ascii "rk_copy_to_user error\012\000"
+.LC138:
+ .ascii "WRITE_SECTOR_IO\012\000"
+.LC139:
+ .ascii "WRITE_SECTOR_IO %x %x\012\000"
+.LC140:
+ .ascii "END_WRITE_SECTOR_IO\012\000"
+.LC141:
+ .ascii "END_WRITE_SECTOR_IO %x %x\012\000"
+.LC142:
+ .ascii "GET_FLASH_INFO_IO\012\000"
+.LC143:
+ .ascii "GET_BAD_BLOCK_IO\012\000"
+.LC144:
+ .ascii "bbt:\000"
+.LC145:
+ .ascii "GET_LOCK_FLAG_IO\012\000"
+.LC146:
+ .ascii "GET_PUBLIC_KEY_IO\012\000"
+.LC147:
+ .ascii "RKNAND_GET_DRM_KEY\012\000"
+.LC148:
+ .ascii "RKNAND_STORE_DRM_KEY\012\000"
+.LC149:
+ .ascii "copy_from_user error \012\000"
+.LC150:
+ .ascii "RKNAND_DIASBLE_SECURE_BOOT\012\000"
+.LC151:
+ .ascii "RKNAND_ENASBLE_SECURE_BOOT\012\000"
+.LC152:
+ .ascii "RKNAND_GET_SN_SECTOR\012\000"
+.LC153:
+ .ascii "RKNAND_LOADER_UNLOCK\012\000"
+.LC154:
+ .ascii "RKNAND_LOADER_STATUS\012\000"
+.LC155:
+ .ascii "RKNAND_LOADER_LOCK\012\000"
+.LC156:
+ .ascii "LockKey not match %d\012\000"
+.LC157:
+ .ascii "RKNAND_GET_VENDOR_SECTOR\012\000"
+.LC158:
+ .ascii "RKNAND_STORE_VENDOR_SECTOR\012\000"
+.LC159:
+ .ascii "return ret = %lx\012\000"
+.LC160:
+ .ascii "secureBootEn check error\012\000"
+.LC161:
+ .ascii "rknand_sys_storage\000"
+ .data
+ .align 2
+ .set .LANCHOR1,. + 0
+ .type random_seed, %object
+ .size random_seed, 256
+random_seed:
+ .short 22378
+ .short 1512
+ .short 25245
+ .short 17827
+ .short 25756
+ .short 19440
+ .short 9026
+ .short 10030
+ .short 29528
+ .short 20467
+ .short 29676
+ .short 24432
+ .short 31328
+ .short 6872
+ .short 13426
+ .short 13842
+ .short 8783
+ .short 1108
+ .short 782
+ .short 28837
+ .short 30729
+ .short 9505
+ .short 18676
+ .short 23085
+ .short 18730
+ .short 1085
+ .short 32609
+ .short 14697
+ .short 20858
+ .short 15170
+ .short 30365
+ .short 1607
+ .short 32298
+ .short 4995
+ .short 18905
+ .short 1976
+ .short 9592
+ .short 20204
+ .short 17443
+ .short 13615
+ .short 23330
+ .short 29369
+ .short 13947
+ .short 9398
+ .short 32398
+ .short 8984
+ .short 27600
+ .short 21785
+ .short 6019
+ .short 6311
+ .short 31598
+ .short 30210
+ .short 19327
+ .short 13896
+ .short 11347
+ .short 27545
+ .short 3107
+ .short 26575
+ .short 32270
+ .short 19852
+ .short 20601
+ .short 8349
+ .short 9290
+ .short 29819
+ .short 13579
+ .short 3661
+ .short 28676
+ .short 27331
+ .short 32574
+ .short 8693
+ .short 31253
+ .short 9081
+ .short 5399
+ .short 6842
+ .short 20087
+ .short 5537
+ .short 1274
+ .short 11617
+ .short 9530
+ .short 4866
+ .short 8035
+ .short 23219
+ .short 1178
+ .short 23272
+ .short 7383
+ .short 18944
+ .short 12488
+ .short 12871
+ .short 29340
+ .short 20532
+ .short 11022
+ .short 22514
+ .short 228
+ .short 22363
+ .short 24978
+ .short 14584
+ .short 12138
+ .short 3092
+ .short 17916
+ .short 16863
+ .short 14554
+ .short 31457
+ .short 29474
+ .short 25311
+ .short 24121
+ .short 3684
+ .short 28037
+ .short 22865
+ .short 22839
+ .short 25217
+ .short 13217
+ .short 27186
+ .short 14938
+ .short 11180
+ .short 29754
+ .short 24180
+ .short 15150
+ .short 32455
+ .short 20434
+ .short 23848
+ .short 29983
+ .short 16120
+ .short 14769
+ .short 20041
+ .short 29803
+ .short 28406
+ .short 17598
+ .short 28087
+ .type NandFlashParaTbl, %object
+ .size NandFlashParaTbl, 2304
+NandFlashParaTbl:
+ .byte 6
+ .byte 44
+ .byte 100
+ .byte 68
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte 68
+ .byte 68
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1064
+ .short 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte 104
+ .byte 4
+ .byte 74
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 5
+ .byte 44
+ .byte -120
+ .byte 4
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte -88
+ .byte 5
+ .byte -53
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 2
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte 104
+ .byte 4
+ .byte 70
+ .byte -119
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte 72
+ .byte 4
+ .byte 74
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1024
+ .short 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte -124
+ .byte 100
+ .byte 60
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 32
+ .short 512
+ .byte 2
+ .byte 2
+ .short 1024
+ .short 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte -124
+ .byte 100
+ .byte 84
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 32
+ .short 512
+ .byte 2
+ .byte 2
+ .short 1024
+ .short 479
+ .byte 4
+ .byte 18
+ .byte 60
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte -41
+ .byte -108
+ .byte 62
+ .byte -124
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .short 128
+ .byte 2
+ .byte 2
+ .short 4096
+ .short 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte 72
+ .byte 4
+ .byte 70
+ .byte -123
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1024
+ .short 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte -120
+ .byte 5
+ .byte -58
+ .byte -119
+ .byte 0
+ .byte 4
+ .byte 2
+ .byte 8
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 5
+ .byte 44
+ .byte -120
+ .byte 36
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte 104
+ .byte 0
+ .byte 39
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .short 128
+ .byte 1
+ .byte 2
+ .short 2048
+ .short 287
+ .byte 0
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 5
+ .byte 44
+ .byte 100
+ .byte 100
+ .byte 86
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 24
+ .short 512
+ .byte 2
+ .byte 2
+ .short 700
+ .short 479
+ .byte 4
+ .byte 18
+ .byte 60
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte -124
+ .byte -59
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 2
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte -43
+ .byte -47
+ .byte -90
+ .byte 104
+ .byte 0
+ .byte 4
+ .byte 2
+ .byte 8
+ .short 64
+ .byte 1
+ .byte 2
+ .short 2048
+ .short 279
+ .byte 0
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 44
+ .byte -36
+ .byte -112
+ .byte -90
+ .byte 84
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .short 64
+ .byte 1
+ .byte 2
+ .short 1024
+ .short 279
+ .byte 0
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 5
+ .byte -75
+ .byte 100
+ .byte 100
+ .byte 86
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 24
+ .short 512
+ .byte 2
+ .byte 2
+ .short 700
+ .short 479
+ .byte 4
+ .byte 18
+ .byte 60
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 5
+ .byte 44
+ .byte 100
+ .byte 68
+ .byte 50
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 32
+ .short 512
+ .byte 2
+ .byte 1
+ .short 1088
+ .short 1503
+ .byte 5
+ .byte 19
+ .byte 60
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .space 4
+ .byte 5
+ .byte 44
+ .byte 100
+ .byte 100
+ .byte 60
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 32
+ .short 512
+ .byte 2
+ .byte 1
+ .short 1044
+ .short 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte -108
+ .byte -46
+ .byte 4
+ .byte 67
+ .byte 2
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 473
+ .byte 1
+ .byte 1
+ .byte 24
+ .byte 32
+ .byte 4
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -41
+ .byte -108
+ .byte -38
+ .byte 116
+ .byte -61
+ .byte 2
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1024
+ .short 473
+ .byte 1
+ .byte 2
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -41
+ .byte -108
+ .byte -111
+ .byte 96
+ .byte 68
+ .byte 2
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1046
+ .short 473
+ .byte 1
+ .byte 3
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte -108
+ .byte -38
+ .byte 116
+ .byte -60
+ .byte 2
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2090
+ .short 473
+ .byte 1
+ .byte 4
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte -108
+ .byte -21
+ .byte 116
+ .byte 68
+ .byte 2
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1066
+ .short 473
+ .byte 1
+ .byte 3
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -43
+ .byte -108
+ .byte -38
+ .byte 116
+ .byte -60
+ .byte 2
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 530
+ .short 473
+ .byte 1
+ .byte 3
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -41
+ .byte -108
+ .byte -102
+ .byte 116
+ .byte 66
+ .byte 2
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1024
+ .short 281
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 4
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte 20
+ .byte -89
+ .byte 66
+ .byte 74
+ .byte 2
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1060
+ .short 473
+ .byte 2
+ .byte 5
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -41
+ .byte 20
+ .byte -98
+ .byte 52
+ .byte 74
+ .byte 2
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1056
+ .short 473
+ .byte 2
+ .byte 5
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte -108
+ .byte -89
+ .byte 66
+ .byte 72
+ .byte 2
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1060
+ .short 473
+ .byte 2
+ .byte 5
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte 20
+ .byte -85
+ .byte 66
+ .byte 74
+ .byte 2
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1056
+ .short 473
+ .byte 2
+ .byte 6
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -83
+ .byte 58
+ .byte 20
+ .byte -85
+ .byte 66
+ .byte 74
+ .byte 2
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2092
+ .short 473
+ .byte 2
+ .byte 5
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -119
+ .byte 100
+ .byte 68
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -119
+ .byte -120
+ .byte 36
+ .byte 75
+ .byte -87
+ .byte -124
+ .byte 7
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -119
+ .byte -120
+ .byte 36
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -119
+ .byte 104
+ .byte 36
+ .byte 74
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 8
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -119
+ .byte 104
+ .byte 4
+ .byte 74
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 8
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -119
+ .byte -41
+ .byte -108
+ .byte 62
+ .byte -124
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 8
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -119
+ .byte 104
+ .byte 4
+ .byte 70
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 8
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 87
+ .byte 1
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 1
+ .short 1060
+ .short 1473
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 87
+ .byte 1
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 1
+ .short 2092
+ .short 1473
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte 58
+ .byte -123
+ .byte -109
+ .byte 118
+ .byte 87
+ .byte 1
+ .byte 2
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 1
+ .short 2092
+ .short 1505
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -43
+ .byte -124
+ .byte 50
+ .byte 114
+ .byte 86
+ .byte 1
+ .byte 1
+ .byte 16
+ .short 128
+ .byte 2
+ .byte 1
+ .short 2056
+ .short 1473
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -108
+ .byte 50
+ .byte 118
+ .byte 86
+ .byte 1
+ .byte 1
+ .byte 16
+ .short 128
+ .byte 2
+ .byte 2
+ .short 2058
+ .short 1489
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -108
+ .byte -126
+ .byte 118
+ .byte 86
+ .byte 1
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2062
+ .short 1489
+ .byte 1
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 80
+ .byte 1
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1066
+ .short 1497
+ .byte 2
+ .byte 34
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte 58
+ .byte -107
+ .byte -109
+ .byte 122
+ .byte 80
+ .byte 1
+ .byte 2
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1066
+ .short 1497
+ .byte 2
+ .byte 34
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -108
+ .byte 50
+ .byte 118
+ .byte 85
+ .byte 1
+ .byte 1
+ .byte 16
+ .short 128
+ .byte 2
+ .byte 2
+ .short 2050
+ .short 401
+ .byte 2
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 87
+ .byte 1
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1058
+ .short 1497
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 80
+ .byte 1
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 1
+ .short 1060
+ .short 1473
+ .byte 2
+ .byte 34
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 81
+ .byte 1
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1074
+ .short 1497
+ .byte 2
+ .byte 35
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte 58
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 81
+ .byte 1
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2106
+ .short 1497
+ .byte 2
+ .byte 35
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 81
+ .byte 1
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 1
+ .short 1056
+ .short 1497
+ .byte 2
+ .byte 35
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 87
+ .byte 8
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1058
+ .short 1497
+ .byte 2
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 87
+ .byte 8
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 1
+ .short 1060
+ .short 1473
+ .byte 2
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -92
+ .byte -126
+ .byte 118
+ .byte 86
+ .byte 8
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2082
+ .short 473
+ .byte 1
+ .byte 65
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 80
+ .byte 8
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1066
+ .short 1497
+ .byte 2
+ .byte 67
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 80
+ .byte 8
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 1
+ .short 1060
+ .short 1473
+ .byte 2
+ .byte 67
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -92
+ .byte -126
+ .byte 118
+ .byte -41
+ .byte 8
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2090
+ .short 1241
+ .byte 1
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 87
+ .byte 8
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 1
+ .short 2092
+ .short 1473
+ .byte 2
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte 58
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 81
+ .byte 8
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2106
+ .short 1497
+ .byte 2
+ .byte 68
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 81
+ .byte 8
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1074
+ .short 1497
+ .byte 2
+ .byte 68
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte 58
+ .byte -92
+ .byte -109
+ .byte 122
+ .byte 80
+ .byte 8
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2138
+ .short 1497
+ .byte 2
+ .byte 0
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -126
+ .byte 118
+ .byte 86
+ .byte 8
+ .byte 1
+ .byte 16
+ .short 256
+ .byte 2
+ .byte 2
+ .short 2062
+ .short 473
+ .byte 1
+ .byte 0
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte -41
+ .byte 8
+ .byte 1
+ .byte 32
+ .short 256
+ .byte 2
+ .byte 2
+ .short 1058
+ .short 1497
+ .byte 2
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -20
+ .byte -41
+ .byte -108
+ .byte 126
+ .byte 100
+ .byte 68
+ .byte 0
+ .byte 1
+ .byte 16
+ .short 128
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 473
+ .byte 2
+ .byte 49
+ .byte 60
+ .byte 36
+ .byte 3
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -20
+ .byte -34
+ .byte -43
+ .byte 126
+ .byte 104
+ .byte 68
+ .byte 0
+ .byte 2
+ .byte 16
+ .short 128
+ .byte 2
+ .byte 2
+ .short 2048
+ .short 505
+ .byte 2
+ .byte 49
+ .byte 60
+ .byte 36
+ .byte 3
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -20
+ .byte -41
+ .byte -108
+ .byte 122
+ .byte 84
+ .byte 67
+ .byte 0
+ .byte 1
+ .byte 16
+ .short 128
+ .byte 2
+ .byte 2
+ .short 2076
+ .short 409
+ .byte 2
+ .byte 0
+ .byte 40
+ .byte 36
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -20
+ .byte -34
+ .byte -43
+ .byte 122
+ .byte 88
+ .byte 67
+ .byte 0
+ .byte 2
+ .byte 16
+ .short 128
+ .byte 2
+ .byte 2
+ .short 2076
+ .short 441
+ .byte 2
+ .byte 0
+ .byte 40
+ .byte 36
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -20
+ .byte -43
+ .byte -108
+ .byte 118
+ .byte 84
+ .byte 67
+ .byte 0
+ .byte 1
+ .byte 16
+ .short 128
+ .byte 2
+ .byte 2
+ .short 1038
+ .short 281
+ .byte 2
+ .byte 0
+ .byte 24
+ .byte 36
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .byte 6
+ .byte -20
+ .byte -41
+ .byte 20
+ .byte 118
+ .byte 84
+ .byte -62
+ .byte 0
+ .byte 1
+ .byte 16
+ .short 128
+ .byte 2
+ .byte 2
+ .short 2076
+ .short 1169
+ .byte 2
+ .byte 0
+ .byte 24
+ .byte 40
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .type NandOptPara, %object
+ .size NandOptPara, 128
+NandOptPara:
+ .byte 1
+ .byte 0
+ .byte 49
+ .byte 63
+ .byte 0
+ .byte 49
+ .byte -128
+ .byte 21
+ .byte 0
+ .byte 50
+ .byte 17
+ .byte -128
+ .byte 112
+ .byte 120
+ .byte 120
+ .byte 3
+ .byte 1
+ .byte 0
+ .space 14
+ .byte 2
+ .byte 0
+ .byte 49
+ .byte 63
+ .byte 0
+ .byte 49
+ .byte -128
+ .byte 21
+ .byte 0
+ .byte 0
+ .byte 17
+ .byte -127
+ .byte 112
+ .byte -15
+ .byte -14
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 14
+ .byte 3
+ .byte 0
+ .byte 49
+ .byte 63
+ .byte 0
+ .byte 49
+ .byte -128
+ .byte 21
+ .byte 96
+ .byte 96
+ .byte 17
+ .byte -127
+ .byte 112
+ .byte -15
+ .byte -14
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 14
+ .byte 4
+ .byte 0
+ .byte 49
+ .byte 63
+ .byte 0
+ .byte 49
+ .byte -128
+ .byte 21
+ .byte 96
+ .byte 96
+ .byte 17
+ .byte -127
+ .byte 112
+ .byte 112
+ .byte 112
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 14
+ .type gNandParaInfo, %object
+ .size gNandParaInfo, 32
+gNandParaInfo:
+ .byte 0
+ .byte 0
+ .space 5
+ .byte 0
+ .byte 1
+ .byte 8
+ .short 128
+ .byte 2
+ .byte 1
+ .short 2048
+ .short 0
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .type SamsungRefValue, %object
+ .size SamsungRefValue, 64
+SamsungRefValue:
+ .byte -89
+ .byte -92
+ .byte -91
+ .byte -90
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 5
+ .byte 10
+ .byte 0
+ .byte 0
+ .byte 40
+ .byte 0
+ .byte -20
+ .byte -40
+ .byte -19
+ .byte -11
+ .byte -19
+ .byte -26
+ .byte 10
+ .byte 15
+ .byte 5
+ .byte 0
+ .byte 15
+ .byte 10
+ .byte -5
+ .byte -20
+ .byte -24
+ .byte -17
+ .byte -24
+ .byte -36
+ .byte -15
+ .byte -5
+ .byte -2
+ .byte -16
+ .byte 10
+ .byte 0
+ .byte -5
+ .byte -20
+ .byte -48
+ .byte -30
+ .byte -48
+ .byte -62
+ .byte 20
+ .byte 15
+ .byte -5
+ .byte -20
+ .byte -24
+ .byte -5
+ .byte -24
+ .byte -36
+ .byte 30
+ .byte 20
+ .byte -5
+ .byte -20
+ .byte -5
+ .byte -1
+ .byte -5
+ .byte -8
+ .byte 7
+ .byte 12
+ .byte 2
+ .byte 0
+ .type ToshibaA19RefValue, %object
+ .size ToshibaA19RefValue, 45
+ToshibaA19RefValue:
+ .byte 4
+ .byte 5
+ .byte 6
+ .byte 7
+ .byte 13
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 4
+ .byte 4
+ .byte 124
+ .byte 126
+ .byte 0
+ .byte 0
+ .byte 124
+ .byte 120
+ .byte 120
+ .byte 0
+ .byte 124
+ .byte 118
+ .byte 116
+ .byte 114
+ .byte 0
+ .byte 8
+ .byte 8
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 11
+ .byte 126
+ .byte 118
+ .byte 116
+ .byte 0
+ .byte 16
+ .byte 118
+ .byte 114
+ .byte 112
+ .byte 0
+ .byte 2
+ .byte 0
+ .byte 126
+ .byte 124
+ .byte 0
+ .type Toshiba15RefValue, %object
+ .size Toshiba15RefValue, 95
+Toshiba15RefValue:
+ .byte 4
+ .byte 5
+ .byte 6
+ .byte 7
+ .byte 13
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 2
+ .byte 4
+ .byte 2
+ .byte 0
+ .byte 0
+ .byte 8
+ .byte 8
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 124
+ .byte 0
+ .byte 124
+ .byte 124
+ .byte 0
+ .byte 122
+ .byte 0
+ .byte 122
+ .byte 122
+ .byte 0
+ .byte 11
+ .byte 126
+ .byte 118
+ .byte 116
+ .byte 0
+ .byte 120
+ .byte 2
+ .byte 120
+ .byte 122
+ .byte 0
+ .byte 126
+ .byte 4
+ .byte 126
+ .byte 122
+ .byte 0
+ .byte 16
+ .byte 118
+ .byte 114
+ .byte 112
+ .byte 0
+ .byte 118
+ .byte 4
+ .byte 118
+ .byte 120
+ .byte 0
+ .byte 4
+ .byte 4
+ .byte 4
+ .byte 118
+ .byte 0
+ .byte 2
+ .byte 0
+ .byte 126
+ .byte 124
+ .byte 0
+ .byte 6
+ .byte 10
+ .byte 6
+ .byte 2
+ .byte 0
+ .byte 116
+ .byte 124
+ .byte 116
+ .byte 118
+ .byte 0
+ .byte 4
+ .byte 4
+ .byte 124
+ .byte 126
+ .byte 0
+ .byte 0
+ .byte 124
+ .byte 120
+ .byte 120
+ .byte 0
+ .byte 124
+ .byte 118
+ .byte 116
+ .byte 114
+ .byte 0
+ .type ToshibaRefValue, %object
+ .size ToshibaRefValue, 8
+ToshibaRefValue:
+ .byte 0
+ .byte 4
+ .byte 124
+ .byte 120
+ .byte 116
+ .byte 8
+ .byte 12
+ .byte 112
+ .type refValueDefault, %object
+ .size refValueDefault, 28
+refValueDefault:
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 6
+ .byte 10
+ .byte 6
+ .byte 0
+ .byte -3
+ .byte -7
+ .byte -8
+ .byte 0
+ .byte -6
+ .byte -13
+ .byte -15
+ .byte 0
+ .byte -11
+ .byte -20
+ .byte -23
+ .byte 0
+ .byte 0
+ .byte -26
+ .byte -30
+ .byte 0
+ .byte 0
+ .byte -32
+ .byte -37
+ .type gFtlInitStatus, %object
+ .size gFtlInitStatus, 4
+gFtlInitStatus:
+ .word -1
+ .type micron_flash_randomizer_flag, %object
+ .size micron_flash_randomizer_flag, 4
+micron_flash_randomizer_flag:
+ .word 1
+ .type gSlcNandParaInfo, %object
+ .size gSlcNandParaInfo, 32
+gSlcNandParaInfo:
+ .byte 2
+ .byte -104
+ .byte -15
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 1
+ .byte 1
+ .byte 4
+ .short 64
+ .byte 1
+ .byte 1
+ .short 1024
+ .short 256
+ .byte 0
+ .byte 0
+ .byte 16
+ .byte 40
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .space 4
+ .type ftl_gc_temp_block_bops_scan_page_addr, %object
+ .size ftl_gc_temp_block_bops_scan_page_addr, 2
+ftl_gc_temp_block_bops_scan_page_addr:
+ .short -1
+ .space 2
+ .type power_up_flag, %object
+ .size power_up_flag, 4
+power_up_flag:
+ .word 1
+ .type gTable_Crc32, %object
+ .size gTable_Crc32, 1024
+gTable_Crc32:
+ .word 0
+ .word 79760823
+ .word 159521646
+ .word 222500569
+ .word 319043292
+ .word 398801771
+ .word 445001138
+ .word 507977733
+ .word 638086584
+ .word 583622671
+ .word 797603542
+ .word 726367073
+ .word 890002276
+ .word 835540691
+ .word 1015955466
+ .word 944721341
+ .word 1276173168
+ .word 1221711559
+ .word 1167245342
+ .word 1096011177
+ .word 1595207084
+ .word 1540743195
+ .word 1452734146
+ .word 1381497717
+ .word 1780004552
+ .word 1859763071
+ .word 1671081382
+ .word 1734058001
+ .word 2031910932
+ .word 2111671715
+ .word 1889442682
+ .word 1952421581
+ .word -1742620960
+ .word -1662993577
+ .word -1851544178
+ .word -1788698567
+ .word -1960476612
+ .word -1880846965
+ .word -2102944942
+ .word -2040097051
+ .word -1104553128
+ .word -1159145745
+ .word -1213480906
+ .word -1284846207
+ .word -1389499004
+ .word -1444093901
+ .word -1531971862
+ .word -1603339427
+ .word -734958192
+ .word -789553113
+ .word -575441154
+ .word -646808759
+ .word -952804532
+ .word -1007397125
+ .word -826851294
+ .word -898216555
+ .word -231145432
+ .word -151515745
+ .word -71623866
+ .word -8775951
+ .word -516081932
+ .word -436454589
+ .word -390124134
+ .word -327278547
+ .word 880959607
+ .word 809725376
+ .word 1023441689
+ .word 968980142
+ .word 663115435
+ .word 591878940
+ .word 772033989
+ .word 717570162
+ .word 311037391
+ .word 374014072
+ .word 453514913
+ .word 533273366
+ .word 26098451
+ .word 89077412
+ .word 135012477
+ .word 214773194
+ .word 2022882055
+ .word 2085861040
+ .word 1896915049
+ .word 1976675806
+ .word 1805028827
+ .word 1868005484
+ .word 1645516469
+ .word 1725274882
+ .word 1587205823
+ .word 1515969288
+ .word 1461243345
+ .word 1406779494
+ .word 1302257763
+ .word 1231023572
+ .word 1142749965
+ .word 1088288442
+ .word -1398548841
+ .word -1469916384
+ .word -1524511239
+ .word -1579106226
+ .word -1079517109
+ .word -1150882308
+ .word -1239024859
+ .word -1293617518
+ .word -1968456913
+ .word -1905609064
+ .word -2094423999
+ .word -2014794250
+ .word -1716548109
+ .word -1653702588
+ .word -1876060515
+ .word -1796433110
+ .word -525136409
+ .word -462290864
+ .word -382658935
+ .word -303031490
+ .word -206095557
+ .word -143247732
+ .word -97181611
+ .word -17551902
+ .word -960798625
+ .word -1032163864
+ .word -818316495
+ .word -872909178
+ .word -708880765
+ .word -780248268
+ .word -599962131
+ .word -654557094
+ .word 1761919214
+ .word 1841679705
+ .word 1619450752
+ .word 1682429495
+ .word 2046883378
+ .word 2126642053
+ .word 1937960284
+ .word 2000937195
+ .word 1326230870
+ .word 1271767265
+ .word 1183757880
+ .word 1112521615
+ .word 1544067978
+ .word 1489606205
+ .word 1435140324
+ .word 1363905875
+ .word 622074782
+ .word 567612969
+ .word 748028144
+ .word 676793671
+ .word 907029826
+ .word 852566261
+ .word 1066546732
+ .word 995310491
+ .word 52196902
+ .word 131955601
+ .word 178154824
+ .word 241131775
+ .word 270024954
+ .word 349785421
+ .word 429546388
+ .word 492525091
+ .word -249203186
+ .word -169575495
+ .word -123245216
+ .word -60399401
+ .word -501137198
+ .word -421507739
+ .word -341615684
+ .word -278768117
+ .word -684909642
+ .word -739502591
+ .word -558956328
+ .word -630321809
+ .word -1003934358
+ .word -1058529059
+ .word -844417532
+ .word -915784781
+ .word -1120555650
+ .word -1175150391
+ .word -1263028720
+ .word -1334395993
+ .word -1372480606
+ .word -1427073515
+ .word -1481408308
+ .word -1552773765
+ .word -1690451770
+ .word -1610822287
+ .word -1832920152
+ .word -1770072545
+ .word -2009467366
+ .word -1929839699
+ .word -2118390412
+ .word -2055544637
+ .word 1569104025
+ .word 1497869614
+ .word 1409596407
+ .word 1355134528
+ .word 1317180997
+ .word 1245944818
+ .word 1191218475
+ .word 1136754844
+ .word 2072956193
+ .word 2135933078
+ .word 1913443919
+ .word 1993202680
+ .word 1753938941
+ .word 1816917578
+ .word 1627971731
+ .word 1707732260
+ .word 295074793
+ .word 358053470
+ .word 403988615
+ .word 483749168
+ .word 43142453
+ .word 106119298
+ .word 185620059
+ .word 265378796
+ .word 933107281
+ .word 861871078
+ .word 1042025791
+ .word 987562120
+ .word 614080653
+ .word 542846266
+ .word 756562915
+ .word 702101076
+ .word -978905479
+ .word -1050272818
+ .word -869987049
+ .word -924581728
+ .word -693952347
+ .word -765317870
+ .word -551470133
+ .word -606062980
+ .word -475038783
+ .word -412191114
+ .word -366124881
+ .word -286495464
+ .word -257209059
+ .word -194363222
+ .word -114731405
+ .word -35103804
+ .word -1984443127
+ .word -1921597250
+ .word -2143955353
+ .word -2064327728
+ .word -1699480619
+ .word -1636632990
+ .word -1825447749
+ .word -1745818356
+ .word -1346395983
+ .word -1417761530
+ .word -1505903649
+ .word -1560496536
+ .word -1128556947
+ .word -1199924262
+ .word -1254519549
+ .word -1309114188
+ .type rknand_sys_storage_dev, %object
+ .size rknand_sys_storage_dev, 36
+rknand_sys_storage_dev:
+ .word 255
+ .word .LC161
+ .word rknand_sys_storage_fops
+ .space 24
+ .type rknand_sys_storage_fops, %object
+ .size rknand_sys_storage_fops, 112
+rknand_sys_storage_fops:
+ .space 36
+ .word rknand_sys_storage_ioctl
+ .word rknand_sys_storage_ioctl
+ .space 4
+ .word rknand_sys_storage_open
+ .space 4
+ .word rknand_sys_storage_release
+ .space 52
+ .bss
+ .align 2
+ .set .LANCHOR0,. + 0
+ .set .LANCHOR2,. + 8184
+ .type g_slc2KBNand, %object
+ .size g_slc2KBNand, 1
+g_slc2KBNand:
+ .space 1
+ .type gNandIDBResBlkNum, %object
+ .size gNandIDBResBlkNum, 1
+gNandIDBResBlkNum:
+ .space 1
+ .space 2
+ .type gBlockPageAlignSize, %object
+ .size gBlockPageAlignSize, 4
+gBlockPageAlignSize:
+ .space 4
+ .type gNandRandomizer, %object
+ .size gNandRandomizer, 1
+gNandRandomizer:
+ .space 1
+ .space 3
+ .type gNandcVer, %object
+ .size gNandcVer, 4
+gNandcVer:
+ .space 4
+ .type gNandChipMap, %object
+ .size gNandChipMap, 32
+gNandChipMap:
+ .space 32
+ .type gNandOptPara, %object
+ .size gNandOptPara, 32
+gNandOptPara:
+ .space 32
+ .type gFlashSlcMode, %object
+ .size gFlashSlcMode, 1
+gFlashSlcMode:
+ .space 1
+ .space 3
+ .type gNandIDataBuf, %object
+ .size gNandIDataBuf, 2048
+gNandIDataBuf:
+ .space 2048
+ .type IDByte, %object
+ .size IDByte, 32
+IDByte:
+ .space 32
+ .type gpNandc, %object
+ .size gpNandc, 4
+gpNandc:
+ .space 4
+ .type NANDC_FMCTL, %object
+ .size NANDC_FMCTL, 4
+NANDC_FMCTL:
+ .space 4
+ .type NANDC_FMWAIT, %object
+ .size NANDC_FMWAIT, 4
+NANDC_FMWAIT:
+ .space 4
+ .type NANDC_FLCTL, %object
+ .size NANDC_FLCTL, 4
+NANDC_FLCTL:
+ .space 4
+ .type NANDC_BCHCTL, %object
+ .size NANDC_BCHCTL, 4
+NANDC_BCHCTL:
+ .space 4
+ .type NANDC_DLL_CTL_REG0, %object
+ .size NANDC_DLL_CTL_REG0, 4
+NANDC_DLL_CTL_REG0:
+ .space 4
+ .type NANDC_DLL_CTL_REG1, %object
+ .size NANDC_DLL_CTL_REG1, 4
+NANDC_DLL_CTL_REG1:
+ .space 4
+ .type NANDC_RANDMZ_CFG, %object
+ .size NANDC_RANDMZ_CFG, 4
+NANDC_RANDMZ_CFG:
+ .space 4
+ .type NANDC_FMWAIT_SYN, %object
+ .size NANDC_FMWAIT_SYN, 4
+NANDC_FMWAIT_SYN:
+ .space 4
+ .type gNandPhyInfo, %object
+ .size gNandPhyInfo, 28
+gNandPhyInfo:
+ .space 28
+ .type slcPageToMlcPageTbl, %object
+ .size slcPageToMlcPageTbl, 512
+slcPageToMlcPageTbl:
+ .space 512
+ .type DieAddrs, %object
+ .size DieAddrs, 32
+DieAddrs:
+ .space 32
+ .type FlashWaitBusyScheduleEn, %object
+ .size FlashWaitBusyScheduleEn, 4
+FlashWaitBusyScheduleEn:
+ .space 4
+ .type gpNandParaInfo, %object
+ .size gpNandParaInfo, 4
+gpNandParaInfo:
+ .space 4
+ .type gDieOp, %object
+ .size gDieOp, 128
+gDieOp:
+ .space 128
+ .type gReadRetryInfo, %object
+ .size gReadRetryInfo, 852
+gReadRetryInfo:
+ .space 852
+ .type read_retry_cur_offset, %object
+ .size read_retry_cur_offset, 4
+read_retry_cur_offset:
+ .space 4
+ .type g_maxRegNum, %object
+ .size g_maxRegNum, 1
+g_maxRegNum:
+ .space 1
+ .type g_retryMode, %object
+ .size g_retryMode, 1
+g_retryMode:
+ .space 1
+ .type gNandMaxDie, %object
+ .size gNandMaxDie, 1
+gNandMaxDie:
+ .space 1
+ .space 1
+ .type DieCsIndex, %object
+ .size DieCsIndex, 8
+DieCsIndex:
+ .space 8
+ .type gFlashInterfaceMode, %object
+ .size gFlashInterfaceMode, 1
+gFlashInterfaceMode:
+ .space 1
+ .type gFlashToggleModeEn, %object
+ .size gFlashToggleModeEn, 1
+gFlashToggleModeEn:
+ .space 1
+ .space 2
+ .type gFlashPageBuffer0, %object
+ .size gFlashPageBuffer0, 4
+gFlashPageBuffer0:
+ .space 4
+ .type gBootDdrMode, %object
+ .size gBootDdrMode, 4
+gBootDdrMode:
+ .space 4
+ .type g_nandc_version_data, %object
+ .size g_nandc_version_data, 4
+g_nandc_version_data:
+ .space 4
+ .type gMasterTempBuf, %object
+ .size gMasterTempBuf, 4
+gMasterTempBuf:
+ .space 4
+ .type gMasterInfo, %object
+ .size gMasterInfo, 32
+gMasterInfo:
+ .space 32
+ .type gNandcDumpWriteEn, %object
+ .size gNandcDumpWriteEn, 4
+gNandcDumpWriteEn:
+ .space 4
+ .type gNandcEccBits, %object
+ .size gNandcEccBits, 4
+gNandcEccBits:
+ .space 4
+ .type gNandFlashEccBits, %object
+ .size gNandFlashEccBits, 1
+gNandFlashEccBits:
+ .space 1
+ .type gMultiPageProgEn, %object
+ .size gMultiPageProgEn, 1
+gMultiPageProgEn:
+ .space 1
+ .space 2
+ .type c_ftl_nand_sys_blks_per_plane, %object
+ .size c_ftl_nand_sys_blks_per_plane, 4
+c_ftl_nand_sys_blks_per_plane:
+ .space 4
+ .type c_ftl_nand_planes_num, %object
+ .size c_ftl_nand_planes_num, 2
+c_ftl_nand_planes_num:
+ .space 2
+ .space 2
+ .type c_ftl_nand_max_sys_blks, %object
+ .size c_ftl_nand_max_sys_blks, 4
+c_ftl_nand_max_sys_blks:
+ .space 4
+ .type c_ftl_nand_data_blks_per_plane, %object
+ .size c_ftl_nand_data_blks_per_plane, 2
+c_ftl_nand_data_blks_per_plane:
+ .space 2
+ .type c_ftl_nand_blk_pre_plane, %object
+ .size c_ftl_nand_blk_pre_plane, 2
+c_ftl_nand_blk_pre_plane:
+ .space 2
+ .type c_ftl_nand_max_data_blks, %object
+ .size c_ftl_nand_max_data_blks, 4
+c_ftl_nand_max_data_blks:
+ .space 4
+ .type c_ftl_nand_totle_phy_blks, %object
+ .size c_ftl_nand_totle_phy_blks, 4
+c_ftl_nand_totle_phy_blks:
+ .space 4
+ .type c_ftl_nand_type, %object
+ .size c_ftl_nand_type, 2
+c_ftl_nand_type:
+ .space 2
+ .type c_ftl_nand_die_num, %object
+ .size c_ftl_nand_die_num, 2
+c_ftl_nand_die_num:
+ .space 2
+ .type c_ftl_nand_planes_per_die, %object
+ .size c_ftl_nand_planes_per_die, 2
+c_ftl_nand_planes_per_die:
+ .space 2
+ .type p_plane_order_table, %object
+ .size p_plane_order_table, 32
+p_plane_order_table:
+ .space 32
+ .type c_mlc_erase_count_value, %object
+ .size c_mlc_erase_count_value, 2
+c_mlc_erase_count_value:
+ .space 2
+ .type c_ftl_nand_ext_blk_pre_plane, %object
+ .size c_ftl_nand_ext_blk_pre_plane, 2
+c_ftl_nand_ext_blk_pre_plane:
+ .space 2
+ .type c_ftl_vendor_part_size, %object
+ .size c_ftl_vendor_part_size, 2
+c_ftl_vendor_part_size:
+ .space 2
+ .type c_ftl_nand_blks_per_die, %object
+ .size c_ftl_nand_blks_per_die, 2
+c_ftl_nand_blks_per_die:
+ .space 2
+ .type c_ftl_nand_blks_per_die_shift, %object
+ .size c_ftl_nand_blks_per_die_shift, 2
+c_ftl_nand_blks_per_die_shift:
+ .space 2
+ .type c_ftl_nand_page_pre_blk, %object
+ .size c_ftl_nand_page_pre_blk, 2
+c_ftl_nand_page_pre_blk:
+ .space 2
+ .type c_ftl_nand_page_pre_slc_blk, %object
+ .size c_ftl_nand_page_pre_slc_blk, 2
+c_ftl_nand_page_pre_slc_blk:
+ .space 2
+ .type c_ftl_nand_page_pre_super_blk, %object
+ .size c_ftl_nand_page_pre_super_blk, 2
+c_ftl_nand_page_pre_super_blk:
+ .space 2
+ .type c_ftl_nand_sec_pre_page, %object
+ .size c_ftl_nand_sec_pre_page, 2
+c_ftl_nand_sec_pre_page:
+ .space 2
+ .type c_ftl_nand_sec_pre_page_shift, %object
+ .size c_ftl_nand_sec_pre_page_shift, 2
+c_ftl_nand_sec_pre_page_shift:
+ .space 2
+ .type c_ftl_nand_byte_pre_page, %object
+ .size c_ftl_nand_byte_pre_page, 2
+c_ftl_nand_byte_pre_page:
+ .space 2
+ .type c_ftl_nand_byte_pre_oob, %object
+ .size c_ftl_nand_byte_pre_oob, 2
+c_ftl_nand_byte_pre_oob:
+ .space 2
+ .type c_ftl_nand_reserved_blks, %object
+ .size c_ftl_nand_reserved_blks, 2
+c_ftl_nand_reserved_blks:
+ .space 2
+ .type DeviceCapacity, %object
+ .size DeviceCapacity, 4
+DeviceCapacity:
+ .space 4
+ .type c_ftl_nand_max_vendor_blks, %object
+ .size c_ftl_nand_max_vendor_blks, 2
+c_ftl_nand_max_vendor_blks:
+ .space 2
+ .type c_ftl_nand_vendor_region_num, %object
+ .size c_ftl_nand_vendor_region_num, 2
+c_ftl_nand_vendor_region_num:
+ .space 2
+ .type c_ftl_nand_map_blks_per_plane, %object
+ .size c_ftl_nand_map_blks_per_plane, 2
+c_ftl_nand_map_blks_per_plane:
+ .space 2
+ .space 2
+ .type c_ftl_nand_max_map_blks, %object
+ .size c_ftl_nand_max_map_blks, 4
+c_ftl_nand_max_map_blks:
+ .space 4
+ .type c_ftl_nand_init_sys_blks_per_plane, %object
+ .size c_ftl_nand_init_sys_blks_per_plane, 4
+c_ftl_nand_init_sys_blks_per_plane:
+ .space 4
+ .type c_ftl_nand_map_region_num, %object
+ .size c_ftl_nand_map_region_num, 2
+c_ftl_nand_map_region_num:
+ .space 2
+ .type c_ftl_nand_l2pmap_ram_region_num, %object
+ .size c_ftl_nand_l2pmap_ram_region_num, 2
+c_ftl_nand_l2pmap_ram_region_num:
+ .space 2
+ .type g_MaxLbaSector, %object
+ .size g_MaxLbaSector, 4
+g_MaxLbaSector:
+ .space 4
+ .type g_totle_vendor_block, %object
+ .size g_totle_vendor_block, 2
+g_totle_vendor_block:
+ .space 2
+ .space 2
+ .type p_vendor_block_table, %object
+ .size p_vendor_block_table, 4
+p_vendor_block_table:
+ .space 4
+ .type g_wr_page_num, %object
+ .size g_wr_page_num, 4
+g_wr_page_num:
+ .space 4
+ .type req_wr_io, %object
+ .size req_wr_io, 4
+req_wr_io:
+ .space 4
+ .type g_MaxLpn, %object
+ .size g_MaxLpn, 4
+g_MaxLpn:
+ .space 4
+ .type g_cur_erase_blk, %object
+ .size g_cur_erase_blk, 4
+g_cur_erase_blk:
+ .space 4
+ .type gBbtInfo, %object
+ .size gBbtInfo, 60
+gBbtInfo:
+ .space 60
+ .type gSysFreeQueue, %object
+ .size gSysFreeQueue, 2056
+gSysFreeQueue:
+ .space 2056
+ .type req_erase, %object
+ .size req_erase, 4
+req_erase:
+ .space 4
+ .type p_erase_count_table, %object
+ .size p_erase_count_table, 4
+p_erase_count_table:
+ .space 4
+ .type g_totle_sys_slc_erase_count, %object
+ .size g_totle_sys_slc_erase_count, 4
+g_totle_sys_slc_erase_count:
+ .space 4
+ .type p_sys_data_buf, %object
+ .size p_sys_data_buf, 4
+p_sys_data_buf:
+ .space 4
+ .type p_data_block_list_table, %object
+ .size p_data_block_list_table, 4
+p_data_block_list_table:
+ .space 4
+ .type p_data_block_list_head, %object
+ .size p_data_block_list_head, 4
+p_data_block_list_head:
+ .space 4
+ .type p_valid_page_count_table, %object
+ .size p_valid_page_count_table, 4
+p_valid_page_count_table:
+ .space 4
+ .type p_data_block_list_tail, %object
+ .size p_data_block_list_tail, 4
+p_data_block_list_tail:
+ .space 4
+ .type g_num_data_superblocks, %object
+ .size g_num_data_superblocks, 2
+g_num_data_superblocks:
+ .space 2
+ .space 2
+ .type p_free_data_block_list_head, %object
+ .size p_free_data_block_list_head, 4
+p_free_data_block_list_head:
+ .space 4
+ .type g_num_free_superblocks, %object
+ .size g_num_free_superblocks, 2
+g_num_free_superblocks:
+ .space 2
+ .space 2
+ .type g_active_superblock, %object
+ .size g_active_superblock, 48
+g_active_superblock:
+ .space 48
+ .type g_buffer_superblock, %object
+ .size g_buffer_superblock, 48
+g_buffer_superblock:
+ .space 48
+ .type g_gc_temp_superblock, %object
+ .size g_gc_temp_superblock, 48
+g_gc_temp_superblock:
+ .space 48
+ .type p_l2p_ram_map, %object
+ .size p_l2p_ram_map, 4
+p_l2p_ram_map:
+ .space 4
+ .type g_l2p_last_update_region_id, %object
+ .size g_l2p_last_update_region_id, 2
+g_l2p_last_update_region_id:
+ .space 2
+ .type FtlUpdateVaildLpnCount, %object
+ .size FtlUpdateVaildLpnCount, 2
+FtlUpdateVaildLpnCount:
+ .space 2
+ .type g_VaildLpn, %object
+ .size g_VaildLpn, 4
+g_VaildLpn:
+ .space 4
+ .type p_blk_mode_table, %object
+ .size p_blk_mode_table, 4
+p_blk_mode_table:
+ .space 4
+ .type g_inkDie_check_enable, %object
+ .size g_inkDie_check_enable, 4
+g_inkDie_check_enable:
+ .space 4
+ .type g_totle_read_page_count, %object
+ .size g_totle_read_page_count, 4
+g_totle_read_page_count:
+ .space 4
+ .type g_totle_discard_page_count, %object
+ .size g_totle_discard_page_count, 4
+g_totle_discard_page_count:
+ .space 4
+ .type g_totle_write_page_count, %object
+ .size g_totle_write_page_count, 4
+g_totle_write_page_count:
+ .space 4
+ .type g_totle_cache_write_count, %object
+ .size g_totle_cache_write_count, 4
+g_totle_cache_write_count:
+ .space 4
+ .type g_totle_l2p_write_count, %object
+ .size g_totle_l2p_write_count, 4
+g_totle_l2p_write_count:
+ .space 4
+ .type g_totle_gc_page_count, %object
+ .size g_totle_gc_page_count, 4
+g_totle_gc_page_count:
+ .space 4
+ .type g_totle_write_sector, %object
+ .size g_totle_write_sector, 4
+g_totle_write_sector:
+ .space 4
+ .type g_totle_read_sector, %object
+ .size g_totle_read_sector, 4
+g_totle_read_sector:
+ .space 4
+ .type g_GlobalSysVersion, %object
+ .size g_GlobalSysVersion, 4
+g_GlobalSysVersion:
+ .space 4
+ .type g_GlobalDataVersion, %object
+ .size g_GlobalDataVersion, 4
+g_GlobalDataVersion:
+ .space 4
+ .type g_totle_mlc_erase_count, %object
+ .size g_totle_mlc_erase_count, 4
+g_totle_mlc_erase_count:
+ .space 4
+ .type g_totle_slc_erase_count, %object
+ .size g_totle_slc_erase_count, 4
+g_totle_slc_erase_count:
+ .space 4
+ .type g_totle_avg_erase_count, %object
+ .size g_totle_avg_erase_count, 4
+g_totle_avg_erase_count:
+ .space 4
+ .type g_max_erase_count, %object
+ .size g_max_erase_count, 4
+g_max_erase_count:
+ .space 4
+ .type g_min_erase_count, %object
+ .size g_min_erase_count, 4
+g_min_erase_count:
+ .space 4
+ .type g_sys_save_data, %object
+ .size g_sys_save_data, 48
+g_sys_save_data:
+ .space 48
+ .type c_ftl_nand_data_op_blks_per_plane, %object
+ .size c_ftl_nand_data_op_blks_per_plane, 2
+c_ftl_nand_data_op_blks_per_plane:
+ .space 2
+ .space 2
+ .type gSysInfo, %object
+ .size gSysInfo, 12
+gSysInfo:
+ .space 12
+ .type g_gc_superblock, %object
+ .size g_gc_superblock, 48
+g_gc_superblock:
+ .space 48
+ .type g_all_blk_used_slc_mode, %object
+ .size g_all_blk_used_slc_mode, 4
+g_all_blk_used_slc_mode:
+ .space 4
+ .type g_sys_ext_data, %object
+ .size g_sys_ext_data, 512
+g_sys_ext_data:
+ .space 512
+ .type g_gc_free_blk_threshold, %object
+ .size g_gc_free_blk_threshold, 2
+g_gc_free_blk_threshold:
+ .space 2
+ .type g_gc_merge_free_blk_threshold, %object
+ .size g_gc_merge_free_blk_threshold, 2
+g_gc_merge_free_blk_threshold:
+ .space 2
+ .type g_gc_skip_write_count, %object
+ .size g_gc_skip_write_count, 4
+g_gc_skip_write_count:
+ .space 4
+ .type g_gc_blk_index, %object
+ .size g_gc_blk_index, 2
+g_gc_blk_index:
+ .space 2
+ .space 2
+ .type g_in_swl_replace, %object
+ .size g_in_swl_replace, 4
+g_in_swl_replace:
+ .space 4
+ .type g_gc_num_req, %object
+ .size g_gc_num_req, 4
+g_gc_num_req:
+ .space 4
+ .type gp_gc_page_buf_info, %object
+ .size gp_gc_page_buf_info, 4
+gp_gc_page_buf_info:
+ .space 4
+ .type p_gc_data_buf, %object
+ .size p_gc_data_buf, 4
+p_gc_data_buf:
+ .space 4
+ .type p_gc_spare_buf, %object
+ .size p_gc_spare_buf, 4
+p_gc_spare_buf:
+ .space 4
+ .type req_gc, %object
+ .size req_gc, 4
+req_gc:
+ .space 4
+ .type c_gc_page_buf_num, %object
+ .size c_gc_page_buf_num, 4
+c_gc_page_buf_num:
+ .space 4
+ .type g_gc_blk_num, %object
+ .size g_gc_blk_num, 2
+g_gc_blk_num:
+ .space 2
+ .space 2
+ .type p_gc_blk_tbl, %object
+ .size p_gc_blk_tbl, 4
+p_gc_blk_tbl:
+ .space 4
+ .type p_gc_page_info, %object
+ .size p_gc_page_info, 4
+p_gc_page_info:
+ .space 4
+ .type g_gc_page_offset, %object
+ .size g_gc_page_offset, 2
+g_gc_page_offset:
+ .space 2
+ .type g_gc_next_blk, %object
+ .size g_gc_next_blk, 2
+g_gc_next_blk:
+ .space 2
+ .type g_gc_next_blk_1, %object
+ .size g_gc_next_blk_1, 2
+g_gc_next_blk_1:
+ .space 2
+ .type g_gc_bad_block_temp_num, %object
+ .size g_gc_bad_block_temp_num, 2
+g_gc_bad_block_temp_num:
+ .space 2
+ .type g_gc_bad_block_temp_tbl, %object
+ .size g_gc_bad_block_temp_tbl, 34
+g_gc_bad_block_temp_tbl:
+ .space 34
+ .type g_gc_bad_block_gc_index, %object
+ .size g_gc_bad_block_gc_index, 2
+g_gc_bad_block_gc_index:
+ .space 2
+ .type p_map_block_valid_page_count, %object
+ .size p_map_block_valid_page_count, 4
+p_map_block_valid_page_count:
+ .space 4
+ .type p_l2p_map_buf, %object
+ .size p_l2p_map_buf, 4
+p_l2p_map_buf:
+ .space 4
+ .type gL2pMapInfo, %object
+ .size gL2pMapInfo, 40
+gL2pMapInfo:
+ .space 40
+ .type g_totle_map_block, %object
+ .size g_totle_map_block, 2
+g_totle_map_block:
+ .space 2
+ .space 2
+ .type p_map_block_table, %object
+ .size p_map_block_table, 4
+p_map_block_table:
+ .space 4
+ .type p_map_block_ver_table, %object
+ .size p_map_block_ver_table, 4
+p_map_block_ver_table:
+ .space 4
+ .type p_map_region_ppn_table, %object
+ .size p_map_region_ppn_table, 4
+p_map_region_ppn_table:
+ .space 4
+ .type c_ftl_nand_bbm_buf_size, %object
+ .size c_ftl_nand_bbm_buf_size, 2
+c_ftl_nand_bbm_buf_size:
+ .space 2
+ .space 2
+ .type g_req_cache, %object
+ .size g_req_cache, 4
+g_req_cache:
+ .space 4
+ .type g_tmp_data_superblock_id, %object
+ .size g_tmp_data_superblock_id, 2
+g_tmp_data_superblock_id:
+ .space 2
+ .space 2
+ .type g_totle_swl_count, %object
+ .size g_totle_swl_count, 4
+g_totle_swl_count:
+ .space 4
+ .type ftl_gc_temp_power_lost_recovery_flag, %object
+ .size ftl_gc_temp_power_lost_recovery_flag, 4
+ftl_gc_temp_power_lost_recovery_flag:
+ .space 4
+ .type g_recovery_page_min_ver, %object
+ .size g_recovery_page_min_ver, 4
+g_recovery_page_min_ver:
+ .space 4
+ .type p_swl_mul_table, %object
+ .size p_swl_mul_table, 4
+p_swl_mul_table:
+ .space 4
+ .type g_SlcPartLbaEndSector, %object
+ .size g_SlcPartLbaEndSector, 4
+g_SlcPartLbaEndSector:
+ .space 4
+ .type g_in_gc_progress, %object
+ .size g_in_gc_progress, 4
+g_in_gc_progress:
+ .space 4
+ .type g_gc_head_data_block, %object
+ .size g_gc_head_data_block, 4
+g_gc_head_data_block:
+ .space 4
+ .type g_gc_head_data_block_count, %object
+ .size g_gc_head_data_block_count, 4
+g_gc_head_data_block_count:
+ .space 4
+ .type c_wr_page_buf_num, %object
+ .size c_wr_page_buf_num, 4
+c_wr_page_buf_num:
+ .space 4
+ .type req_read, %object
+ .size req_read, 4
+req_read:
+ .space 4
+ .type req_gc_dst, %object
+ .size req_gc_dst, 4
+req_gc_dst:
+ .space 4
+ .type req_prgm, %object
+ .size req_prgm, 4
+req_prgm:
+ .space 4
+ .type p_sys_data_buf_1, %object
+ .size p_sys_data_buf_1, 4
+p_sys_data_buf_1:
+ .space 4
+ .type p_vendor_data_buf, %object
+ .size p_vendor_data_buf, 4
+p_vendor_data_buf:
+ .space 4
+ .type p_wr_io_data_buf, %object
+ .size p_wr_io_data_buf, 4
+p_wr_io_data_buf:
+ .space 4
+ .type p_io_data_buf_0, %object
+ .size p_io_data_buf_0, 4
+p_io_data_buf_0:
+ .space 4
+ .type p_io_data_buf_1, %object
+ .size p_io_data_buf_1, 4
+p_io_data_buf_1:
+ .space 4
+ .type p_sys_spare_buf, %object
+ .size p_sys_spare_buf, 4
+p_sys_spare_buf:
+ .space 4
+ .type p_io_spare_buf, %object
+ .size p_io_spare_buf, 4
+p_io_spare_buf:
+ .space 4
+ .type p_wr_io_spare_buf, %object
+ .size p_wr_io_spare_buf, 4
+p_wr_io_spare_buf:
+ .space 4
+ .type g_ect_tbl_info_size, %object
+ .size g_ect_tbl_info_size, 2
+g_ect_tbl_info_size:
+ .space 2
+ .space 2
+ .type gp_ect_tbl_info, %object
+ .size gp_ect_tbl_info, 4
+gp_ect_tbl_info:
+ .space 4
+ .type p_valid_page_count_check_table, %object
+ .size p_valid_page_count_check_table, 4
+p_valid_page_count_check_table:
+ .space 4
+ .type p_vendor_block_valid_page_count, %object
+ .size p_vendor_block_valid_page_count, 4
+p_vendor_block_valid_page_count:
+ .space 4
+ .type p_vendor_block_ver_table, %object
+ .size p_vendor_block_ver_table, 4
+p_vendor_block_ver_table:
+ .space 4
+ .type p_vendor_region_ppn_table, %object
+ .size p_vendor_region_ppn_table, 4
+p_vendor_region_ppn_table:
+ .space 4
+ .type gNandMaxChip, %object
+ .size gNandMaxChip, 1
+gNandMaxChip:
+ .space 1
+ .space 1
+ .type gTotleBlock, %object
+ .size gTotleBlock, 2
+gTotleBlock:
+ .space 2
+ .type mlcPageToSlcPageTbl, %object
+ .size mlcPageToSlcPageTbl, 1024
+mlcPageToSlcPageTbl:
+ .space 1024
+ .type RK29_NANDC_REG_BASE, %object
+ .size RK29_NANDC_REG_BASE, 4
+RK29_NANDC_REG_BASE:
+ .space 4
+ .type gFlashPageBuffer1, %object
+ .size gFlashPageBuffer1, 4
+gFlashPageBuffer1:
+ .space 4
+ .type g_maxRetryCount, %object
+ .size g_maxRetryCount, 1
+g_maxRetryCount:
+ .space 1
+ .space 3
+ .type gpFlashSaveInfo, %object
+ .size gpFlashSaveInfo, 4
+gpFlashSaveInfo:
+ .space 4
+ .type gNandFlashIDBEccBits, %object
+ .size gNandFlashIDBEccBits, 1
+gNandFlashIDBEccBits:
+ .space 1
+ .space 3
+ .type gNandFlashIdbBlockAddr, %object
+ .size gNandFlashIdbBlockAddr, 4
+gNandFlashIdbBlockAddr:
+ .space 4
+ .type gNandFlashInfoBlockAddr, %object
+ .size gNandFlashInfoBlockAddr, 4
+gNandFlashInfoBlockAddr:
+ .space 4
+ .type gNandIDBResBlkNumSaveInFlash, %object
+ .size gNandIDBResBlkNumSaveInFlash, 1
+gNandIDBResBlkNumSaveInFlash:
+ .space 1
+ .space 3
+ .type FlashDdrTunningReadCount, %object
+ .size FlashDdrTunningReadCount, 4
+FlashDdrTunningReadCount:
+ .space 4
+ .type gFlashSpareBuffer, %object
+ .size gFlashSpareBuffer, 4
+gFlashSpareBuffer:
+ .space 4
+ .type gFlashProgCheckBuffer, %object
+ .size gFlashProgCheckBuffer, 4
+gFlashProgCheckBuffer:
+ .space 4
+ .type gFlashProgCheckSpareBuffer, %object
+ .size gFlashProgCheckSpareBuffer, 4
+gFlashProgCheckSpareBuffer:
+ .space 4
+ .type gMultiPageReadEn, %object
+ .size gMultiPageReadEn, 1
+gMultiPageReadEn:
+ .space 1
+ .space 3
+ .type gpReadRetrial, %object
+ .size gpReadRetrial, 4
+gpReadRetrial:
+ .space 4
+ .type req_sys, %object
+ .size req_sys, 36
+req_sys:
+ .space 36
+ .type g_MaxLbn, %object
+ .size g_MaxLbn, 4
+g_MaxLbn:
+ .space 4
+ .type FbbtBlk, %object
+ .size FbbtBlk, 16
+FbbtBlk:
+ .space 16
+ .type gVendorBlkInfo, %object
+ .size gVendorBlkInfo, 40
+gVendorBlkInfo:
+ .space 40
+ .type g_ect_tbl_power_up_flush, %object
+ .size g_ect_tbl_power_up_flush, 2
+g_ect_tbl_power_up_flush:
+ .space 2
+ .type g_power_lost_recovery_flag, %object
+ .size g_power_lost_recovery_flag, 2
+g_power_lost_recovery_flag:
+ .space 2
+ .type g_recovery_page_num, %object
+ .size g_recovery_page_num, 4
+g_recovery_page_num:
+ .space 4
+ .type g_recovery_ppa_tbl, %object
+ .size g_recovery_ppa_tbl, 128
+g_recovery_ppa_tbl:
+ .space 128
+ .type gc_ink_free_return_value, %object
+ .size gc_ink_free_return_value, 2
+gc_ink_free_return_value:
+ .space 2
+ .type g_gc_cur_blk_valid_pages, %object
+ .size g_gc_cur_blk_valid_pages, 2
+g_gc_cur_blk_valid_pages:
+ .space 2
+ .type g_gc_cur_blk_max_valid_pages, %object
+ .size g_gc_cur_blk_max_valid_pages, 2
+g_gc_cur_blk_max_valid_pages:
+ .space 2
+ .space 2
+ .type gp_last_act_superblock, %object
+ .size gp_last_act_superblock, 4
+gp_last_act_superblock:
+ .space 4
+ .type g_LowFormat, %object
+ .size g_LowFormat, 4
+g_LowFormat:
+ .space 4
+ .type gLoaderBootInfo, %object
+ .size gLoaderBootInfo, 4
+gLoaderBootInfo:
+ .space 4
+ .type RK29_NANDC1_REG_BASE, %object
+ .size RK29_NANDC1_REG_BASE, 4
+RK29_NANDC1_REG_BASE:
+ .space 4
+ .type gc_discard_updated, %object
+ .size gc_discard_updated, 4
+gc_discard_updated:
+ .space 4
+ .type g_ftl_nand_free_count, %object
+ .size g_ftl_nand_free_count, 4
+g_ftl_nand_free_count:
+ .space 4
+ .type last_cache_match_count, %object
+ .size last_cache_match_count, 4
+last_cache_match_count:
+ .space 4
+ .type g_idb_buffer, %object
+ .size g_idb_buffer, 4
+g_idb_buffer:
+ .space 4
+ .type gpDrmKeyInfo, %object
+ .size gpDrmKeyInfo, 4
+gpDrmKeyInfo:
+ .space 4
+ .type SecureBootCheckOK, %object
+ .size SecureBootCheckOK, 4
+SecureBootCheckOK:
+ .space 4
+ .type SecureBootEn, %object
+ .size SecureBootEn, 4
+SecureBootEn:
+ .space 4
+ .type gpBootConfig, %object
+ .size gpBootConfig, 4
+gpBootConfig:
+ .space 4
+ .type gSnSectorData, %object
+ .size gSnSectorData, 512
+gSnSectorData:
+ .space 512
+ .type SecureBootUnlockTryCount, %object
+ .size SecureBootUnlockTryCount, 4
+SecureBootUnlockTryCount:
+ .space 4
+ .type gpVendor0Info, %object
+ .size gpVendor0Info, 4
+gpVendor0Info:
+ .space 4
+ .type gpVendor1Info, %object
+ .size gpVendor1Info, 4
+gpVendor1Info:
+ .space 4
+ .type gToggleModeClkDiv, %object
+ .size gToggleModeClkDiv, 4
+gToggleModeClkDiv:
+ .space 4
+ .type gpNandc1, %object
+ .size gpNandc1, 4
+gpNandc1:
+ .space 4
+ .type gNandFlashResEndPageAddr, %object
+ .size gNandFlashResEndPageAddr, 4
+gNandFlashResEndPageAddr:
+ .space 4
+ .type gNandFlashInfoBlockEcc, %object
+ .size gNandFlashInfoBlockEcc, 1
+gNandFlashInfoBlockEcc:
+ .space 1
+ .type gFlashOnfiModeEn, %object
+ .size gFlashOnfiModeEn, 1
+gFlashOnfiModeEn:
+ .space 1
+ .type gFlashSdrModeEn, %object
+ .size gFlashSdrModeEn, 1
+gFlashSdrModeEn:
+ .space 1
#NO_APP
.text
.align 2
+ .type rknand_sys_storage_release, %function
+rknand_sys_storage_release:
+ stp x29, x30, [sp, -16]!
+ add x29, sp, 0
+ ldr x0, [x1,208]
+ cbz x0, .L2
+ str xzr, [x1,208]
+ bl kfree
+.L2:
+ mov w0, 0
+ ldp x29, x30, [sp], 16
+ ret
+ .size rknand_sys_storage_release, .-rknand_sys_storage_release
+ .align 2
.type rknand_sys_storage_open, %function
rknand_sys_storage_open:
- adrp x0, :got:kmalloc_caches
- mov x2, 4096
stp x29, x30, [sp, -32]!
+ adrp x0, kmalloc_caches+96
+ mov x2, 4096
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:kmalloc_caches]
str x19, [sp,16]
mov x19, x1
+ ldr x0, [x0,#:lo12:kmalloc_caches+96]
mov w1, 192
- ldr x0, [x0,96]
movk w1, 0x240, lsl 16
bl kmem_cache_alloc_trace
str xzr, [x19,208]
- cbnz x0, .L2
+ cbnz x0, .L8
adrp x0, .LC0
add x0, x0, :lo12:.LC0
bl printk
mov w0, -12
- b .L3
-.L2:
+ b .L9
+.L8:
str x0, [x19,208]
mov w0, 0
-.L3:
+.L9:
ldr x19, [sp,16]
ldp x29, x30, [sp], 32
ret
.size rknand_sys_storage_open, .-rknand_sys_storage_open
.align 2
- .type rknand_sys_storage_release, %function
-rknand_sys_storage_release:
- stp x29, x30, [sp, -16]!
- add x29, sp, 0
- ldr x0, [x1,208]
- cbz x0, .L6
- str xzr, [x1,208]
- bl kfree
-.L6:
- mov w0, 0
- ldp x29, x30, [sp], 16
+ .type ftl_set_blk_mode.part.8, %function
+ftl_set_blk_mode.part.8:
+ adrp x1, .LANCHOR0
+ uxth w0, w0
+ ubfx x2, x0, 5, 11
+ lsl x2, x2, 2
+ ldr x3, [x1,#:lo12:.LANCHOR0]
+ mov w1, 1
+ lsl w0, w1, w0
+ ldr w1, [x3,x2]
+ orr w0, w1, w0
+ str w0, [x3,x2]
ret
- .size rknand_sys_storage_release, .-rknand_sys_storage_release
+ .size ftl_set_blk_mode.part.8, .-ftl_set_blk_mode.part.8
.align 2
.global FlashMemCmp8
.type FlashMemCmp8, %function
FlashMemCmp8:
- adrp x3, :got:g_slc2KBNand
mov x5, x0
- ldr x3, [x3, #:got_lo12:g_slc2KBNand]
- ldrb w0, [x3]
- cbz w0, .L14
+ adrp x0, .LANCHOR0+8
+ ldrb w0, [x0,#:lo12:.LANCHOR0+8]
+ cbz w0, .L16
ldrb w4, [x5,1]
mov w0, 0
ldrb w3, [x1,1]
cmp w4, w3
- beq .L12
-.L14:
- mov x3, 0
+ beq .L13
.L16:
+ mov x3, 0
+.L14:
cmp w3, w2
mov w4, w3
- bcs .L18
+ bcs .L19
ldrb w0, [x5,x3]
add x3, x3, 1
add x6, x1, x3
ldrb w6, [x6,-1]
cmp w6, w0
- beq .L16
+ beq .L14
add w0, w4, 1
- b .L12
-.L18:
+ b .L13
+.L19:
mov w0, 0
-.L12:
+.L13:
ret
.size FlashMemCmp8, .-FlashMemCmp8
.align 2
.global FlashRsvdBlkChk
.type FlashRsvdBlkChk, %function
FlashRsvdBlkChk:
- adrp x2, :got:gNandIDBResBlkNum
- adrp x3, :got:gBlockPageAlignSize
+ adrp x2, .LANCHOR0
uxtb w0, w0
- ldr x2, [x2, #:got_lo12:gNandIDBResBlkNum]
- ldr x3, [x3, #:got_lo12:gBlockPageAlignSize]
- ldrb w2, [x2]
- ldr w3, [x3]
- mul w2, w2, w3
+ add x2, x2, :lo12:.LANCHOR0
+ ldrb w3, [x2,9]
+ ldr w2, [x2,12]
+ mul w2, w3, w2
cmp w1, w2
cset w1, cc
cmp w0, wzr
.global FlashGetRandomizer
.type FlashGetRandomizer, %function
FlashGetRandomizer:
- adrp x2, :got:random_seed
- and w3, w1, 127
stp x29, x30, [sp, -32]!
- uxtb w0, w0
+ adrp x2, .LANCHOR1
+ and w3, w1, 127
+ add x2, x2, :lo12:.LANCHOR1
add x29, sp, 0
- ldr x2, [x2, #:got_lo12:random_seed]
+ uxtb w0, w0
str x19, [sp,16]
ldrh w19, [x2,w3,uxtw 1]
- adrp x2, :got:gNandRandomizer
- ldr x2, [x2, #:got_lo12:gNandRandomizer]
- ldrb w2, [x2]
- cbz w2, .L21
+ adrp x2, .LANCHOR0+16
+ ldrb w2, [x2,#:lo12:.LANCHOR0+16]
+ cbz w2, .L22
bl FlashRsvdBlkChk
cmp w0, wzr
orr w1, w19, -1073741824
csel w19, w1, w19, ne
-.L21:
+.L22:
mov w0, w19
ldr x19, [sp,16]
ldp x29, x30, [sp], 32
ret
.size FlashGetRandomizer, .-FlashGetRandomizer
.align 2
+ .global FlashSetRandomizer
+ .type FlashSetRandomizer, %function
+FlashSetRandomizer:
+ stp x29, x30, [sp, -48]!
+ add x29, sp, 0
+ stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR0
+ mov w20, w1
+ stp x21, x22, [sp,32]
+ uxtb w21, w0
+ add x0, x19, :lo12:.LANCHOR0
+ ldr w2, [x0,20]
+ cmp w2, 5
+ bls .L29
+ adrp x2, .LANCHOR1
+ and w20, w1, 127
+ add x2, x2, :lo12:.LANCHOR1
+ ldrb w0, [x0,16]
+ ldrh w20, [x2,w20,uxtw 1]
+ cbz w0, .L30
+ mov w0, w21
+ bl FlashRsvdBlkChk
+ cmp w0, wzr
+ orr w1, w20, -1073741824
+ csel w20, w1, w20, ne
+.L30:
+ add x19, x19, :lo12:.LANCHOR0
+ add x21, x19, x21, sxtw 4
+ ldr x0, [x21,24]
+ str w20, [x0,336]
+ b .L28
+.L29:
+ cmp w2, 4
+ bne .L28
+ adrp x2, .LANCHOR1
+ and w3, w1, 127
+ add x2, x2, :lo12:.LANCHOR1
+ ldrb w0, [x0,16]
+ ldrh w22, [x2,w3,uxtw 1]
+ lsl w22, w22, 8
+ cbz w0, .L32
+ mov w0, w21
+ bl FlashRsvdBlkChk
+ cbz w0, .L32
+ ubfiz w20, w20, 1, 7
+ orr w20, w20, 1
+ orr w22, w22, w20
+.L32:
+ add x19, x19, :lo12:.LANCHOR0
+ add x21, x19, x21, sxtw 4
+ ldr x0, [x21,24]
+ str w22, [x0,336]
+.L28:
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x29, x30, [sp], 48
+ ret
+ .size FlashSetRandomizer, .-FlashSetRandomizer
+ .align 2
+ .global FlashReadCmd
+ .type FlashReadCmd, %function
+FlashReadCmd:
+ adrp x3, .LANCHOR0
+ uxtb w0, w0
+ add x3, x3, :lo12:.LANCHOR0
+ sbfiz x5, x0, 4, 32
+ add x3, x3, 24
+ lsr w4, w1, 16
+ add x2, x3, x5
+ stp x29, x30, [sp, -16]!
+ add x29, sp, 0
+ ldrb w2, [x2,8]
+ ldr x3, [x3,x5]
+ add x2, x3, x2, lsl 8
+ and w3, w1, 255
+ str wzr, [x2,2056]
+ str wzr, [x2,2052]
+ str wzr, [x2,2052]
+ str w3, [x2,2052]
+ lsr w3, w1, 8
+ str w3, [x2,2052]
+ mov w3, 48
+ str w4, [x2,2052]
+ str w3, [x2,2056]
+ bl FlashSetRandomizer
+ ldp x29, x30, [sp], 16
+ ret
+ .size FlashReadCmd, .-FlashReadCmd
+ .align 2
+ .global FlashReadDpDataOutCmd
+ .type FlashReadDpDataOutCmd, %function
+FlashReadDpDataOutCmd:
+ adrp x3, .LANCHOR0
+ uxtb w0, w0
+ add x3, x3, :lo12:.LANCHOR0
+ sbfiz x2, x0, 4, 32
+ add x4, x3, 24
+ stp x29, x30, [sp, -16]!
+ add x5, x4, x2
+ add x29, sp, 0
+ ldr x6, [x4,x2]
+ lsr w4, w1, 8
+ ldrb w2, [x3,104]
+ lsr w3, w1, 16
+ cmp w2, 1
+ ldrb w2, [x5,8]
+ and w5, w1, 255
+ add x2, x6, x2, lsl 8
+ bne .L46
+ mov w6, 6
+ str w6, [x2,2056]
+ str wzr, [x2,2052]
+ str wzr, [x2,2052]
+ str w5, [x2,2052]
+ str w4, [x2,2052]
+ str w3, [x2,2052]
+ b .L48
+.L46:
+ str wzr, [x2,2056]
+ str wzr, [x2,2052]
+ str wzr, [x2,2052]
+ str w5, [x2,2052]
+ str w4, [x2,2052]
+ str w3, [x2,2052]
+ mov w3, 5
+ str w3, [x2,2056]
+ str wzr, [x2,2052]
+ str wzr, [x2,2052]
+.L48:
+ mov w3, 224
+ str w3, [x2,2056]
+ bl FlashSetRandomizer
+ ldp x29, x30, [sp], 16
+ ret
+ .size FlashReadDpDataOutCmd, .-FlashReadDpDataOutCmd
+ .align 2
+ .global flash_enter_slc_mode
+ .type flash_enter_slc_mode, %function
+flash_enter_slc_mode:
+ adrp x1, .LANCHOR0
+ uxtb w0, w0
+ add x1, x1, :lo12:.LANCHOR0
+ ldrb w2, [x1,120]
+ cbz w2, .L49
+ sbfiz x0, x0, 4, 32
+ add x1, x1, 24
+ add x2, x1, x0
+ ldr x1, [x1,x0]
+ ldrb w0, [x2,8]
+ add x0, x0, 8
+ add x0, x1, x0, lsl 8
+ mov w1, 218
+ str w1, [x0,8]
+.L49:
+ ret
+ .size flash_enter_slc_mode, .-flash_enter_slc_mode
+ .align 2
+ .global flash_exit_slc_mode
+ .type flash_exit_slc_mode, %function
+flash_exit_slc_mode:
+ adrp x1, .LANCHOR0
+ uxtb w0, w0
+ add x1, x1, :lo12:.LANCHOR0
+ ldrb w2, [x1,120]
+ cbz w2, .L54
+ sbfiz x0, x0, 4, 32
+ add x1, x1, 24
+ add x2, x1, x0
+ ldr x1, [x1,x0]
+ ldrb w0, [x2,8]
+ add x0, x0, 8
+ add x0, x1, x0, lsl 8
+ mov w1, 223
+ str w1, [x0,8]
+.L54:
+ ret
+ .size flash_exit_slc_mode, .-flash_exit_slc_mode
+ .align 2
+ .global FlashProgFirstCmd
+ .type FlashProgFirstCmd, %function
+FlashProgFirstCmd:
+ adrp x3, .LANCHOR0
+ uxtb w0, w0
+ add x3, x3, :lo12:.LANCHOR0
+ sbfiz x5, x0, 4, 32
+ add x3, x3, 24
+ lsr w4, w1, 16
+ add x2, x3, x5
+ stp x29, x30, [sp, -16]!
+ add x29, sp, 0
+ ldrb w2, [x2,8]
+ ldr x3, [x3,x5]
+ add x2, x3, x2, lsl 8
+ mov w3, 128
+ str w3, [x2,2056]
+ and w3, w1, 255
+ str wzr, [x2,2052]
+ str wzr, [x2,2052]
+ str w3, [x2,2052]
+ lsr w3, w1, 8
+ str w3, [x2,2052]
+ str w4, [x2,2052]
+ bl FlashSetRandomizer
+ ldp x29, x30, [sp], 16
+ ret
+ .size FlashProgFirstCmd, .-FlashProgFirstCmd
+ .align 2
+ .global FlashEraseCmd
+ .type FlashEraseCmd, %function
+FlashEraseCmd:
+ adrp x3, .LANCHOR0
+ ubfiz x0, x0, 4, 8
+ add x3, x3, :lo12:.LANCHOR0
+ add x4, x3, 24
+ add x5, x4, x0
+ ldr x4, [x4,x0]
+ ldrb w0, [x5,8]
+ cbz w2, .L61
+ add x2, x4, x0, lsl 8
+ mov w5, 96
+ str w5, [x2,2056]
+ and w5, w1, 255
+ str w5, [x2,2052]
+ lsr w5, w1, 8
+ str w5, [x2,2052]
+ lsr w5, w1, 16
+ str w5, [x2,2052]
+ ldr w2, [x3,12]
+ add w1, w1, w2
+.L61:
+ add x0, x4, x0, lsl 8
+ mov w2, 96
+ str w2, [x0,2056]
+ and w2, w1, 255
+ str w2, [x0,2052]
+ lsr w2, w1, 8
+ str w2, [x0,2052]
+ lsr w1, w1, 16
+ str w1, [x0,2052]
+ mov w1, 208
+ str w1, [x0,2056]
+ ret
+ .size FlashEraseCmd, .-FlashEraseCmd
+ .align 2
+ .global FlashProgDpSecondCmd
+ .type FlashProgDpSecondCmd, %function
+FlashProgDpSecondCmd:
+ adrp x2, .LANCHOR0
+ uxtb w0, w0
+ add x2, x2, :lo12:.LANCHOR0
+ sbfiz x4, x0, 4, 32
+ add x5, x2, 24
+ lsr w3, w1, 16
+ add x7, x5, x4
+ stp x29, x30, [sp, -16]!
+ add x29, sp, 0
+ ldrb w6, [x2,99]
+ ldrb w2, [x7,8]
+ ldr x4, [x5,x4]
+ add x2, x4, x2, lsl 8
+ and w4, w1, 255
+ str w6, [x2,2056]
+ str wzr, [x2,2052]
+ str wzr, [x2,2052]
+ str w4, [x2,2052]
+ lsr w4, w1, 8
+ str w4, [x2,2052]
+ str w3, [x2,2052]
+ bl FlashSetRandomizer
+ ldp x29, x30, [sp], 16
+ ret
+ .size FlashProgDpSecondCmd, .-FlashProgDpSecondCmd
+ .align 2
+ .global FlashProgSecondCmd
+ .type FlashProgSecondCmd, %function
+FlashProgSecondCmd:
+ adrp x1, .LANCHOR0
+ ubfiz x0, x0, 4, 8
+ add x1, x1, :lo12:.LANCHOR0
+ add x1, x1, 24
+ add x2, x1, x0
+ ldr x1, [x1,x0]
+ ldrb w0, [x2,8]
+ add x0, x0, 8
+ add x0, x1, x0, lsl 8
+ mov w1, 16
+ str w1, [x0,8]
+ ret
+ .size FlashProgSecondCmd, .-FlashProgSecondCmd
+ .align 2
+ .global FlashProgDpFirstCmd
+ .type FlashProgDpFirstCmd, %function
+FlashProgDpFirstCmd:
+ adrp x1, .LANCHOR0
+ ubfiz x0, x0, 4, 8
+ add x1, x1, :lo12:.LANCHOR0
+ add x2, x1, 24
+ add x3, x2, x0
+ ldrb w1, [x1,98]
+ ldr x2, [x2,x0]
+ ldrb w0, [x3,8]
+ add x0, x0, 8
+ add x0, x2, x0, lsl 8
+ str w1, [x0,8]
+ ret
+ .size FlashProgDpFirstCmd, .-FlashProgDpFirstCmd
+ .align 2
.global JSHash
.type JSHash, %function
JSHash:
mov w0, 42982
mov x2, 0
movk w0, 0x47c6, lsl 16
-.L28:
+.L69:
cmp w1, w2
- bls .L30
+ bls .L71
lsl w3, w0, 5
ldrb w4, [x5,x2]
add w3, w3, w0, lsr 2
add x2, x2, 1
add w3, w3, w4
eor w0, w0, w3
- b .L28
-.L30:
+ b .L69
+.L71:
ret
.size JSHash, .-JSHash
.align 2
.global FlashSuspend
.type FlashSuspend, %function
FlashSuspend:
- adrp x0, :got:gpNandc
- adrp x2, .LANCHOR0
- add x1, x2, :lo12:.LANCHOR0
- ldr x0, [x0, #:got_lo12:gpNandc]
- ldr x0, [x0]
- ldr w3, [x0]
- str w3, [x2,#:lo12:.LANCHOR0]
- ldr w2, [x0,4]
- str w2, [x1,4]
- ldr w2, [x0,8]
- str w2, [x1,8]
- ldr w2, [x0,12]
- str w2, [x1,12]
- ldr w2, [x0,304]
- str w2, [x1,16]
- ldr w2, [x0,308]
- str w2, [x1,20]
- ldr w2, [x0,336]
- ldr w0, [x0,344]
- str w0, [x1,28]
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldr x1, [x0,128]
+ ldr w2, [x1]
+ str w2, [x0,136]
+ ldr w2, [x1,4]
+ str w2, [x0,140]
+ ldr w2, [x1,8]
+ str w2, [x0,144]
+ ldr w2, [x1,12]
+ str w2, [x0,148]
+ ldr w2, [x1,304]
+ str w2, [x0,152]
+ ldr w2, [x1,308]
+ str w2, [x0,156]
+ ldr w2, [x1,336]
+ ldr w1, [x1,344]
+ str w2, [x0,160]
+ str w1, [x0,164]
mov w0, 0
- str w2, [x1,24]
ret
.size FlashSuspend, .-FlashSuspend
.align 2
.global LogAddr2PhyAddr
.type LogAddr2PhyAddr, %function
LogAddr2PhyAddr:
- adrp x6, :got:gNandPhyInfo
+ adrp x7, .LANCHOR0
uxtb w4, w4
- ldr x6, [x6, #:got_lo12:gNandPhyInfo]
- ldrh w5, [x6,12]
- ldrh w6, [x6,14]
- mul w5, w5, w6
- adrp x6, :got:gBlockPageAlignSize
- uxth w5, w5
- ldr x6, [x6, #:got_lo12:gBlockPageAlignSize]
- ldrh w8, [x6]
- adrp x6, :got:g_slc2KBNand
- ubfiz w7, w8, 1, 15
- ldr x6, [x6, #:got_lo12:g_slc2KBNand]
- ldrb w6, [x6]
+ add x6, x7, :lo12:.LANCHOR0
+ ldrh w8, [x6,182]
+ ldrh w5, [x6,180]
+ ldrh w9, [x6,12]
+ ldrb w6, [x6,8]
+ mul w5, w5, w8
cmp w6, 1
- csel w8, w7, w8, eq
- ldr w7, [x0,4]
+ ubfiz w8, w9, 1, 15
+ csel w9, w8, w9, eq
+ ldr w8, [x0,4]
+ uxth w5, w5
cmp w1, 1
- ubfx x6, x7, 10, 16
- and w7, w7, 1023
- udiv w9, w6, w5
- msub w5, w9, w5, w6
+ ubfx x6, x8, 10, 16
+ and w8, w8, 1023
+ udiv w10, w6, w5
+ msub w5, w10, w5, w6
uxth w6, w5
- bne .L36
- adrp x1, :got:slcPageToMlcPageTbl
- ldr x1, [x1, #:got_lo12:slcPageToMlcPageTbl]
- ldrh w7, [x1,w7,sxtw 1]
-.L36:
- adrp x1, :got:DieAddrs
+ bne .L77
+ add x1, x7, :lo12:.LANCHOR0
+ ldrb w5, [x1,120]
+ cbnz w5, .L77
+ add x1, x1, 196
+ ldrh w8, [x1,w8,sxtw 1]
+.L77:
+ add x7, x7, :lo12:.LANCHOR0
cmp w4, 1
- ldr x1, [x1, #:got_lo12:DieAddrs]
- ldr w5, [x1,w9,uxtw 2]
+ add x7, x7, 708
mov w1, 0
- madd w5, w6, w8, w5
- add w5, w5, w7
+ ldr w5, [x7,w10,uxtw 2]
+ madd w5, w6, w9, w5
+ add w5, w5, w8
str w5, [x2]
- str w9, [x3]
- bls .L37
+ str w10, [x3]
+ bls .L78
ldr w1, [x0,4]
ldr w0, [x0,60]
add w1, w1, 1024
cmp w1, w0
cset w1, eq
-.L37:
+.L78:
mov w0, w1
ret
.size LogAddr2PhyAddr, .-LogAddr2PhyAddr
.align 2
+ .global FlashScheduleEnSet
+ .type FlashScheduleEnSet, %function
+FlashScheduleEnSet:
+ adrp x1, .LANCHOR0
+ add x1, x1, :lo12:.LANCHOR0
+ ldr w2, [x1,740]
+ str w0, [x1,740]
+ mov w0, w2
+ ret
+ .size FlashScheduleEnSet, .-FlashScheduleEnSet
+ .align 2
.global FlashGetPageSize
.type FlashGetPageSize, %function
FlashGetPageSize:
- adrp x0, :got:gpNandParaInfo
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
+ adrp x0, .LANCHOR0+744
+ ldr x0, [x0,#:lo12:.LANCHOR0+744]
ldrb w0, [x0,9]
ret
.size FlashGetPageSize, .-FlashGetPageSize
.global NandcGetChipIf
.type NandcGetChipIf, %function
NandcGetChipIf:
- adrp x1, :got:gNandChipMap
+ adrp x1, .LANCHOR0
ubfiz x0, x0, 4, 8
- ldr x1, [x1, #:got_lo12:gNandChipMap]
+ add x1, x1, :lo12:.LANCHOR0
+ add x1, x1, 24
add x2, x1, x0
ldr x0, [x1,x0]
ldrb w2, [x2,8]
ret
.size NandcGetChipIf, .-NandcGetChipIf
.align 2
- .global FlashEraseCmd
- .type FlashEraseCmd, %function
-FlashEraseCmd:
- stp x29, x30, [sp, -32]!
- add x29, sp, 0
- str x1, [x29,16]
- str x2, [x29,24]
- bl NandcGetChipIf
- ldr x2, [x29,24]
- ldr x1, [x29,16]
- cbz w2, .L43
- mov w2, 96
- str w2, [x0,8]
- and w2, w1, 255
- str w2, [x0,4]
- lsr w2, w1, 8
- str w2, [x0,4]
- lsr w2, w1, 16
- str w2, [x0,4]
- adrp x2, :got:gBlockPageAlignSize
- ldr x2, [x2, #:got_lo12:gBlockPageAlignSize]
- ldr w2, [x2]
- add w1, w1, w2
-.L43:
- mov w2, 96
- str w2, [x0,8]
- and w2, w1, 255
- str w2, [x0,4]
- lsr w2, w1, 8
- str w2, [x0,4]
- lsr w1, w1, 16
- str w1, [x0,4]
- mov w1, 208
- str w1, [x0,8]
- ldp x29, x30, [sp], 32
- ret
- .size FlashEraseCmd, .-FlashEraseCmd
- .align 2
- .global FlashProgSecondCmd
- .type FlashProgSecondCmd, %function
-FlashProgSecondCmd:
- stp x29, x30, [sp, -16]!
- add x29, sp, 0
- bl NandcGetChipIf
- mov w1, 16
- str w1, [x0,8]
- ldp x29, x30, [sp], 16
- ret
- .size FlashProgSecondCmd, .-FlashProgSecondCmd
- .align 2
- .global FlashProgDpFirstCmd
- .type FlashProgDpFirstCmd, %function
-FlashProgDpFirstCmd:
- stp x29, x30, [sp, -16]!
- add x29, sp, 0
- bl NandcGetChipIf
- adrp x1, :got:gNandOptPara
- ldr x1, [x1, #:got_lo12:gNandOptPara]
- ldrb w1, [x1,10]
- str w1, [x0,8]
- ldp x29, x30, [sp], 16
- ret
- .size FlashProgDpFirstCmd, .-FlashProgDpFirstCmd
- .align 2
.global NandcSetDdrPara
.type NandcSetDdrPara, %function
NandcSetDdrPara:
- adrp x1, :got:gpNandc
+ adrp x1, .LANCHOR0+128
uxtb w0, w0
lsl w2, w0, 8
orr w0, w2, w0, lsl 16
- ldr x1, [x1, #:got_lo12:gpNandc]
+ ldr x1, [x1,#:lo12:.LANCHOR0+128]
orr w0, w0, 1
- ldr x1, [x1]
str w0, [x1,304]
ret
.size NandcSetDdrPara, .-NandcSetDdrPara
.align 2
+ .global NandcSetDdrDiv
+ .type NandcSetDdrDiv, %function
+NandcSetDdrDiv:
+ adrp x1, .LANCHOR0+128
+ uxtb w0, w0
+ ldr x2, [x1,#:lo12:.LANCHOR0+128]
+ mov w1, 16640
+ orr w0, w0, w1
+ str w0, [x2,344]
+ ret
+ .size NandcSetDdrDiv, .-NandcSetDdrDiv
+ .align 2
.global NandcSetDdrMode
.type NandcSetDdrMode, %function
NandcSetDdrMode:
- adrp x1, :got:gpNandc
+ adrp x1, .LANCHOR0+128
cmp w0, wzr
- ldr x1, [x1, #:got_lo12:gpNandc]
- ldr x2, [x1]
+ ldr x2, [x1,#:lo12:.LANCHOR0+128]
ldr w1, [x2]
and w3, w1, -8193
orr w1, w1, 253952
.type NandcSetMode, %function
NandcSetMode:
stp x29, x30, [sp, -48]!
- adrp x1, :got:gpNandc
+ adrp x1, .LANCHOR0
uxtb w0, w0
add x29, sp, 0
str x21, [sp,32]
- tst w0, 6
- ldr x21, [x1, #:got_lo12:gpNandc]
+ add x21, x1, :lo12:.LANCHOR0
stp x19, x20, [sp,16]
+ tst w0, 6
mov x20, x1
- ldr x2, [x21]
+ ldr x2, [x21,128]
ldr w19, [x2]
- beq .L54
+ beq .L90
orr w19, w19, 24576
and w0, w0, 4
and w19, w19, -32769
orr w1, w19, 32768
csel w19, w1, w19, ne
bl rknand_get_clk_rate
- ldr x0, [x21]
+ ldr x0, [x21,128]
mov w1, 8322
str w1, [x0,344]
mov w1, 4099
str w1, [x0,308]
mov w1, 39
str w1, [x0,308]
- b .L56
-.L54:
+ b .L92
+.L90:
and w19, w19, -8193
-.L56:
- ldr x1, [x20, #:got_lo12:gpNandc]
- ldr x0, [x1]
+.L92:
+ add x1, x20, :lo12:.LANCHOR0
+ ldr x0, [x1,128]
str w19, [x0]
mov w0, 0
ldp x19, x20, [sp,16]
.global NandcFlashCsDebug
.type NandcFlashCsDebug, %function
NandcFlashCsDebug:
- adrp x1, :got:gNandChipMap
+ adrp x1, .LANCHOR0+24
uxtb w0, w0
- ldr x1, [x1, #:got_lo12:gNandChipMap]
- ldr x2, [x1]
+ ldr x2, [x1,#:lo12:.LANCHOR0+24]
ldr w1, [x2]
bfi w1, w0, 0, 8
str w1, [x2]
.global NandcFlashCs
.type NandcFlashCs, %function
NandcFlashCs:
- adrp x1, :got:gNandChipMap
+ adrp x1, .LANCHOR0
ubfiz x0, x0, 4, 8
- ldr x1, [x1, #:got_lo12:gNandChipMap]
+ add x1, x1, :lo12:.LANCHOR0
+ add x1, x1, 24
add x3, x1, x0
ldr x2, [x1,x0]
mov w1, 1
.global NandcFlashDeCs
.type NandcFlashDeCs, %function
NandcFlashDeCs:
- adrp x1, :got:gNandChipMap
+ adrp x1, .LANCHOR0
ubfiz x0, x0, 4, 8
- ldr x1, [x1, #:got_lo12:gNandChipMap]
+ add x1, x1, :lo12:.LANCHOR0
+ add x1, x1, 24
ldr x1, [x1,x0]
ldr w0, [x1]
and w0, w0, -256
sub sp, sp, #16
lsr w0, w0, 4
str w0, [sp,12]
-.L63:
+.L99:
ldr w0, [sp,12]
sub w1, w0, #1
str w1, [sp,12]
- cbnz w0, .L63
+ cbnz w0, .L99
add sp, sp, 16
ret
.size NandcDelayns, .-NandcDelayns
.global FlashReadStatus
.type FlashReadStatus, %function
FlashReadStatus:
+ adrp x1, .LANCHOR0
+ ubfiz x0, x0, 4, 8
stp x29, x30, [sp, -32]!
+ add x1, x1, :lo12:.LANCHOR0
+ add x1, x1, 24
add x29, sp, 0
+ add x2, x1, x0
str x19, [sp,16]
- bl NandcGetChipIf
- mov x19, x0
+ ldrb w2, [x2,8]
+ ldr x19, [x1,x0]
mov w0, 112
- str w0, [x19,8]
+ add x19, x19, x2, lsl 8
+ str w0, [x19,2056]
mov w0, 80
bl NandcDelayns
- ldr w0, [x19]
+ ldr w0, [x19,2048]
ldr x19, [sp,16]
ldp x29, x30, [sp], 32
ret
.global ToshibaSetRRPara
.type ToshibaSetRRPara, %function
ToshibaSetRRPara:
+ uxtb w1, w1
+ mov w3, 5
+ add w2, w1, 1
stp x29, x30, [sp, -96]!
- adrp x2, :got:Toshiba15RefValue
+ smull x3, w2, w3
+ adrp x2, .LANCHOR1
add x29, sp, 0
+ add x2, x2, :lo12:.LANCHOR1
+ stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
- uxtb x23, w1
- ldr x2, [x2, #:got_lo12:Toshiba15RefValue]
+ add x23, x2, x1, sxtw
+ add x24, x2, 256
+ add x21, x2, 304
stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
- mov w20, 5
- mov x21, x0
- add w0, w23, 1
- mov x19, 0
stp x25, x26, [sp,64]
- smull x20, w0, w20
- adrp x0, :got:ToshibaA19RefValue
- adrp x25, :got:g_maxRegNum
- stp x27, x28, [sp,80]
+ str x27, [sp,80]
mov x22, x0
- mov w26, 85
- ldr x24, [x0, #:got_lo12:ToshibaA19RefValue]
- adrp x27, :got:g_retryMode
- adrp x28, :got:ToshibaRefValue
- add x24, x20, x24
- add x20, x20, x2
-.L67:
- ldr x0, [x25, #:got_lo12:g_maxRegNum]
- ldrb w0, [x0]
- cmp w0, w19
- bls .L73
- str w26, [x21,8]
- ldr x0, [x22, #:got_lo12:ToshibaA19RefValue]
- ldrsb w0, [x19,x0]
- str w0, [x21,4]
+ add x24, x24, x3
+ add x21, x21, x3
+ mov x20, 0
+ adrp x26, .LANCHOR0
+ mov w27, 85
+ mov x19, x2
+.L103:
+ add x25, x26, :lo12:.LANCHOR0
+ ldrb w0, [x25,753]
+ cmp w0, w20
+ bls .L109
+ add x0, x19, 256
+ str w27, [x22,8]
+ ldrsb w0, [x20,x0]
+ str w0, [x22,4]
mov w0, 200
bl NandcDelayns
- ldr x0, [x27, #:got_lo12:g_retryMode]
- ldrb w0, [x0]
+ ldrb w0, [x25,752]
cmp w0, 34
- bne .L68
- ldrsb w0, [x24,x19]
- b .L72
-.L68:
+ bne .L104
+ ldrsb w0, [x24,x20]
+ b .L108
+.L104:
cmp w0, 35
- bne .L70
- ldrsb w0, [x20,x19]
- b .L72
-.L70:
- ldr x0, [x28, #:got_lo12:ToshibaRefValue]
- ldrsb w0, [x0,x23]
-.L72:
- str w0, [x21]
- add x19, x19, 1
- b .L67
-.L73:
+ bne .L106
+ ldrsb w0, [x21,x20]
+ b .L108
+.L106:
+ ldrsb w0, [x23,400]
+.L108:
+ str w0, [x22]
+ add x20, x20, 1
+ b .L103
+.L109:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
+ ldr x27, [sp,80]
ldp x29, x30, [sp], 96
ret
.size ToshibaSetRRPara, .-ToshibaSetRRPara
.type SamsungSetRRPara, %function
SamsungSetRRPara:
stp x29, x30, [sp, -64]!
- uxtb x1, w1
+ adrp x2, .LANCHOR1
+ add x2, x2, :lo12:.LANCHOR1
add x29, sp, 0
- stp x21, x22, [sp,32]
- mov x21, x0
- adrp x0, :got:SamsungRefValue
+ add x1, x2, x1, uxtb 2
stp x19, x20, [sp,16]
- add x1, x1, 1
- mov x19, 0
- ldr x20, [x0, #:got_lo12:SamsungRefValue]
- mov x22, x0
+ stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
- add x20, x20, x1, lsl 2
- adrp x23, :got:g_maxRegNum
+ mov x21, x0
+ add x22, x1, 412
+ mov x20, 0
+ adrp x23, .LANCHOR0
mov w24, 161
-.L75:
- ldr x0, [x23, #:got_lo12:g_maxRegNum]
- ldrb w0, [x0]
- cmp w0, w19
- bls .L77
+ mov x19, x2
+.L111:
+ add x0, x23, :lo12:.LANCHOR0
+ ldrb w0, [x0,753]
+ cmp w0, w20
+ bls .L113
str w24, [x21,8]
+ add x0, x19, 408
str wzr, [x21]
- ldr x0, [x22, #:got_lo12:SamsungRefValue]
- ldrsb w0, [x19,x0]
+ ldrsb w0, [x20,x0]
str w0, [x21]
- ldrsb w0, [x20,x19]
- add x19, x19, 1
+ ldrsb w0, [x22,x20]
+ add x20, x20, 1
str w0, [x21]
mov w0, 300
bl NandcDelayns
- b .L75
-.L77:
+ b .L111
+.L113:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
.global HynixSetRRPara
.type HynixSetRRPara, %function
HynixSetRRPara:
- stp x29, x30, [sp, -80]!
- adrp x4, :got:gReadRetryInfo
+ stp x29, x30, [sp, -96]!
add x29, sp, 0
stp x21, x22, [sp,32]
- uxtb x22, w0
- adrp x0, :got:gpNandParaInfo
- stp x23, x24, [sp,48]
+ adrp x22, .LANCHOR0
+ str x27, [sp,80]
stp x19, x20, [sp,16]
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
- mov x21, x22
+ add x19, x22, :lo12:.LANCHOR0
+ uxtb w27, w1
+ stp x23, x24, [sp,48]
stp x25, x26, [sp,64]
- uxtb w20, w1
- mov x24, x2
- ldr x0, [x0]
- uxtb w23, w3
+ uxtb x23, w0
+ mov x25, x2
+ ldr x0, [x19,744]
+ mov x26, x23
+ uxtb w24, w3
+ add x19, x19, 760
ldrb w0, [x0,19]
cmp w0, 6
- bne .L79
- ldr x4, [x4, #:got_lo12:gReadRetryInfo]
- lsl w19, w23, 2
- add x4, x4, x22, lsl 6
- add x4, x4, 20
- add x19, x4, x19, sxtw
- b .L80
-.L79:
- ldr x4, [x4, #:got_lo12:gReadRetryInfo]
- lsl x19, x22, 3
- add x19, x19, x23, sxtw
- add x4, x4, x19, lsl 3
- add x19, x4, 20
-.L80:
- mov w0, w21
- uxtb x26, w20
- mov x20, 0
- bl NandcGetChipIf
- mov x25, x0
- mov w0, w21
+ bne .L115
+ add x19, x19, x23, lsl 6
+ lsl w0, w24, 2
+ add x19, x19, 20
+ add x19, x19, x0, sxtw
+ b .L116
+.L115:
+ lsl x2, x23, 3
+ add x2, x2, x24, sxtw
+ add x19, x19, x2, lsl 3
+ add x19, x19, 20
+.L116:
+ add x2, x22, :lo12:.LANCHOR0
+ lsl x0, x23, 4
+ add x2, x2, 24
+ uxtb x27, w27
+ add x1, x2, x0
+ ldr x20, [x2,x0]
+ mov w0, w26
+ ldrb w21, [x1,8]
bl NandcFlashCs
+ ubfiz x21, x21, 8, 8
mov w0, 54
- str w0, [x25,8]
-.L81:
- cmp x20, x26
- beq .L83
- ldrb w0, [x24,x20]
- str w0, [x25,4]
+ add x20, x20, x21
+ mov x21, 0
+ str w0, [x20,2056]
+.L117:
+ cmp x21, x27
+ beq .L119
+ ldrb w0, [x25,x21]
+ str w0, [x20,2052]
mov w0, 200
bl NandcDelayns
- ldrb w0, [x19,x20]
- add x20, x20, 1
- str w0, [x25]
- b .L81
-.L83:
+ ldrb w0, [x19,x21]
+ add x21, x21, 1
+ str w0, [x20,2048]
+ b .L117
+.L119:
+ add x22, x22, :lo12:.LANCHOR0
mov w0, 22
- str w0, [x25,8]
- mov w0, w21
+ add x23, x22, x23
+ str w0, [x20,2056]
+ mov w0, w26
bl NandcFlashDeCs
- adrp x0, :got:read_retry_cur_offset
- ldr x0, [x0, #:got_lo12:read_retry_cur_offset]
- strb w23, [x0,x22]
+ strb w24, [x23,1616]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x29, x30, [sp], 80
+ ldr x27, [sp,80]
+ ldp x29, x30, [sp], 96
ret
.size HynixSetRRPara, .-HynixSetRRPara
.align 2
.global FlashSetReadRetryDefault
.type FlashSetReadRetryDefault, %function
FlashSetReadRetryDefault:
- adrp x0, :got:gpNandParaInfo
stp x29, x30, [sp, -48]!
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
stp x19, x20, [sp,16]
- str x21, [sp,32]
- mov x19, 0
- ldr x0, [x0]
+ adrp x19, .LANCHOR0
+ mov x20, 0
+ add x19, x19, :lo12:.LANCHOR0
+ stp x21, x22, [sp,32]
+ ldr x0, [x19,744]
ldrb w0, [x0,19]
sub w0, w0, #1
uxtb w0, w0
cmp w0, 5
- bhi .L84
- adrp x20, :got:IDByte
- adrp x21, :got:gReadRetryInfo
-.L89:
- lsl x1, x19, 3
- ldr x2, [x20, #:got_lo12:IDByte]
- uxtb w0, w19
- ldrb w1, [x1,x2]
+ bhi .L120
+ add x21, x19, 1620
+ add x22, x19, 764
+.L125:
+ lsl x1, x20, 3
+ uxtb w0, w20
+ ldrb w1, [x1,x21]
cmp w1, 173
- bne .L86
- ldr x2, [x21, #:got_lo12:gReadRetryInfo]
+ bne .L122
+ ldrb w1, [x19,761]
+ mov x2, x22
mov w3, 0
- add x2, x2, 4
- ldrb w1, [x2,-3]
bl HynixSetRRPara
-.L86:
- add x19, x19, 1
- cmp x19, 4
- bne .L89
-.L84:
+.L122:
+ add x20, x20, 1
+ cmp x20, 4
+ bne .L125
+.L120:
ldp x19, x20, [sp,16]
- ldr x21, [sp,32]
+ ldp x21, x22, [sp,32]
ldp x29, x30, [sp], 48
ret
.size FlashSetReadRetryDefault, .-FlashSetReadRetryDefault
.global FlashReadStatusEN
.type FlashReadStatusEN, %function
FlashReadStatusEN:
- stp x29, x30, [sp, -48]!
+ stp x29, x30, [sp, -32]!
+ adrp x3, .LANCHOR0
+ ubfiz x0, x0, 4, 8
+ add x4, x3, :lo12:.LANCHOR0
add x29, sp, 0
+ add x5, x4, 24
stp x19, x20, [sp,16]
- uxtb w20, w2
- str x1, [x29,40]
- bl NandcGetChipIf
- mov x19, x0
- adrp x0, :got:gpNandParaInfo
- ldr x1, [x29,40]
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
+ add x6, x5, x0
+ uxtb w2, w2
+ ldr x20, [x5,x0]
+ ldr x0, [x4,744]
+ ldrb w19, [x6,8]
ldrb w0, [x0,8]
cmp w0, 2
- bne .L92
- adrp x3, :got:gNandOptPara
- ldr x0, [x3, #:got_lo12:gNandOptPara]
- cbnz w20, .L93
- ldrb w0, [x0,13]
- b .L101
-.L93:
- ldrb w0, [x0,14]
-.L101:
- str w0, [x19,8]
+ bne .L128
+ add x4, x4, 88
+ cbnz w2, .L129
+ ldrb w2, [x4,13]
+ b .L137
+.L129:
+ ldrb w2, [x4,14]
+.L137:
+ add x0, x19, 8
+ add x3, x3, :lo12:.LANCHOR0
+ add x0, x20, x0, lsl 8
+ str w2, [x0,8]
mov w2, 0
- ldr x0, [x3, #:got_lo12:gNandOptPara]
- ldrb w0, [x0,15]
- cbz w0, .L96
-.L100:
- ldr x0, [x3, #:got_lo12:gNandOptPara]
- ldrb w0, [x0,15]
- cmp w2, w0
- bcs .L96
+ ldrb w4, [x3,103]
+ cbz w4, .L132
+ add x3, x19, 8
+ lsl x3, x3, 8
+.L136:
+ cmp w2, w4
+ bcs .L132
+ add x5, x20, x3
lsl w0, w2, 3
- add w2, w2, 1
lsr w0, w1, w0
+ add w2, w2, 1
and w0, w0, 255
- str w0, [x19,4]
- b .L100
-.L92:
- mov w0, 112
- str w0, [x19,8]
-.L96:
+ str w0, [x5,4]
+ b .L136
+.L128:
+ add x0, x19, 8
+ mov w1, 112
+ add x0, x20, x0, lsl 8
+ str w1, [x0,8]
+.L132:
+ add x19, x19, 8
mov w0, 80
+ lsl x19, x19, 8
bl NandcDelayns
- ldr w0, [x19]
+ ldr w0, [x20,x19]
ldp x19, x20, [sp,16]
- ldp x29, x30, [sp], 48
+ ldp x29, x30, [sp], 32
uxtb w0, w0
ret
.size FlashReadStatusEN, .-FlashReadStatusEN
uxtb w19, w0
mov w20, w1
uxtb w21, w2
-.L106:
+.L142:
mov w0, w19
mov w1, w20
mov w2, w21
bl FlashReadStatusEN
cmp w0, 255
mov w3, w0
- beq .L106
- tbz x3, 6, .L106
+ beq .L142
+ tbz x3, 6, .L142
ldp x19, x20, [sp,16]
ldr x21, [sp,32]
ldp x29, x30, [sp], 48
.type FlashWaitCmdDone, %function
FlashWaitCmdDone:
stp x29, x30, [sp, -48]!
- adrp x2, :got:gDieOp
uxtb x1, w0
- mov x0, 24
+ mov x2, 24
add x29, sp, 0
stp x19, x20, [sp,16]
- ldr x2, [x2, #:got_lo12:gDieOp]
- mov x20, x1
- mul x1, x1, x0
- str x21, [sp,32]
- add x19, x2, x1
- ldrb w21, [x2,x1]
+ adrp x20, .LANCHOR0
+ stp x21, x22, [sp,32]
+ add x20, x20, :lo12:.LANCHOR0
+ mov x22, x1
+ mul x1, x1, x2
+ add x0, x20, 1652
+ add x19, x0, x1
+ ldrb w21, [x0,x1]
ldr x0, [x19,8]
- cbz x0, .L111
+ cbz x0, .L147
mov w0, w21
+ add x20, x20, 708
bl NandcFlashCs
- adrp x1, :got:DieAddrs
- ldr x1, [x1, #:got_lo12:DieAddrs]
- ldr w0, [x1,w20,sxtw 2]
+ ldr w0, [x20,w22,sxtw 2]
ldr w1, [x19,4]
cmp w0, wzr
mov w0, w21
str w0, [x1]
str xzr, [x19,8]
ldr x1, [x19,16]
- cbz x1, .L111
+ cbz x1, .L147
str w0, [x1]
str xzr, [x19,16]
-.L111:
+.L147:
mov w0, 0
- ldr x21, [sp,32]
ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
ldp x29, x30, [sp], 48
ret
.size FlashWaitCmdDone, .-FlashWaitCmdDone
.global NandcWaitFlashReady
.type NandcWaitFlashReady, %function
NandcWaitFlashReady:
- adrp x1, :got:gNandChipMap
- ubfiz x0, x0, 4, 8
stp x29, x30, [sp, -48]!
+ adrp x1, .LANCHOR0
+ ubfiz x0, x0, 4, 8
+ add x1, x1, :lo12:.LANCHOR0
add x29, sp, 0
- ldr x1, [x1, #:got_lo12:gNandChipMap]
+ add x1, x1, 24
stp x19, x20, [sp,16]
mov w19, 34464
ldr x20, [x1,x0]
movk w19, 0x1, lsl 16
-.L118:
+.L154:
mov w0, 100
bl NandcDelayns
ldr w0, [x20]
str w0, [x29,40]
ldr w0, [x29,40]
- tbnz x0, 9, .L119
+ tbnz x0, 9, .L155
subs w19, w19, #1
- bne .L118
+ bne .L154
mov w0, -1
- b .L117
-.L119:
+ b .L153
+.L155:
mov w0, 0
-.L117:
+.L153:
ldp x19, x20, [sp,16]
ldp x29, x30, [sp], 48
ret
.global FlashReset
.type FlashReset, %function
FlashReset:
- stp x29, x30, [sp, -32]!
+ stp x29, x30, [sp, -48]!
+ adrp x1, .LANCHOR0
add x29, sp, 0
stp x19, x20, [sp,16]
- uxtb w19, w0
- mov w0, w19
- bl NandcGetChipIf
- mov x20, x0
- mov w0, w19
+ add x1, x1, :lo12:.LANCHOR0
+ uxtb w20, w0
+ add x1, x1, 24
+ sbfiz x0, x20, 4, 32
+ add x2, x1, x0
+ str x21, [sp,32]
+ ldr x21, [x1,x0]
+ mov w0, w20
+ ldrb w19, [x2,8]
bl NandcFlashCs
+ add x19, x19, 8
mov w0, 255
- str w0, [x20,8]
- mov w0, w19
+ add x19, x21, x19, lsl 8
+ str w0, [x19,8]
+ mov w0, w20
bl NandcWaitFlashReady
- mov w0, w19
+ mov w0, w20
bl NandcFlashDeCs
+ ldr x21, [sp,32]
ldp x19, x20, [sp,16]
- ldp x29, x30, [sp], 32
+ ldp x29, x30, [sp], 48
ret
.size FlashReset, .-FlashReset
.align 2
.global FlashSetInterfaceMode
.type FlashSetInterfaceMode, %function
FlashSetInterfaceMode:
- stp x29, x30, [sp, -80]!
+ adrp x1, .LANCHOR0
+ mov x6, 0
+ add x1, x1, :lo12:.LANCHOR0
+ mov w8, 239
+ stp x29, x30, [sp, -16]!
+ add x7, x1, 24
+ add x4, x1, 1620
add x29, sp, 0
- stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
- stp x23, x24, [sp,48]
- stp x25, x26, [sp,64]
- mov w20, w0
- mov x19, 0
- adrp x25, :got:IDByte
- adrp x21, :got:gFlashInterfaceMode
- mov w22, 239
- mov w23, 128
- mov w24, 1
- mov w26, 35
-.L134:
- mov w0, w19
- bl NandcGetChipIf
- lsl x1, x19, 3
- ldr x2, [x25, #:got_lo12:IDByte]
- ldrb w1, [x1,x2]
- cmp w1, 152
- beq .L124
- cmp w1, 69
- beq .L124
- cmp w1, 173
- beq .L124
- cmp w1, 44
- bne .L125
-.L124:
- ldr x2, [x21, #:got_lo12:gFlashInterfaceMode]
- cmp w20, 1
- ldrb w2, [x2]
- bne .L127
- tbz x2, 0, .L125
- str w22, [x0,8]
- cmp w1, 173
- bne .L128
- str w20, [x0,4]
- b .L145
-.L128:
- cmp w1, 44
- bne .L130
- str w20, [x0,4]
- mov w1, 5
- b .L146
-.L130:
- str w23, [x0,4]
- str w20, [x0]
- b .L132
-.L127:
- tbz x2, 2, .L125
- str w22, [x0,8]
- cmp w1, 173
- bne .L131
- str w24, [x0,4]
- mov w1, 32
-.L146:
- str w1, [x0]
- b .L132
-.L131:
- cmp w1, 44
- bne .L133
- str w24, [x0,4]
- str w26, [x0]
- b .L132
-.L133:
- str w23, [x0,4]
-.L145:
- str wzr, [x0]
-.L132:
- str wzr, [x0]
- str wzr, [x0]
- str wzr, [x0]
-.L125:
- add x19, x19, 1
- cmp x19, 4
- bne .L134
+ ldrb w2, [x1,1844]
+ mov w9, 128
+ mov w10, 1
+ mov w12, 35
+ and w11, w2, 1
+ and w2, w2, 4
+ mov w13, 32
+ mov w14, 5
+ uxtb w5, w2
+.L170:
+ ldrb w3, [x6,x4]
+ ldr x1, [x7]
+ cmp w3, 152
+ ldrb w2, [x7,8]
+ beq .L160
+ cmp w3, 69
+ beq .L160
+ cmp w3, 173
+ beq .L160
+ cmp w3, 44
+ bne .L161
+.L160:
+ cmp w0, 1
+ bne .L163
+ cbz w11, .L161
+ ubfiz x2, x2, 8, 8
+ cmp w3, 173
+ add x1, x1, x2
+ str w8, [x1,2056]
+ bne .L164
+ str w0, [x1,2052]
+ b .L181
+.L164:
+ cmp w3, 44
+ bne .L166
+ str w0, [x1,2052]
+ str w14, [x1,2048]
+ b .L168
+.L166:
+ str w9, [x1,2052]
+ str w0, [x1,2048]
+ b .L168
+.L163:
+ cbz w5, .L161
+ ubfiz x2, x2, 8, 8
+ cmp w3, 173
+ add x1, x1, x2
+ str w8, [x1,2056]
+ bne .L167
+ str w10, [x1,2052]
+ str w13, [x1,2048]
+ b .L168
+.L167:
+ cmp w3, 44
+ bne .L169
+ str w10, [x1,2052]
+ str w12, [x1,2048]
+ b .L168
+.L169:
+ str w9, [x1,2052]
+.L181:
+ str wzr, [x1,2048]
+.L168:
+ str wzr, [x1,2048]
+ str wzr, [x1,2048]
+ str wzr, [x1,2048]
+.L161:
+ add x6, x6, 8
+ add x7, x7, 16
+ cmp x6, 32
+ bne .L170
mov w0, 0
bl NandcWaitFlashReady
mov w0, 0
- ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x29, x30, [sp], 80
+ ldp x29, x30, [sp], 16
ret
.size FlashSetInterfaceMode, .-FlashSetInterfaceMode
.align 2
.global FlashReadSpare
.type FlashReadSpare, %function
FlashReadSpare:
- adrp x3, :got:gNandParaInfo
- stp x29, x30, [sp, -64]!
+ adrp x3, .LANCHOR1+481
+ adrp x5, .LANCHOR0
+ stp x29, x30, [sp, -48]!
+ uxtb w0, w0
+ add x5, x5, :lo12:.LANCHOR0
+ add x5, x5, 24
+ sbfiz x6, x0, 4, 32
add x29, sp, 0
- ldr x3, [x3, #:got_lo12:gNandParaInfo]
- stp x19, x20, [sp,16]
- str x21, [sp,32]
- uxtb w21, w0
- mov w0, w21
- str x2, [x29,56]
- ldrb w20, [x3,9]
- str x1, [x29,48]
- bl NandcGetChipIf
- str wzr, [x0,8]
- mov x19, x0
- ldr x1, [x29,48]
- lsl w20, w20, 9
- str w20, [x0,4]
- lsr w20, w20, 8
- str w20, [x0,4]
- and w0, w1, 255
- str w0, [x19,4]
- lsr w0, w1, 8
- str w0, [x19,4]
+ ldrb w4, [x3,#:lo12:.LANCHOR1+481]
+ add x3, x5, x6
+ str x19, [sp,16]
+ lsl w4, w4, 9
+ str x2, [x29,40]
+ ldrb w3, [x3,8]
+ ldr x19, [x5,x6]
+ add x19, x19, x3, lsl 8
+ and w3, w1, 255
+ str wzr, [x19,2056]
+ str w4, [x19,2052]
+ lsr w4, w4, 8
+ str w4, [x19,2052]
+ str w3, [x19,2052]
+ lsr w3, w1, 8
+ str w3, [x19,2052]
lsr w1, w1, 16
- mov w0, 48
- str w1, [x19,4]
- str w0, [x19,8]
- mov w0, w21
+ str w1, [x19,2052]
+ mov w1, 48
+ str w1, [x19,2056]
bl NandcWaitFlashReady
- ldr x2, [x29,56]
- ldr w0, [x19]
+ ldr x2, [x29,40]
+ ldr w0, [x19,2048]
strb w0, [x2]
- ldp x19, x20, [sp,16]
- ldr x21, [sp,32]
- ldp x29, x30, [sp], 64
+ ldr x19, [sp,16]
+ ldp x29, x30, [sp], 48
ret
.size FlashReadSpare, .-FlashReadSpare
.align 2
.global SandiskProgTestBadBlock
.type SandiskProgTestBadBlock, %function
SandiskProgTestBadBlock:
- stp x29, x30, [sp, -48]!
+ adrp x3, .LANCHOR0
+ uxtb w0, w0
+ stp x29, x30, [sp, -32]!
+ add x3, x3, :lo12:.LANCHOR0
+ sbfiz x4, x0, 4, 32
+ add x3, x3, 24
add x29, sp, 0
- stp x19, x20, [sp,16]
- uxtb w20, w0
- mov w0, w20
- str x1, [x29,40]
- bl NandcGetChipIf
- mov x19, x0
- mov w0, 162
- ldr x1, [x29,40]
- str w0, [x19,8]
- mov w0, 128
- str w0, [x19,8]
- and w0, w1, 255
- str wzr, [x19,4]
- str wzr, [x19,4]
- str w0, [x19,4]
- lsr w0, w1, 8
- str w0, [x19,4]
+ add x2, x3, x4
+ str x19, [sp,16]
+ ldrb w2, [x2,8]
+ ldr x19, [x3,x4]
+ add x19, x19, x2, lsl 8
+ mov w2, 162
+ str w2, [x19,2056]
+ mov w2, 128
+ str w2, [x19,2056]
+ and w2, w1, 255
+ str wzr, [x19,2052]
+ str wzr, [x19,2052]
+ str w2, [x19,2052]
+ lsr w2, w1, 8
+ str w2, [x19,2052]
lsr w1, w1, 16
- mov w0, 16
- str w1, [x19,4]
- str w0, [x19,8]
- mov w0, w20
+ str w1, [x19,2052]
+ mov w1, 16
+ str w1, [x19,2056]
bl NandcWaitFlashReady
mov w0, 112
- str w0, [x19,8]
+ str w0, [x19,2056]
mov w0, 80
bl NandcDelayns
- ldr w0, [x19]
- ldp x19, x20, [sp,16]
+ ldr w0, [x19,2048]
+ ldr x19, [sp,16]
and w0, w0, 1
- ldp x29, x30, [sp], 48
+ ldp x29, x30, [sp], 32
ret
.size SandiskProgTestBadBlock, .-SandiskProgTestBadBlock
.align 2
str w0, [x20,4]
mov w0, 200
bl NandcDelayns
- adrp x3, :got:ToshibaA19RefValue
- adrp x2, :got:Toshiba15RefValue
mov w1, 5
- adrp x4, :got:g_maxRegNum
- adrp x5, :got:g_retryMode
+ adrp x2, .LANCHOR1
+ add x2, x2, :lo12:.LANCHOR1
+ adrp x5, .LANCHOR0
smull x1, w19, w1
- ldr x2, [x2, #:got_lo12:Toshiba15RefValue]
- ldr x3, [x3, #:got_lo12:ToshibaA19RefValue]
- add x3, x1, x3
- add x1, x1, x2
- mov x2, 0
-.L150:
- ldr x0, [x4, #:got_lo12:g_maxRegNum]
- ldrb w0, [x0]
- cmp w0, w2
- bls .L155
- ldr x0, [x5, #:got_lo12:g_retryMode]
- ldrb w0, [x0]
- cmp w0, 67
- bne .L151
- ldrsb w0, [x3,x2]
- b .L154
-.L151:
- ldrsb w0, [x1,x2]
-.L154:
- str w0, [x20]
+ add x0, x2, 256
+ add x2, x2, 304
+ add x0, x0, x1
+ add x1, x2, x1
+ mov x2, 0
+.L185:
+ add x3, x5, :lo12:.LANCHOR0
+ ldrb w4, [x3,753]
+ cmp w4, w2
+ bls .L190
+ ldrb w3, [x3,752]
+ cmp w3, 67
+ bne .L186
+ ldrsb w3, [x0,x2]
+ b .L189
+.L186:
+ ldrsb w3, [x1,x2]
+.L189:
+ str w3, [x20]
add x2, x2, 1
- b .L150
-.L155:
+ b .L185
+.L190:
mov w0, 0
bl NandcWaitFlashReady
ldp x19, x20, [sp,16]
ret
.size SandiskSetRRPara, .-SandiskSetRRPara
.align 2
- .global NandcRandmzSel
- .type NandcRandmzSel, %function
-NandcRandmzSel:
- adrp x2, :got:gNandChipMap
- ubfiz x0, x0, 4, 8
- ldr x2, [x2, #:got_lo12:gNandChipMap]
- ldr x0, [x2,x0]
- str w1, [x0,336]
- ret
- .size NandcRandmzSel, .-NandcRandmzSel
- .align 2
- .global FlashSetRandomizer
- .type FlashSetRandomizer, %function
-FlashSetRandomizer:
- stp x29, x30, [sp, -48]!
+ .global FlashEraseSLc2KBlocks
+ .type FlashEraseSLc2KBlocks, %function
+FlashEraseSLc2KBlocks:
+ stp x29, x30, [sp, -96]!
add x29, sp, 0
- str x21, [sp,32]
- uxtb w21, w0
- adrp x0, :got:gNandcVer
+ stp x21, x22, [sp,32]
+ adrp x22, __stack_chk_guard
+ adrp x21, .LANCHOR0
+ stp x23, x24, [sp,48]
+ stp x25, x26, [sp,64]
+ add x21, x21, :lo12:.LANCHOR0
+ mov w25, w1
+ adrp x24, .LC1
+ ldr x1, [x22,#:lo12:__stack_chk_guard]
stp x19, x20, [sp,16]
- mov w19, w1
- ldr x0, [x0, #:got_lo12:gNandcVer]
- ldr w0, [x0]
- cmp w0, 5
- bls .L158
- adrp x0, :got:random_seed
- and w19, w1, 127
- ldr x0, [x0, #:got_lo12:random_seed]
- ldrh w19, [x0,w19,uxtw 1]
- adrp x0, :got:gNandRandomizer
- ldr x0, [x0, #:got_lo12:gNandRandomizer]
- ldrb w0, [x0]
- cbz w0, .L159
- mov w0, w21
- bl FlashRsvdBlkChk
- cmp w0, wzr
- orr w1, w19, -1073741824
- csel w19, w1, w19, ne
-.L159:
- mov w0, w21
- mov w1, w19
- b .L173
-.L158:
- cmp w0, 4
- bne .L157
- adrp x0, :got:random_seed
- and w2, w1, 127
- ldr x0, [x0, #:got_lo12:random_seed]
- ldrh w20, [x0,w2,uxtw 1]
- mov w0, w21
- lsl w20, w20, 8
- bl FlashRsvdBlkChk
- cbz w0, .L161
- adrp x0, :got:gNandRandomizer
- ldr x0, [x0, #:got_lo12:gNandRandomizer]
- ldrb w0, [x0]
- cbz w0, .L161
- ubfiz w19, w19, 1, 7
- orr w19, w19, 1
- orr w20, w20, w19
-.L161:
- mov w0, w21
- mov w1, w20
-.L173:
- bl NandcRandmzSel
-.L157:
- ldp x19, x20, [sp,16]
- ldr x21, [sp,32]
- ldp x29, x30, [sp], 48
- ret
- .size FlashSetRandomizer, .-FlashSetRandomizer
- .align 2
- .global FlashReadCmd
- .type FlashReadCmd, %function
-FlashReadCmd:
- stp x29, x30, [sp, -48]!
- add x29, sp, 0
- str x19, [sp,16]
- uxtb w19, w0
+ str x1, [x29,88]
+ mov x20, x0
+ mov w23, 0
+ add x26, x21, 1652
+ add x24, x24, :lo12:.LC1
+.L192:
+ cmp w23, w25
+ beq .L202
+ add x2, x29, 80
+ sub w4, w25, w23
+ mov x0, x20
+ mov w1, 0
+ add x3, x29, 84
+ bl LogAddr2PhyAddr
+ ldr w2, [x29,84]
+ ldrb w0, [x21,1845]
+ cmp w2, w0
+ bcc .L193
+ mov w0, -1
+ str w0, [x20]
+ b .L194
+.L193:
+ uxtw x2, w2
+ add x0, x21, x2
+ ldrb w19, [x0,1848]
+ mov x0, 24
+ mul x2, x2, x0
mov w0, w19
- str x1, [x29,40]
- bl NandcGetChipIf
- str wzr, [x0,8]
- str wzr, [x0,4]
- ldr x1, [x29,40]
- str wzr, [x0,4]
- and w2, w1, 255
- str w2, [x0,4]
- lsr w2, w1, 8
- str w2, [x0,4]
- lsr w2, w1, 16
- str w2, [x0,4]
- mov w2, 48
- str w2, [x0,8]
+ strb w19, [x26,x2]
+ bl NandcWaitFlashReady
mov w0, w19
- bl FlashSetRandomizer
- ldr x19, [sp,16]
- ldp x29, x30, [sp], 48
+ bl NandcFlashCs
+ ldr w1, [x29,80]
+ mov w2, 0
+ mov w0, w19
+ bl FlashEraseCmd
+ mov w0, w19
+ bl NandcWaitFlashReady
+ ldr w1, [x29,80]
+ mov w0, w19
+ bl FlashReadStatus
+ sbfx x0, x0, 0, 1
+ str w0, [x20]
+ mov w0, w19
+ ldr w1, [x29,80]
+ ldr w2, [x21,12]
+ add w1, w2, w1
+ mov w2, 0
+ bl FlashEraseCmd
+ mov w0, w19
+ bl NandcWaitFlashReady
+ ldr w1, [x29,80]
+ mov w0, w19
+ bl FlashReadStatus
+ tbz x0, 0, .L195
+ mov w0, -1
+ str w0, [x20]
+.L195:
+ ldr w0, [x20]
+ cmn w0, #1
+ bne .L196
+ ldr w1, [x29,80]
+ mov x0, x24
+ bl printk
+.L196:
+ mov w0, w19
+ bl NandcFlashDeCs
+.L194:
+ add w23, w23, 1
+ add x20, x20, 56
+ b .L192
+.L202:
+ ldr x2, [x29,88]
+ mov w0, 0
+ ldr x1, [x22,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L198
+ bl __stack_chk_fail
+.L198:
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
+ ldp x29, x30, [sp], 96
ret
- .size FlashReadCmd, .-FlashReadCmd
+ .size FlashEraseSLc2KBlocks, .-FlashEraseSLc2KBlocks
.align 2
.global HynixGetReadRetryDefault
.type HynixGetReadRetryDefault, %function
mov w3, -82
add x29, sp, 0
stp x19, x20, [sp,16]
- adrp x19, :got:gReadRetryInfo
- stp x27, x28, [sp,80]
+ adrp x19, .LANCHOR0
+ stp x25, x26, [sp,64]
+ mov w26, w0
+ add x0, x19, :lo12:.LANCHOR0
+ add x1, x0, 760
+ cmp w26, 2
stp x21, x22, [sp,32]
- ldr x1, [x19, #:got_lo12:gReadRetryInfo]
- mov w28, w0
stp x23, x24, [sp,48]
- stp x25, x26, [sp,64]
- strb w0, [x1]
+ stp x27, x28, [sp,80]
+ strb w26, [x0,760]
mov w0, -84
strb w4, [x1,5]
- cmp w28, 2
strb w0, [x1,4]
mov w0, -81
strb w3, [x1,6]
strb w0, [x1,7]
- bne .L176
+ bne .L204
mov w0, -89
strb w0, [x1,4]
- adrp x0, :got:refValueDefault
+ adrp x0, .LANCHOR1+521
mov w1, -9
- ldr x0, [x0, #:got_lo12:refValueDefault]
- strb w1, [x0,17]
- b .L213
-.L176:
- cmp w28, 3
- bne .L178
+ strb w1, [x0,#:lo12:.LANCHOR1+521]
+ b .L241
+.L204:
+ cmp w26, 3
+ bne .L206
mov w0, -80
strb w0, [x1,4]
mov w0, -79
mov w0, -74
strb w0, [x1,10]
mov w0, -73
- b .L229
-.L178:
- cmp w28, 4
- bne .L179
+ b .L257
+.L206:
+ cmp w26, 4
+ bne .L207
mov w5, -52
strb w5, [x1,4]
mov w5, -65
mov w5, -51
strb w3, [x1,10]
strb w5, [x1,8]
-.L229:
+.L257:
mov w21, 8
strb w0, [x1,11]
mov w20, w21
- b .L177
-.L179:
- cmp w28, 5
- bne .L180
+ b .L205
+.L207:
+ cmp w26, 5
+ bne .L208
mov w0, 56
strb w0, [x1,4]
mov w0, 57
strb w0, [x1,6]
mov w0, 59
strb w0, [x1,7]
- b .L228
-.L180:
- cmp w28, 6
- bne .L213
+ b .L256
+.L208:
+ cmp w26, 6
+ bne .L241
mov w0, 14
strb w0, [x1,4]
mov w0, 15
strb w0, [x1,6]
mov w0, 17
strb w0, [x1,7]
- b .L228
-.L213:
+ b .L256
+.L241:
mov w21, 7
-.L228:
+.L256:
mov w20, 4
-.L177:
- sub w0, w28, #1
+.L205:
+ sub w0, w26, #1
cmp w0, 1
- bhi .L225
- mov w27, 0
- adrp x23, :got:gNandMaxDie
- adrp x24, :got:DieCsIndex
- mov w25, 55
- adrp x26, :got:refValueDefault
-.L181:
- ldr x0, [x23, #:got_lo12:gNandMaxDie]
- ldrb w0, [x0]
- cmp w0, w27
- bls .L188
- ldr x0, [x24, #:got_lo12:DieCsIndex]
- mov x28, 0
- ldr x22, [x19, #:got_lo12:gReadRetryInfo]
- ldrb w0, [x0,w27,sxtw]
- sbfiz x1, x0, 6, 32
- add x22, x22, x1
+ bhi .L253
+ adrp x24, .LANCHOR1
+ add x27, x19, :lo12:.LANCHOR0
+ add x24, x24, :lo12:.LANCHOR1
+ mov w23, 0
+ add x28, x27, 760
+ add x4, x27, 24
+ add x24, x24, 504
+.L209:
+ ldrb w0, [x27,1845]
+ cmp w0, w23
+ bls .L216
+ add x0, x27, x23, sxtw
+ ldrb w0, [x0,1848]
+ mov x25, 0
+ add x22, x28, x0, lsl 6
+ lsl x0, x0, 4
+ add x1, x4, x0
add x22, x22, 20
- bl NandcGetChipIf
- mov x1, x0
-.L183:
- str w25, [x1,8]
+ ldr x26, [x4,x0]
+ ldrb w0, [x1,8]
+ mov w1, 55
+ add x26, x26, x0, lsl 8
+.L211:
+ add x0, x28, x25
+ str w1, [x26,2056]
+ str x4, [x29,128]
str x1, [x29,136]
- ldr x0, [x19, #:got_lo12:gReadRetryInfo]
- add x0, x28, x0
ldrb w0, [x0,4]
- str w0, [x1,4]
+ str w0, [x26,2052]
mov w0, 80
bl NandcDelayns
+ ldr w0, [x26,2048]
+ strb w0, [x22,x25]
+ add x25, x25, 1
ldr x1, [x29,136]
- ldr w0, [x1]
- strb w0, [x22,x28]
- add x28, x28, 1
- cmp w20, w28, uxtb
- bhi .L183
+ cmp w20, w25, uxtb
+ ldr x4, [x29,128]
+ bhi .L211
mov x0, 0
-.L184:
+.L212:
add w2, w0, 8
mov x1, 0
-.L185:
- ldr x3, [x26, #:got_lo12:refValueDefault]
- add x4, x1, x0
+.L213:
+ add x3, x1, x0
add x1, x1, 4
- add x3, x4, x3
+ add x3, x24, x3
cmp x1, 24
- ldrb w4, [x3,4]
+ ldrb w5, [x3,4]
ldrb w3, [x22,x0]
- add w3, w4, w3
+ add w3, w5, w3
strb w3, [x22,w2,sxtw]
add w2, w2, 8
- bne .L185
+ bne .L213
add x0, x0, 1
cmp x0, 4
- bne .L184
- add w27, w27, 1
+ bne .L212
+ add w23, w23, 1
strb wzr, [x22,16]
strb wzr, [x22,24]
strb wzr, [x22,32]
- uxtb w27, w27
+ uxtb w23, w23
strb wzr, [x22,40]
strb wzr, [x22,48]
strb wzr, [x22,41]
strb wzr, [x22,49]
- b .L181
-.L225:
- sub w0, w28, #3
+ b .L209
+.L253:
+ sub w0, w26, #3
cmp w0, 3
- bhi .L188
+ bhi .L216
mul w0, w20, w21
- sub w25, w20, #1
- cmp w28, 6
+ cmp w26, 6
+ mov w1, 4
asr w24, w0, 2
lsl w0, w0, 4
- str w0, [x29,136]
+ str w0, [x29,124]
lsl w0, w24, 1
- mov w1, 4
- str w0, [x29,128]
+ str w0, [x29,116]
mov w0, 8
- uxtb x25, w25
csel w0, w1, w0, eq
+ add x23, x19, :lo12:.LANCHOR0
+ str w0, [x29,120]
+ add x0, x23, 760
+ str x0, [x29,136]
+ sub w0, w20, #1
mov w22, 0
- str w0, [x29,132]
- sub w27, w28, #5
- add x0, x25, 1
- str x0, [x29,120]
-.L189:
- adrp x0, :got:gNandMaxDie
- ldr x0, [x0, #:got_lo12:gNandMaxDie]
- ldrb w0, [x0]
+ sub w27, w26, #5
+ uxtb x0, w0
+ add x0, x0, 1
+ str x0, [x29,104]
+.L217:
+ ldrb w0, [x23,1845]
cmp w0, w22
- bhi .L212
-.L188:
- ldr x19, [x19, #:got_lo12:gReadRetryInfo]
- strb w20, [x19,1]
- strb w21, [x19,2]
- ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
+ bhi .L240
+.L216:
+ add x19, x19, :lo12:.LANCHOR0
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
+ strb w21, [x19,762]
+ strb w20, [x19,761]
+ ldp x21, x22, [sp,32]
+ ldp x19, x20, [sp,16]
ldp x27, x28, [sp,80]
ldp x29, x30, [sp], 144
ret
-.L212:
- adrp x0, :got:DieCsIndex
- ldr x3, [x19, #:got_lo12:gReadRetryInfo]
- str x3, [x29,104]
- ldr x0, [x0, #:got_lo12:DieCsIndex]
- ldrb w23, [x0,w22,sxtw]
- mov w0, w23
- sbfiz x26, x23, 6, 32
- add x26, x3, x26
- bl NandcGetChipIf
+.L240:
+ add x0, x23, x22, sxtw
+ ldrb w0, [x0,1848]
+ ldr x1, [x29,136]
+ add x3, x23, 24
mov x25, x0
- mov w4, 255
- str w4, [x0,8]
- mov w0, w23
- str x4, [x29,112]
- add x26, x26, 20
+ add x28, x1, x0, lsl 6
+ lsl x0, x0, 4
+ add x1, x28, 20
+ str x1, [x29,128]
+ add x1, x3, x0
+ ldr x0, [x3,x0]
+ mov w3, 255
+ str x3, [x29,96]
+ ldrb w1, [x1,8]
+ add x28, x0, x1, lsl 8
+ mov w0, w25
+ str w3, [x28,2056]
bl NandcWaitFlashReady
mov w0, 54
- cmp w28, 4
- str w0, [x25,8]
- ldr x4, [x29,112]
- ldr x3, [x29,104]
- bne .L190
+ cmp w26, 4
+ str w0, [x28,2056]
+ ldr x3, [x29,96]
+ bne .L218
mov w0, 64
- str w4, [x25,4]
- str w0, [x25]
+ str w3, [x28,2052]
+ str w0, [x28,2048]
mov w0, 204
- b .L230
-.L190:
+ b .L258
+.L218:
cmp w27, 1
- bhi .L192
- ldrb w0, [x3,4]
- str w0, [x25,4]
+ bhi .L220
+ ldr x0, [x29,136]
+ ldrb w0, [x0,4]
+ str w0, [x28,2052]
mov w0, 82
- b .L231
-.L192:
+ b .L259
+.L220:
mov w0, 174
- str w0, [x25,4]
- str wzr, [x25]
+ str w0, [x28,2052]
+ str wzr, [x28,2048]
mov w0, 176
-.L230:
- str w0, [x25,4]
+.L258:
+ str w0, [x28,2052]
mov w0, 77
-.L231:
- str w0, [x25]
+.L259:
+ str w0, [x28,2048]
mov w0, 22
- str w0, [x25,8]
+ str w0, [x28,2056]
mov w0, 23
- str w0, [x25,8]
+ str w0, [x28,2056]
mov w0, 4
- str w0, [x25,8]
+ str w0, [x28,2056]
mov w0, 25
- str w0, [x25,8]
- cmp w28, 6
- str wzr, [x25,8]
- str wzr, [x25,4]
- str wzr, [x25,4]
- bne .L193
+ str w0, [x28,2056]
+ cmp w26, 6
+ str wzr, [x28,2056]
+ str wzr, [x28,2052]
+ str wzr, [x28,2052]
+ bne .L221
mov w0, 31
- str w0, [x25,4]
- b .L194
-.L193:
- str wzr, [x25,4]
-.L194:
+ str w0, [x28,2052]
+ b .L222
+.L221:
+ str wzr, [x28,2052]
+.L222:
mov w3, 2
- str w3, [x25,4]
- str wzr, [x25,4]
+ str w3, [x28,2052]
+ str wzr, [x28,2052]
mov w0, 48
- str w0, [x25,8]
- mov w0, w23
- str x3, [x29,112]
+ str w0, [x28,2056]
+ mov w0, w25
+ str x3, [x29,96]
bl NandcWaitFlashReady
- ldr x3, [x29,112]
+ ldr x3, [x29,96]
mov w0, 16
cmp w27, 1
csel w3, w3, w0, hi
mov w0, 0
-.L196:
+.L224:
add w0, w0, 1
- ldr w4, [x25]
+ ldr w4, [x28,2048]
uxtb w0, w0
cmp w0, w3
- bne .L196
- adrp x4, :got:gFlashPageBuffer0
- ldr x0, [x4, #:got_lo12:gFlashPageBuffer0]
- ldr x7, [x0]
+ bne .L224
+ ldr x6, [x23,1856]
mov x0, 0
-.L197:
- ldr w1, [x29,136]
+.L225:
+ ldr w1, [x29,124]
cmp w1, w0
- ble .L232
- ldr w3, [x25]
- strb w3, [x7,x0]
+ ble .L260
+ ldr w3, [x28,2048]
+ strb w3, [x6,x0]
add x0, x0, 1
- b .L197
-.L232:
- ldr x0, [x4, #:got_lo12:gFlashPageBuffer0]
- mov w6, w24
- mov w5, 8
- ldr x9, [x0]
-.L200:
+ b .L225
+.L260:
+ ldr x8, [x23,1856]
+ mov w5, w24
+ mov w4, 8
+.L228:
mov w0, 0
-.L199:
- add w3, w0, w6
+.L227:
+ add w3, w0, w5
add w0, w0, 1
sbfiz x3, x3, 2, 32
cmp w0, w24
- ldr w8, [x9,x3]
- mvn w8, w8
- str w8, [x9,x3]
- bne .L199
- ldr w0, [x29,128]
- subs w5, w5, #1
- add w6, w6, w0
- bne .L200
- mov x5, 0
- mov w13, 1
-.L201:
- ldr x0, [x4, #:got_lo12:gFlashPageBuffer0]
+ ldr w7, [x8,x3]
+ mvn w7, w7
+ str w7, [x8,x3]
+ bne .L227
+ ldr w0, [x29,116]
+ subs w4, w4, #1
+ add w5, w5, w0
+ bne .L228
+ mov x4, 0
+ mov w12, 1
+.L229:
mov w3, 0
- mov w8, w3
- ldr x12, [x0]
-.L205:
- lsl w6, w13, w8
- mov w10, w5
+ ldr x11, [x23,1856]
+ mov w7, w3
+.L233:
+ lsl w5, w12, w7
+ mov w9, w4
mov w0, 16
- mov w9, 0
-.L203:
- ldr w11, [x12,w10,sxtw 2]
- add w10, w10, w24
- and w11, w6, w11
- cmp w11, w6
- csinc w9, w9, w9, ne
+ mov w8, 0
+.L231:
+ ldr w10, [x11,w9,sxtw 2]
+ add w9, w9, w24
+ and w10, w5, w10
+ cmp w10, w5
+ csinc w8, w8, w8, ne
subs w0, w0, #1
- bne .L203
- cmp w9, 9
- orr w6, w3, w6
- add w8, w8, 1
- csel w3, w6, w3, cs
- cmp w8, 32
- bne .L205
- str w3, [x12,x5,lsl 2]
- add x5, x5, 1
- cmp w24, w5
- bgt .L201
+ bne .L231
+ cmp w8, 9
+ orr w5, w3, w5
+ add w7, w7, 1
+ csel w3, w5, w3, cs
+ cmp w7, 32
+ bne .L233
+ str w3, [x11,x4,lsl 2]
+ add x4, x4, 1
+ cmp w24, w4
+ bgt .L229
mov w4, w0
-.L208:
+.L236:
mov x3, 0
-.L207:
+.L235:
add w5, w0, w3
- ldrb w6, [x7,x3]
+ ldr x1, [x29,128]
+ ldrb w7, [x6,x3]
add x3, x3, 1
cmp w20, w3, uxtb
- strb w6, [x26,w5,sxtw]
- bhi .L207
- ldr x1, [x29,120]
+ strb w7, [x1,w5,sxtw]
+ bhi .L235
+ ldr x1, [x29,104]
add w4, w4, 1
cmp w4, w21
- add x7, x7, x1
- ldr w1, [x29,132]
+ add x6, x6, x1
+ ldr w1, [x29,120]
add w0, w0, w1
- blt .L208
+ blt .L236
mov w0, 255
- str w0, [x25,8]
- mov w0, w23
+ str w0, [x28,2056]
+ mov w0, w25
bl NandcWaitFlashReady
cmp w27, 1
- bhi .L210
+ bhi .L238
mov w0, 54
- str w0, [x25,8]
+ str w0, [x28,2056]
+ ldr x0, [x29,136]
mov w1, -1
- ldr x0, [x19, #:got_lo12:gReadRetryInfo]
ldrb w0, [x0,4]
- str w0, [x25,4]
+ str w0, [x28,2052]
mov w0, 22
- str wzr, [x25]
- str w0, [x25,8]
+ str wzr, [x28,2048]
+ str w0, [x28,2056]
mov w0, w22
bl FlashReadCmd
- b .L211
-.L210:
+ b .L239
+.L238:
mov w0, 56
- str w0, [x25,8]
-.L211:
- mov w0, w23
+ str w0, [x28,2056]
+.L239:
+ mov w0, w25
add w22, w22, 1
bl NandcWaitFlashReady
uxtb w22, w22
- b .L189
+ b .L217
.size HynixGetReadRetryDefault, .-HynixGetReadRetryDefault
.align 2
- .global FlashReadDpDataOutCmd
- .type FlashReadDpDataOutCmd, %function
-FlashReadDpDataOutCmd:
- stp x29, x30, [sp, -48]!
- add x29, sp, 0
- str x19, [sp,16]
- uxtb w19, w0
- mov w0, w19
- str x1, [x29,40]
- bl NandcGetChipIf
- adrp x2, :got:gNandOptPara
- ldr x1, [x29,40]
- and w4, w1, 255
- lsr w3, w1, 8
- ldr x2, [x2, #:got_lo12:gNandOptPara]
- ldrb w2, [x2,16]
- cmp w2, 1
- lsr w2, w1, 16
- bne .L234
- mov w5, 6
- str w5, [x0,8]
- str wzr, [x0,4]
- str wzr, [x0,4]
- str w4, [x0,4]
- str w3, [x0,4]
- str w2, [x0,4]
- b .L236
-.L234:
- str wzr, [x0,8]
- str wzr, [x0,4]
- str wzr, [x0,4]
- str w4, [x0,4]
- str w3, [x0,4]
- str w2, [x0,4]
- mov w2, 5
- str w2, [x0,8]
- str wzr, [x0,4]
- str wzr, [x0,4]
-.L236:
- mov w2, 224
- str w2, [x0,8]
- mov w0, w19
- bl FlashSetRandomizer
- ldr x19, [sp,16]
- ldp x29, x30, [sp], 48
- ret
- .size FlashReadDpDataOutCmd, .-FlashReadDpDataOutCmd
- .align 2
.global FlashReadDpCmd
.type FlashReadDpCmd, %function
FlashReadDpCmd:
stp x29, x30, [sp, -80]!
+ adrp x3, .LANCHOR0
add x29, sp, 0
stp x21, x22, [sp,32]
+ add x3, x3, :lo12:.LANCHOR0
uxtb w21, w0
+ add x4, x3, 24
+ sbfiz x0, x21, 4, 32
+ add x3, x3, 88
str x23, [sp,48]
- mov w0, w21
- str x1, [x29,64]
stp x19, x20, [sp,16]
- str x2, [x29,72]
- bl NandcGetChipIf
- adrp x3, :got:gNandOptPara
- mov x19, x0
- ldr x1, [x29,64]
- ldr x2, [x29,72]
- ldr x3, [x3, #:got_lo12:gNandOptPara]
- and w5, w1, 255
- lsr w4, w1, 8
+ add x5, x4, x0
and w23, w2, 255
+ ldr x6, [x4,x0]
lsr w22, w2, 8
- lsr w20, w2, 16
ldrb w0, [x3,16]
+ lsr w4, w1, 8
+ ldrb w19, [x5,8]
+ lsr w20, w2, 16
cmp w0, 1
+ and w5, w1, 255
lsr w0, w1, 16
- bne .L238
+ bne .L262
+ add x19, x6, x19, lsl 8
ldrb w2, [x3,8]
- str w2, [x19,8]
- str wzr, [x19,4]
- str wzr, [x19,4]
- str w5, [x19,4]
- str w4, [x19,4]
- str w0, [x19,4]
str x1, [x29,72]
+ str w2, [x19,2056]
+ str wzr, [x19,2052]
+ str wzr, [x19,2052]
+ str w5, [x19,2052]
+ str w4, [x19,2052]
+ str w0, [x19,2052]
ldrb w0, [x3,9]
- str w0, [x19,8]
+ str w0, [x19,2056]
mov w0, w21
bl NandcWaitFlashReady
- str wzr, [x19,8]
- str wzr, [x19,4]
+ str wzr, [x19,2056]
+ str wzr, [x19,2052]
mov w0, 48
- str wzr, [x19,4]
- str w23, [x19,4]
- str w22, [x19,4]
- str w20, [x19,4]
- str w0, [x19,8]
+ str wzr, [x19,2052]
+ str w23, [x19,2052]
+ str w22, [x19,2052]
+ str w20, [x19,2052]
+ str w0, [x19,2056]
ldr x1, [x29,72]
- b .L239
-.L238:
+ b .L263
+.L262:
+ add x19, x6, x19, lsl 8
ldrb w2, [x3,8]
- str w2, [x19,8]
- str w5, [x19,4]
- str w4, [x19,4]
- str w0, [x19,4]
+ str w2, [x19,2056]
+ str w5, [x19,2052]
+ str w4, [x19,2052]
+ str w0, [x19,2052]
ldrb w0, [x3,9]
- str w0, [x19,8]
+ str w0, [x19,2056]
mov w0, 48
- str w23, [x19,4]
- str w22, [x19,4]
- str w20, [x19,4]
- str w0, [x19,8]
-.L239:
+ str w23, [x19,2052]
+ str w22, [x19,2052]
+ str w20, [x19,2052]
+ str w0, [x19,2056]
+.L263:
mov w0, w21
bl FlashSetRandomizer
ldr x23, [sp,48]
ret
.size FlashReadDpCmd, .-FlashReadDpCmd
.align 2
- .global FlashProgFirstCmd
- .type FlashProgFirstCmd, %function
-FlashProgFirstCmd:
- stp x29, x30, [sp, -48]!
- add x29, sp, 0
- str x19, [sp,16]
- uxtb w19, w0
- mov w0, w19
- str x1, [x29,40]
- bl NandcGetChipIf
- mov w2, 128
- str w2, [x0,8]
- str wzr, [x0,4]
- ldr x1, [x29,40]
- str wzr, [x0,4]
- and w2, w1, 255
- str w2, [x0,4]
- lsr w2, w1, 8
- str w2, [x0,4]
- lsr w2, w1, 16
- str w2, [x0,4]
- mov w0, w19
- bl FlashSetRandomizer
- ldr x19, [sp,16]
- ldp x29, x30, [sp], 48
- ret
- .size FlashProgFirstCmd, .-FlashProgFirstCmd
- .align 2
- .global FlashProgDpSecondCmd
- .type FlashProgDpSecondCmd, %function
-FlashProgDpSecondCmd:
- stp x29, x30, [sp, -48]!
- add x29, sp, 0
- str x19, [sp,16]
- uxtb w19, w0
- mov w0, w19
- str x1, [x29,40]
- bl NandcGetChipIf
- adrp x2, :got:gNandOptPara
- ldr x1, [x29,40]
- ldr x2, [x2, #:got_lo12:gNandOptPara]
- ldrb w2, [x2,11]
- str w2, [x0,8]
- and w2, w1, 255
- str wzr, [x0,4]
- str wzr, [x0,4]
- str w2, [x0,4]
- lsr w2, w1, 8
- str w2, [x0,4]
- lsr w2, w1, 16
- str w2, [x0,4]
- mov w0, w19
- bl FlashSetRandomizer
- ldr x19, [sp,16]
- ldp x29, x30, [sp], 48
- ret
- .size FlashProgDpSecondCmd, .-FlashProgDpSecondCmd
- .align 2
.global FlashDeInit
.type FlashDeInit, %function
FlashDeInit:
stp x29, x30, [sp, -32]!
mov w0, 0
add x29, sp, 0
- str x19, [sp,16]
- adrp x19, :got:gFlashToggleModeEn
+ stp x19, x20, [sp,16]
bl NandcWaitFlashReady
bl FlashSetReadRetryDefault
- ldr x19, [x19, #:got_lo12:gFlashToggleModeEn]
- ldrb w0, [x19]
- cbz w0, .L243
- adrp x0, :got:gFlashInterfaceMode
- ldr x0, [x0, #:got_lo12:gFlashInterfaceMode]
- ldrb w0, [x0]
- tbz x0, 0, .L243
+ adrp x0, .LANCHOR0
+ add x20, x0, :lo12:.LANCHOR0
+ mov x19, x0
+ ldrb w1, [x20,1864]
+ cbz w1, .L265
+ ldrb w0, [x20,1844]
+ tbz x0, 0, .L265
mov w0, 1
bl FlashSetInterfaceMode
mov w0, 1
bl NandcSetMode
- strb wzr, [x19]
-.L243:
- mov w0, 0
- mov w1, 0
- bl NandcRandmzSel
- ldr x19, [sp,16]
+ strb wzr, [x20,1864]
+.L265:
+ add x0, x19, :lo12:.LANCHOR0
+ ldr x0, [x0,24]
+ str wzr, [x0,336]
mov w0, 0
+ ldp x19, x20, [sp,16]
ldp x29, x30, [sp], 32
ret
.size FlashDeInit, .-FlashDeInit
.align 2
+ .global NandcRandmzSel
+ .type NandcRandmzSel, %function
+NandcRandmzSel:
+ adrp x2, .LANCHOR0
+ ubfiz x0, x0, 4, 8
+ add x2, x2, :lo12:.LANCHOR0
+ add x2, x2, 24
+ ldr x0, [x2,x0]
+ str w1, [x0,336]
+ ret
+ .size NandcRandmzSel, .-NandcRandmzSel
+ .align 2
.global NandcTimeCfg
.type NandcTimeCfg, %function
NandcTimeCfg:
mov w0, 0
bl rknand_get_clk_rate
mov w2, 16960
- adrp x1, :got:gpNandc
+ adrp x1, .LANCHOR0
movk w2, 0xf, lsl 16
+ add x1, x1, :lo12:.LANCHOR0
sdiv w0, w0, w2
- ldr x1, [x1, #:got_lo12:gpNandc]
cmp w0, 250
- ble .L251
- ldr x0, [x1]
+ ble .L274
+ ldr x0, [x1,128]
mov w1, 8354
- b .L258
-.L251:
+ b .L281
+.L274:
cmp w0, 220
- ble .L253
- ldr x0, [x1]
- b .L259
-.L253:
+ ble .L276
+ ldr x0, [x1,128]
+ b .L282
+.L276:
cmp w0, 185
- ble .L254
- ldr x0, [x1]
+ ble .L277
+ ldr x0, [x1,128]
mov w1, 4226
- b .L258
-.L254:
+ b .L281
+.L277:
cmp w0, 160
- ldr x0, [x1]
- ble .L255
+ ldr x0, [x1,128]
+ ble .L278
mov w1, 4194
- b .L258
-.L255:
+ b .L281
+.L278:
cmp w19, 35
mov w1, 4193
- bls .L258
+ bls .L281
cmp w19, 99
mov w1, 4225
- bls .L258
-.L259:
+ bls .L281
+.L282:
mov w1, 8322
-.L258:
+.L281:
str w1, [x0,4]
ldr x19, [sp,16]
ldp x29, x30, [sp], 32
and w1, w1, -33
cmp w1, 1
add x29, sp, 0
- bls .L261
+ bls .L284
mov w1, 8322
cmp w0, w1
- bne .L262
-.L261:
- adrp x1, :got:gpNandc
- ldr x1, [x1, #:got_lo12:gpNandc]
- ldr x1, [x1]
+ bne .L285
+.L284:
+ adrp x1, .LANCHOR0+128
+ ldr x1, [x1,#:lo12:.LANCHOR0+128]
str w0, [x1,4]
-.L262:
- adrp x0, :got:gNandParaInfo
- ldr x0, [x0, #:got_lo12:gNandParaInfo]
- ldrb w0, [x0,21]
+.L285:
+ adrp x0, .LANCHOR1+493
+ ldrb w0, [x0,#:lo12:.LANCHOR1+493]
bl NandcTimeCfg
ldp x29, x30, [sp], 16
ret
.size FlashTimingCfg, .-FlashTimingCfg
.align 2
+ .global NandcInit
+ .type NandcInit, %function
+NandcInit:
+ stp x29, x30, [sp, -32]!
+ mov w2, 1
+ add x29, sp, 0
+ str x19, [sp,16]
+ adrp x19, .LANCHOR0
+ add x19, x19, :lo12:.LANCHOR0
+ str w2, [x19,48]
+ mov w2, 2
+ str x0, [x19,24]
+ str x0, [x19,40]
+ str w2, [x19,64]
+ mov w2, 3
+ str x0, [x19,56]
+ str w2, [x19,80]
+ str x0, [x19,72]
+ str x0, [x19,128]
+ str wzr, [x19,32]
+ ldr w1, [x0]
+ ubfx x2, x1, 13, 1
+ str w2, [x19,1868]
+ ldr w2, [x0,352]
+ and w1, w1, 245760
+ orr w1, w1, 256
+ ubfx x2, x2, 16, 4
+ str w2, [x19,20]
+ ldr w2, [x0,352]
+ str w2, [x19,1872]
+ str w1, [x0]
+ ldr x0, [x19,128]
+ str wzr, [x0,336]
+ mov w0, 40
+ bl NandcTimeCfg
+ ldr x0, [x19,128]
+ mov w1, 8322
+ str w1, [x0,344]
+ mov w1, 6145
+ movk w1, 0x18, lsl 16
+ str w1, [x0,304]
+ mov w0, 36864
+ bl ftl_malloc
+ str wzr, [x19,1928]
+ str x0, [x19,1880]
+ str x0, [x19,1888]
+ add x0, x0, 32768
+ str wzr, [x19,1936]
+ str x0, [x19,1896]
+ ldr x19, [sp,16]
+ ldp x29, x30, [sp], 32
+ ret
+ .size NandcInit, .-NandcInit
+ .align 2
.global NandcGetTimeCfg
.type NandcGetTimeCfg, %function
NandcGetTimeCfg:
- adrp x4, :got:gpNandc
- ldr x4, [x4, #:got_lo12:gpNandc]
- ldr x5, [x4]
+ adrp x4, .LANCHOR0
+ add x4, x4, :lo12:.LANCHOR0
+ ldr x5, [x4,128]
ldr w5, [x5,4]
str w5, [x0]
- ldr x0, [x4]
+ ldr x0, [x4,128]
ldr w0, [x0]
str w0, [x1]
- ldr x0, [x4]
+ ldr x0, [x4,128]
ldr w0, [x0,304]
str w0, [x2]
- ldr x1, [x4]
+ ldr x1, [x4,128]
ldr w0, [x1,308]
ldr w1, [x1,344]
and w0, w0, 255
.global NandcBchSel
.type NandcBchSel, %function
NandcBchSel:
- adrp x1, :got:gpNandc
+ adrp x1, .LANCHOR0
uxtb w0, w0
+ add x1, x1, :lo12:.LANCHOR0
+ mov w3, 1
cmp w0, 16
- ldr x1, [x1, #:got_lo12:gpNandc]
- ldr x2, [x1]
- mov w1, 1
- str w1, [x2,8]
- adrp x1, :got:gNandcEccBits
- ldr x1, [x1, #:got_lo12:gNandcEccBits]
- str w0, [x1]
+ ldr x2, [x1,128]
+ str w0, [x1,1940]
mov w1, 4096
- bne .L265
-.L268:
+ str w3, [x2,8]
+ bne .L289
+.L292:
and w1, w1, -17
- b .L266
-.L265:
+ b .L290
+.L289:
cmp w0, 24
- bne .L267
+ bne .L291
orr w1, w1, 16
- b .L266
-.L267:
+ b .L290
+.L291:
cmp w0, 40
orr w1, w1, 262144
orr w1, w1, 16
- beq .L268
-.L266:
+ beq .L292
+.L290:
orr w1, w1, 1
str w1, [x2,12]
ret
.global FlashBchSel
.type FlashBchSel, %function
FlashBchSel:
- adrp x1, :got:gNandFlashEccBits
- uxtb w0, w0
stp x29, x30, [sp, -16]!
+ adrp x1, .LANCHOR0+1944
+ uxtb w0, w0
add x29, sp, 0
- ldr x1, [x1, #:got_lo12:gNandFlashEccBits]
- strb w0, [x1]
+ strb w0, [x1,#:lo12:.LANCHOR0+1944]
bl NandcBchSel
ldp x29, x30, [sp], 16
ret
.global FlashResume
.type FlashResume, %function
FlashResume:
- adrp x1, :got:gpNandc
stp x29, x30, [sp, -48]!
add x29, sp, 0
- ldr x1, [x1, #:got_lo12:gpNandc]
stp x19, x20, [sp,16]
+ adrp x20, .LANCHOR0
str x21, [sp,32]
- adrp x19, .LANCHOR0
- add x0, x19, :lo12:.LANCHOR0
- mov x20, 0
- ldr x2, [x1]
- adrp x21, :got:IDByte
- ldr w3, [x19,#:lo12:.LANCHOR0]
- str w3, [x2]
- ldr w3, [x0,4]
- ldr x2, [x1]
- str w3, [x2,4]
- ldr w2, [x0,8]
- ldr x1, [x1]
+ add x0, x20, :lo12:.LANCHOR0
+ mov x21, 0
+ add x19, x0, 1620
+ ldr x1, [x0,128]
+ ldr w2, [x0,136]
+ str w2, [x1]
+ ldr w2, [x0,140]
+ ldr x1, [x0,128]
+ str w2, [x1,4]
+ ldr w2, [x0,144]
+ ldr x1, [x0,128]
str w2, [x1,8]
- ldr w2, [x0,12]
+ ldr w2, [x0,148]
str w2, [x1,12]
- ldr w2, [x0,16]
+ ldr w2, [x0,152]
str w2, [x1,304]
- ldr w2, [x0,20]
+ ldr w2, [x0,156]
str w2, [x1,308]
- ldr w2, [x0,24]
+ ldr w2, [x0,160]
str w2, [x1,336]
- ldr w0, [x0,28]
- str w0, [x1,344]
-.L275:
- lsl x0, x20, 3
- ldr x1, [x21, #:got_lo12:IDByte]
- ldrb w0, [x0,x1]
+ ldr w2, [x0,164]
+ str w2, [x1,344]
+.L299:
+ lsl x0, x21, 3
+ ldrb w0, [x0,x19]
sub w0, w0, #1
uxtb w0, w0
cmp w0, 253
- bhi .L274
- mov w0, w20
+ bhi .L298
+ mov w0, w21
bl FlashReset
-.L274:
- add x20, x20, 1
- cmp x20, 4
- bne .L275
- adrp x0, :got:gFlashToggleModeEn
- ldr x0, [x0, #:got_lo12:gFlashToggleModeEn]
- ldrb w0, [x0]
- cbz w0, .L276
- adrp x20, :got:gFlashInterfaceMode
+.L298:
+ add x21, x21, 1
+ cmp x21, 4
+ bne .L299
+ add x19, x20, :lo12:.LANCHOR0
+ ldrb w0, [x19,1864]
+ cbz w0, .L300
mov w0, 1
- add x19, x19, :lo12:.LANCHOR0
bl NandcSetMode
- ldr x20, [x20, #:got_lo12:gFlashInterfaceMode]
- ldrb w0, [x20]
+ ldrb w0, [x19,1844]
bl FlashSetInterfaceMode
- ldrb w0, [x20]
+ ldrb w0, [x19,1844]
bl NandcSetMode
- ldr w0, [x19,16]
+ ldr w0, [x19,152]
lsr w0, w0, 8
bl NandcSetDdrPara
-.L276:
- adrp x0, :got:gpNandParaInfo
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
+.L300:
+ add x20, x20, :lo12:.LANCHOR0
+ ldr x0, [x20,744]
ldrb w0, [x0,20]
bl FlashBchSel
ldr x21, [sp,32]
mov w1, 1
bl NandCIrqEnable
ldr w0, [x19]
- tbnz x0, 9, .L286
+ tbnz x0, 9, .L310
mov x0, x19
bl wait_for_nand_flash_ready
- b .L285
-.L286:
+ b .L309
+.L310:
mov x0, x19
mov w1, 1
bl NandCIrqDisable
-.L285:
+.L309:
ldr x19, [sp,16]
ldp x29, x30, [sp], 32
ret
.global FlashEraseBlocks
.type FlashEraseBlocks, %function
FlashEraseBlocks:
- stp x29, x30, [sp, -128]!
+ stp x29, x30, [sp, -144]!
add x29, sp, 0
+ stp x23, x24, [sp,48]
+ mov w23, w2
+ adrp x2, __stack_chk_guard
+ stp x27, x28, [sp,80]
+ mov w27, w1
+ str x2, [x29,120]
+ ldr x1, [x2,#:lo12:__stack_chk_guard]
+ mov x24, x0
+ str x1, [x29,136]
+ adrp x1, .LANCHOR0
stp x19, x20, [sp,16]
+ add x19, x1, :lo12:.LANCHOR0
+ str x1, [x29,112]
stp x21, x22, [sp,32]
stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- stp x23, x24, [sp,48]
- mov x20, x0
- mov w21, w1
- mov w19, 0
- mov w22, 56
- add x25, x29, 120
- add x26, x29, 124
- adrp x27, :got:gMultiPageProgEn
- adrp x28, :got:gDieOp
-.L289:
- cmp w19, w21
- adrp x23, :got:gNandMaxDie
- bcs .L304
- umull x5, w19, w22
+ ldrb w3, [x19,8]
+ mov w20, 0
+ cbz w3, .L313
+ mov w1, w23
+ bl FlashEraseSLc2KBlocks
+ b .L314
+.L313:
+ mov w28, 56
+ add x25, x19, 1652
+ mov x26, 24
+.L339:
+ cmp w20, w23
+ bcs .L340
+ umull x5, w20, w28
mov w1, 0
- sub w4, w21, w19
- add x23, x20, x5
- mov x2, x25
- mov x0, x23
- mov x3, x26
+ sub w4, w23, w20
+ add x21, x24, x5
+ add x2, x29, 128
+ mov x0, x21
+ add x3, x29, 132
str x5, [x29,104]
bl LogAddr2PhyAddr
- mov w24, w0
- adrp x1, :got:gNandMaxDie
- ldr w0, [x29,124]
+ mov w22, w0
+ ldrb w1, [x19,1845]
+ ldr w0, [x29,132]
ldr x5, [x29,104]
- ldr x1, [x1, #:got_lo12:gNandMaxDie]
- ldrb w1, [x1]
cmp w0, w1
- bcc .L290
+ bcc .L315
mov w0, -1
- str w0, [x20,x5]
- b .L291
-.L290:
- ldr x1, [x27, #:got_lo12:gMultiPageProgEn]
- mov x5, 24
- ldr x4, [x28, #:got_lo12:gDieOp]
- ldrb w1, [x1]
+ str w0, [x24,x5]
+ b .L316
+.L315:
+ ldrb w1, [x19,1945]
cmp w1, wzr
uxtw x1, w0
- csel w24, w24, wzr, ne
- madd x1, x1, x5, x4
- adrp x4, :got:gDieOp
+ csel w22, w22, wzr, ne
+ madd x1, x1, x26, x25
ldr x1, [x1,8]
- cbz x1, .L293
- str x4, [x29,104]
+ cbz x1, .L318
bl FlashWaitCmdDone
- ldr x4, [x29,104]
-.L293:
- ldr x2, [x4, #:got_lo12:gDieOp]
- mov x1, 24
- ldr w0, [x29,124]
- madd x1, x0, x1, x2
- ldr w2, [x29,120]
- str x23, [x1,8]
- str xzr, [x1,16]
- str w2, [x1,4]
- cbz w24, .L294
- add w2, w19, 1
- umull x2, w2, w22
- add x2, x20, x2
- str x2, [x1,16]
-.L294:
- adrp x1, :got:DieCsIndex
- ldr x4, [x4, #:got_lo12:gDieOp]
- add w19, w19, w24
- ldr x1, [x1, #:got_lo12:DieCsIndex]
- ldrb w23, [x1,x0]
- mov x1, 24
- mul x0, x0, x1
- strb w23, [x4,x0]
- mov w0, w23
+.L318:
+ ldr w0, [x29,132]
+ ldr w1, [x29,128]
+ madd x2, x0, x26, x25
+ str x21, [x2,8]
+ str xzr, [x2,16]
+ str w1, [x2,4]
+ cbz w22, .L319
+ add w1, w20, 1
+ umull x1, w1, w28
+ add x1, x24, x1
+ str x1, [x2,16]
+.L319:
+ add x1, x19, x0
+ mul x0, x0, x26
+ ldrb w21, [x1,1848]
+ strb w21, [x25,x0]
+ mov w0, w21
bl NandcFlashCs
- adrp x0, :got:DieAddrs
- ldr w1, [x29,124]
- ldr x0, [x0, #:got_lo12:DieAddrs]
+ cmp w27, 1
+ bne .L320
+ ldrb w0, [x19,120]
+ cbz w0, .L320
+ mov w0, w21
+ bl flash_enter_slc_mode
+.L320:
+ ldr w1, [x29,132]
+ add x0, x19, 708
+ add w20, w20, w22
ldr w0, [x0,x1,lsl 2]
- ldr w1, [x29,120]
+ ldr w1, [x29,128]
cmp w0, wzr
- mov w0, w23
+ mov w0, w21
cset w2, ne
bl FlashWaitReadyEN
- ldr w1, [x29,120]
- mov w0, w23
- mov w2, w24
+ ldr w1, [x29,128]
+ mov w0, w21
+ mov w2, w22
bl FlashEraseCmd
- mov w0, w23
+ mov w0, w21
bl NandcFlashDeCs
-.L291:
- add w19, w19, 1
- b .L289
-.L304:
- adrp x0, :got:gpNandc
- mov w19, 0
- ldr x0, [x0, #:got_lo12:gpNandc]
- ldr x0, [x0]
+.L316:
+ add w20, w20, 1
+ b .L339
+.L340:
+ ldr x0, [x29,112]
+ mov x20, 0
+ mov x22, 24
+ add x19, x0, :lo12:.LANCHOR0
+ add x21, x19, 1652
+ ldr x0, [x19,128]
bl NandcIqrWaitFlashReady
-.L296:
- ldr x0, [x23, #:got_lo12:gNandMaxDie]
- ldrb w0, [x0]
- cmp w19, w0
- bcs .L305
- mov w0, w19
- add w19, w19, 1
+.L322:
+ ldrb w0, [x19,1845]
+ cmp w0, w20
+ bls .L341
+ mov w0, w20
bl FlashWaitCmdDone
- b .L296
-.L305:
+ cmp w27, 1
+ bne .L323
+ ldrb w0, [x19,120]
+ cbz w0, .L323
+ mul x0, x20, x22
+ ldrb w0, [x0,x21]
+ bl flash_exit_slc_mode
+.L323:
+ add x20, x20, 1
+ b .L322
+.L341:
mov w0, 0
+.L314:
+ ldr x1, [x29,120]
+ ldr x2, [x29,136]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L325
+ bl __stack_chk_fail
+.L325:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 128
+ ldp x29, x30, [sp], 144
ret
.size FlashEraseBlocks, .-FlashEraseBlocks
.align 2
.type NandcSendDumpDataDone, %function
NandcSendDumpDataDone:
sub sp, sp, #16
-.L309:
+.L345:
ldr w1, [x0,8]
str w1, [sp,8]
ldr w1, [sp,8]
- tbz x1, 20, .L309
+ tbz x1, 20, .L345
add sp, sp, 16
ret
.size NandcSendDumpDataDone, .-NandcSendDumpDataDone
ubfiz x0, x0, 4, 8
ubfx x3, x3, 1, 7
add x29, sp, 0
- str x25, [sp,64]
- uxtb w25, w1
- adrp x1, :got:gNandChipMap
stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
- ldr x1, [x1, #:got_lo12:gNandChipMap]
- ubfiz w19, w25, 1, 1
+ adrp x19, .LANCHOR0
+ str x25, [sp,64]
stp x23, x24, [sp,48]
- uxtb w23, w2
- add x2, x1, x0
- ldr x21, [x1,x0]
- mov w1, 16
- orr w19, w19, 8
+ uxtb w24, w1
+ add x1, x19, :lo12:.LANCHOR0
+ uxtb w25, w2
+ add x2, x1, 24
+ stp x21, x22, [sp,32]
mov x22, x4
- ldrb w0, [x2,8]
- ldr w24, [x21,12]
- bfi w24, w1, 8, 8
- and w24, w24, -9
- bfi w24, w0, 5, 3
+ add x4, x2, x0
+ ldr x21, [x2,x0]
+ mov w2, 16
+ ubfiz w20, w24, 1, 1
+ ldrb w0, [x4,8]
+ orr w20, w20, 8
+ ldr w23, [x21,12]
+ bfi w23, w2, 8, 8
+ and w23, w23, -9
+ bfi w23, w0, 5, 3
mov w0, 1
- bfi w19, w0, 5, 2
- adrp x0, :got:gNandcVer
- orr w19, w19, 536870912
- orr w19, w19, 1024
- ldr x0, [x0, #:got_lo12:gNandcVer]
- bfi w19, w3, 4, 1
- ldr w0, [x0]
+ bfi w20, w0, 5, 2
+ ldr w0, [x1,20]
+ orr w20, w20, 536870912
cmp w0, 3
- bls .L313
+ orr w20, w20, 1024
+ bfi w20, w3, 4, 1
+ bls .L349
ldr w0, [x21,16]
cmp x5, xzr
str w0, [x29,88]
- cset w6, ne
+ cset w8, ne
ldr w0, [x29,88]
and w0, w0, -5
str w0, [x29,88]
- cbnz w6, .L327
- cbz x4, .L314
-.L327:
- adrp x20, :got:gMasterInfo
- cbnz w25, .L316
-.L324:
+ cbnz w8, .L363
+ cbz x22, .L350
+.L363:
+ cbnz w24, .L352
+.L360:
mov x0, x21
- add w23, w23, 1
- asr w23, w23, 1
bl rk_nandc_xfer_irq_flag_init
- bfi w19, w23, 22, 6
mov x0, x21
mov w1, 0
bl NandCIrqEnable
+ add w2, w25, 1
mov x0, x22
- cbnz x22, .L318
- ldr x0, [x20, #:got_lo12:gMasterInfo]
- ldr x0, [x0]
- b .L318
-.L316:
- adrp x0, :got:gNandcEccBits
- mov w3, 128
- mov w1, 0
- lsr w7, w23, 1
- mov w2, w1
- mov w8, -1
- ldr x0, [x0, #:got_lo12:gNandcEccBits]
- ldr w0, [x0]
+ asr w2, w2, 1
+ bfi w20, w2, 22, 6
+ cbnz x22, .L354
+ add x0, x19, :lo12:.LANCHOR0
+ ldr x0, [x0,1888]
+ b .L354
+.L352:
+ add x1, x19, :lo12:.LANCHOR0
+ mov w6, 128
+ mov w3, 0
+ lsr w2, w25, 1
+ mov w4, w3
+ mov w9, -1
+ ldr w0, [x1,1940]
cmp w0, 25
mov w0, 64
- csel w3, w0, w3, cc
-.L320:
- cmp w2, w7
- bcs .L324
- lsr w0, w1, 2
- ldr x4, [x20, #:got_lo12:gMasterInfo]
+ csel w6, w0, w6, cc
+.L356:
+ cmp w4, w2
+ bcs .L360
+ lsr w0, w3, 2
ubfiz x0, x0, 2, 30
- cbz w6, .L321
- ldr x9, [x4,8]
- ldrh w4, [x5,2]
- ldrh w10, [x5],4
- orr w4, w10, w4, lsl 16
- str w4, [x9,x0]
- b .L322
-.L321:
- ldr x4, [x4,8]
- str w8, [x4,x0]
-.L322:
- add w2, w2, 1
- add w1, w1, w3
- b .L320
-.L318:
- ldr x20, [x20, #:got_lo12:gMasterInfo]
- ubfx x23, x19, 22, 5
- mov w2, w25
+ cbz w8, .L357
+ ldrh w7, [x5,2]
+ ldr x10, [x1,1896]
+ ldrh w11, [x5],4
+ orr w7, w11, w7, lsl 16
+ str w7, [x10,x0]
+ b .L358
+.L357:
+ ldr x7, [x1,1896]
+ str w9, [x7,x0]
+.L358:
+ add w4, w4, 1
+ add w3, w3, w6
+ b .L356
+.L354:
+ add x19, x19, :lo12:.LANCHOR0
+ ubfx x25, x20, 22, 5
+ mov w2, w24
and x22, x22, 3
- ldr x1, [x20,8]
- str x1, [x20,24]
- lsl w1, w23, 10
- str x0, [x20,16]
+ ldr x1, [x19,1896]
+ str x1, [x19,1912]
+ lsl w1, w25, 10
+ str x0, [x19,1904]
bl rknand_dma_map_single
- str w0, [x20,32]
- ldr x0, [x20,24]
- lsl w1, w23, 7
- mov w2, w25
+ str w0, [x19,1920]
+ ldr x0, [x19,1912]
+ lsl w1, w25, 7
+ mov w2, w24
bl rknand_dma_map_single
- str w0, [x20,36]
+ str w0, [x19,1924]
mov w0, 1
- str w0, [x20,40]
- ldr w0, [x20,32]
+ str w0, [x19,1928]
+ ldr w0, [x19,1920]
mov w1, 16
str w0, [x21,20]
- ldr w0, [x20,36]
+ ldr w0, [x19,1924]
str w0, [x21,24]
str wzr, [x29,88]
ldr w0, [x29,88]
ldr w0, [x29,88]
orr w0, w0, 448
str w0, [x29,88]
- cbnz x22, .L325
+ cbnz x22, .L361
ldr w0, [x29,88]
mov w1, 2
bfi w0, w1, 3, 3
str w0, [x29,88]
-.L325:
+.L361:
ldr w0, [x29,88]
- cmp w25, wzr
+ cmp w24, wzr
cset w1, eq
orr w0, w0, 4
str w0, [x29,88]
ldr w0, [x29,88]
orr w0, w0, 1
str w0, [x29,88]
-.L314:
+.L350:
ldr w0, [x29,88]
str w0, [x21,16]
-.L313:
- str w24, [x21,12]
- str w19, [x21,8]
- orr w19, w19, 4
- str w19, [x21,8]
+.L349:
+ str w23, [x21,12]
+ str w20, [x21,8]
+ orr w20, w20, 4
+ str w20, [x21,8]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
Ftl_log2:
mov w2, 1
mov w1, 0
-.L332:
+.L368:
cmp w2, w0
- bhi .L334
+ bhi .L370
add w1, w1, 1
lsl w2, w2, 1
uxth w1, w1
- b .L332
-.L334:
+ b .L368
+.L370:
sub w0, w1, #1
ret
.size Ftl_log2, .-Ftl_log2
uxth w0, w0
mov w1, 24
cmp w0, 23
- adrp x2, :got:c_ftl_nand_max_sys_blks
csel w0, w0, w1, hi
- adrp x1, :got:c_ftl_nand_sys_blks_per_plane
- adrp x3, :got:c_ftl_nand_blk_pre_plane
- ldr x1, [x1, #:got_lo12:c_ftl_nand_sys_blks_per_plane]
- str w0, [x1]
- adrp x1, :got:c_ftl_nand_planes_num
- ldr x2, [x2, #:got_lo12:c_ftl_nand_max_sys_blks]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w1, [x1]
- mul w1, w0, w1
- str w1, [x2]
- adrp x2, :got:c_ftl_nand_data_blks_per_plane
- ldr x3, [x3, #:got_lo12:c_ftl_nand_blk_pre_plane]
- ldr x2, [x2, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w3, [x3]
+ adrp x1, .LANCHOR0
+ add x1, x1, :lo12:.LANCHOR0
+ ldrh w2, [x1,1952]
+ ldrh w3, [x1,1962]
+ str w0, [x1,1948]
+ mul w2, w0, w2
sub w0, w3, w0
- strh w0, [x2]
- adrp x2, :got:c_ftl_nand_totle_phy_blks
- adrp x0, :got:c_ftl_nand_max_data_blks
- ldr x2, [x2, #:got_lo12:c_ftl_nand_totle_phy_blks]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_max_data_blks]
- ldr w2, [x2]
- sub w1, w2, w1
- str w1, [x0]
+ strh w0, [x1,1960]
+ ldr w0, [x1,1968]
+ str w2, [x1,1956]
+ sub w2, w0, w2
mov w0, 0
+ str w2, [x1,1964]
ret
.size FtlSysBlkNumInit, .-FtlSysBlkNumInit
.align 2
.global FtlConstantsInit
.type FtlConstantsInit, %function
FtlConstantsInit:
- stp x29, x30, [sp, -96]!
- adrp x3, :got:c_ftl_nand_planes_per_die
- adrp x6, :got:p_plane_order_table
+ stp x29, x30, [sp, -80]!
+ mov x3, 0
add x29, sp, 0
stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
+ stp x21, x22, [sp,32]
stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- mov x19, x0
- adrp x20, :got:c_ftl_nand_blk_pre_plane
- ldrh w7, [x0,8]
- adrp x0, :got:c_ftl_nand_type
- ldrh w2, [x19,10]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_type]
- ldrh w5, [x19,14]
- strh w7, [x0]
- adrp x0, :got:c_ftl_nand_die_num
- ldr x1, [x0, #:got_lo12:c_ftl_nand_die_num]
- strh w2, [x1]
- ldrh w1, [x19,12]
- ldr x3, [x3, #:got_lo12:c_ftl_nand_planes_per_die]
- strh w1, [x3]
- ldr x3, [x20, #:got_lo12:c_ftl_nand_blk_pre_plane]
- strh w5, [x3]
- mov x3, 0
-.L339:
- ldr x4, [x6, #:got_lo12:p_plane_order_table]
- adrp x13, :got:p_plane_order_table
- strb w3, [x3,x4]
+ mov x23, x0
+ adrp x19, .LANCHOR0
+ ldrh w6, [x0,8]
+ add x0, x19, :lo12:.LANCHOR0
+ ldrh w2, [x23,10]
+ ldrh w1, [x23,12]
+ ldrh w4, [x23,14]
+ strh w6, [x0,1972]
+ strh w2, [x0,1974]
+ strh w1, [x0,1976]
+ strh w4, [x0,1962]
+.L375:
+ add x5, x0, 1984
+ strb w3, [x3,x5]
add x3, x3, 1
cmp x3, 32
- bne .L339
- ldrh w4, [x19,20]
- ldrb w3, [x19,15]
- cmp w4, w3
- bcs .L340
- uxtb w9, w1
- mov w4, 0
- mul w12, w1, w2
- ubfiz w11, w9, 1, 7
-.L341:
- cmp w4, w1
- bcs .L343
- uxtb w3, w4
- mov w6, w4
- mov w8, 0
-.L344:
- cmp w8, w2
- bcs .L357
- ldr x10, [x13, #:got_lo12:p_plane_order_table]
- add w14, w6, w12
- add w15, w3, w9
- add w8, w8, 1
- strb w3, [x10,w6,uxtw]
- add w3, w3, w11
- strb w15, [x10,x14]
- add w6, w6, w1
- uxtb w3, w3
- b .L344
-.L357:
- add w4, w4, 1
- b .L341
-.L343:
- ldr x3, [x0, #:got_lo12:c_ftl_nand_die_num]
+ bne .L375
+ ldrh w3, [x23,20]
+ ldrb w0, [x23,15]
+ cmp w3, w0
+ bcs .L376
+ uxtb w8, w1
+ mov w3, 0
+ mul w11, w1, w2
+ ubfiz w10, w8, 1, 7
+ add x12, x19, :lo12:.LANCHOR0
+.L377:
+ cmp w3, w1
+ bcs .L379
+ uxtb w0, w3
+ mov w5, w3
+ mov w7, 0
+.L380:
+ cmp w7, w2
+ bcs .L393
+ add x9, x12, 1984
+ add w13, w5, w11
+ add w14, w0, w8
+ add w7, w7, 1
+ strb w0, [x9,w5,uxtw]
+ add w0, w0, w10
+ strb w14, [x9,x13]
+ add w5, w5, w1
+ uxtb w0, w0
+ b .L380
+.L393:
+ add w3, w3, 1
+ b .L377
+.L379:
+ add x0, x19, :lo12:.LANCHOR0
lsl w2, w2, 1
- lsr w5, w5, 1
- strh w2, [x3]
- ldr x2, [x20, #:got_lo12:c_ftl_nand_blk_pre_plane]
- strh w5, [x2]
-.L340:
- adrp x2, :got:c_mlc_erase_count_value
- adrp x21, :got:c_ftl_nand_ext_blk_pre_plane
- mov w3, 5
- cmp w7, 1
- ldr x2, [x2, #:got_lo12:c_mlc_erase_count_value]
- strh w3, [x2]
- ldr x3, [x21, #:got_lo12:c_ftl_nand_ext_blk_pre_plane]
- strh wzr, [x3]
- bne .L345
- strh w7, [x2]
-.L345:
- adrp x23, :got:c_ftl_vendor_part_size
+ lsr w4, w4, 1
+ strh w2, [x0,1974]
+ strh w4, [x0,1962]
+.L376:
+ add x0, x19, :lo12:.LANCHOR0
+ mov w2, 5
+ cmp w6, 1
+ strh w2, [x0,2016]
+ strh wzr, [x0,2018]
+ bne .L381
+ strh w6, [x0,2016]
+.L381:
+ add x0, x19, :lo12:.LANCHOR0
mov w2, 4352
- ldr x3, [x23, #:got_lo12:c_ftl_vendor_part_size]
- strh w2, [x3]
- adrp x2, :got:g_slc2KBNand
- ldr x2, [x2, #:got_lo12:g_slc2KBNand]
- ldrb w2, [x2]
- cbz w2, .L346
+ strh w2, [x0,2020]
+ ldrb w2, [x0,8]
+ cbz w2, .L382
mov w2, 384
- strh w2, [x3]
-.L346:
- ldr x0, [x0, #:got_lo12:c_ftl_nand_die_num]
- adrp x24, :got:c_ftl_nand_planes_num
- adrp x25, :got:c_ftl_nand_page_pre_blk
- adrp x28, :got:c_ftl_nand_page_pre_slc_blk
- adrp x27, :got:c_ftl_nand_sec_pre_page
- adrp x22, :got:c_ftl_nand_sec_pre_page_shift
- ldrh w0, [x0]
- ldr x24, [x24, #:got_lo12:c_ftl_nand_planes_num]
- mul w0, w1, w0
- strh w0, [x24]
- ldr x20, [x20, #:got_lo12:c_ftl_nand_blk_pre_plane]
- ldrh w0, [x20]
- mul w1, w1, w0
- adrp x0, :got:c_ftl_nand_blks_per_die
- uxth w1, w1
- ldr x0, [x0, #:got_lo12:c_ftl_nand_blks_per_die]
- strh w1, [x0]
- mov w0, w1
+ strh w2, [x0,2020]
+.L382:
+ add x21, x19, :lo12:.LANCHOR0
+ ldrh w20, [x21,1962]
+ ldrh w22, [x21,1974]
+ mul w22, w1, w22
+ mul w1, w20, w1
+ uxth w22, w22
+ strh w22, [x21,1952]
+ uxth w0, w1
+ strh w0, [x21,2022]
bl Ftl_log2
- adrp x1, :got:c_ftl_nand_blks_per_die_shift
- ldrh w2, [x19,18]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_blks_per_die_shift]
- strh w0, [x1]
- ldrh w0, [x19,16]
- ldr x1, [x25, #:got_lo12:c_ftl_nand_page_pre_blk]
- strh w0, [x1]
- ldr x1, [x28, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- strh w2, [x1]
- adrp x1, :got:c_ftl_nand_page_pre_super_blk
- ldrh w2, [x24]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_page_pre_super_blk]
- mul w0, w0, w2
- strh w0, [x1]
- ldrh w0, [x19,20]
- ldr x26, [x27, #:got_lo12:c_ftl_nand_sec_pre_page]
- strh w0, [x26]
+ ldrh w25, [x23,16]
+ ldrh w24, [x23,20]
+ strh w0, [x21,2024]
+ mul w0, w22, w25
+ strh w0, [x21,2030]
+ mov w0, w24
+ ldrh w26, [x23,18]
+ strh w25, [x21,2026]
+ strh w26, [x21,2028]
+ strh w24, [x21,2032]
bl Ftl_log2
- ldr x1, [x22, #:got_lo12:c_ftl_nand_sec_pre_page_shift]
- uxth w6, w0
- ldrh w2, [x26]
- mov x4, x28
- ldrh w5, [x24]
- strh w0, [x1]
- adrp x0, :got:c_ftl_nand_byte_pre_page
- lsl w1, w2, 9
- ldr x0, [x0, #:got_lo12:c_ftl_nand_byte_pre_page]
- strh w1, [x0]
- adrp x0, :got:c_ftl_nand_byte_pre_oob
- ubfx x1, x1, 9, 7
- lsl w1, w1, 1
- ldr x0, [x0, #:got_lo12:c_ftl_nand_byte_pre_oob]
- strh w1, [x0]
- adrp x0, :got:c_ftl_nand_reserved_blks
- ldrh w1, [x19,26]
- mov x19, x25
- ldr x0, [x0, #:got_lo12:c_ftl_nand_reserved_blks]
- strh w1, [x0]
- adrp x1, :got:c_ftl_nand_totle_phy_blks
- ldrh w0, [x20]
- mov x20, x27
- ldr x1, [x1, #:got_lo12:c_ftl_nand_totle_phy_blks]
- cmp w0, 1024
- mul w3, w5, w0
- str w3, [x1]
- bls .L347
- ldr x1, [x21, #:got_lo12:c_ftl_nand_ext_blk_pre_plane]
- and w3, w0, 255
- strh w3, [x1]
-.L347:
- ldr x21, [x21, #:got_lo12:c_ftl_nand_ext_blk_pre_plane]
- adrp x3, :got:DeviceCapacity
- ldr x7, [x19, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w1, [x21]
- ldrh w7, [x7]
- sub w1, w0, w1
- ldr x3, [x3, #:got_lo12:DeviceCapacity]
- mul w1, w5, w1
- mul w1, w1, w2
- mul w1, w1, w7
+ uxth w3, w0
+ strh w0, [x21,2034]
+ lsl w0, w24, 9
+ strh w0, [x21,2036]
+ ubfx x0, x0, 9, 7
+ cmp w20, 1024
+ lsl w0, w0, 1
+ strh w0, [x21,2038]
+ ldrh w0, [x23,26]
+ strh w0, [x21,2040]
+ mul w0, w22, w20
+ str w0, [x21,1968]
+ bls .L383
+ and w0, w20, 255
+ strh w0, [x21,2018]
+.L383:
+ add x2, x19, :lo12:.LANCHOR0
+ ldrh w1, [x2,2018]
+ ldrh w0, [x2,2020]
+ sub w1, w20, w1
+ mul w1, w22, w1
+ mul w1, w1, w24
+ mul w24, w24, w26
+ mul w1, w1, w25
asr w1, w1, 11
- str w1, [x3]
- ldr x4, [x4, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldr x23, [x23, #:got_lo12:c_ftl_vendor_part_size]
- ldrh w4, [x4]
- ldrh w1, [x23]
- mul w2, w2, w4
- lsl w3, w1, 3
- sdiv w2, w3, w2
- adrp x3, :got:c_ftl_nand_max_vendor_blks
- uxth w2, w2
- cmp w2, 4
- bls .L348
- ldr x4, [x3, #:got_lo12:c_ftl_nand_max_vendor_blks]
- strh w2, [x4]
- b .L349
-.L348:
- ldr x2, [x3, #:got_lo12:c_ftl_nand_max_vendor_blks]
- mov w4, 4
- strh w4, [x2]
-.L349:
- adrp x2, :got:c_ftl_nand_vendor_region_num
- asr w1, w1, w6
- add w1, w1, 2
- lsl w0, w0, 6
- cmp w5, 1
- ldr x2, [x2, #:got_lo12:c_ftl_nand_vendor_region_num]
- strh w1, [x2]
- add w1, w6, 9
- asr w0, w0, w1
- adrp x1, :got:c_ftl_nand_map_blks_per_plane
- ldr x1, [x1, #:got_lo12:c_ftl_nand_map_blks_per_plane]
- strh w0, [x1]
- adrp x1, :got:c_ftl_nand_max_map_blks
- and w0, w0, 65535
- ldr x1, [x1, #:got_lo12:c_ftl_nand_max_map_blks]
- mul w2, w0, w5
- add w0, w0, 8
- str w2, [x1]
- ldr x3, [x3, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldrh w1, [x3]
- udiv w1, w1, w5
- add w0, w0, w1
- adrp x1, :got:c_ftl_nand_sys_blks_per_plane
- ldr x2, [x1, #:got_lo12:c_ftl_nand_sys_blks_per_plane]
- bne .L356
- add w0, w0, 4
-.L356:
- str w0, [x2]
- ldr x21, [x1, #:got_lo12:c_ftl_nand_sys_blks_per_plane]
- ldrh w0, [x21]
+ str w1, [x2,2044]
+ lsl w1, w0, 3
+ sdiv w24, w1, w24
+ uxth w24, w24
+ cmp w24, 4
+ bls .L384
+ strh w24, [x2,2048]
+ b .L385
+.L384:
+ mov w1, 4
+ strh w1, [x2,2048]
+.L385:
+ add x1, x19, :lo12:.LANCHOR0
+ asr w0, w0, w3
+ lsl w20, w20, 6
+ add w3, w3, 9
+ asr w20, w20, w3
+ add w0, w0, 2
+ strh w20, [x1,2052]
+ and w20, w20, 65535
+ strh w0, [x1,2050]
+ cmp w22, 1
+ mul w0, w20, w22
+ str w0, [x1,2056]
+ add w20, w20, 8
+ ldrh w0, [x1,2048]
+ udiv w0, w0, w22
+ add w20, w20, w0
+ bne .L392
+ add w20, w20, 4
+.L392:
+ add x19, x19, :lo12:.LANCHOR0
+ str w20, [x1,1948]
+ ldrh w0, [x19,1948]
bl FtlSysBlkNumInit
- adrp x0, :got:c_ftl_nand_init_sys_blks_per_plane
- ldr w1, [x21]
- adrp x2, :got:c_ftl_nand_map_region_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_init_sys_blks_per_plane]
- str w1, [x0]
- adrp x0, :got:c_ftl_nand_max_data_blks
- ldr x19, [x19, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_max_data_blks]
- ldr x22, [x22, #:got_lo12:c_ftl_nand_sec_pre_page_shift]
- ldrh w1, [x19]
- ldr w0, [x0]
- ldr x2, [x2, #:got_lo12:c_ftl_nand_map_region_num]
+ str wzr, [x19,2068]
+ ldr w0, [x19,1948]
+ str w0, [x19,2060]
+ ldr w0, [x19,1964]
+ ldrh w1, [x19,2026]
lsl w0, w0, 2
+ ldp x21, x22, [sp,32]
mul w1, w0, w1
- ldrh w0, [x22]
+ ldrh w0, [x19,2034]
+ ldp x23, x24, [sp,48]
add w0, w0, 9
lsr w0, w1, w0
- mov w1, 2048
+ ldrh w1, [x19,2032]
add w0, w0, 2
- strh w0, [x2]
- adrp x0, :got:c_ftl_nand_l2pmap_ram_region_num
- ldr x20, [x20, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_l2pmap_ram_region_num]
- ldrh w2, [x20]
- sdiv w1, w1, w2
- strh w1, [x0]
- adrp x0, :got:g_MaxLbaSector
- ldr x0, [x0, #:got_lo12:g_MaxLbaSector]
- str wzr, [x0]
- mov w0, 0
- ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
+ strh w0, [x19,2064]
+ mov w0, 2048
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 96
+ sdiv w0, w0, w1
+ strh w0, [x19,2066]
+ ldp x19, x20, [sp,16]
+ ldp x29, x30, [sp], 80
+ mov w0, 0
ret
.size FtlConstantsInit, .-FtlConstantsInit
.align 2
.global IsBlkInVendorPart
.type IsBlkInVendorPart, %function
IsBlkInVendorPart:
- adrp x1, :got:g_totle_vendor_block
+ adrp x1, .LANCHOR0
uxth w4, w0
+ add x1, x1, :lo12:.LANCHOR0
mov w0, 0
- ldr x1, [x1, #:got_lo12:g_totle_vendor_block]
- ldrh w1, [x1]
- cbz w1, .L359
- adrp x1, :got:c_ftl_nand_max_vendor_blks
- ldr x1, [x1, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldrh w2, [x1]
- adrp x1, :got:p_vendor_block_table
- ldr x1, [x1, #:got_lo12:p_vendor_block_table]
- ldr x3, [x1]
+ ldrh w2, [x1,2072]
+ cbz w2, .L395
+ ldrh w2, [x1,2048]
+ ldr x3, [x1,2080]
mov x1, 0
-.L360:
+.L396:
cmp w2, w1, uxth
- bls .L365
+ bls .L401
add x1, x1, 1
add x0, x3, x1, lsl 1
ldrh w0, [x0,-2]
cmp w0, w4
- bne .L360
+ bne .L396
mov w0, 1
- b .L359
-.L365:
+ b .L395
+.L401:
mov w0, 0
-.L359:
+.L395:
ret
.size IsBlkInVendorPart, .-IsBlkInVendorPart
.align 2
.global FtlCacheMetchLpa
.type FtlCacheMetchLpa, %function
FtlCacheMetchLpa:
- adrp x2, :got:g_wr_page_num
+ adrp x2, .LANCHOR0
mov w6, w0
+ add x2, x2, :lo12:.LANCHOR0
mov w0, 0
- ldr x2, [x2, #:got_lo12:g_wr_page_num]
- ldr w3, [x2]
- cbz w3, .L367
- adrp x2, :got:req_wr_io
+ ldr w3, [x2,2088]
+ cbz w3, .L403
+ ldr x5, [x2,2096]
mov x0, 56
- ldr x2, [x2, #:got_lo12:req_wr_io]
- ldr x5, [x2]
mov x2, 0
-.L368:
+.L404:
cmp w3, w2
- bls .L377
+ bls .L413
madd x4, x2, x0, x5
add x2, x2, 1
ldr w4, [x4,24]
cmp w4, w6
- bcc .L368
+ bcc .L404
cmp w4, w1
- bhi .L368
+ bhi .L404
mov w0, 1
- b .L367
-.L377:
+ b .L403
+.L413:
mov w0, 0
-.L367:
+.L403:
ret
.size FtlCacheMetchLpa, .-FtlCacheMetchLpa
.align 2
.global FtlGetCap
.type FtlGetCap, %function
FtlGetCap:
- adrp x0, :got:g_MaxLbaSector
- ldr x0, [x0, #:got_lo12:g_MaxLbaSector]
- ldr w0, [x0]
+ adrp x0, .LANCHOR0+2068
+ ldr w0, [x0,#:lo12:.LANCHOR0+2068]
ret
.size FtlGetCap, .-FtlGetCap
.align 2
.global FtlGetCapacity
.type FtlGetCapacity, %function
FtlGetCapacity:
- adrp x0, :got:g_MaxLbaSector
- ldr x0, [x0, #:got_lo12:g_MaxLbaSector]
- ldr w0, [x0]
+ adrp x0, .LANCHOR0+2068
+ ldr w0, [x0,#:lo12:.LANCHOR0+2068]
ret
.size FtlGetCapacity, .-FtlGetCapacity
.align 2
.global FtlGetLpn
.type FtlGetLpn, %function
FtlGetLpn:
- adrp x0, :got:g_MaxLpn
- ldr x0, [x0, #:got_lo12:g_MaxLpn]
- ldr w0, [x0]
+ adrp x0, .LANCHOR0+2104
+ ldr w0, [x0,#:lo12:.LANCHOR0+2104]
ret
.size FtlGetLpn, .-FtlGetLpn
.align 2
.global FtlGetCurEraseBlock
.type FtlGetCurEraseBlock, %function
FtlGetCurEraseBlock:
- adrp x0, :got:c_ftl_nand_planes_num
- adrp x1, :got:g_cur_erase_blk
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldr x1, [x1, #:got_lo12:g_cur_erase_blk]
- ldrh w2, [x0]
- ldr w0, [x1]
+ adrp x1, .LANCHOR0
+ add x1, x1, :lo12:.LANCHOR0
+ ldrh w2, [x1,1952]
+ ldr w0, [x1,2108]
mul w0, w2, w0
ret
.size FtlGetCurEraseBlock, .-FtlGetCurEraseBlock
.global FtlGetAllBlockNum
.type FtlGetAllBlockNum, %function
FtlGetAllBlockNum:
- adrp x0, :got:c_ftl_nand_blk_pre_plane
- adrp x1, :got:c_ftl_nand_planes_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_blk_pre_plane]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w2, [x0]
- ldrh w0, [x1]
+ adrp x1, .LANCHOR0
+ add x1, x1, :lo12:.LANCHOR0
+ ldrh w2, [x1,1962]
+ ldrh w0, [x1,1952]
mul w0, w2, w0
ret
.size FtlGetAllBlockNum, .-FtlGetAllBlockNum
.global FtlBbmMapBadBlock
.type FtlBbmMapBadBlock, %function
FtlBbmMapBadBlock:
- uxth w1, w0
- adrp x0, :got:c_ftl_nand_blks_per_die
stp x29, x30, [sp, -32]!
+ uxth w1, w0
mov w4, 1
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:c_ftl_nand_blks_per_die]
str x19, [sp,16]
- adrp x19, :got:gBbtInfo
- ldrh w3, [x0]
- ldr x19, [x19, #:got_lo12:gBbtInfo]
+ adrp x19, .LANCHOR0
+ add x19, x19, :lo12:.LANCHOR0
+ add x19, x19, 2112
+ ldrh w3, [x19,-90]
udiv w2, w1, w3
add x0, x19, x2, uxth 3
ldr x0, [x0,32]
ldr w5, [x0,x6]
orr w4, w4, w5
str w4, [x0,x6]
- adrp x0, .LC1
- add x0, x0, :lo12:.LC1
+ adrp x0, .LC2
+ add x0, x0, :lo12:.LC2
bl printk
ldrh w0, [x19,6]
add w0, w0, 1
.global FtlBbmIsBadBlock
.type FtlBbmIsBadBlock, %function
FtlBbmIsBadBlock:
- adrp x2, :got:c_ftl_nand_blks_per_die
+ adrp x2, .LANCHOR0
uxth w0, w0
- ldr x2, [x2, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w1, [x2]
+ add x3, x2, :lo12:.LANCHOR0
+ ldrh w1, [x3,2022]
udiv w2, w0, w1
msub w0, w2, w1, w0
- adrp x1, :got:gBbtInfo
+ add x2, x3, x2, uxth 3
+ ldr x1, [x2,2144]
uxth w0, w0
- ldr x1, [x1, #:got_lo12:gBbtInfo]
ubfx x3, x0, 5, 11
- add x2, x1, x2, uxth 3
- ldr x1, [x2,32]
ldr w1, [x1,x3,lsl 2]
lsr w0, w1, w0
and w0, w0, 1
.type FtlBbtCalcTotleCnt, %function
FtlBbtCalcTotleCnt:
stp x29, x30, [sp, -48]!
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
add x29, sp, 0
stp x19, x20, [sp,16]
+ str x21, [sp,32]
mov w19, 0
- stp x21, x22, [sp,32]
mov w20, w19
- adrp x22, :got:c_ftl_nand_blks_per_die
- adrp x21, :got:c_ftl_nand_die_num
-.L387:
- ldr x0, [x22, #:got_lo12:c_ftl_nand_blks_per_die]
- ldr x1, [x21, #:got_lo12:c_ftl_nand_die_num]
- ldrh w0, [x0]
- ldrh w1, [x1]
- mul w0, w0, w1
- cmp w20, w0
- bge .L393
+ ldrh w1, [x0,2022]
+ ldrh w21, [x0,1974]
+ mul w21, w1, w21
+.L423:
+ cmp w20, w21
+ bge .L429
mov w0, w20
bl FtlBbmIsBadBlock
- cbz w0, .L388
+ cbz w0, .L424
add w19, w19, 1
uxth w19, w19
-.L388:
+.L424:
add w20, w20, 1
uxth w20, w20
- b .L387
-.L393:
+ b .L423
+.L429:
mov w0, w19
+ ldr x21, [sp,32]
ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
ldp x29, x30, [sp], 48
ret
.size FtlBbtCalcTotleCnt, .-FtlBbtCalcTotleCnt
.global V2P_block
.type V2P_block, %function
V2P_block:
- adrp x2, :got:c_ftl_nand_planes_per_die
+ adrp x3, .LANCHOR0
uxth w0, w0
+ add x3, x3, :lo12:.LANCHOR0
uxth w1, w1
- ldr x2, [x2, #:got_lo12:c_ftl_nand_planes_per_die]
- ldrh w3, [x2]
- udiv w2, w0, w3
- msub w0, w2, w3, w0
- madd w0, w1, w3, w0
- adrp x1, :got:c_ftl_nand_blks_per_die
- ldr x1, [x1, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w1, [x1]
+ ldrh w4, [x3,1976]
+ udiv w2, w0, w4
+ msub w0, w2, w4, w0
+ madd w0, w1, w4, w0
+ ldrh w1, [x3,2022]
madd w0, w2, w1, w0
ret
.size V2P_block, .-V2P_block
.global P2V_plane
.type P2V_plane, %function
P2V_plane:
- adrp x1, :got:c_ftl_nand_planes_per_die
- adrp x2, :got:c_ftl_nand_blks_per_die
+ adrp x2, .LANCHOR0
uxth w0, w0
- ldr x1, [x1, #:got_lo12:c_ftl_nand_planes_per_die]
- ldr x2, [x2, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w1, [x1]
- ldrh w3, [x2]
+ add x2, x2, :lo12:.LANCHOR0
+ ldrh w1, [x2,1976]
+ ldrh w3, [x2,2022]
udiv w2, w0, w1
udiv w3, w0, w3
msub w0, w2, w1, w0
.global P2V_block_in_plane
.type P2V_block_in_plane, %function
P2V_block_in_plane:
- adrp x1, :got:c_ftl_nand_blks_per_die
+ adrp x2, .LANCHOR0
uxth w0, w0
- ldr x1, [x1, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w2, [x1]
- udiv w1, w0, w2
- msub w0, w1, w2, w0
- adrp x1, :got:c_ftl_nand_planes_per_die
+ add x2, x2, :lo12:.LANCHOR0
+ ldrh w3, [x2,2022]
+ udiv w1, w0, w3
+ msub w0, w1, w3, w0
+ ldrh w1, [x2,1976]
uxth w0, w0
- ldr x1, [x1, #:got_lo12:c_ftl_nand_planes_per_die]
- ldrh w1, [x1]
udiv w0, w0, w1
ret
.size P2V_block_in_plane, .-P2V_block_in_plane
ftl_cmp_data_ver:
cmp w0, w1
mov w2, -2147483648
- bls .L398
+ bls .L434
sub w1, w0, w1
cmp w1, w2
cset w0, ls
- b .L399
-.L398:
+ b .L435
+.L434:
sub w1, w1, w0
cmp w1, w2
cset w0, hi
-.L399:
+.L435:
ret
.size ftl_cmp_data_ver, .-ftl_cmp_data_ver
.align 2
.global FtlFreeSysBlkQueueEmpty
.type FtlFreeSysBlkQueueEmpty, %function
FtlFreeSysBlkQueueEmpty:
- adrp x0, :got:gSysFreeQueue
- ldr x0, [x0, #:got_lo12:gSysFreeQueue]
- ldrh w0, [x0,6]
+ adrp x0, .LANCHOR0+2214
+ ldrh w0, [x0,#:lo12:.LANCHOR0+2214]
cmp w0, wzr
cset w0, eq
ret
.global FtlFreeSysBlkQueueFull
.type FtlFreeSysBlkQueueFull, %function
FtlFreeSysBlkQueueFull:
- adrp x0, :got:gSysFreeQueue
- ldr x0, [x0, #:got_lo12:gSysFreeQueue]
- ldrh w0, [x0,6]
+ adrp x0, .LANCHOR0+2214
+ ldrh w0, [x0,#:lo12:.LANCHOR0+2214]
cmp w0, 1024
cset w0, eq
ret
.global FtlFreeSysBlkQueueIn
.type FtlFreeSysBlkQueueIn, %function
FtlFreeSysBlkQueueIn:
- stp x29, x30, [sp, -32]!
+ stp x29, x30, [sp, -48]!
+ adrp x2, .LANCHOR0
+ uxth w1, w1
add x29, sp, 0
+ stp x21, x22, [sp,32]
+ uxth w22, w0
+ add x0, x2, :lo12:.LANCHOR0
stp x19, x20, [sp,16]
- uxth w20, w0
- uxth w19, w1
- bl FtlFreeSysBlkQueueFull
- uxth w0, w0
- cbnz w0, .L402
- cbz w19, .L404
- mov w0, w20
+ mov x19, x2
+ ldrh w0, [x0,2214]
+ cmp w0, 1024
+ beq .L438
+ cbz w1, .L440
+ adrp x20, .LANCHOR2
+ mov w0, w22
+ add x20, x20, :lo12:.LANCHOR2
bl P2V_block_in_plane
- uxth w19, w0
- adrp x1, :got:req_erase
- lsl w2, w20, 10
- ldr x1, [x1, #:got_lo12:req_erase]
- ldr x0, [x1]
- str w2, [x0,4]
- ldr x0, [x1]
+ uxth w21, w0
+ lsl w1, w22, 10
+ ldr x0, [x20,-88]
+ str w1, [x0,4]
mov w1, 1
+ mov w2, w1
+ ldr x0, [x20,-88]
bl FlashEraseBlocks
- adrp x0, :got:p_erase_count_table
- ubfiz x1, x19, 1, 16
- ldr x0, [x0, #:got_lo12:p_erase_count_table]
- ldr x2, [x0]
+ ubfiz x1, x21, 1, 16
+ ldr x2, [x20,-80]
ldrh w0, [x2,x1]
add w0, w0, 1
strh w0, [x2,x1]
- adrp x1, :got:g_totle_sys_slc_erase_count
- ldr x1, [x1, #:got_lo12:g_totle_sys_slc_erase_count]
- ldr w0, [x1]
+ ldr w0, [x20,-72]
add w0, w0, 1
- str w0, [x1]
-.L404:
- adrp x1, :got:gSysFreeQueue
- ldr x1, [x1, #:got_lo12:gSysFreeQueue]
+ str w0, [x20,-72]
+.L440:
+ add x1, x19, :lo12:.LANCHOR0
+ add x1, x1, 2208
ldrh w0, [x1,6]
ldrh w2, [x1,4]
add w0, w0, 1
add x0, x1, x2, sxtw 1
add w2, w2, 1
and w2, w2, 1023
- strh w20, [x0,8]
+ strh w22, [x0,8]
strh w2, [x1,4]
-.L402:
+.L438:
ldp x19, x20, [sp,16]
- ldp x29, x30, [sp], 32
+ ldp x21, x22, [sp,32]
+ ldp x29, x30, [sp], 48
ret
.size FtlFreeSysBlkQueueIn, .-FtlFreeSysBlkQueueIn
.align 2
stp x29, x30, [sp, -48]!
add x29, sp, 0
stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
+ adrp x20, .LANCHOR0
+ str x21, [sp,32]
+ add x20, x20, :lo12:.LANCHOR0
mov w19, 0
- adrp x20, :got:gSysFreeQueue
- adrp x21, :got:p_sys_data_buf
- adrp x22, :got:p_erase_count_table
-.L409:
- ldr x1, [x20, #:got_lo12:gSysFreeQueue]
- adrp x6, :got:gSysFreeQueue
- ldrh w0, [x1,6]
+ add x20, x20, 2208
+ adrp x21, .LANCHOR2
+.L448:
+ ldrh w0, [x20,6]
cmp w0, w19
- bls .L417
- ldrh w0, [x1,2]
+ bls .L456
+ ldrh w0, [x20,2]
add w0, w0, w19
- add x0, x1, x0, sxtw 1
+ add x0, x20, x0, sxtw 1
ldrh w0, [x0,8]
bl P2V_block_in_plane
ubfiz x0, x0, 1, 16
- ldr x3, [x22, #:got_lo12:p_erase_count_table]
- ubfiz x1, x19, 2, 16
- ldr x2, [x21, #:got_lo12:p_sys_data_buf]
+ add x1, x21, :lo12:.LANCHOR2
+ ubfiz x2, x19, 2, 16
add w19, w19, 1
- ldr x3, [x3]
+ ldr x3, [x1,-64]
uxth w19, w19
- ldr x2, [x2]
- ldrh w0, [x3,x0]
- str w0, [x2,x1]
- b .L409
-.L417:
+ ldr x1, [x1,-80]
+ ldrh w0, [x1,x0]
+ str w0, [x3,x2]
+ b .L448
+.L456:
+ adrp x4, .LANCHOR0
+ adrp x7, .LANCHOR2
mov w0, 0
- adrp x7, :got:p_sys_data_buf
-.L411:
- ldr x1, [x6, #:got_lo12:gSysFreeQueue]
- ldrh w5, [x1,6]
- sub w1, w5, #1
+ add x4, x4, :lo12:.LANCHOR0
+ mov x8, x7
+.L450:
+ ldrh w6, [x4,2214]
+ sub w1, w6, #1
cmp w0, w1
- bge .L418
- ldr x1, [x7, #:got_lo12:p_sys_data_buf]
- add w4, w0, 1
- uxth w4, w4
- ldr x3, [x1]
- mov w2, w4
+ bge .L457
+ add x1, x7, :lo12:.LANCHOR2
+ add w5, w0, 1
+ uxth w5, w5
+ ldr x3, [x1,-64]
+ mov w2, w5
mov w1, w0
-.L412:
- cmp w2, w5
- bcs .L419
- ubfiz x8, x2, 2, 16
- ldr w9, [x3,w1,uxtw 2]
- ldr w8, [x3,x8]
- cmp w9, w8
+.L451:
+ cmp w2, w6
+ bcs .L458
+ ubfiz x9, x2, 2, 16
+ ldr w10, [x3,w1,uxtw 2]
+ ldr w9, [x3,x9]
+ cmp w10, w9
csel w1, w1, w2, ls
add w2, w2, 1
uxth w2, w2
- b .L412
-.L419:
+ b .L451
+.L458:
cmp w0, w1
- beq .L415
- ubfiz x5, x0, 2, 16
- ubfiz x2, x1, 2, 32
- ldr w9, [x3,x5]
- ldr w8, [x3,x2]
+ beq .L454
+ ubfiz x2, x0, 2, 16
+ ubfiz x6, x1, 2, 32
+ ldr w10, [x3,x2]
+ ldr w9, [x3,x6]
+ str w10, [x3,x6]
+ add x3, x8, :lo12:.LANCHOR2
+ ldr x3, [x3,-64]
str w9, [x3,x2]
- adrp x2, :got:p_sys_data_buf
- ldr x2, [x2, #:got_lo12:p_sys_data_buf]
- ldr x2, [x2]
- str w8, [x2,x5]
- ldr x2, [x6, #:got_lo12:gSysFreeQueue]
- ldrh w3, [x2,2]
+ add x2, x4, 2208
+ ldrh w3, [x4,2210]
add w1, w3, w1
add w0, w3, w0
add x1, x2, x1, sxtw 1
add x0, x2, x0, sxtw 1
ldrh w2, [x0,8]
- ldrh w5, [x1,8]
+ ldrh w6, [x1,8]
strh w2, [x1,8]
- strh w5, [x0,8]
-.L415:
- mov w0, w4
- b .L411
-.L418:
+ strh w6, [x0,8]
+.L454:
+ mov w0, w5
+ b .L450
+.L457:
ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
+ ldr x21, [sp,32]
ldp x29, x30, [sp], 48
ret
.size FtlFreeSysBLkSort, .-FtlFreeSysBLkSort
.global IsInFreeQueue
.type IsInFreeQueue, %function
IsInFreeQueue:
- stp x29, x30, [sp, -32]!
- add x29, sp, 0
- str x19, [sp,16]
- uxth w19, w0
- bl FtlFreeSysBlkQueueFull
- uxth w1, w0
+ adrp x1, .LANCHOR0
+ uxth w6, w0
+ add x1, x1, :lo12:.LANCHOR0
mov w0, 0
- cbnz w1, .L421
- adrp x2, :got:gSysFreeQueue
- mov w0, w1
- ldr x3, [x2, #:got_lo12:gSysFreeQueue]
- ldrh w4, [x3,6]
- ldrh w3, [x3,2]
-.L422:
- cmp w0, w4
- bcs .L426
- ldr x5, [x2, #:got_lo12:gSysFreeQueue]
- add w1, w0, w3
- ubfiz x1, x1, 1, 10
- add x1, x5, x1
- ldrh w1, [x1,8]
- cmp w1, w19
- beq .L425
- add w0, w0, 1
- b .L422
-.L426:
+ add x1, x1, 2208
+ ldrh w4, [x1,6]
+ cmp w4, 1024
+ beq .L460
+ ldrh w5, [x1,2]
+ mov w3, w0
+.L461:
+ cmp w3, w4
+ bcs .L465
+ add w2, w3, w5
+ ubfiz x2, x2, 1, 10
+ add x2, x1, x2
+ ldrh w0, [x2,8]
+ cmp w0, w6
+ beq .L464
+ add w3, w3, 1
+ b .L461
+.L465:
mov w0, 0
- b .L421
-.L425:
+ b .L460
+.L464:
mov w0, 1
-.L421:
- ldr x19, [sp,16]
- ldp x29, x30, [sp], 32
+.L460:
ret
.size IsInFreeQueue, .-IsInFreeQueue
.align 2
.global FtlFreeSysBlkQueueOut
.type FtlFreeSysBlkQueueOut, %function
FtlFreeSysBlkQueueOut:
- stp x29, x30, [sp, -16]!
- add x29, sp, 0
- bl FtlFreeSysBlkQueueEmpty
- uxth w1, w0
+ adrp x1, .LANCHOR0
mov w0, 0
- cbnz w1, .L428
- adrp x1, :got:gSysFreeQueue
- ldr x1, [x1, #:got_lo12:gSysFreeQueue]
+ add x1, x1, :lo12:.LANCHOR0
+ add x1, x1, 2208
+ ldrh w3, [x1,6]
+ cbz w3, .L467
ldrh w2, [x1,2]
add x0, x1, x2, sxtw 1
- ldrh w3, [x1,6]
- add w2, w2, 1
ldrh w0, [x0,8]
sub w3, w3, #1
- and w2, w2, 1023
+ add w2, w2, 1
strh w3, [x1,6]
+ and w2, w2, 1023
strh w2, [x1,2]
-.L428:
- ldp x29, x30, [sp], 16
+.L467:
ret
.size FtlFreeSysBlkQueueOut, .-FtlFreeSysBlkQueueOut
.align 2
uxth w0, w0
mov w9, 65535
cmp w0, w9
- beq .L431
- adrp x3, :got:p_data_block_list_table
- mov w4, 6
+ beq .L471
+ adrp x2, .LANCHOR2
+ mov w7, 6
+ add x5, x2, :lo12:.LANCHOR2
mov w1, -1
- adrp x2, :got:p_data_block_list_head
- umull x11, w0, w4
- ldr x8, [x3, #:got_lo12:p_data_block_list_table]
- mov x10, x3
- mov x5, x2
- ldr x12, [x8]
- add x6, x12, x11
- strh w1, [x6,2]
- strh w1, [x12,x11]
- ldr x7, [x2, #:got_lo12:p_data_block_list_head]
- ldr x1, [x7]
- cbnz x1, .L432
- str x6, [x7]
- b .L431
-.L432:
- adrp x2, :got:p_valid_page_count_table
- ubfiz x7, x0, 1, 16
- ldr x13, [x8]
- mov x8, -6148914691236517206
- ldr x2, [x2, #:got_lo12:p_valid_page_count_table]
- ldr x14, [x2]
- ldrh w2, [x6,4]
- ldrh w3, [x14,x7]
+ umull x10, w0, w7
+ mov x3, x2
+ ldr x11, [x5,-56]
+ add x4, x11, x10
+ strh w1, [x4,2]
+ strh w1, [x11,x10]
+ ldr x1, [x5,-48]
+ cbnz x1, .L472
+ str x4, [x5,-48]
+ b .L471
+.L472:
+ ubfiz x8, x0, 1, 16
+ ldr x13, [x5,-40]
+ ldrh w2, [x4,4]
+ mov x14, -6148914691236517206
+ ldr x12, [x5,-56]
+ ldrh w6, [x13,x8]
cmp w2, wzr
- mul w3, w3, w2
- sub x2, x1, x13
+ mul w6, w6, w2
+ sub x2, x1, x12
asr x2, x2, 1
- csinv w3, w3, wzr, ne
- madd x2, x8, x2, x2
- adrp x8, :got:p_erase_count_table
+ csinv w6, w6, wzr, ne
+ madd x2, x14, x2, x2
+ ldr x14, [x5,-80]
uxth w2, w2
- ldr x8, [x8, #:got_lo12:p_erase_count_table]
- ldr x15, [x8]
- add x8, x15, x7
- mov w7, w4
-.L439:
- ubfiz x16, x2, 1, 16
- ldrh w17, [x1,4]
- cmp w17, wzr
- ldrh w4, [x14,x16]
- mul w4, w4, w17
- csinv w4, w4, wzr, ne
- cmp w4, w3
- bne .L435
- ldrh w16, [x15,x16]
- ldrh w4, [x8]
- cmp w16, w4
- bcc .L437
- b .L436
-.L435:
- bhi .L436
-.L437:
- ldrh w4, [x1]
- cmp w4, w9
- bne .L438
- strh w2, [x6,2]
+ add x8, x14, x8
+.L479:
+ ubfiz x15, x2, 1, 16
+ ldrh w16, [x1,4]
+ cmp w16, wzr
+ ldrh w5, [x13,x15]
+ mul w5, w5, w16
+ csinv w5, w5, wzr, ne
+ cmp w5, w6
+ bne .L475
+ ldrh w15, [x14,x15]
+ ldrh w5, [x8]
+ cmp w15, w5
+ bcc .L477
+ b .L476
+.L475:
+ bhi .L476
+.L477:
+ ldrh w5, [x1]
+ cmp w5, w9
+ bne .L478
+ strh w2, [x4,2]
+ add x2, x3, :lo12:.LANCHOR2
strh w0, [x1]
- adrp x0, :got:p_data_block_list_tail
- ldr x0, [x0, #:got_lo12:p_data_block_list_tail]
- str x6, [x0]
- b .L431
-.L438:
- umull x1, w4, w7
- mov w2, w4
- add x1, x13, x1
- b .L439
-.L436:
- strh w2, [x12,x11]
+ str x4, [x2,-32]
+ b .L471
+.L478:
+ umull x1, w5, w7
+ mov w2, w5
+ add x1, x12, x1
+ b .L479
+.L476:
+ strh w2, [x11,x10]
ldrh w2, [x1,2]
- strh w2, [x6,2]
- ldr x2, [x5, #:got_lo12:p_data_block_list_head]
- ldr x3, [x2]
+ strh w2, [x4,2]
+ add x2, x3, :lo12:.LANCHOR2
+ ldr x3, [x2,-48]
cmp x1, x3
- bne .L440
+ bne .L480
strh w0, [x1,2]
- str x6, [x2]
- b .L431
-.L440:
- ldrh w2, [x1,2]
- mov w3, 6
- umull x2, w2, w3
- ldr x3, [x10, #:got_lo12:p_data_block_list_table]
- ldr x3, [x3]
- strh w0, [x3,x2]
+ str x4, [x2,-48]
+ b .L471
+.L480:
+ ldrh w3, [x1,2]
+ mov w4, 6
+ ldr x2, [x2,-56]
+ umull x3, w3, w4
+ strh w0, [x2,x3]
strh w0, [x1,2]
-.L431:
+.L471:
mov w0, 0
ret
.size insert_data_list, .-insert_data_list
stp x29, x30, [sp, -16]!
add x29, sp, 0
bl insert_data_list
- adrp x0, :got:g_num_data_superblocks
- ldr x0, [x0, #:got_lo12:g_num_data_superblocks]
- ldrh w1, [x0]
+ adrp x0, .LANCHOR2
+ add x0, x0, :lo12:.LANCHOR2
+ ldrh w1, [x0,-24]
add w1, w1, 1
- strh w1, [x0]
+ strh w1, [x0,-24]
ldp x29, x30, [sp], 16
ret
.size INSERT_DATA_LIST, .-INSERT_DATA_LIST
.type insert_free_list, %function
insert_free_list:
uxth w0, w0
- mov w6, 65535
- cmp w0, w6
- beq .L445
- adrp x3, :got:p_data_block_list_table
- mov w5, 6
+ mov w7, 65535
+ cmp w0, w7
+ beq .L485
+ adrp x2, .LANCHOR2
+ mov w6, 6
+ add x5, x2, :lo12:.LANCHOR2
mov w1, -1
- adrp x2, :got:p_free_data_block_list_head
- umull x7, w0, w5
- ldr x9, [x3, #:got_lo12:p_data_block_list_table]
- mov x12, x3
+ umull x8, w0, w6
mov x3, x2
- ldr x8, [x9]
- add x4, x8, x7
+ ldr x9, [x5,-56]
+ add x4, x9, x8
strh w1, [x4,2]
- strh w1, [x8,x7]
- ldr x10, [x2, #:got_lo12:p_free_data_block_list_head]
- ldr x1, [x10]
- cbnz x1, .L446
- str x4, [x10]
- b .L445
-.L446:
- adrp x2, :got:p_erase_count_table
- ldr x10, [x9]
- mov x9, -6148914691236517206
- ldr x2, [x2, #:got_lo12:p_erase_count_table]
- ldr x11, [x2]
+ strh w1, [x9,x8]
+ ldr x1, [x5,-16]
+ cbnz x1, .L486
+ str x4, [x5,-16]
+ b .L485
+.L486:
+ ldr x11, [x5,-80]
ubfiz x2, x0, 1, 16
- ldrh w13, [x11,x2]
+ ldr x10, [x5,-56]
+ mov x5, -6148914691236517206
+ ldrh w12, [x11,x2]
sub x2, x1, x10
asr x2, x2, 1
- madd x2, x9, x2, x2
+ madd x2, x5, x2, x2
uxth w2, w2
-.L449:
- ubfiz x9, x2, 1, 16
- ldrh w9, [x11,x9]
- cmp w9, w13
- bcs .L447
- ldrh w9, [x1]
- cmp w9, w6
- bne .L448
+.L489:
+ ubfiz x5, x2, 1, 16
+ ldrh w5, [x11,x5]
+ cmp w5, w12
+ bcs .L487
+ ldrh w5, [x1]
+ cmp w5, w7
+ bne .L488
strh w2, [x4,2]
strh w0, [x1]
- b .L445
-.L448:
- umull x1, w9, w5
- mov w2, w9
+ b .L485
+.L488:
+ umull x1, w5, w6
+ mov w2, w5
add x1, x10, x1
- b .L449
-.L447:
+ b .L489
+.L487:
ldrh w5, [x1,2]
strh w5, [x4,2]
- strh w2, [x8,x7]
- ldr x2, [x3, #:got_lo12:p_free_data_block_list_head]
- ldr x3, [x2]
+ strh w2, [x9,x8]
+ add x2, x3, :lo12:.LANCHOR2
+ ldr x3, [x2,-16]
cmp x1, x3
- bne .L450
+ bne .L490
strh w0, [x1,2]
- str x4, [x2]
- b .L445
-.L450:
- ldrh w2, [x1,2]
- mov w3, 6
- umull x2, w2, w3
- ldr x3, [x12, #:got_lo12:p_data_block_list_table]
- ldr x3, [x3]
- strh w0, [x3,x2]
+ str x4, [x2,-16]
+ b .L485
+.L490:
+ ldrh w3, [x1,2]
+ mov w4, 6
+ ldr x2, [x2,-56]
+ umull x3, w3, w4
+ strh w0, [x2,x3]
strh w0, [x1,2]
-.L445:
+.L485:
mov w0, 0
ret
.size insert_free_list, .-insert_free_list
stp x29, x30, [sp, -16]!
add x29, sp, 0
bl insert_free_list
- adrp x0, :got:g_num_free_superblocks
- ldr x0, [x0, #:got_lo12:g_num_free_superblocks]
- ldrh w1, [x0]
+ adrp x0, .LANCHOR2
+ add x0, x0, :lo12:.LANCHOR2
+ ldrh w1, [x0,-8]
add w1, w1, 1
- strh w1, [x0]
+ strh w1, [x0,-8]
ldp x29, x30, [sp], 16
ret
.size INSERT_FREE_LIST, .-INSERT_FREE_LIST
.global List_remove_node
.type List_remove_node, %function
List_remove_node:
- adrp x6, :got:p_data_block_list_table
+ adrp x6, .LANCHOR2
uxth w1, w1
+ add x6, x6, :lo12:.LANCHOR2
mov w5, 6
ldr x3, [x0]
mov w7, 65535
- ldr x6, [x6, #:got_lo12:p_data_block_list_table]
umull x1, w1, w5
- ldr x2, [x6]
+ ldr x2, [x6,-56]
add x4, x2, x1
cmp x4, x3
- bne .L453
+ bne .L493
ldrh w3, [x2,x1]
cmp w3, w7
- bne .L454
+ bne .L494
str xzr, [x0]
- b .L455
-.L454:
+ b .L495
+.L494:
umull x3, w3, w5
add x3, x2, x3
str x3, [x0]
mov w0, -1
strh w0, [x3,2]
- b .L455
-.L453:
+ b .L495
+.L493:
ldrh w0, [x2,x1]
ldrh w3, [x4,2]
cmp w0, w7
- bne .L456
+ bne .L496
umull x3, w3, w5
mov w0, -1
strh w0, [x2,x3]
- b .L455
-.L456:
+ b .L495
+.L496:
umull x0, w0, w5
add x0, x2, x0
strh w3, [x0,2]
ldrh w3, [x4,2]
- ldr x0, [x6]
+ ldr x0, [x6,-56]
ldrh w7, [x2,x1]
umull x3, w3, w5
strh w7, [x0,x3]
-.L455:
+.L495:
mov w0, -1
strh w0, [x2,x1]
strh w0, [x4,2]
str x19, [sp,16]
mov w19, 65535
ldr x2, [x0]
- cbz x2, .L458
- adrp x3, :got:p_data_block_list_table
+ cbz x2, .L498
+ adrp x3, .LANCHOR2-56
mov w5, w19
mov w6, 6
- ldr x3, [x3, #:got_lo12:p_data_block_list_table]
- ldr x4, [x3]
-.L459:
- cbnz w1, .L460
-.L462:
+ ldr x4, [x3,#:lo12:.LANCHOR2-56]
+.L499:
+ cbnz w1, .L500
+.L502:
sub x2, x2, x4
mov x1, -6148914691236517206
asr x2, x2, 1
uxth w19, w2
mov w1, w19
bl List_remove_node
- b .L458
-.L460:
+ b .L498
+.L500:
ldrh w3, [x2]
cmp w3, w5
- beq .L462
+ beq .L502
umull x3, w3, w6
sub w1, w1, #1
add x2, x4, x3
uxth w1, w1
- b .L459
-.L458:
+ b .L499
+.L498:
mov w0, w19
ldr x19, [sp,16]
ldp x29, x30, [sp], 32
.global List_get_gc_head_node
.type List_get_gc_head_node, %function
List_get_gc_head_node:
- uxth w2, w0
- adrp x0, :got:p_data_block_list_head
- ldr x0, [x0, #:got_lo12:p_data_block_list_head]
- ldr x1, [x0]
+ adrp x2, .LANCHOR2
+ uxth w3, w0
+ add x2, x2, :lo12:.LANCHOR2
mov w0, 65535
- cbz x1, .L466
- adrp x0, :got:p_data_block_list_table
- mov w4, 65535
+ ldr x1, [x2,-48]
+ cbz x1, .L511
+ ldr x4, [x2,-56]
mov w5, 6
- ldr x0, [x0, #:got_lo12:p_data_block_list_table]
- ldr x0, [x0]
-.L467:
- cbnz w2, .L468
-.L470:
- sub x1, x1, x0
+.L507:
+ cbz w3, .L508
+ ldrh w2, [x1]
+ cmp w2, w0
+ beq .L511
+ umull x2, w2, w5
+ sub w3, w3, #1
+ add x1, x4, x2
+ uxth w3, w3
+ b .L507
+.L508:
+ sub x1, x1, x4
mov x0, -6148914691236517206
asr x1, x1, 1
madd x1, x0, x1, x1
uxth w0, w1
- b .L466
-.L468:
- ldrh w3, [x1]
- cmp w3, w4
- beq .L470
- umull x3, w3, w5
- sub w2, w2, #1
- add x1, x0, x3
- uxth w2, w2
- b .L467
-.L466:
+.L511:
ret
.size List_get_gc_head_node, .-List_get_gc_head_node
.align 2
List_update_data_list:
stp x29, x30, [sp, -32]!
add x29, sp, 0
- str x19, [sp,16]
- uxth w19, w0
- adrp x0, :got:g_active_superblock
- ldr x0, [x0, #:got_lo12:g_active_superblock]
- ldrh w0, [x0]
- cmp w0, w19
- beq .L473
- adrp x0, :got:g_buffer_superblock
- ldr x0, [x0, #:got_lo12:g_buffer_superblock]
- ldrh w0, [x0]
- cmp w0, w19
- beq .L473
- adrp x0, :got:g_gc_temp_superblock
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- ldrh w0, [x0]
- cmp w0, w19
- beq .L473
- adrp x0, :got:p_data_block_list_table
- mov w3, 6
- umull x4, w19, w3
- ldr x0, [x0, #:got_lo12:p_data_block_list_table]
- ldr x5, [x0]
- adrp x0, :got:p_data_block_list_head
- add x4, x5, x4
- ldr x0, [x0, #:got_lo12:p_data_block_list_head]
- ldr x1, [x0]
- cmp x4, x1
- beq .L473
- adrp x1, :got:p_valid_page_count_table
- ldrh w2, [x4,4]
- ldr x1, [x1, #:got_lo12:p_valid_page_count_table]
- ldr x6, [x1]
- ubfiz x1, x19, 1, 16
- ldrh w1, [x6,x1]
- mul w2, w1, w2
- ldrh w1, [x4,2]
- mov x4, -6148914691236517206
- cmp w2, wzr
- csinv w2, w2, wzr, ne
- umull x3, w1, w3
- asr x1, x3, 1
- add x3, x5, x3
- madd x1, x4, x1, x1
- ldrh w3, [x3,4]
- ldrh w1, [x6,x1,lsl 1]
- mul w1, w1, w3
+ stp x19, x20, [sp,16]
+ uxth w20, w0
+ adrp x0, .LANCHOR2
+ add x19, x0, :lo12:.LANCHOR2
+ ldrh w0, [x0,#:lo12:.LANCHOR2]
+ cmp w0, w20
+ beq .L513
+ ldrh w0, [x19,48]
+ cmp w0, w20
+ beq .L513
+ ldrh w0, [x19,96]
+ cmp w0, w20
+ beq .L513
+ mov w2, 6
+ ldr x4, [x19,-56]
+ ldr x0, [x19,-48]
+ umull x3, w20, w2
+ add x3, x4, x3
+ cmp x3, x0
+ beq .L513
+ ldr x5, [x19,-40]
+ ubfiz x0, x20, 1, 16
+ ldrh w1, [x3,4]
+ ldrh w0, [x5,x0]
+ mul w1, w0, w1
+ ldrh w0, [x3,2]
+ mov x3, -6148914691236517206
cmp w1, wzr
csinv w1, w1, wzr, ne
- cmp w2, w1
- bcs .L473
- mov w1, w19
+ umull x2, w0, w2
+ asr x0, x2, 1
+ add x2, x4, x2
+ madd x0, x3, x0, x0
+ ldrh w2, [x2,4]
+ ldrh w0, [x5,x0,lsl 1]
+ mul w0, w0, w2
+ cmp w0, wzr
+ csinv w0, w0, wzr, ne
+ cmp w1, w0
+ bcs .L513
+ sub x0, x19, #48
+ mov w1, w20
bl List_remove_node
- adrp x0, :got:g_num_data_superblocks
- ldr x0, [x0, #:got_lo12:g_num_data_superblocks]
- ldrh w1, [x0]
- sub w1, w1, #1
- strh w1, [x0]
- mov w0, w19
+ ldrh w0, [x19,-24]
+ sub w0, w0, #1
+ strh w0, [x19,-24]
+ mov w0, w20
bl INSERT_DATA_LIST
-.L473:
+.L513:
mov w0, 0
- ldr x19, [sp,16]
+ ldp x19, x20, [sp,16]
ldp x29, x30, [sp], 32
ret
.size List_update_data_list, .-List_update_data_list
mov w20, 0
ldrh w2, [x0,10]
ldr x1, [x0,16]
-.L477:
+.L517:
cmp w20, w2
- beq .L480
+ beq .L520
mov x22, x1
ldrh w21, [x1],2
- cbnz w21, .L478
+ cbnz w21, .L518
mov x19, x0
bl FtlFreeSysBlkQueueOut
uxth w1, w0
strh w0, [x22]
- cbz w1, .L480
+ cbz w1, .L520
ldr w0, [x19,48]
strh w21, [x19,2]
add w0, w0, 1
strh w20, [x19]
add w0, w0, 1
strh w0, [x19,8]
- b .L480
-.L478:
+ b .L520
+.L518:
add w20, w20, 1
uxth w20, w20
- b .L477
-.L480:
+ b .L517
+.L520:
mov w0, 0
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
.global select_l2p_ram_region
.type select_l2p_ram_region, %function
select_l2p_ram_region:
- adrp x0, :got:c_ftl_nand_l2pmap_ram_region_num
- mov x3, 0
- mov w4, 65535
- ldr x0, [x0, #:got_lo12:c_ftl_nand_l2pmap_ram_region_num]
- ldrh w2, [x0]
- adrp x0, :got:p_l2p_ram_map
- ldr x0, [x0, #:got_lo12:p_l2p_ram_map]
- ldr x1, [x0]
-.L484:
- uxth w0, w3
+ adrp x0, .LANCHOR0+2066
+ mov x4, 0
+ mov w5, 65535
+ ldrh w2, [x0,#:lo12:.LANCHOR0+2066]
+ adrp x0, .LANCHOR2
+ add x1, x0, :lo12:.LANCHOR2
+ mov x3, x0
+ ldr x1, [x1,144]
+.L524:
+ uxth w0, w4
cmp w0, w2
- bcs .L500
- add x3, x3, 1
- add x5, x1, x3, lsl 4
- ldrh w5, [x5,-16]
- cmp w5, w4
- bne .L484
- b .L485
-.L500:
+ bcs .L540
+ add x4, x4, 1
+ add x6, x1, x4, lsl 4
+ ldrh w6, [x6,-16]
+ cmp w6, w5
+ bne .L524
+ b .L525
+.L540:
mov w0, w2
- mov x3, 0
- mov w6, -2147483648
-.L487:
- uxth w5, w3
- cmp w5, w2
- bcs .L501
- add x4, x1, x3, lsl 4
- ldr w4, [x4,4]
- tbnz w4, #31, .L496
- cmp w4, w6
- bcc .L488
-.L496:
- mov w4, w6
- mov w5, w0
-.L488:
- add x3, x3, 1
- mov w6, w4
- mov w0, w5
- b .L487
-.L501:
+ mov x4, 0
+ mov w7, -2147483648
+.L527:
+ uxth w6, w4
+ cmp w6, w2
+ bcs .L541
+ add x5, x1, x4, lsl 4
+ ldr w5, [x5,4]
+ tbnz w5, #31, .L536
+ cmp w5, w7
+ bcc .L528
+.L536:
+ mov w5, w7
+ mov w6, w0
+.L528:
+ add x4, x4, 1
+ mov w7, w5
+ mov w0, w6
+ b .L527
+.L541:
cmp w0, w2
- bcc .L485
- adrp x0, :got:g_l2p_last_update_region_id
+ bcc .L525
+ add x0, x3, :lo12:.LANCHOR2
add x1, x1, 4
mov w4, -1
mov w3, 0
- ldr x0, [x0, #:got_lo12:g_l2p_last_update_region_id]
- ldrh w5, [x0]
+ ldrh w5, [x0,152]
mov w0, w2
-.L491:
+.L531:
cmp w3, w2
- beq .L485
+ beq .L525
ldr w7, [x1]
cmp w7, w4
- bcs .L492
+ bcs .L532
ldrh w6, [x1,-4]
cmp w6, w5
csel w4, w4, w7, eq
cmp w6, w5
csel w0, w0, w3, eq
-.L492:
+.L532:
add w3, w3, 1
add x1, x1, 16
uxth w3, w3
- b .L491
-.L485:
+ b .L531
+.L525:
ret
.size select_l2p_ram_region, .-select_l2p_ram_region
.align 2
.global FtlUpdateVaildLpn
.type FtlUpdateVaildLpn, %function
FtlUpdateVaildLpn:
- adrp x1, :got:FtlUpdateVaildLpnCount
- ldr x3, [x1, #:got_lo12:FtlUpdateVaildLpnCount]
- ldrh w2, [x3]
- cbnz w0, .L503
+ adrp x1, .LANCHOR2
+ add x3, x1, :lo12:.LANCHOR2
+ ldrh w2, [x3,154]
+ cbnz w0, .L543
cmp w2, 4
- bhi .L503
+ bhi .L543
add w2, w2, 1
- strh w2, [x3]
- b .L502
-.L503:
- ldr x1, [x1, #:got_lo12:FtlUpdateVaildLpnCount]
+ strh w2, [x3,154]
+ b .L542
+.L543:
+ adrp x2, .LANCHOR0+1960
+ add x0, x1, :lo12:.LANCHOR2
mov w7, 65535
- strh wzr, [x1]
- adrp x1, :got:g_VaildLpn
- ldr x0, [x1, #:got_lo12:g_VaildLpn]
- str wzr, [x0]
- adrp x0, :got:c_ftl_nand_data_blks_per_plane
- ldr x0, [x0, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w5, [x0]
- adrp x0, :got:p_valid_page_count_table
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x6, [x0]
+ ldrh w5, [x2,#:lo12:.LANCHOR0+1960]
+ strh wzr, [x0,154]
+ str wzr, [x0,156]
+ ldr x6, [x0,-40]
mov x0, 0
-.L504:
+.L544:
cmp w5, w0, uxth
- bls .L502
+ bls .L542
ldrh w4, [x6,x0,lsl 1]
cmp w4, w7
- beq .L505
- ldr x3, [x1, #:got_lo12:g_VaildLpn]
- ldr w2, [x3]
+ beq .L545
+ add x3, x1, :lo12:.LANCHOR2
+ ldr w2, [x3,156]
add w2, w4, w2
- str w2, [x3]
-.L505:
+ str w2, [x3,156]
+.L545:
add x0, x0, 1
- b .L504
-.L502:
+ b .L544
+.L542:
ret
.size FtlUpdateVaildLpn, .-FtlUpdateVaildLpn
.align 2
+ .global ftl_set_blk_mode
+ .type ftl_set_blk_mode, %function
+ftl_set_blk_mode:
+ stp x29, x30, [sp, -16]!
+ uxth w0, w0
+ add x29, sp, 0
+ cbz w1, .L549
+ bl ftl_set_blk_mode.part.8
+ b .L548
+.L549:
+ adrp x1, .LANCHOR0
+ ubfx x2, x0, 5, 11
+ lsl x2, x2, 2
+ ldr x3, [x1,#:lo12:.LANCHOR0]
+ mov w1, 1
+ lsl w0, w1, w0
+ ldr w1, [x3,x2]
+ bic w0, w1, w0
+ str w0, [x3,x2]
+.L548:
+ ldp x29, x30, [sp], 16
+ ret
+ .size ftl_set_blk_mode, .-ftl_set_blk_mode
+ .align 2
+ .global ftl_get_blk_mode
+ .type ftl_get_blk_mode, %function
+ftl_get_blk_mode:
+ adrp x1, .LANCHOR0
+ uxth w0, w0
+ ubfx x2, x0, 5, 11
+ ldr x1, [x1,#:lo12:.LANCHOR0]
+ ldr w1, [x1,x2,lsl 2]
+ lsr w0, w1, w0
+ and w0, w0, 1
+ ret
+ .size ftl_get_blk_mode, .-ftl_get_blk_mode
+ .align 2
.global ftl_sb_update_avl_pages
.type ftl_sb_update_avl_pages, %function
ftl_sb_update_avl_pages:
- adrp x3, :got:c_ftl_nand_planes_num
- strh wzr, [x0,4]
+ adrp x3, .LANCHOR0
uxth w1, w1
+ add x4, x3, :lo12:.LANCHOR0
uxth w2, w2
- mov w5, 65535
- ldr x3, [x3, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w3, [x3]
-.L509:
- cmp w2, w3
- bcs .L515
- add x4, x0, x2, sxtw 1
- ldrh w4, [x4,16]
- cmp w4, w5
- beq .L510
- ldrh w4, [x0,4]
- add w4, w4, 1
- strh w4, [x0,4]
-.L510:
+ strh wzr, [x0,4]
+ mov w6, 65535
+ ldrh w4, [x4,1952]
+.L553:
+ cmp w2, w4
+ bcs .L559
+ add x5, x0, x2, sxtw 1
+ ldrh w5, [x5,16]
+ cmp w5, w6
+ beq .L554
+ ldrh w5, [x0,4]
+ add w5, w5, 1
+ strh w5, [x0,4]
+.L554:
add w2, w2, 1
uxth w2, w2
- b .L509
-.L515:
- adrp x2, :got:c_ftl_nand_page_pre_blk
- mov x4, x0
+ b .L553
+.L559:
+ add x3, x3, :lo12:.LANCHOR0
mov w6, 65535
- add x3, x0, x3, uxth 1
- ldr x2, [x2, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w5, [x2]
-.L512:
- cmp x4, x3
- beq .L516
- ldrh w2, [x4,16]
+ add x4, x0, x4, uxth 1
+ ldrh w5, [x3,2026]
+ mov x3, x0
+.L556:
+ cmp x3, x4
+ beq .L560
+ ldrh w2, [x3,16]
cmp w2, w6
- beq .L513
+ beq .L557
ldrh w2, [x0,4]
add w2, w5, w2
sub w2, w2, #1
sub w2, w2, w1
strh w2, [x0,4]
-.L513:
- add x4, x4, 2
- b .L512
-.L516:
+.L557:
+ add x3, x3, 2
+ b .L556
+.L560:
ret
.size ftl_sb_update_avl_pages, .-ftl_sb_update_avl_pages
.align 2
stp x29, x30, [sp, -80]!
add x29, sp, 0
stp x19, x20, [sp,16]
- stp x23, x24, [sp,48]
stp x21, x22, [sp,32]
- str x25, [sp,64]
+ stp x23, x24, [sp,48]
+ stp x25, x26, [sp,64]
mov x19, x0
strh wzr, [x0,4]
- mov w20, 0
strb wzr, [x0,7]
- adrp x22, :got:c_ftl_nand_planes_num
- adrp x24, :got:p_plane_order_table
- mov w23, -1
-.L518:
- ldr x0, [x22, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- cmp w0, w20
- bls .L525
- ldr x0, [x24, #:got_lo12:p_plane_order_table]
- add x21, x19, x20, uxth 1
+ adrp x0, .LANCHOR0
+ add x1, x0, :lo12:.LANCHOR0
+ add x22, x19, 16
+ mov x21, 0
+ mov x20, x0
+ mov x23, x1
+ mov w25, -1
+ ldrh w24, [x1,1952]
+.L562:
+ cmp w24, w21, uxth
+ bls .L569
+ add x0, x23, 1984
ldrh w1, [x19]
- ldrb w0, [x0,w20,sxtw]
+ ldrb w0, [x0,x21]
bl V2P_block
- strh w23, [x21,16]
- mov w25, w0
+ strh w25, [x22]
+ mov w26, w0
bl FtlBbmIsBadBlock
- cbnz w0, .L519
- strh w25, [x21,16]
+ cbnz w0, .L563
+ strh w26, [x22]
ldrb w0, [x19,7]
add w0, w0, 1
strb w0, [x19,7]
-.L519:
- add w20, w20, 1
- uxth w20, w20
- b .L518
-.L525:
- adrp x1, :got:c_ftl_nand_page_pre_blk
- ldrb w0, [x19,7]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_page_pre_blk]
+.L563:
+ add x21, x21, 1
+ add x22, x22, 2
+ b .L562
+.L569:
+ add x0, x20, :lo12:.LANCHOR0
+ ldrb w1, [x19,7]
strb wzr, [x19,9]
- ldrh w1, [x1]
- mul w0, w0, w1
+ ldrh w0, [x0,2026]
+ mul w0, w1, w0
strh w0, [x19,4]
- adrp x0, :got:g_inkDie_check_enable
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w0, [x0]
- cbz w0, .L521
- adrp x0, :got:p_erase_count_table
+ adrp x0, .LANCHOR2
+ add x0, x0, :lo12:.LANCHOR2
+ ldr w1, [x0,160]
+ cbz w1, .L565
ldrh w1, [x19]
- ldr x0, [x0, #:got_lo12:p_erase_count_table]
- ldr x0, [x0]
+ ldr x0, [x0,-80]
ldrh w0, [x0,x1,lsl 1]
cmp w0, 59
- bhi .L521
+ bhi .L565
mov w0, 1
strb w0, [x19,9]
-.L521:
+.L565:
mov w0, 0
- ldr x25, [sp,64]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
ldp x29, x30, [sp], 80
ret
.size make_superblock, .-make_superblock
.type update_multiplier_value, %function
update_multiplier_value:
stp x29, x30, [sp, -64]!
+ adrp x1, .LANCHOR0
+ add x1, x1, :lo12:.LANCHOR0
add x29, sp, 0
stp x19, x20, [sp,16]
- mov w19, 0
- uxth w20, w0
stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
- mov w21, w19
- adrp x22, :got:c_ftl_nand_planes_num
- adrp x23, :got:p_plane_order_table
- adrp x24, :got:c_ftl_nand_page_pre_blk
-.L527:
- ldr x0, [x22, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- cmp w0, w21
- bls .L534
- ldr x0, [x23, #:got_lo12:p_plane_order_table]
- mov w1, w20
- ldrb w0, [x0,w21,sxtw]
+ mov x22, 0
+ uxth w21, w0
+ ldrh w23, [x1,1952]
+ mov w19, w22
+ ldrh w24, [x1,2026]
+ mov x20, x1
+.L571:
+ cmp w23, w22, uxth
+ bls .L578
+ add x0, x20, 1984
+ mov w1, w21
+ ldrb w0, [x0,x22]
bl V2P_block
bl FtlBbmIsBadBlock
- cbnz w0, .L528
- ldr x0, [x24, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w0, [x0]
- add w19, w19, w0
+ cbnz w0, .L572
+ add w19, w19, w24
uxth w19, w19
-.L528:
- add w21, w21, 1
- uxth w21, w21
- b .L527
-.L534:
- cbz w19, .L530
+.L572:
+ add x22, x22, 1
+ b .L571
+.L578:
+ cbz w19, .L574
mov w0, 32768
sdiv w19, w0, w19
-.L530:
+.L574:
mov w0, 6
- umull x20, w20, w0
- adrp x0, :got:p_data_block_list_table
- ldr x0, [x0, #:got_lo12:p_data_block_list_table]
- ldr x0, [x0]
- add x20, x0, x20
+ umull x21, w21, w0
+ adrp x0, .LANCHOR2-56
+ ldr x0, [x0,#:lo12:.LANCHOR2-56]
+ add x21, x0, x21
mov w0, 0
- strh w19, [x20,4]
+ strh w19, [x21,4]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
.global GetFreeBlockMinEraseCount
.type GetFreeBlockMinEraseCount, %function
GetFreeBlockMinEraseCount:
- adrp x0, :got:p_free_data_block_list_head
- ldr x0, [x0, #:got_lo12:p_free_data_block_list_head]
- ldr x1, [x0]
+ adrp x2, .LANCHOR2
+ add x2, x2, :lo12:.LANCHOR2
+ ldr x1, [x2,-16]
mov w0, w1
- cbz x1, .L536
- adrp x0, :got:p_data_block_list_table
- ldr x0, [x0, #:got_lo12:p_data_block_list_table]
- ldr x0, [x0]
+ cbz x1, .L580
+ ldr x0, [x2,-56]
sub x1, x1, x0
mov x0, -6148914691236517206
asr x1, x1, 1
madd x1, x0, x1, x1
- adrp x0, :got:p_erase_count_table
+ ldr x0, [x2,-80]
and x1, x1, 65535
- ldr x0, [x0, #:got_lo12:p_erase_count_table]
- ldr x0, [x0]
ldrh w0, [x0,x1,lsl 1]
-.L536:
+.L580:
ret
.size GetFreeBlockMinEraseCount, .-GetFreeBlockMinEraseCount
.align 2
.global GetFreeBlockMaxEraseCount
.type GetFreeBlockMaxEraseCount, %function
GetFreeBlockMaxEraseCount:
- uxth w3, w0
- adrp x0, :got:p_free_data_block_list_head
- ldr x0, [x0, #:got_lo12:p_free_data_block_list_head]
- ldr x1, [x0]
+ adrp x2, .LANCHOR2
+ uxth w4, w0
+ add x5, x2, :lo12:.LANCHOR2
+ ldr x1, [x5,-16]
mov w0, w1
- cbz x1, .L539
- adrp x0, :got:g_num_free_superblocks
- mov w5, 6
- mov w6, 65535
- ldr x0, [x0, #:got_lo12:g_num_free_superblocks]
- ldrh w2, [x0]
+ cbz x1, .L583
+ ldrh w3, [x5,-8]
mov w0, 7
- mul w2, w2, w0
- adrp x0, :got:p_data_block_list_table
- asr w2, w2, 3
- cmp w3, w2
- ldr x0, [x0, #:got_lo12:p_data_block_list_table]
- csel w3, w2, w3, gt
- mov x2, -6148914691236517206
- ldr x0, [x0]
+ mov w6, 6
+ mov w7, 65535
+ mul w3, w3, w0
+ ldr x0, [x5,-56]
+ asr w3, w3, 3
+ cmp w4, w3
sub x1, x1, x0
+ csel w4, w3, w4, gt
asr x1, x1, 1
- madd x1, x2, x1, x1
- mov w2, 0
+ mov x3, -6148914691236517206
+ madd x1, x3, x1, x1
+ mov w3, 0
uxth w1, w1
-.L541:
- cmp w2, w3
- beq .L544
- umull x4, w1, w5
- ldrh w4, [x0,x4]
- cmp w4, w6
- bne .L542
-.L544:
- adrp x0, :got:p_erase_count_table
+.L585:
+ cmp w3, w4
+ beq .L588
+ umull x5, w1, w6
+ ldrh w5, [x0,x5]
+ cmp w5, w7
+ bne .L586
+.L588:
+ add x2, x2, :lo12:.LANCHOR2
ubfiz x1, x1, 1, 16
- ldr x0, [x0, #:got_lo12:p_erase_count_table]
- ldr x0, [x0]
+ ldr x0, [x2,-80]
ldrh w0, [x0,x1]
- b .L539
-.L542:
- add w2, w2, 1
- mov w1, w4
- uxth w2, w2
- b .L541
-.L539:
+ b .L583
+.L586:
+ add w3, w3, 1
+ mov w1, w5
+ uxth w3, w3
+ b .L585
+.L583:
ret
.size GetFreeBlockMaxEraseCount, .-GetFreeBlockMaxEraseCount
.align 2
.type FtlPrintInfo2buf, %function
FtlPrintInfo2buf:
stp x29, x30, [sp, -128]!
- adrp x1, .LC2
add x29, sp, 0
- add x1, x1, :lo12:.LC2
- stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
- mov x22, x0
+ adrp x24, __stack_chk_guard
+ mov x23, x0
stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- bl strcpy
- add x20, x22, 12
- adrp x2, :got:gNandPhyInfo
+ adrp x26, .LANCHOR0
+ ldr x1, [x24,#:lo12:__stack_chk_guard]
+ add x26, x26, :lo12:.LANCHOR0
+ str x1, [x29,120]
adrp x1, .LC3
- mov x0, x20
add x1, x1, :lo12:.LC3
- ldr x2, [x2, #:got_lo12:gNandPhyInfo]
- ldr w2, [x2]
- bl sprintf
- add x20, x20, x0, sxtw
- adrp x2, :got:DeviceCapacity
+ stp x19, x20, [sp,16]
+ stp x21, x22, [sp,32]
+ stp x27, x28, [sp,80]
+ bl strcpy
+ add x20, x23, 12
+ ldr w2, [x26,168]
adrp x1, .LC4
mov x0, x20
add x1, x1, :lo12:.LC4
- ldr x2, [x2, #:got_lo12:DeviceCapacity]
- ldr w2, [x2]
bl sprintf
add x20, x20, x0, sxtw
- adrp x0, :got:gFtlInitStatus
- ldr x0, [x0, #:got_lo12:gFtlInitStatus]
- ldr w0, [x0]
- cmp w0, 1
- beq .L547
- sub w0, w20, w22
- b .L548
-.L547:
- add x0, x29, 112
- add x1, x29, 116
- add x2, x29, 120
- add x3, x29, 124
- adrp x19, :got:gBbtInfo
- adrp x25, :got:g_num_free_superblocks
- bl NandcGetTimeCfg
- adrp x23, :got:p_valid_page_count_table
- ldr w4, [x29,120]
adrp x1, .LC5
- ldr w5, [x29,124]
+ ldr w2, [x26,2044]
mov x0, x20
- ldr w3, [x29,116]
add x1, x1, :lo12:.LC5
- ldr w2, [x29,112]
- adrp x26, :got:g_sys_ext_data
bl sprintf
- add x21, x20, x0, sxtw
+ add x20, x20, x0, sxtw
+ adrp x0, .LANCHOR1+532
+ ldr w0, [x0,#:lo12:.LANCHOR1+532]
+ cmp w0, 1
+ beq .L591
+ sub w0, w20, w23
+ b .L592
+.L591:
+ add x0, x29, 104
+ add x1, x29, 108
+ add x2, x29, 112
+ add x3, x29, 116
+ adrp x25, .LANCHOR2
+ bl NandcGetTimeCfg
+ add x22, x25, :lo12:.LANCHOR2
+ ldr w4, [x29,112]
adrp x1, .LC6
- mov x0, x21
+ ldr w5, [x29,116]
add x1, x1, :lo12:.LC6
- add x21, x21, 10
- adrp x20, :got:g_sys_save_data
- bl strcpy
- adrp x2, :got:g_MaxLpn
+ ldr w3, [x29,108]
+ mov x0, x20
+ ldr w2, [x29,104]
+ bl sprintf
+ add x21, x20, x0, sxtw
adrp x1, .LC7
mov x0, x21
add x1, x1, :lo12:.LC7
- ldr x2, [x2, #:got_lo12:g_MaxLpn]
- ldr w2, [x2]
- bl sprintf
- add x21, x21, x0, sxtw
- adrp x2, :got:g_VaildLpn
+ add x21, x21, 10
+ bl strcpy
+ ldr w2, [x26,2104]
adrp x1, .LC8
mov x0, x21
add x1, x1, :lo12:.LC8
- ldr x2, [x2, #:got_lo12:g_VaildLpn]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_read_page_count
+ ldr w2, [x22,156]
adrp x1, .LC9
mov x0, x21
add x1, x1, :lo12:.LC9
- ldr x2, [x2, #:got_lo12:g_totle_read_page_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_discard_page_count
+ ldr w2, [x22,164]
adrp x1, .LC10
mov x0, x21
add x1, x1, :lo12:.LC10
- ldr x2, [x2, #:got_lo12:g_totle_discard_page_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_write_page_count
+ ldr w2, [x22,168]
adrp x1, .LC11
mov x0, x21
add x1, x1, :lo12:.LC11
- ldr x2, [x2, #:got_lo12:g_totle_write_page_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_cache_write_count
+ ldr w2, [x22,172]
adrp x1, .LC12
mov x0, x21
add x1, x1, :lo12:.LC12
- ldr x2, [x2, #:got_lo12:g_totle_cache_write_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_l2p_write_count
+ ldr w2, [x22,176]
adrp x1, .LC13
mov x0, x21
add x1, x1, :lo12:.LC13
- ldr x2, [x2, #:got_lo12:g_totle_l2p_write_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_gc_page_count
+ ldr w2, [x22,180]
adrp x1, .LC14
mov x0, x21
add x1, x1, :lo12:.LC14
- ldr x2, [x2, #:got_lo12:g_totle_gc_page_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x0, :got:g_totle_write_sector
+ ldr w2, [x22,184]
adrp x1, .LC15
- add x1, x1, :lo12:.LC15
- ldr x0, [x0, #:got_lo12:g_totle_write_sector]
- ldr w2, [x0]
mov x0, x21
- lsr w2, w2, 11
+ add x1, x1, :lo12:.LC15
bl sprintf
add x21, x21, x0, sxtw
- adrp x0, :got:g_totle_read_sector
+ ldr w2, [x22,188]
adrp x1, .LC16
- add x1, x1, :lo12:.LC16
- ldr x0, [x0, #:got_lo12:g_totle_read_sector]
- ldr w2, [x0]
mov x0, x21
+ add x1, x1, :lo12:.LC16
lsr w2, w2, 11
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_GlobalSysVersion
+ ldr w2, [x22,192]
adrp x1, .LC17
mov x0, x21
add x1, x1, :lo12:.LC17
- ldr x2, [x2, #:got_lo12:g_GlobalSysVersion]
- ldr w2, [x2]
+ lsr w2, w2, 11
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_GlobalDataVersion
+ ldr w2, [x22,196]
adrp x1, .LC18
- add x1, x1, :lo12:.LC18
mov x0, x21
- ldr x2, [x2, #:got_lo12:g_GlobalDataVersion]
- ldr w2, [x2]
+ add x1, x1, :lo12:.LC18
bl sprintf
- ldr x19, [x19, #:got_lo12:gBbtInfo]
add x21, x21, x0, sxtw
- ldrh w2, [x19,6]
- str x2, [x29,104]
- bl FtlBbtCalcTotleCnt
- uxth w3, w0
- ldr x2, [x29,104]
+ ldr w2, [x22,200]
adrp x1, .LC19
- mov x0, x21
add x1, x1, :lo12:.LC19
+ mov x0, x21
bl sprintf
- ldr x25, [x25, #:got_lo12:g_num_free_superblocks]
- adrp x1, .LC20
add x21, x21, x0, sxtw
- add x1, x1, :lo12:.LC20
+ bl FtlBbtCalcTotleCnt
+ uxth w3, w0
+ ldrh w2, [x26,2118]
+ adrp x1, .LC20
mov x0, x21
- ldrh w2, [x25]
+ add x1, x1, :lo12:.LC20
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_mlc_erase_count
+ ldrh w2, [x22,-8]
adrp x1, .LC21
mov x0, x21
add x1, x1, :lo12:.LC21
- ldr x2, [x2, #:got_lo12:g_totle_mlc_erase_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_slc_erase_count
+ ldr w2, [x22,204]
adrp x1, .LC22
mov x0, x21
add x1, x1, :lo12:.LC22
- ldr x2, [x2, #:got_lo12:g_totle_slc_erase_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_avg_erase_count
+ ldr w2, [x22,208]
adrp x1, .LC23
mov x0, x21
add x1, x1, :lo12:.LC23
- ldr x2, [x2, #:got_lo12:g_totle_avg_erase_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_totle_sys_slc_erase_count
+ ldr w2, [x22,212]
adrp x1, .LC24
mov x0, x21
add x1, x1, :lo12:.LC24
- ldr x2, [x2, #:got_lo12:g_totle_sys_slc_erase_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_max_erase_count
+ ldr w2, [x22,-72]
adrp x1, .LC25
mov x0, x21
add x1, x1, :lo12:.LC25
- ldr x2, [x2, #:got_lo12:g_max_erase_count]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_min_erase_count
+ ldr w2, [x22,216]
adrp x1, .LC26
mov x0, x21
add x1, x1, :lo12:.LC26
- ldr x2, [x2, #:got_lo12:g_min_erase_count]
- ldr w2, [x2]
bl sprintf
- ldr x20, [x20, #:got_lo12:g_sys_save_data]
- adrp x1, .LC27
add x21, x21, x0, sxtw
- add x1, x1, :lo12:.LC27
+ ldr w2, [x22,220]
+ adrp x1, .LC27
mov x0, x21
- ldrh w2, [x20,30]
+ add x1, x1, :lo12:.LC27
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x20,28]
+ ldrh w2, [x22,254]
adrp x1, .LC28
mov x0, x21
add x1, x1, :lo12:.LC28
- adrp x20, :got:g_gc_superblock
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:g_MaxLbaSector
+ ldrh w2, [x22,252]
adrp x1, .LC29
mov x0, x21
add x1, x1, :lo12:.LC29
- ldr x2, [x2, #:got_lo12:g_MaxLbaSector]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:c_ftl_nand_init_sys_blks_per_plane
+ ldr w2, [x26,2068]
adrp x1, .LC30
mov x0, x21
add x1, x1, :lo12:.LC30
- ldr x2, [x2, #:got_lo12:c_ftl_nand_init_sys_blks_per_plane]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:c_ftl_nand_sys_blks_per_plane
+ ldr w2, [x26,2060]
adrp x1, .LC31
mov x0, x21
add x1, x1, :lo12:.LC31
- ldr x2, [x2, #:got_lo12:c_ftl_nand_sys_blks_per_plane]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:gSysFreeQueue
+ ldr w2, [x26,1948]
adrp x1, .LC32
mov x0, x21
add x1, x1, :lo12:.LC32
- ldr x2, [x2, #:got_lo12:gSysFreeQueue]
- ldrh w2, [x2,6]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:c_ftl_nand_data_blks_per_plane
+ ldrh w2, [x26,2214]
adrp x1, .LC33
mov x0, x21
add x1, x1, :lo12:.LC33
- ldr x2, [x2, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:c_ftl_nand_data_op_blks_per_plane
+ ldrh w2, [x26,1960]
adrp x1, .LC34
mov x0, x21
add x1, x1, :lo12:.LC34
- ldr x2, [x2, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- ldrh w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:c_ftl_nand_max_data_blks
+ ldrh w2, [x22,272]
adrp x1, .LC35
mov x0, x21
add x1, x1, :lo12:.LC35
- ldr x2, [x2, #:got_lo12:c_ftl_nand_max_data_blks]
- ldr w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- adrp x2, :got:gSysInfo
+ ldr w2, [x26,1964]
adrp x1, .LC36
mov x0, x21
add x1, x1, :lo12:.LC36
- ldr x2, [x2, #:got_lo12:gSysInfo]
- ldrh w2, [x2]
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x19]
+ ldrh w2, [x22,280]
adrp x1, .LC37
- adrp x19, :got:g_active_superblock
mov x0, x21
add x1, x1, :lo12:.LC37
bl sprintf
- ldr x19, [x19, #:got_lo12:g_active_superblock]
- adrp x1, .LC38
add x21, x21, x0, sxtw
- add x1, x1, :lo12:.LC38
+ ldrh w2, [x26,2112]
+ adrp x1, .LC38
mov x0, x21
- ldrh w2, [x19,2]
+ add x1, x1, :lo12:.LC38
bl sprintf
add x21, x21, x0, sxtw
- ldrb w2, [x19,6]
+ ldrh w2, [x22,2]
adrp x1, .LC39
mov x0, x21
add x1, x1, :lo12:.LC39
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x19]
+ ldrb w2, [x22,6]
adrp x1, .LC40
mov x0, x21
add x1, x1, :lo12:.LC40
bl sprintf
add x21, x21, x0, sxtw
- ldrb w2, [x19,8]
+ ldrh w2, [x25,#:lo12:.LANCHOR2]
adrp x1, .LC41
mov x0, x21
add x1, x1, :lo12:.LC41
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x19,4]
+ ldrb w2, [x22,8]
adrp x1, .LC42
mov x0, x21
add x1, x1, :lo12:.LC42
bl sprintf
- ldr x24, [x23, #:got_lo12:p_valid_page_count_table]
- ldrh w3, [x19]
- adrp x1, .LC43
- adrp x19, :got:g_buffer_superblock
add x21, x21, x0, sxtw
- ldr x2, [x24]
+ ldrh w2, [x22,4]
+ adrp x1, .LC43
mov x0, x21
add x1, x1, :lo12:.LC43
- ldrh w2, [x2,x3,lsl 1]
bl sprintf
- ldr x19, [x19, #:got_lo12:g_buffer_superblock]
- adrp x1, .LC44
add x21, x21, x0, sxtw
- add x1, x1, :lo12:.LC44
+ ldrh w3, [x25,#:lo12:.LANCHOR2]
+ adrp x1, .LC44
+ ldr x2, [x22,-40]
mov x0, x21
- ldrh w2, [x19,2]
+ add x1, x1, :lo12:.LC44
+ ldrh w2, [x2,x3,lsl 1]
bl sprintf
add x21, x21, x0, sxtw
- ldrb w2, [x19,6]
+ ldrh w2, [x22,50]
adrp x1, .LC45
mov x0, x21
add x1, x1, :lo12:.LC45
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x19]
+ ldrb w2, [x22,54]
adrp x1, .LC46
mov x0, x21
add x1, x1, :lo12:.LC46
bl sprintf
add x21, x21, x0, sxtw
- ldrb w2, [x19,8]
+ ldrh w2, [x22,48]
adrp x1, .LC47
mov x0, x21
add x1, x1, :lo12:.LC47
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x19,4]
+ ldrb w2, [x22,56]
adrp x1, .LC48
mov x0, x21
add x1, x1, :lo12:.LC48
bl sprintf
add x21, x21, x0, sxtw
- ldrh w3, [x19]
+ ldrh w2, [x22,52]
adrp x1, .LC49
- ldr x2, [x24]
- adrp x19, :got:g_gc_temp_superblock
mov x0, x21
add x1, x1, :lo12:.LC49
- ldrh w2, [x2,x3,lsl 1]
bl sprintf
- ldr x19, [x19, #:got_lo12:g_gc_temp_superblock]
- adrp x1, .LC50
add x21, x21, x0, sxtw
- add x1, x1, :lo12:.LC50
+ ldrh w3, [x22,48]
+ adrp x1, .LC50
+ ldr x2, [x22,-40]
mov x0, x21
- ldrh w2, [x19,2]
+ add x1, x1, :lo12:.LC50
+ ldrh w2, [x2,x3,lsl 1]
bl sprintf
add x21, x21, x0, sxtw
- ldrb w2, [x19,6]
+ ldrh w2, [x22,98]
adrp x1, .LC51
mov x0, x21
add x1, x1, :lo12:.LC51
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x19]
+ ldrb w2, [x22,102]
adrp x1, .LC52
mov x0, x21
add x1, x1, :lo12:.LC52
bl sprintf
add x21, x21, x0, sxtw
- ldrb w2, [x19,8]
+ ldrh w2, [x22,96]
adrp x1, .LC53
mov x0, x21
add x1, x1, :lo12:.LC53
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x19,4]
+ ldrb w2, [x22,104]
adrp x1, .LC54
mov x0, x21
add x1, x1, :lo12:.LC54
bl sprintf
- ldr x20, [x20, #:got_lo12:g_gc_superblock]
- adrp x1, .LC55
add x21, x21, x0, sxtw
- add x1, x1, :lo12:.LC55
+ ldrh w2, [x22,100]
+ adrp x1, .LC55
mov x0, x21
- ldrh w2, [x20,2]
+ add x1, x1, :lo12:.LC55
bl sprintf
add x21, x21, x0, sxtw
- ldrb w2, [x20,6]
+ ldrh w2, [x22,298]
adrp x1, .LC56
mov x0, x21
add x1, x1, :lo12:.LC56
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x20]
+ ldrb w2, [x22,302]
adrp x1, .LC57
mov x0, x21
add x1, x1, :lo12:.LC57
bl sprintf
add x21, x21, x0, sxtw
- ldrb w2, [x20,8]
+ ldrh w2, [x22,296]
adrp x1, .LC58
mov x0, x21
add x1, x1, :lo12:.LC58
bl sprintf
add x21, x21, x0, sxtw
- ldrh w2, [x20,4]
+ ldrb w2, [x22,304]
adrp x1, .LC59
mov x0, x21
add x1, x1, :lo12:.LC59
bl sprintf
add x21, x21, x0, sxtw
- adrp x0, :got:g_all_blk_used_slc_mode
- ldr x26, [x26, #:got_lo12:g_sys_ext_data]
+ ldrh w2, [x22,300]
adrp x1, .LC60
- add x1, x1, :lo12:.LC60
- ldr x0, [x0, #:got_lo12:g_all_blk_used_slc_mode]
- ldr w4, [x26,84]
- ldr w5, [x26,76]
- ldr w3, [x0]
- adrp x0, :got:g_inkDie_check_enable
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w2, [x0]
mov x0, x21
- orr w2, w2, w3, lsl 8
- ldr w3, [x26,80]
+ add x1, x1, :lo12:.LC60
bl sprintf
- add x19, x21, x0, sxtw
- ldr w2, [x26,72]
+ add x21, x21, x0, sxtw
+ ldr w3, [x22,344]
adrp x1, .LC61
- mov x0, x19
+ ldr w2, [x22,160]
add x1, x1, :lo12:.LC61
+ ldr w4, [x22,436]
+ mov x0, x21
+ ldr w5, [x22,428]
+ orr w2, w2, w3, lsl 8
+ ldr w3, [x22,432]
bl sprintf
- add x19, x19, x0, sxtw
- ldr w2, [x26,96]
+ add x19, x21, x0, sxtw
+ ldr w2, [x22,424]
adrp x1, .LC62
mov x0, x19
add x1, x1, :lo12:.LC62
bl sprintf
add x19, x19, x0, sxtw
- adrp x2, :got:g_gc_free_blk_threshold
+ ldr w2, [x22,448]
adrp x1, .LC63
mov x0, x19
add x1, x1, :lo12:.LC63
- ldr x2, [x2, #:got_lo12:g_gc_free_blk_threshold]
- ldrh w2, [x2]
bl sprintf
add x19, x19, x0, sxtw
- adrp x2, :got:g_gc_merge_free_blk_threshold
+ ldrh w2, [x22,864]
adrp x1, .LC64
mov x0, x19
add x1, x1, :lo12:.LC64
- ldr x2, [x2, #:got_lo12:g_gc_merge_free_blk_threshold]
- ldrh w2, [x2]
bl sprintf
add x19, x19, x0, sxtw
- adrp x2, :got:g_gc_skip_write_count
+ ldrh w2, [x22,866]
adrp x1, .LC65
mov x0, x19
add x1, x1, :lo12:.LC65
- ldr x2, [x2, #:got_lo12:g_gc_skip_write_count]
- ldr w2, [x2]
bl sprintf
add x19, x19, x0, sxtw
- adrp x2, :got:g_gc_blk_index
+ ldr w2, [x22,868]
adrp x1, .LC66
+ mov x0, x19
add x1, x1, :lo12:.LC66
+ bl sprintf
+ add x19, x19, x0, sxtw
+ ldrh w2, [x22,872]
+ adrp x1, .LC67
+ add x1, x1, :lo12:.LC67
mov x0, x19
- ldr x2, [x2, #:got_lo12:g_gc_blk_index]
- ldrh w2, [x2]
bl sprintf
add x19, x19, x0, sxtw
bl GetFreeBlockMinEraseCount
uxth w2, w0
- adrp x1, .LC67
+ adrp x1, .LC68
mov x0, x19
- add x1, x1, :lo12:.LC67
+ add x1, x1, :lo12:.LC68
bl sprintf
add x19, x19, x0, sxtw
- ldrh w0, [x25]
+ ldrh w0, [x22,-8]
bl GetFreeBlockMaxEraseCount
uxth w2, w0
- adrp x1, .LC68
+ adrp x1, .LC69
mov x0, x19
- add x1, x1, :lo12:.LC68
+ add x1, x1, :lo12:.LC69
bl sprintf
add x19, x19, x0, sxtw
- ldrh w0, [x20]
+ ldrh w0, [x22,296]
mov w1, 65535
cmp w0, w1
- beq .L549
+ beq .L593
ubfiz x2, x0, 1, 16
- ldr x3, [x24]
- adrp x1, .LC69
+ ldr x3, [x22,-40]
+ adrp x1, .LC70
mov x0, x19
- add x1, x1, :lo12:.LC69
+ add x1, x1, :lo12:.LC70
ldrh w2, [x3,x2]
bl sprintf
add x19, x19, x0, sxtw
-.L549:
+.L593:
mov w0, 0
- adrp x24, .LC70
+ adrp x22, .LC71
mov w20, 0
- adrp x28, :got:p_data_block_list_table
+ mov w28, 65535
bl List_get_gc_head_node
- add x24, x24, :lo12:.LC70
+ mov w27, 6
uxth w3, w0
- mov w9, 65535
- mov w8, 6
- adrp x27, :got:p_erase_count_table
-.L551:
- cmp w3, w9
- str x9, [x29,96]
- adrp x21, :got:p_data_block_list_table
- beq .L550
- ldr x0, [x23, #:got_lo12:p_valid_page_count_table]
+ add x22, x22, :lo12:.LC71
+.L595:
+ cmp w3, w28
+ beq .L594
+ add x21, x25, :lo12:.LANCHOR2
ubfiz x6, x3, 1, 16
- ldr x26, [x28, #:got_lo12:p_data_block_list_table]
+ umull x26, w3, w27
+ mov x0, x19
mov w2, w20
- umull x25, w3, w8
- ldr x4, [x0]
- mov x1, x24
- ldr x0, [x27, #:got_lo12:p_erase_count_table]
+ ldr x5, [x21,-56]
+ mov x1, x22
+ ldr x4, [x21,-40]
add w20, w20, 1
- ldr x5, [x26]
+ ldr x7, [x21,-80]
+ add x5, x5, x26
ldrh w4, [x4,x6]
- ldr x7, [x0]
- add x5, x5, x25
- mov x0, x19
- str x8, [x29,104]
ldrh w5, [x5,4]
ldrh w6, [x7,x6]
bl sprintf
add x19, x19, x0, sxtw
- ldr x0, [x26]
+ ldr x0, [x21,-56]
cmp w20, 16
- ldr x8, [x29,104]
- ldr x9, [x29,96]
- ldrh w3, [x0,x25]
- bne .L551
-.L550:
- adrp x0, :got:p_free_data_block_list_head
- ldr x1, [x21, #:got_lo12:p_data_block_list_table]
- adrp x23, .LC71
+ ldrh w3, [x0,x26]
+ bne .L595
+.L594:
+ add x1, x25, :lo12:.LANCHOR2
+ adrp x22, .LC72
mov w20, 0
mov w28, 65535
mov w27, 6
- ldr x0, [x0, #:got_lo12:p_free_data_block_list_head]
- add x23, x23, :lo12:.LC71
- ldr x3, [x1]
- adrp x26, :got:p_erase_count_table
- ldr x0, [x0]
+ add x22, x22, :lo12:.LC72
+ ldr x0, [x1,-16]
+ ldr x3, [x1,-56]
sub x3, x0, x3
mov x0, -6148914691236517206
asr x3, x3, 1
madd x3, x0, x3, x3
uxth w3, w3
-.L553:
+.L597:
cmp w3, w28
- beq .L552
- ldr x25, [x21, #:got_lo12:p_data_block_list_table]
+ beq .L596
+ add x21, x25, :lo12:.LANCHOR2
ubfiz x5, x3, 1, 16
- ldr x0, [x26, #:got_lo12:p_erase_count_table]
- mov w2, w20
- umull x24, w3, w27
- ldr x4, [x25]
- mov x1, x23
- ldr x6, [x0]
+ umull x26, w3, w27
mov x0, x19
- add x4, x4, x24
+ mov w2, w20
+ ldr x4, [x21,-56]
+ mov x1, x22
+ ldr x6, [x21,-80]
add w20, w20, 1
+ add x4, x4, x26
ldrh w5, [x6,x5]
ldrh w4, [x4,4]
bl sprintf
add x19, x19, x0, sxtw
- ldr x0, [x25]
+ ldr x0, [x21,-56]
cmp w20, 4
- ldrh w3, [x0,x24]
- bne .L553
-.L552:
- sub w0, w19, w22
-.L548:
+ ldrh w3, [x0,x26]
+ bne .L597
+.L596:
+ sub w0, w19, w23
+.L592:
+ ldr x2, [x29,120]
+ ldr x1, [x24,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L598
+ bl __stack_chk_fail
+.L598:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
.type rknand_proc_ftlread, %function
rknand_proc_ftlread:
stp x29, x30, [sp, -32]!
- adrp x1, .LC72
- adrp x2, .LC73
+ adrp x1, .LC73
+ adrp x2, .LC74
add x29, sp, 0
- add x1, x1, :lo12:.LC72
- add x2, x2, :lo12:.LC73
+ add x1, x1, :lo12:.LC73
+ add x2, x2, :lo12:.LC74
stp x19, x20, [sp,16]
mov x20, x0
bl sprintf
.global GetSwlReplaceBlock
.type GetSwlReplaceBlock, %function
GetSwlReplaceBlock:
- adrp x1, :got:g_totle_avg_erase_count
- adrp x2, :got:g_min_erase_count
stp x29, x30, [sp, -96]!
add x29, sp, 0
- ldr x0, [x1, #:got_lo12:g_totle_avg_erase_count]
- stp x23, x24, [sp,48]
- str x25, [sp,64]
- mov x24, x1
stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR2
+ add x0, x19, :lo12:.LANCHOR2
stp x21, x22, [sp,32]
- mov x25, x2
- ldr w3, [x0]
- ldr x0, [x2, #:got_lo12:g_min_erase_count]
- ldr w0, [x0]
+ stp x23, x24, [sp,48]
+ stp x25, x26, [sp,64]
+ ldr w2, [x0,212]
+ ldr w1, [x0,220]
+ cmp w2, w1
+ bcs .L603
+ adrp x1, .LANCHOR0
+ str wzr, [x0,204]
+ add x2, x1, :lo12:.LANCHOR0
+ ldr x5, [x0,-80]
+ mov x0, 0
+ ldrh w3, [x2,1960]
+.L604:
cmp w3, w0
- bcs .L558
- adrp x0, :got:g_totle_mlc_erase_count
- adrp x2, :got:p_erase_count_table
- ldr x1, [x0, #:got_lo12:g_totle_mlc_erase_count]
- str wzr, [x1]
- adrp x1, :got:c_ftl_nand_data_blks_per_plane
- ldr x2, [x2, #:got_lo12:p_erase_count_table]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldr x5, [x2]
- mov x2, 0
- ldrh w1, [x1]
-.L559:
- cmp w1, w2
- bls .L602
- ldr x4, [x0, #:got_lo12:g_totle_mlc_erase_count]
- ldrh w6, [x5,x2,lsl 1]
- add x2, x2, 1
- ldr w3, [x4]
- add w3, w6, w3
- str w3, [x4]
- b .L559
-.L602:
- ldr x0, [x0, #:got_lo12:g_totle_mlc_erase_count]
- ldr x2, [x24, #:got_lo12:g_totle_avg_erase_count]
- ldr w3, [x0]
- udiv w1, w3, w1
- str w1, [x2]
- adrp x1, :got:g_totle_slc_erase_count
- ldr x1, [x1, #:got_lo12:g_totle_slc_erase_count]
- ldr w1, [x1]
- sub w3, w3, w1
- adrp x1, :got:c_mlc_erase_count_value
- ldr x1, [x1, #:got_lo12:c_mlc_erase_count_value]
- ldrh w1, [x1]
- udiv w3, w3, w1
- str w3, [x0]
- b .L561
-.L558:
- adrp x0, :got:g_max_erase_count
- ldr x0, [x0, #:got_lo12:g_max_erase_count]
- ldr w1, [x0]
- cmp w3, w1
- bls .L561
+ bls .L645
+ add x4, x19, :lo12:.LANCHOR2
+ ldrh w6, [x5,x0,lsl 1]
+ add x0, x0, 1
+ ldr w2, [x4,204]
+ add w2, w6, w2
+ str w2, [x4,204]
+ b .L604
+.L645:
+ add x2, x19, :lo12:.LANCHOR2
+ add x1, x1, :lo12:.LANCHOR0
+ ldr w0, [x2,204]
+ ldrh w1, [x1,2016]
+ udiv w3, w0, w3
+ str w3, [x2,212]
+ ldr w3, [x2,208]
+ sub w0, w0, w3
+ udiv w0, w0, w1
+ str w0, [x2,204]
+ b .L606
+.L603:
+ ldr w1, [x0,216]
+ cmp w2, w1
+ bls .L606
add w1, w1, 1
- adrp x4, :got:c_ftl_nand_data_blks_per_plane
- str w1, [x0]
- adrp x5, :got:p_erase_count_table
+ adrp x4, .LANCHOR0
+ str w1, [x0,216]
mov w0, 0
-.L563:
- ldr x1, [x4, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w1, [x1]
+.L608:
+ add x1, x4, :lo12:.LANCHOR0
+ ldrh w1, [x1,1960]
cmp w0, w1
- bcs .L561
- ldr x1, [x5, #:got_lo12:p_erase_count_table]
+ bcs .L606
+ add x1, x19, :lo12:.LANCHOR2
ubfiz x2, x0, 1, 32
add w0, w0, 1
- ldr x3, [x1]
+ ldr x3, [x1,-80]
ldrh w1, [x3,x2]
add w1, w1, 1
strh w1, [x3,x2]
- b .L563
-.L561:
- ldr x0, [x25, #:got_lo12:g_min_erase_count]
- ldr x1, [x24, #:got_lo12:g_totle_avg_erase_count]
- ldr w0, [x0]
- ldr w1, [x1]
- add w2, w0, 341
- cmp w2, w1
- bls .L566
- adrp x2, :got:g_max_erase_count
- add w1, w0, 1024
- ldr x2, [x2, #:got_lo12:g_max_erase_count]
- ldr w2, [x2]
+ b .L608
+.L606:
+ add x0, x19, :lo12:.LANCHOR2
+ ldr w22, [x0,220]
+ ldr w23, [x0,212]
+ add w1, w22, 256
+ cmp w1, w23
+ bls .L611
+ ldr w2, [x0,216]
+ add w1, w22, 768
cmp w1, w2
- bls .L566
- adrp x1, :got:g_inkDie_check_enable
- ldr x1, [x1, #:got_lo12:g_inkDie_check_enable]
- ldr w1, [x1]
- cbz w1, .L569
- cmp w0, 30
- bls .L566
-.L569:
+ bls .L611
+ ldr w0, [x0,160]
+ cbz w0, .L614
+ cmp w22, 30
+ bls .L611
+.L614:
mov w0, 65535
- b .L568
-.L566:
- adrp x0, :got:g_num_free_superblocks
- ldr x0, [x0, #:got_lo12:g_num_free_superblocks]
- ldrh w0, [x0]
- add w0, w0, w0, lsl 1
- lsr w0, w0, 2
+ b .L613
+.L611:
+ add x0, x19, :lo12:.LANCHOR2
+ ldrh w0, [x0,-8]
+ add w0, w0, w0, lsl 1
+ lsr w0, w0, 2
bl GetFreeBlockMaxEraseCount
uxth w6, w0
- ldr x0, [x25, #:got_lo12:g_min_erase_count]
- ldr w1, [x0]
- add w0, w1, 64
+ add w0, w22, 64
cmp w6, w0
- bcs .L582
- cmp w1, 30
- bhi .L569
-.L582:
- adrp x0, :got:p_data_block_list_head
- ldr x0, [x0, #:got_lo12:p_data_block_list_head]
- ldr x2, [x0]
- cbz x2, .L569
- adrp x0, :got:p_data_block_list_table
- adrp x21, :got:p_erase_count_table
- mov w22, 65535
- mov w10, 6
- mov w19, w22
- mov w9, w22
- ldr x0, [x0, #:got_lo12:p_data_block_list_table]
- ldr x8, [x0]
- ldr x0, [x21, #:got_lo12:p_erase_count_table]
- ldr x5, [x0]
+ bcs .L625
+ cmp w22, 30
+ bhi .L614
+.L625:
+ add x0, x19, :lo12:.LANCHOR2
+ ldr x3, [x0,-48]
+ cbz x3, .L614
+ mov w24, 65535
+ ldr x5, [x0,-56]
+ ldr x26, [x0,-80]
mov x0, -6148914691236517206
+ mov w20, w24
+ mov w7, w24
add x0, x0, 1
-.L571:
- ldrh w4, [x2]
- cmp w4, w9
- beq .L573
- ldrh w3, [x2,4]
- cbz w3, .L572
- sub x3, x2, x8
- asr x3, x3, 1
- mul x3, x3, x0
- uxth w7, w3
- and x3, x3, 65535
- ldrh w2, [x5,x3,lsl 1]
- cmp w2, w1
- bls .L581
+ mov w8, 6
+.L616:
+ ldrh w1, [x3]
+ cmp w1, w7
+ beq .L618
+ ldrh w2, [x3,4]
+ cbz w2, .L617
+ sub x4, x3, x5
+ asr x4, x4, 1
+ mul x4, x4, x0
+ uxth w3, w4
+ and x4, x4, 65535
+ ldrh w2, [x26,x4,lsl 1]
cmp w2, w22
- bcs .L572
- mov w22, w2
- mov w19, w7
-.L572:
- umull x2, w4, w10
- add x2, x8, x2
- b .L571
-.L581:
- mov w19, w7
-.L573:
+ bls .L624
+ cmp w2, w24
+ bcs .L617
+ mov w24, w2
+ mov w20, w3
+.L617:
+ umull x3, w1, w8
+ add x3, x5, x3
+ b .L616
+.L624:
+ mov w20, w3
+.L618:
mov w0, 65535
- cmp w19, w0
- beq .L569
- ubfiz x23, x19, 1, 16
- ldrh w20, [x5,x23]
- cmp w20, w1
- bls .L576
+ cmp w20, w0
+ beq .L614
+ ubfiz x25, x20, 1, 16
+ ldrh w21, [x26,x25]
+ cmp w21, w22
+ bls .L620
str x6, [x29,88]
bl GetFreeBlockMinEraseCount
- ldr x2, [x25, #:got_lo12:g_min_erase_count]
ldr x6, [x29,88]
- ldr w1, [x2]
- cmp w1, w0, uxth
- bcs .L576
- str w22, [x2]
-.L576:
- cmp w20, 29
- bhi .L578
- adrp x0, :got:g_inkDie_check_enable
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w0, [x0]
- cbz w0, .L578
- ldr x1, [x24, #:got_lo12:g_totle_avg_erase_count]
- add w0, w20, 10
- ldr w1, [x1]
- cmp w0, w1
- bls .L579
- adrp x0, :got:c_mlc_erase_count_value
- ldr x0, [x0, #:got_lo12:c_mlc_erase_count_value]
- ldrh w0, [x0]
- cmp w0, w20
- bls .L578
-.L579:
- adrp x0, :got:g_num_data_superblocks
- ldr x0, [x0, #:got_lo12:g_num_data_superblocks]
- ldrh w0, [x0]
+ cmp w22, w0, uxth
+ bcs .L620
+ add x0, x19, :lo12:.LANCHOR2
+ str w24, [x0,220]
+.L620:
+ cmp w21, 29
+ bhi .L621
+ add x0, x19, :lo12:.LANCHOR2
+ ldr w0, [x0,160]
+ cbz w0, .L621
+ add w0, w21, 10
+ cmp w0, w23
+ bls .L622
+ adrp x0, .LANCHOR0+2016
+ ldrh w0, [x0,#:lo12:.LANCHOR0+2016]
+ cmp w0, w21
+ bls .L621
+.L622:
+ add x22, x19, :lo12:.LANCHOR2
+ ldrh w0, [x22,-24]
cmp w0, 64
- bls .L578
- ldr x21, [x21, #:got_lo12:p_erase_count_table]
- adrp x0, .LC74
- mov w1, w19
- add x0, x0, :lo12:.LC74
- ldr x2, [x21]
- ldrh w2, [x2,x23]
- bl printk
- b .L601
-.L578:
- ldr x1, [x24, #:got_lo12:g_totle_avg_erase_count]
- ldr w2, [x1]
- cmp w20, w2
- bcs .L569
- add w0, w20, 128
- cmp w6, w0
- ble .L569
- add w0, w20, 341
- adrp x1, :got:g_max_erase_count
- cmp w0, w2
- bcc .L580
- ldr x0, [x1, #:got_lo12:g_max_erase_count]
- add w20, w20, 1024
- ldr w0, [x0]
- cmp w20, w0
- bcs .L569
-.L580:
- adrp x0, :got:p_valid_page_count_table
- ldr x21, [x21, #:got_lo12:p_erase_count_table]
- ldr x3, [x1, #:got_lo12:g_max_erase_count]
- mov w1, w19
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x5, [x21]
- ldr w3, [x3]
- ldr x4, [x0]
+ bls .L621
adrp x0, .LC75
- ldrh w5, [x5,x23]
+ ldrh w2, [x26,x25]
add x0, x0, :lo12:.LC75
- ldrh w4, [x4,x23]
+ mov w1, w20
bl printk
-.L601:
- adrp x0, :got:g_in_swl_replace
- mov w1, 1
- ldr x0, [x0, #:got_lo12:g_in_swl_replace]
- str w1, [x0]
- mov w0, w19
-.L568:
+ mov w0, 1
+ str w0, [x22,876]
+ b .L644
+.L621:
+ cmp w21, w23
+ bcs .L614
+ add w0, w21, 128
+ cmp w6, w0
+ ble .L614
+ add w0, w21, 256
+ cmp w0, w23
+ bcc .L623
+ add x0, x19, :lo12:.LANCHOR2
+ add w21, w21, 768
+ ldr w0, [x0,216]
+ cmp w21, w0
+ bcs .L614
+.L623:
+ add x19, x19, :lo12:.LANCHOR2
+ adrp x0, .LC76
+ ldrh w5, [x26,x25]
+ add x0, x0, :lo12:.LC76
+ mov w1, w20
+ mov w2, w23
+ ldr x4, [x19,-40]
+ ldr w3, [x19,216]
+ ldrh w4, [x4,x25]
+ bl printk
+ mov w0, 1
+ str w0, [x19,876]
+.L644:
+ mov w0, w20
+.L613:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
- ldr x25, [sp,64]
+ ldp x25, x26, [sp,64]
ldp x29, x30, [sp], 96
ret
.size GetSwlReplaceBlock, .-GetSwlReplaceBlock
mov w1, 65535
cmp w0, w1
add x29, sp, 0
- beq .L604
- adrp x1, :got:p_valid_page_count_table
- ubfiz x2, x0, 1, 16
- ldr x1, [x1, #:got_lo12:p_valid_page_count_table]
- ldr x1, [x1]
- strh wzr, [x1,x2]
+ beq .L647
+ adrp x2, .LANCHOR2-40
+ ubfiz x1, x0, 1, 16
+ ldr x2, [x2,#:lo12:.LANCHOR2-40]
+ strh wzr, [x2,x1]
bl INSERT_FREE_LIST
-.L604:
+.L647:
mov w0, 0
ldp x29, x30, [sp], 16
ret
.global FtlGcBufInit
.type FtlGcBufInit, %function
FtlGcBufInit:
- adrp x0, :got:g_gc_num_req
+ adrp x3, .LANCHOR2
mov w1, 0
- adrp x6, :got:c_ftl_nand_planes_num
- mov w7, 24
- adrp x8, :got:gp_gc_page_buf_info
- mov w9, 1
- ldr x0, [x0, #:got_lo12:g_gc_num_req]
- adrp x10, :got:c_ftl_nand_byte_pre_page
- mov w3, 4
- adrp x11, :got:p_gc_data_buf
- adrp x12, :got:c_ftl_nand_byte_pre_oob
- adrp x13, :got:p_gc_spare_buf
- str wzr, [x0]
- adrp x14, :got:req_gc
- mov w15, 56
-.L606:
- ldr x0, [x6, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
+ add x0, x3, :lo12:.LANCHOR2
+ adrp x10, .LANCHOR0
+ mov w11, 24
+ mov w12, 1
+ mov w6, 4
+ mov w13, 56
+ str wzr, [x0,880]
+.L649:
+ add x5, x10, :lo12:.LANCHOR0
+ adrp x9, .LANCHOR0
+ ldrh w0, [x5,1952]
cmp w1, w0
- bcs .L610
- ldr x4, [x8, #:got_lo12:gp_gc_page_buf_info]
- umull x2, w1, w7
- ldr x5, [x4]
- add x0, x5, x2
- str w9, [x0,16]
- ldr x0, [x10, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldr x16, [x11, #:got_lo12:p_gc_data_buf]
- ldrh w0, [x0]
- ldr x16, [x16]
+ bcs .L653
+ add x2, x3, :lo12:.LANCHOR2
+ umull x4, w1, w11
+ ldr x7, [x2,888]
+ ldr x8, [x2,896]
+ add x0, x7, x4
+ str w12, [x0,16]
+ ldrh w0, [x5,2036]
mul w0, w1, w0
- sdiv w0, w0, w3
- add x0, x16, x0, sxtw 2
- str x0, [x5,x2]
- ldr x0, [x12, #:got_lo12:c_ftl_nand_byte_pre_oob]
- ldr x5, [x4]
- ldr x16, [x13, #:got_lo12:p_gc_spare_buf]
- ldrh w0, [x0]
- add x4, x5, x2
- ldr x16, [x16]
+ sdiv w0, w0, w6
+ add x0, x8, x0, sxtw 2
+ str x0, [x7,x4]
+ ldrh w0, [x5,2038]
+ ldr x8, [x2,888]
+ ldr x5, [x2,904]
mul w0, w1, w0
- sdiv w0, w0, w3
- add x0, x16, x0, sxtw 2
- str x0, [x4,8]
- umull x0, w1, w15
- ldr x16, [x14, #:got_lo12:req_gc]
+ add x7, x8, x4
+ ldr x2, [x2,912]
+ sdiv w0, w0, w6
+ add x0, x5, x0, sxtw 2
+ str x0, [x7,8]
+ umull x0, w1, w13
add w1, w1, 1
- ldr x2, [x5,x2]
+ add x0, x2, x0
+ ldr x2, [x8,x4]
uxth w1, w1
- ldr x16, [x16]
- add x0, x16, x0
str x2, [x0,8]
- ldr x2, [x4,8]
+ ldr x2, [x7,8]
str x2, [x0,16]
- b .L606
-.L610:
- adrp x6, :got:c_gc_page_buf_num
- mov w7, 24
- adrp x8, :got:gp_gc_page_buf_info
- adrp x9, :got:c_ftl_nand_byte_pre_page
- mov w3, 4
- adrp x10, :got:p_gc_data_buf
- adrp x11, :got:c_ftl_nand_byte_pre_oob
- adrp x12, :got:p_gc_spare_buf
-.L608:
- ldr x1, [x6, #:got_lo12:c_gc_page_buf_num]
- ldr w1, [x1]
+ b .L649
+.L653:
+ mov w8, 24
+ mov w5, 4
+.L651:
+ add x2, x3, :lo12:.LANCHOR2
+ ldr w1, [x2,920]
cmp w0, w1
- bcs .L611
- ldr x4, [x8, #:got_lo12:gp_gc_page_buf_info]
- umull x2, w0, w7
- ldr x5, [x4]
- add x1, x5, x2
+ bcs .L654
+ umull x4, w0, w8
+ ldr x7, [x2,888]
+ add x6, x9, :lo12:.LANCHOR0
+ ldr x10, [x2,896]
+ add x1, x7, x4
str wzr, [x1,16]
- ldr x1, [x9, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldr x13, [x10, #:got_lo12:p_gc_data_buf]
- ldrh w1, [x1]
- ldr x13, [x13]
+ ldrh w1, [x6,2036]
mul w1, w0, w1
- sdiv w1, w1, w3
- add x1, x13, x1, sxtw 2
- str x1, [x5,x2]
- ldr x1, [x11, #:got_lo12:c_ftl_nand_byte_pre_oob]
- ldr x4, [x4]
- ldrh w1, [x1]
- add x2, x4, x2
- ldr x4, [x12, #:got_lo12:p_gc_spare_buf]
+ sdiv w1, w1, w5
+ add x1, x10, x1, sxtw 2
+ str x1, [x7,x4]
+ ldrh w1, [x6,2038]
+ ldr x6, [x2,888]
+ ldr x2, [x2,904]
mul w1, w0, w1
+ add x4, x6, x4
add w0, w0, 1
- ldr x4, [x4]
- sdiv w1, w1, w3
+ sdiv w1, w1, w5
uxth w0, w0
- add x1, x4, x1, sxtw 2
- str x1, [x2,8]
- b .L608
-.L611:
+ add x1, x2, x1, sxtw 2
+ str x1, [x4,8]
+ b .L651
+.L654:
ret
.size FtlGcBufInit, .-FtlGcBufInit
.align 2
.global FtlGcBufFree
.type FtlGcBufFree, %function
FtlGcBufFree:
- adrp x2, :got:c_gc_page_buf_num
+ adrp x2, .LANCHOR2
mov w3, 0
+ add x2, x2, :lo12:.LANCHOR2
mov w7, 56
mov w9, 24
- ldr x2, [x2, #:got_lo12:c_gc_page_buf_num]
- ldr w8, [x2]
- adrp x2, :got:gp_gc_page_buf_info
- ldr x2, [x2, #:got_lo12:gp_gc_page_buf_info]
- ldr x5, [x2]
-.L613:
+ ldr w8, [x2,920]
+ ldr x5, [x2,888]
+.L656:
cmp w3, w1
- bcs .L612
+ bcs .L655
umull x4, w3, w7
mov w2, 0
add x4, x0, x4
-.L618:
+.L661:
cmp w2, w8
- bcs .L615
+ bcs .L658
umull x6, w2, w9
add x10, x5, x6
ldr x11, [x5,x6]
ldr x6, [x4,8]
cmp x11, x6
- bne .L614
+ bne .L657
str wzr, [x10,16]
- b .L615
-.L614:
+ b .L658
+.L657:
add w2, w2, 1
uxth w2, w2
- b .L618
-.L615:
+ b .L661
+.L658:
add w3, w3, 1
uxth w3, w3
- b .L613
-.L612:
+ b .L656
+.L655:
ret
.size FtlGcBufFree, .-FtlGcBufFree
.align 2
.global FtlGcBufAlloc
.type FtlGcBufAlloc, %function
FtlGcBufAlloc:
- adrp x2, :got:c_gc_page_buf_num
+ adrp x2, .LANCHOR2
mov w7, 24
+ add x2, x2, :lo12:.LANCHOR2
mov w8, 1
mov w9, 56
- ldr x2, [x2, #:got_lo12:c_gc_page_buf_num]
- ldr w5, [x2]
- adrp x2, :got:gp_gc_page_buf_info
- ldr x2, [x2, #:got_lo12:gp_gc_page_buf_info]
- ldr x6, [x2]
+ ldr w5, [x2,920]
+ ldr x6, [x2,888]
mov w2, 0
-.L620:
+.L663:
cmp w2, w1
- bcs .L626
+ bcs .L669
mov w3, 0
-.L624:
+.L667:
cmp w3, w5
- bcs .L622
+ bcs .L665
umull x4, w3, w7
add x4, x6, x4
ldr w10, [x4,16]
- cbnz w10, .L621
+ cbnz w10, .L664
umull x3, w2, w9
str w8, [x4,16]
add x3, x0, x3
str x10, [x3,8]
ldr x4, [x4,8]
str x4, [x3,16]
- b .L622
-.L621:
+ b .L665
+.L664:
add w3, w3, 1
uxth w3, w3
- b .L624
-.L622:
+ b .L667
+.L665:
add w2, w2, 1
uxth w2, w2
- b .L620
-.L626:
+ b .L663
+.L669:
ret
.size FtlGcBufAlloc, .-FtlGcBufAlloc
.align 2
.global IsBlkInGcList
.type IsBlkInGcList, %function
IsBlkInGcList:
- adrp x1, :got:g_gc_blk_num
+ adrp x1, .LANCHOR2
uxth w0, w0
- ldr x1, [x1, #:got_lo12:g_gc_blk_num]
- ldrh w2, [x1]
- adrp x1, :got:p_gc_blk_tbl
- ldr x1, [x1, #:got_lo12:p_gc_blk_tbl]
- ldr x3, [x1]
+ add x1, x1, :lo12:.LANCHOR2
+ ldrh w2, [x1,924]
+ ldr x3, [x1,928]
mov x1, 0
-.L628:
+.L671:
cmp w2, w1, uxth
- bls .L632
+ bls .L675
add x1, x1, 1
add x4, x3, x1, lsl 1
ldrh w4, [x4,-2]
cmp w4, w0
- bne .L628
+ bne .L671
mov w0, 1
- b .L629
-.L632:
+ b .L672
+.L675:
mov w0, 0
-.L629:
+.L672:
ret
.size IsBlkInGcList, .-IsBlkInGcList
.align 2
add x29, sp, 0
str x19, [sp,16]
mov w19, w0
- lsr w0, w0, 10
+ lsr x0, x19, 10
str x1, [x29,32]
str x2, [x29,40]
bl P2V_block_in_plane
- adrp x3, :got:g_gc_blk_num
+ adrp x3, .LANCHOR2
ldr x2, [x29,40]
+ add x4, x3, :lo12:.LANCHOR2
ldr x1, [x29,32]
uxth w8, w0
mov x5, 0
- ldr x4, [x3, #:got_lo12:g_gc_blk_num]
- ldrh w7, [x4]
- adrp x4, :got:p_gc_blk_tbl
- ldr x4, [x4, #:got_lo12:p_gc_blk_tbl]
- ldr x6, [x4]
-.L634:
+ ldrh w7, [x4,924]
+ ldr x6, [x4,928]
+.L677:
uxth w4, w5
cmp w4, w7
- bcs .L638
+ bcs .L681
add x5, x5, 1
add x9, x6, x5, lsl 1
ldrh w9, [x9,-2]
cmp w9, w8
- bne .L634
-.L638:
+ bne .L677
+.L681:
cmp w4, w7
- bne .L636
+ bne .L679
ubfiz x4, x4, 1, 16
strh w0, [x6,x4]
- ldr x3, [x3, #:got_lo12:g_gc_blk_num]
- ldrh w4, [x3]
+ add x0, x3, :lo12:.LANCHOR2
+ ldrh w4, [x0,924]
add w4, w4, 1
- strh w4, [x3]
-.L636:
- adrp x3, :got:g_gc_page_offset
- adrp x5, :got:p_gc_page_info
+ strh w4, [x0,924]
+.L679:
+ add x3, x3, :lo12:.LANCHOR2
mov w0, 12
- ldr x3, [x3, #:got_lo12:g_gc_page_offset]
- ldr x5, [x5, #:got_lo12:p_gc_page_info]
- ldrh w4, [x3]
- ldr x6, [x5]
+ ldrh w4, [x3,936]
+ ldr x5, [x3,944]
umull x4, w4, w0
- add x6, x6, x4
- str w1, [x6,4]
- ldr x1, [x5]
+ add x5, x5, x4
+ str w1, [x5,4]
+ ldr x1, [x3,944]
add x0, x1, x4
str w2, [x0,8]
str w19, [x1,x4]
- ldrh w0, [x3]
+ ldrh w0, [x3,936]
add w0, w0, 1
- strh w0, [x3]
+ strh w0, [x3,936]
ldr x19, [sp,16]
ldp x29, x30, [sp], 48
ret
add x29, sp, 0
str x19, [sp,16]
uxth w19, w0
- adrp x0, .LC76
+ adrp x0, .LC77
mov w1, w19
- add x0, x0, :lo12:.LC76
+ add x0, x0, :lo12:.LC77
bl printk
- adrp x2, :got:g_gc_next_blk
+ adrp x2, .LANCHOR2
mov w0, 65535
- ldr x2, [x2, #:got_lo12:g_gc_next_blk]
- ldrh w1, [x2]
+ add x2, x2, :lo12:.LANCHOR2
+ ldrh w1, [x2,952]
cmp w1, w0
- beq .L643
- adrp x2, :got:g_gc_next_blk_1
- ldr x2, [x2, #:got_lo12:g_gc_next_blk_1]
- ldrh w1, [x2]
+ bne .L684
+ strh w19, [x2,952]
+ b .L685
+.L684:
+ ldrh w1, [x2,954]
cmp w1, w0
- bne .L642
-.L643:
- strh w19, [x2]
-.L642:
+ bne .L685
+ strh w19, [x2,954]
+.L685:
mov w0, 0
ldr x19, [sp,16]
ldp x29, x30, [sp], 32
.global FtlGcMarkBadPhyBlk
.type FtlGcMarkBadPhyBlk, %function
FtlGcMarkBadPhyBlk:
- stp x29, x30, [sp, -48]!
+ stp x29, x30, [sp, -64]!
add x29, sp, 0
stp x19, x20, [sp,16]
uxth w20, w0
- adrp x19, :got:g_gc_bad_block_temp_num
- mov w0, w20
+ adrp x19, .LANCHOR2
stp x21, x22, [sp,32]
+ mov w0, w20
+ add x22, x19, :lo12:.LANCHOR2
+ str x23, [sp,48]
bl P2V_block_in_plane
uxth w21, w0
- ldr x1, [x19, #:got_lo12:g_gc_bad_block_temp_num]
- adrp x0, .LC77
+ ldrh w1, [x22,956]
+ adrp x0, .LC78
mov w2, w20
- add x0, x0, :lo12:.LC77
- ldrh w1, [x1]
+ add x0, x0, :lo12:.LC78
bl printk
mov w0, w21
bl FtlGcRefreshBlock
- adrp x0, :got:g_inkDie_check_enable
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w0, [x0]
- cbz w0, .L645
- adrp x1, :got:p_erase_count_table
+ ldr w0, [x22,160]
+ cbz w0, .L687
ubfiz x0, x21, 1, 16
- ldr x1, [x1, #:got_lo12:p_erase_count_table]
- ldr x2, [x1]
+ ldr x2, [x22,-80]
ldrh w1, [x2,x0]
cmp w1, 29
- bls .L645
+ bls .L687
sub w1, w1, #30
strh w1, [x2,x0]
-.L645:
- ldr x0, [x19, #:got_lo12:g_gc_bad_block_temp_num]
- adrp x3, :got:g_gc_bad_block_temp_tbl
- ldrh w1, [x0]
+.L687:
+ add x2, x19, :lo12:.LANCHOR2
mov x0, 0
-.L646:
+ add x2, x2, 960
+ ldrh w1, [x2,-4]
+.L688:
cmp w1, w0, uxth
- bls .L652
+ bls .L694
add x0, x0, 1
- ldr x2, [x3, #:got_lo12:g_gc_bad_block_temp_tbl]
- add x2, x2, x0, lsl 1
- ldrh w2, [x2,-2]
- cmp w2, w20
- bne .L646
- b .L647
-.L652:
+ add x3, x2, x0, lsl 1
+ ldrh w3, [x3,-2]
+ cmp w3, w20
+ bne .L688
+ b .L689
+.L694:
cmp w1, 15
- bhi .L647
- ldr x19, [x19, #:got_lo12:g_gc_bad_block_temp_num]
+ bhi .L689
+ add x19, x19, :lo12:.LANCHOR2
add w0, w1, 1
- strh w0, [x19]
- adrp x0, :got:g_gc_bad_block_temp_tbl
- ldr x0, [x0, #:got_lo12:g_gc_bad_block_temp_tbl]
- strh w20, [x0,w1,sxtw 1]
-.L647:
+ add x19, x19, 960
+ strh w0, [x19,-4]
+ strh w20, [x19,w1,sxtw 1]
+.L689:
mov w0, 0
+ ldr x23, [sp,48]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
- ldp x29, x30, [sp], 48
+ ldp x29, x30, [sp], 64
ret
.size FtlGcMarkBadPhyBlk, .-FtlGcMarkBadPhyBlk
.align 2
.global FtlGcReFreshBadBlk
.type FtlGcReFreshBadBlk, %function
FtlGcReFreshBadBlk:
- adrp x0, :got:g_gc_bad_block_temp_num
stp x29, x30, [sp, -32]!
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:g_gc_bad_block_temp_num]
str x19, [sp,16]
- ldrh w1, [x0]
- cbz w1, .L654
- adrp x0, :got:g_gc_next_blk
- ldr x0, [x0, #:got_lo12:g_gc_next_blk]
- ldrh w2, [x0]
- mov w0, 65535
- cmp w2, w0
- bne .L654
- adrp x19, :got:g_gc_bad_block_gc_index
- ldr x0, [x19, #:got_lo12:g_gc_bad_block_gc_index]
- ldrh w2, [x0]
+ adrp x19, .LANCHOR2
+ add x0, x19, :lo12:.LANCHOR2
+ ldrh w1, [x0,956]
+ cbz w1, .L696
+ ldrh w3, [x0,952]
+ mov w2, 65535
+ cmp w3, w2
+ bne .L696
+ ldrh w2, [x0,994]
cmp w2, w1
- bcc .L655
- strh wzr, [x0]
-.L655:
- ldr x19, [x19, #:got_lo12:g_gc_bad_block_gc_index]
- adrp x0, :got:g_gc_bad_block_temp_tbl
- ldrh w1, [x19]
- ldr x0, [x0, #:got_lo12:g_gc_bad_block_temp_tbl]
+ bcc .L697
+ strh wzr, [x0,994]
+.L697:
+ add x19, x19, :lo12:.LANCHOR2
+ add x0, x19, 960
+ ldrh w1, [x19,994]
ldrh w0, [x0,w1,sxtw 1]
bl P2V_block_in_plane
bl FtlGcRefreshBlock
- ldrh w0, [x19]
+ ldrh w0, [x19,994]
add w0, w0, 1
- strh w0, [x19]
-.L654:
+ strh w0, [x19,994]
+.L696:
mov w0, 0
ldr x19, [sp,16]
ldp x29, x30, [sp], 32
ret
.size FtlGcReFreshBadBlk, .-FtlGcReFreshBadBlk
.align 2
- .global ftl_malloc
- .type ftl_malloc, %function
-ftl_malloc:
- stp x29, x30, [sp, -16]!
- mov w1, 193
- sxtw x0, w0
- add x29, sp, 0
- movk w1, 0x240, lsl 16
- bl __kmalloc
- ldp x29, x30, [sp], 16
- ret
- .size ftl_malloc, .-ftl_malloc
- .align 2
- .global NandcInit
- .type NandcInit, %function
-NandcInit:
- adrp x1, :got:gNandChipMap
- mov w2, 1
- stp x29, x30, [sp, -32]!
- add x29, sp, 0
- ldr x1, [x1, #:got_lo12:gNandChipMap]
- str x19, [sp,16]
- adrp x19, :got:gpNandc
- str w2, [x1,24]
- mov w2, 2
- str x0, [x1]
- str x0, [x1,16]
- str w2, [x1,40]
- mov w2, 3
- str x0, [x1,32]
- str w2, [x1,56]
- adrp x2, :got:gBootDdrMode
- str x0, [x1,48]
- str wzr, [x1,8]
- ldr x19, [x19, #:got_lo12:gpNandc]
- str x0, [x19]
- ldr x2, [x2, #:got_lo12:gBootDdrMode]
- ldr w1, [x0]
- ubfx x3, x1, 13, 1
- str w3, [x2]
- adrp x2, :got:gNandcVer
- ldr w3, [x0,352]
- and w1, w1, 245760
- ubfx x3, x3, 16, 4
- orr w1, w1, 256
- ldr x2, [x2, #:got_lo12:gNandcVer]
- str w3, [x2]
- str w1, [x0]
- ldr x0, [x19]
- str wzr, [x0,336]
- mov w0, 40
- bl NandcTimeCfg
- ldr x0, [x19]
- mov w1, 8322
- str w1, [x0,344]
- mov w1, 6145
- movk w1, 0x18, lsl 16
- str w1, [x0,304]
- mov w0, 36864
- bl ftl_malloc
- adrp x1, :got:gMasterTempBuf
- ldr x1, [x1, #:got_lo12:gMasterTempBuf]
- str x0, [x1]
- adrp x1, :got:gMasterInfo
- ldr x1, [x1, #:got_lo12:gMasterInfo]
- str x0, [x1]
- add x0, x0, 32768
- str x0, [x1,8]
- adrp x0, :got:gNandcDumpWriteEn
- str wzr, [x1,40]
- ldr x0, [x0, #:got_lo12:gNandcDumpWriteEn]
- str wzr, [x0]
- ldr x19, [sp,16]
- ldp x29, x30, [sp], 32
- ret
- .size NandcInit, .-NandcInit
- .align 2
- .global ftl_free
- .type ftl_free, %function
-ftl_free:
- stp x29, x30, [sp, -16]!
- add x29, sp, 0
- bl kfree
- ldp x29, x30, [sp], 16
- ret
- .size ftl_free, .-ftl_free
- .align 2
.global ftl_memset
.type ftl_memset, %function
ftl_memset:
stp x29, x30, [sp, -32]!
add x29, sp, 0
stp x19, x20, [sp,16]
- mov w19, w1
- cbnz w0, .L664
+ mov w20, w1
+ cbnz w0, .L703
+ adrp x1, .LANCHOR0
mov x0, 0
- adrp x2, :got:slcPageToMlcPageTbl
-.L665:
- ldr x1, [x2, #:got_lo12:slcPageToMlcPageTbl]
- strh w0, [x1,x0,lsl 1]
+ add x1, x1, :lo12:.LANCHOR0
+.L704:
+ add x2, x1, 196
+ strh w0, [x2,x0,lsl 1]
add x0, x0, 1
cmp x0, 256
- bne .L665
-.L671:
- adrp x20, :got:mlcPageToSlcPageTbl
- mov w2, 1024
+ bne .L704
+.L710:
+ adrp x19, .LANCHOR2
mov w1, 255
- uxth w19, w19
- ldr x0, [x20, #:got_lo12:mlcPageToSlcPageTbl]
+ add x19, x19, :lo12:.LANCHOR2
+ mov w2, 1024
+ add x19, x19, 996
+ uxth w20, w20
+ mov x0, x19
bl ftl_memset
+ adrp x1, .LANCHOR0
mov x0, 0
- adrp x2, :got:slcPageToMlcPageTbl
- b .L666
-.L664:
+ add x1, x1, :lo12:.LANCHOR0
+ b .L705
+.L703:
cmp w0, 1
- bne .L667
+ bne .L706
+ adrp x3, .LANCHOR0
mov x0, 0
mov w4, 3
mov w5, 2
- adrp x3, :got:slcPageToMlcPageTbl
-.L670:
+ add x3, x3, :lo12:.LANCHOR0
+.L709:
cmp x0, 3
uxth w1, w0
mov w2, w1
- bls .L668
+ bls .L707
ubfiz w2, w1, 1, 15
and w1, w1, 1
cmp w1, wzr
csel w1, w4, w5, ne
sub w2, w2, w1
uxth w2, w2
-.L668:
- ldr x1, [x3, #:got_lo12:slcPageToMlcPageTbl]
+.L707:
+ add x1, x3, 196
strh w2, [x1,x0,lsl 1]
add x0, x0, 1
cmp x0, 256
- bne .L670
- b .L671
-.L667:
+ bne .L709
+ b .L710
+.L706:
cmp w0, 2
- bne .L672
- mov w2, 65535
+ bne .L711
+ adrp x3, .LANCHOR0
+ mov w1, 65535
mov x0, 0
- adrp x4, :got:slcPageToMlcPageTbl
-.L674:
- ldr x3, [x4, #:got_lo12:slcPageToMlcPageTbl]
+ add x3, x3, :lo12:.LANCHOR0
+.L713:
+ add x4, x3, 196
cmp x0, 1
- uxth w1, w0
- csel w1, w2, w1, hi
- add w2, w2, 2
- strh w1, [x3,x0,lsl 1]
+ uxth w2, w0
+ csel w2, w1, w2, hi
+ add w1, w1, 2
+ strh w2, [x4,x0,lsl 1]
add x0, x0, 1
cmp x0, 256
- uxth w2, w2
- bne .L674
- b .L671
-.L672:
+ uxth w1, w1
+ bne .L713
+ b .L710
+.L711:
cmp w0, 3
- bne .L675
+ bne .L714
+ adrp x3, .LANCHOR0
mov x0, 0
- mov w5, 5
- mov w6, 4
- adrp x4, :got:slcPageToMlcPageTbl
-.L678:
+ mov w4, 5
+ mov w5, 4
+ add x3, x3, :lo12:.LANCHOR0
+.L717:
cmp x0, 5
- uxth w3, w0
- mov w2, w3
- bls .L676
- ubfiz w2, w3, 1, 15
- and w3, w3, 1
- cmp w3, wzr
- csel w1, w5, w6, ne
+ uxth w1, w0
+ mov w2, w1
+ bls .L715
+ ubfiz w2, w1, 1, 15
+ and w1, w1, 1
+ cmp w1, wzr
+ csel w1, w4, w5, ne
sub w2, w2, w1
uxth w2, w2
-.L676:
- ldr x1, [x4, #:got_lo12:slcPageToMlcPageTbl]
+.L715:
+ add x1, x3, 196
strh w2, [x1,x0,lsl 1]
add x0, x0, 1
cmp x0, 256
- bne .L678
- b .L671
-.L675:
+ bne .L717
+ b .L710
+.L714:
cmp w0, 4
- bne .L679
- adrp x2, :got:slcPageToMlcPageTbl
- mov w1, 1
+ bne .L718
+ adrp x1, .LANCHOR0
mov w5, 7
+ add x1, x1, :lo12:.LANCHOR0
mov w4, 6
- ldr x2, [x2, #:got_lo12:slcPageToMlcPageTbl]
+ add x2, x1, 196
strh w0, [x2,8]
mov w0, 5
+ strh wzr, [x1,196]
+ mov w1, 1
strh w0, [x2,10]
mov w0, 7
strh w1, [x2,2]
mov w1, 3
strh w0, [x2,14]
mov w0, 8
- strh wzr, [x2]
strh w1, [x2,6]
-.L681:
+.L720:
and w3, w0, 1
ubfiz w1, w0, 1, 15
add w0, w0, 1
sub w1, w1, w3
cmp w0, 256
strh w1, [x2,14]
- bne .L681
- b .L671
-.L679:
+ bne .L720
+ b .L710
+.L718:
+ cmp w0, 5
+ bne .L721
+ adrp x2, .LANCHOR0
+ mov x0, 0
+ add x2, x2, :lo12:.LANCHOR0
+.L722:
+ add x1, x2, 196
+ strh w0, [x1,x0,lsl 1]
+ add x0, x0, 1
+ cmp x0, 16
+ bne .L722
+ mov x0, 0
+.L723:
+ add x2, x1, x0
+ add w3, w0, 16
+ add x0, x0, 2
+ cmp x0, 480
+ strh w3, [x2,32]
+ bne .L723
+ b .L710
+.L721:
cmp w0, 6
- bne .L671
+ bne .L710
+ adrp x1, .LANCHOR0
mov x2, 0
- mov w5, 12
- mov w6, 10
- adrp x4, :got:slcPageToMlcPageTbl
-.L684:
+ mov w4, 12
+ mov w5, 10
+ add x1, x1, :lo12:.LANCHOR0
+.L726:
cmp x2, 5
uxth w3, w2
mov w0, w3
- bls .L682
+ bls .L724
add w0, w3, w3, lsl 1
and w3, w3, 1
cmp w3, wzr
uxth w0, w0
- csel w1, w5, w6, ne
- sub w0, w0, w1
+ csel w3, w4, w5, ne
+ sub w0, w0, w3
uxth w0, w0
-.L682:
- ldr x1, [x4, #:got_lo12:slcPageToMlcPageTbl]
- strh w0, [x1,x2,lsl 1]
+.L724:
+ add x3, x1, 196
+ strh w0, [x3,x2,lsl 1]
add x2, x2, 1
cmp x2, 256
- bne .L684
- b .L671
-.L666:
- cmp w19, w0, uxth
- bls .L700
- ldr x1, [x2, #:got_lo12:slcPageToMlcPageTbl]
- ldr x3, [x20, #:got_lo12:mlcPageToSlcPageTbl]
- ldrh w1, [x1,x0,lsl 1]
+ bne .L726
+ b .L710
+.L705:
+ cmp w20, w0, uxth
+ bls .L744
+ add x2, x1, 196
+ ldrh w2, [x2,x0,lsl 1]
add x0, x0, 1
- strh w1, [x3,w1,sxtw 1]
- b .L666
-.L700:
+ strh w2, [x19,w2,sxtw 1]
+ b .L705
+.L744:
ldp x19, x20, [sp,16]
ldp x29, x30, [sp], 32
ret
FlashDieInfoInit:
stp x29, x30, [sp, -96]!
add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x19, :got:gNandMaxDie
stp x21, x22, [sp,32]
+ adrp x22, .LANCHOR2
+ str x27, [sp,80]
+ add x1, x22, :lo12:.LANCHOR2
+ adrp x21, .LANCHOR0
+ stp x19, x20, [sp,16]
stp x23, x24, [sp,48]
- ldr x0, [x19, #:got_lo12:gNandMaxDie]
- adrp x23, :got:gNandMaxChip
stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- strb wzr, [x0]
- adrp x22, :got:gBlockPageAlignSize
- ldr x0, [x23, #:got_lo12:gNandMaxChip]
- strb wzr, [x0]
- adrp x0, :got:gNandParaInfo
- ldr x0, [x0, #:got_lo12:gNandParaInfo]
- ldrh w0, [x0,10]
- cmp w0, 256
- bls .L702
- ldr x0, [x22, #:got_lo12:gBlockPageAlignSize]
+ strb wzr, [x1,2020]
+ adrp x1, .LANCHOR1+482
+ add x0, x21, :lo12:.LANCHOR0
+ ldrh w1, [x1,#:lo12:.LANCHOR1+482]
+ strb wzr, [x0,1845]
+ cmp w1, 256
+ bls .L746
mov w1, 512
- b .L718
-.L702:
- cmp w0, 128
- bhi .L704
- ldr x1, [x22, #:got_lo12:gBlockPageAlignSize]
- str w0, [x1]
- b .L703
-.L704:
- ldr x0, [x22, #:got_lo12:gBlockPageAlignSize]
+ b .L762
+.L746:
+ cmp w1, 128
+ bls .L762
mov w1, 256
-.L718:
- str w1, [x0]
-.L703:
- adrp x20, :got:DieCsIndex
- mov w1, 0
+.L762:
+ add x19, x21, :lo12:.LANCHOR0
+ str w1, [x0,12]
mov w2, 8
- adrp x21, :got:DieAddrs
- mov x25, 0
- adrp x27, :got:gpNandParaInfo
- ldr x0, [x20, #:got_lo12:DieCsIndex]
- adrp x28, :got:IDByte
+ mov w1, 0
+ add x0, x19, 1848
+ add x25, x19, 708
+ mov x24, 0
+ add x26, x19, 1620
bl ftl_memset
- ldr x0, [x21, #:got_lo12:DieAddrs]
mov w1, 0
mov w2, 32
+ mov x0, x25
bl ftl_memset
- adrp x0, :got:gDieOp
+ add x0, x19, 1652
mov w1, 0
mov w2, 192
- ldr x0, [x0, #:got_lo12:gDieOp]
bl ftl_memset
-.L706:
- ldr x0, [x27, #:got_lo12:gpNandParaInfo]
- adrp x24, :got:gpNandParaInfo
- ldr x1, [x28, #:got_lo12:IDByte]
- adrp x26, :got:IDByte
- ldr x2, [x0]
- add x1, x1, x25, lsl 3
- add x0, x2, 1
- ldrb w2, [x2]
+ ldr x20, [x19,744]
+ add x23, x20, 1
+.L750:
+ ldrb w2, [x20]
+ mov x0, x23
+ add x1, x26, x24, lsl 3
bl FlashMemCmp8
- cbnz w0, .L705
- ldr x2, [x19, #:got_lo12:gNandMaxDie]
- ldr x3, [x21, #:got_lo12:DieAddrs]
- ldrb w1, [x2]
- str w0, [x3,w1,sxtw 2]
+ cbnz w0, .L749
+ ldrb w1, [x19,1845]
+ str w0, [x25,w1,sxtw 2]
add w0, w1, 1
- strb w0, [x2]
- ldr x0, [x20, #:got_lo12:DieCsIndex]
- strb w25, [x0,w1,sxtw]
-.L705:
- add x25, x25, 1
- cmp x25, 4
- bne .L706
- ldr x0, [x19, #:got_lo12:gNandMaxDie]
- ldr x23, [x23, #:got_lo12:gNandMaxChip]
- ldrb w0, [x0]
- strb w0, [x23]
- ldr x0, [x24, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
- ldrb w0, [x0,8]
+ add x1, x19, x1, sxtw
+ strb w0, [x19,1845]
+ strb w24, [x1,1848]
+.L749:
+ add x24, x24, 1
+ cmp x24, 4
+ bne .L750
+ add x19, x21, :lo12:.LANCHOR0
+ add x0, x22, :lo12:.LANCHOR2
+ ldrb w1, [x19,1845]
+ strb w1, [x0,2020]
+ ldrb w0, [x20,8]
cmp w0, 2
- beq .L711
-.L710:
- ldr x24, [x24, #:got_lo12:gpNandParaInfo]
- adrp x1, :got:gTotleBlock
- ldr x19, [x19, #:got_lo12:gNandMaxDie]
- ldr x2, [x24]
- ldrb w0, [x19]
- ldr x1, [x1, #:got_lo12:gTotleBlock]
- ldrb w3, [x2,13]
- ldrh w2, [x2,14]
- mul w0, w0, w3
- mul w0, w0, w2
- strh w0, [x1]
- ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
+ beq .L751
+.L755:
+ add x21, x21, :lo12:.LANCHOR0
+ ldrb w1, [x20,13]
+ add x22, x22, :lo12:.LANCHOR2
+ ldr x27, [sp,80]
ldp x23, x24, [sp,48]
+ ldrb w0, [x21,1845]
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
+ mul w0, w0, w1
+ ldrh w1, [x20,14]
+ ldp x19, x20, [sp,16]
+ mul w0, w0, w1
+ strh w0, [x22,2022]
+ ldp x21, x22, [sp,32]
ldp x29, x30, [sp], 96
ret
-.L711:
- mov x23, 0
-.L707:
- ldr x25, [x24, #:got_lo12:gpNandParaInfo]
- ldr x1, [x26, #:got_lo12:IDByte]
- ldr x2, [x25]
- add x1, x1, x23, lsl 3
- add x0, x2, 1
- ldrb w2, [x2]
+.L751:
+ ldr w26, [x19,12]
+ mov x24, 0
+ add x27, x19, 1620
+ add x25, x19, 708
+.L754:
+ ldrb w2, [x20]
+ mov x0, x23
+ add x1, x27, x24, lsl 3
bl FlashMemCmp8
- cbnz w0, .L708
- ldr x0, [x19, #:got_lo12:gNandMaxDie]
- ldr x3, [x25]
- ldr x1, [x22, #:got_lo12:gBlockPageAlignSize]
- ldrb w4, [x0]
- ldrb w0, [x3,13]
- ldr w1, [x1]
- mov x2, x4
+ cbnz w0, .L752
+ ldrb w1, [x20,13]
+ ldrb w3, [x19,1845]
+ mul w0, w1, w26
+ ldrh w1, [x20,14]
+ mov x2, x3
+ and w1, w1, 65280
mul w1, w0, w1
- ldrh w0, [x3,14]
- and w0, w0, 65280
- mul w0, w1, w0
- ldr x1, [x21, #:got_lo12:DieAddrs]
- str w0, [x1,w4,sxtw 2]
- ldrb w3, [x3,23]
- cbz w3, .L709
- lsl w0, w0, 1
- str w0, [x1,w4,sxtw 2]
-.L709:
- ldr x0, [x19, #:got_lo12:gNandMaxDie]
+ str w1, [x25,w3,sxtw 2]
+ ldrb w0, [x20,23]
+ cbz w0, .L753
+ lsl w1, w1, 1
+ str w1, [x25,w3,sxtw 2]
+.L753:
+ add x0, x19, x3
add w2, w2, 1
- strb w2, [x0]
- ldr x0, [x20, #:got_lo12:DieCsIndex]
- strb w23, [x0,x4]
-.L708:
- add x23, x23, 1
- cmp x23, 4
- bne .L707
- b .L710
+ strb w2, [x19,1845]
+ strb w24, [x0,1848]
+.L752:
+ add x24, x24, 1
+ cmp x24, 4
+ bne .L754
+ b .L755
.size FlashDieInfoInit, .-FlashDieInfoInit
.align 2
.global ReadFlashInfo
str x19, [sp,16]
mov x19, x0
bl ftl_memset
- adrp x2, :got:gpNandParaInfo
- adrp x1, :got:gBlockPageAlignSize
- adrp x4, :got:DieCsIndex
+ adrp x1, .LANCHOR0
mov w5, 1
- ldr x2, [x2, #:got_lo12:gpNandParaInfo]
- ldr x1, [x1, #:got_lo12:gBlockPageAlignSize]
- ldr x0, [x2]
- ldrb w3, [x0,9]
- ldr w0, [x1]
- adrp x1, :got:gNandFlashEccBits
- mul w0, w0, w3
+ add x1, x1, :lo12:.LANCHOR0
+ ldr x0, [x1,744]
+ ldrb w2, [x0,9]
+ ldr w0, [x1,12]
+ mul w0, w0, w2
+ ldrb w2, [x1,1944]
+ strb w2, [x19,7]
uxth w0, w0
strh w0, [x19,4]
- ldr x1, [x1, #:got_lo12:gNandFlashEccBits]
- ldrb w1, [x1]
- strb w1, [x19,7]
- ldr x3, [x2]
- ldrb w1, [x3,13]
- mul w0, w1, w0
- ldrh w1, [x3,14]
- mul w0, w0, w1
- ldrb w1, [x3,8]
- mul w0, w0, w1
+ ldr x3, [x1,744]
+ ldrb w2, [x3,13]
+ mul w0, w2, w0
+ ldrh w2, [x3,14]
+ mul w0, w0, w2
+ ldrb w2, [x3,8]
+ mul w0, w0, w2
str w0, [x19]
- ldr x0, [x2]
+ ldr x0, [x1,744]
+ ldrb w4, [x1,1845]
ldrb w0, [x0,9]
strb w0, [x19,6]
mov w0, 32
strb w0, [x19,8]
- ldr x0, [x2]
+ ldr x0, [x1,744]
ldrb w0, [x0,7]
strb w0, [x19,9]
- adrp x0, :got:gNandMaxDie
- strb wzr, [x19,10]
- ldr x0, [x0, #:got_lo12:gNandMaxDie]
- ldrb w3, [x0]
mov x0, 0
-.L720:
- cmp w3, w0, uxtb
- bls .L722
- ldr x1, [x4, #:got_lo12:DieCsIndex]
- ldrb w2, [x19,10]
- ldrb w1, [x0,x1]
+ strb wzr, [x19,10]
+.L764:
+ cmp w4, w0, uxtb
+ bls .L766
+ add x2, x1, 1848
+ ldrb w3, [x19,10]
+ ldrb w2, [x0,x2]
add x0, x0, 1
- lsl w1, w5, w1
- orr w1, w1, w2
- strb w1, [x19,10]
- b .L720
-.L722:
+ lsl w2, w5, w2
+ orr w2, w2, w3
+ strb w2, [x19,10]
+ b .L764
+.L766:
ldr x19, [sp,16]
ldp x29, x30, [sp], 32
ret
.global FtlMemInit
.type FtlMemInit, %function
FtlMemInit:
- adrp x0, :got:g_SlcPartLbaEndSector
+ stp x29, x30, [sp, -80]!
mov w1, 65535
- stp x29, x30, [sp, -224]!
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:g_SlcPartLbaEndSector]
+ stp x21, x22, [sp,32]
+ adrp x21, .LANCHOR2
+ adrp x22, .LANCHOR0
+ add x0, x21, :lo12:.LANCHOR2
+ add x3, x22, :lo12:.LANCHOR0
stp x19, x20, [sp,16]
stp x23, x24, [sp,48]
- stp x21, x22, [sp,32]
- stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- str wzr, [x0]
- adrp x0, :got:g_all_blk_used_slc_mode
- adrp x20, :got:c_ftl_nand_planes_num
- ldr x0, [x0, #:got_lo12:g_all_blk_used_slc_mode]
- str wzr, [x0]
- adrp x0, :got:g_GlobalSysVersion
- ldr x0, [x0, #:got_lo12:g_GlobalSysVersion]
- str wzr, [x0]
- adrp x0, :got:g_GlobalDataVersion
- ldr x0, [x0, #:got_lo12:g_GlobalDataVersion]
- str wzr, [x0]
- adrp x0, :got:g_totle_gc_page_count
- ldr x0, [x0, #:got_lo12:g_totle_gc_page_count]
- str wzr, [x0]
- adrp x0, :got:g_totle_write_page_count
- ldr x0, [x0, #:got_lo12:g_totle_write_page_count]
- str wzr, [x0]
- adrp x0, :got:g_totle_discard_page_count
- ldr x0, [x0, #:got_lo12:g_totle_discard_page_count]
- str wzr, [x0]
- adrp x0, :got:g_totle_cache_write_count
- ldr x0, [x0, #:got_lo12:g_totle_cache_write_count]
- str wzr, [x0]
- adrp x0, :got:g_totle_l2p_write_count
- ldr x0, [x0, #:got_lo12:g_totle_l2p_write_count]
- str wzr, [x0]
- adrp x0, :got:g_totle_read_page_count
- ldr x0, [x0, #:got_lo12:g_totle_read_page_count]
- str wzr, [x0]
- adrp x0, :got:g_totle_mlc_erase_count
- ldr x0, [x0, #:got_lo12:g_totle_mlc_erase_count]
- str wzr, [x0]
- adrp x0, :got:g_totle_slc_erase_count
- ldr x0, [x0, #:got_lo12:g_totle_slc_erase_count]
- str wzr, [x0]
- adrp x0, :got:g_totle_sys_slc_erase_count
- ldr x0, [x0, #:got_lo12:g_totle_sys_slc_erase_count]
- str wzr, [x0]
- adrp x0, :got:g_max_erase_count
- ldr x0, [x0, #:got_lo12:g_max_erase_count]
- str wzr, [x0]
- adrp x0, :got:g_min_erase_count
- ldr x0, [x0, #:got_lo12:g_min_erase_count]
- str wzr, [x0]
- adrp x0, :got:g_in_gc_progress
- ldr x0, [x0, #:got_lo12:g_in_gc_progress]
- str wzr, [x0]
- adrp x0, :got:g_in_swl_replace
- ldr x0, [x0, #:got_lo12:g_in_swl_replace]
- str wzr, [x0]
- adrp x0, :got:g_gc_head_data_block
- ldr x0, [x0, #:got_lo12:g_gc_head_data_block]
- str w1, [x0]
- adrp x0, :got:g_gc_head_data_block_count
+ str x25, [sp,64]
+ str w1, [x0,2032]
mov w1, -1
- ldr x0, [x0, #:got_lo12:g_gc_head_data_block_count]
- str wzr, [x0]
- adrp x0, :got:g_gc_skip_write_count
- ldr x0, [x0, #:got_lo12:g_gc_skip_write_count]
- str wzr, [x0]
- adrp x0, :got:g_cur_erase_blk
- ldr x0, [x0, #:got_lo12:g_cur_erase_blk]
- str wzr, [x0]
- adrp x0, :got:g_gc_next_blk
- ldr x0, [x0, #:got_lo12:g_gc_next_blk]
- strh w1, [x0]
- adrp x0, :got:g_gc_next_blk_1
- ldr x0, [x0, #:got_lo12:g_gc_next_blk_1]
- strh w1, [x0]
- adrp x0, :got:g_gc_free_blk_threshold
+ str wzr, [x0,2024]
+ strh w1, [x0,952]
+ strh w1, [x0,954]
mov w1, 32
- ldr x0, [x0, #:got_lo12:g_gc_free_blk_threshold]
- strh w1, [x0]
- adrp x0, :got:g_gc_merge_free_blk_threshold
+ str wzr, [x0,344]
+ str wzr, [x0,196]
+ str wzr, [x0,200]
+ str wzr, [x0,184]
+ str wzr, [x0,172]
+ str wzr, [x0,168]
+ str wzr, [x0,176]
+ str wzr, [x0,180]
+ str wzr, [x0,164]
+ str wzr, [x0,204]
+ str wzr, [x0,208]
+ str wzr, [x0,-72]
+ str wzr, [x0,216]
+ str wzr, [x0,220]
+ str wzr, [x0,2028]
+ str wzr, [x0,876]
+ str wzr, [x0,2036]
+ str wzr, [x0,868]
+ str wzr, [x3,2108]
+ strh w1, [x0,864]
mov w1, 128
- ldr x0, [x0, #:got_lo12:g_gc_merge_free_blk_threshold]
- strh w1, [x0]
- adrp x0, :got:g_gc_blk_index
- adrp x1, :got:c_wr_page_buf_num
- mov x23, x1
- ldr x0, [x0, #:got_lo12:g_gc_blk_index]
- strh wzr, [x0]
- adrp x0, :got:g_gc_bad_block_temp_num
- ldr x0, [x0, #:got_lo12:g_gc_bad_block_temp_num]
- strh wzr, [x0]
- adrp x0, :got:g_gc_bad_block_gc_index
- ldr x0, [x0, #:got_lo12:g_gc_bad_block_gc_index]
- strh wzr, [x0]
- adrp x0, :got:c_ftl_nand_sec_pre_page
- ldr x3, [x1, #:got_lo12:c_wr_page_buf_num]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w2, [x0]
- mov w0, 1024
- sdiv w2, w0, w2
- str w2, [x3]
- ldr x0, [x20, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- lsl w0, w0, 2
- cmp w2, w0
- bls .L724
- str w0, [x3]
-.L724:
- adrp x0, :got:g_wr_page_num
- adrp x19, :got:c_ftl_nand_page_pre_super_blk
- mov w21, 56
- adrp x28, :got:req_gc_dst
- adrp x27, :got:p_sys_data_buf
- adrp x26, :got:p_sys_data_buf_1
- ldr x0, [x0, #:got_lo12:g_wr_page_num]
- adrp x25, :got:p_vendor_data_buf
- adrp x24, :got:p_gc_data_buf
- str wzr, [x0]
- ldr x19, [x19, #:got_lo12:c_ftl_nand_page_pre_super_blk]
- ldrh w0, [x19]
+ ldrh w2, [x3,2032]
+ strh w1, [x0,866]
+ mov w1, 1024
+ strh wzr, [x0,872]
+ sdiv w2, w1, w2
+ ldrh w1, [x3,1952]
+ strh wzr, [x0,956]
+ lsl w1, w1, 2
+ strh wzr, [x0,994]
+ str w2, [x0,2040]
+ cmp w2, w1
+ bls .L768
+ str w1, [x0,2040]
+.L768:
+ add x20, x22, :lo12:.LANCHOR0
+ add x19, x21, :lo12:.LANCHOR2
+ mov w24, 56
+ ldrh w0, [x20,2030]
+ str wzr, [x20,2088]
lsl w0, w0, 1
bl ftl_malloc
- adrp x8, :got:p_gc_blk_tbl
- str x8, [x29,96]
- ldr x1, [x8, #:got_lo12:p_gc_blk_tbl]
- str x0, [x1]
+ str x0, [x19,928]
+ ldrh w1, [x20,2030]
mov w0, 12
- ldrh w1, [x19]
mul w0, w1, w0
bl ftl_malloc
- adrp x7, :got:p_gc_page_info
- str x7, [x29,104]
- ldr x1, [x7, #:got_lo12:p_gc_page_info]
- str x0, [x1]
- ldr x20, [x20, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w19, [x20]
- mul w19, w19, w21
- lsl w22, w19, 3
- mov w0, w22
+ ldrh w23, [x20,1952]
+ str x0, [x19,944]
+ mul w23, w23, w24
+ lsl w25, w23, 3
+ mov w0, w25
bl ftl_malloc
- adrp x6, :got:req_read
- str x6, [x29,112]
- ldr x1, [x6, #:got_lo12:req_read]
- str x0, [x1]
- mov w0, w19
+ str x0, [x19,2048]
+ mov w0, w23
bl ftl_malloc
- ldr x1, [x28, #:got_lo12:req_gc_dst]
- str x0, [x1]
- mov w0, w22
+ str x0, [x19,2056]
+ mov w0, w25
bl ftl_malloc
- adrp x5, :got:req_prgm
- str x5, [x29,120]
- ldr x1, [x5, #:got_lo12:req_prgm]
- str x0, [x1]
- mov w0, w19
+ str x0, [x19,2064]
+ mov w0, w23
bl ftl_malloc
- adrp x4, :got:req_erase
- str x4, [x29,128]
- ldr x1, [x4, #:got_lo12:req_erase]
- str x0, [x1]
- mov w0, w19
+ str x0, [x19,-88]
+ mov w0, w23
bl ftl_malloc
- adrp x3, :got:req_gc
- str x3, [x29,136]
- ldr x1, [x3, #:got_lo12:req_gc]
- str x0, [x1]
- ldr x22, [x23, #:got_lo12:c_wr_page_buf_num]
- ldr w0, [x22]
- mul w0, w0, w21
+ str x0, [x19,912]
+ ldr w0, [x19,2040]
+ mul w0, w0, w24
bl ftl_malloc
- adrp x2, :got:req_wr_io
- adrp x12, :got:c_ftl_nand_byte_pre_page
- adrp x9, :got:c_gc_page_buf_num
- ldr x2, [x2, #:got_lo12:req_wr_io]
- str x0, [x2]
- ldrh w0, [x20]
- ldr x12, [x12, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldr x23, [x9, #:got_lo12:c_gc_page_buf_num]
+ str x0, [x20,2096]
+ ldrh w0, [x20,1952]
+ ldrh w23, [x20,2036]
lsl w0, w0, 1
add w0, w0, 1
- str x12, [x29,144]
- ldrh w19, [x12]
- str w0, [x23]
- mov w0, w19
+ str w0, [x19,920]
+ mov w0, w23
bl ftl_malloc
- ldr x2, [x27, #:got_lo12:p_sys_data_buf]
- str x0, [x2]
- mov w0, w19
+ str x0, [x19,-64]
+ mov w0, w23
bl ftl_malloc
- ldr x2, [x26, #:got_lo12:p_sys_data_buf_1]
- str x0, [x2]
- mov w0, w19
+ str x0, [x19,2072]
+ mov w0, w23
bl ftl_malloc
- ldr x2, [x25, #:got_lo12:p_vendor_data_buf]
- str x0, [x2]
- ldr w0, [x23]
- mul w0, w19, w0
+ str x0, [x19,2080]
+ ldr w0, [x19,920]
+ mul w0, w23, w0
bl ftl_malloc
- ldr x2, [x24, #:got_lo12:p_gc_data_buf]
- str x0, [x2]
- ldr w0, [x22]
- mul w0, w19, w0
+ str x0, [x19,896]
+ ldr w0, [x19,2040]
+ mul w0, w23, w0
bl ftl_malloc
- adrp x2, :got:p_wr_io_data_buf
- ldr x2, [x2, #:got_lo12:p_wr_io_data_buf]
- str x0, [x2]
- mov w0, w19
+ str x0, [x19,2088]
+ mov w0, w23
bl ftl_malloc
- adrp x1, :got:p_io_data_buf_0
- ldr x2, [x1, #:got_lo12:p_io_data_buf_0]
- str x0, [x2]
- mov w0, w19
+ str x0, [x19,2096]
+ mov w0, w23
bl ftl_malloc
- adrp x1, :got:p_io_data_buf_1
- ldr x2, [x1, #:got_lo12:p_io_data_buf_1]
- str x0, [x2]
+ str x0, [x19,2104]
+ ldr w1, [x19,920]
mov w0, 24
- ldr w2, [x23]
- mul w0, w2, w0
+ mul w0, w1, w0
bl ftl_malloc
- ldrh w19, [x20]
- adrp x1, :got:gp_gc_page_buf_info
- ldr x2, [x1, #:got_lo12:gp_gc_page_buf_info]
- str x0, [x2]
- adrp x2, :got:c_ftl_nand_byte_pre_oob
- ldr x21, [x2, #:got_lo12:c_ftl_nand_byte_pre_oob]
- ldrh w0, [x21]
- mul w19, w0, w19
- mov w0, w19
+ ldrh w23, [x20,1952]
+ str x0, [x19,888]
+ ldrh w0, [x20,2038]
+ mul w23, w0, w23
+ mov w0, w23
bl ftl_malloc
- adrp x1, :got:p_sys_spare_buf
- ldr x10, [x1, #:got_lo12:p_sys_spare_buf]
- str x0, [x10]
- lsl w0, w19, 3
+ str x0, [x19,2112]
+ lsl w0, w23, 3
bl ftl_malloc
- adrp x1, :got:p_io_spare_buf
- ldr x10, [x1, #:got_lo12:p_io_spare_buf]
- str x0, [x10]
- ldrh w10, [x21]
- ldr w0, [x23]
- adrp x23, :got:p_io_data_buf_0
- mul w0, w10, w0
+ str x0, [x19,2120]
+ ldrh w1, [x20,2038]
+ ldr w0, [x19,920]
+ mul w0, w1, w0
bl ftl_malloc
- adrp x15, :got:p_gc_spare_buf
- ldrh w2, [x21]
- str x15, [x29,152]
- adrp x21, :got:gp_gc_page_buf_info
- ldr x9, [x15, #:got_lo12:p_gc_spare_buf]
- str x0, [x9]
- ldr w0, [x22]
- adrp x22, :got:p_io_data_buf_1
- mul w0, w2, w0
+ str x0, [x19,904]
+ ldrh w1, [x20,2038]
+ ldr w0, [x19,2040]
+ mul w0, w1, w0
bl ftl_malloc
- adrp x1, :got:p_wr_io_spare_buf
- adrp x13, :got:c_ftl_nand_blk_pre_plane
- ldr x1, [x1, #:got_lo12:p_wr_io_spare_buf]
- str x0, [x1]
- adrp x1, :got:g_ect_tbl_info_size
- ldr x19, [x13, #:got_lo12:c_ftl_nand_blk_pre_plane]
- ldr x20, [x1, #:got_lo12:g_ect_tbl_info_size]
- ldrh w0, [x19]
+ str x0, [x19,2128]
+ ldrh w0, [x20,1962]
lsl w0, w0, 1
- strh w0, [x20]
+ strh w0, [x19,2136]
and w0, w0, 65534
bl ftl_malloc
- adrp x2, :got:p_swl_mul_table
- ldr x2, [x2, #:got_lo12:p_swl_mul_table]
- str x0, [x2]
- ldrh w0, [x20]
+ str x0, [x19,2144]
+ ldrh w0, [x19,2136]
add x0, x0, 547
lsr x0, x0, 9
- strh w0, [x20]
+ strh w0, [x19,2136]
lsl w0, w0, 9
bl ftl_malloc
- adrp x1, :got:gp_ect_tbl_info
- adrp x14, :got:p_erase_count_table
- str x14, [x29,160]
- ldr x1, [x1, #:got_lo12:gp_ect_tbl_info]
- str x0, [x1]
+ ldrh w23, [x20,1962]
+ str x0, [x19,2152]
add x0, x0, 32
- ldr x1, [x14, #:got_lo12:p_erase_count_table]
- str x0, [x1]
- ldrh w1, [x19]
- lsl w20, w1, 1
- mov w0, w20
+ lsl w23, w23, 1
+ str x0, [x19,-80]
+ mov w0, w23
bl ftl_malloc
- adrp x2, :got:p_valid_page_count_check_table
- ldr x2, [x2, #:got_lo12:p_valid_page_count_check_table]
- str x0, [x2]
- mov w0, w20
+ str x0, [x19,2160]
+ mov w0, w23
bl ftl_malloc
- adrp x9, :got:p_valid_page_count_table
- adrp x16, :got:c_ftl_nand_max_map_blks
- str x9, [x29,168]
- ldr x1, [x9, #:got_lo12:p_valid_page_count_table]
- str x0, [x1]
- ldr x16, [x16, #:got_lo12:c_ftl_nand_max_map_blks]
- str x16, [x29,208]
- ldr w1, [x16]
- lsl w20, w1, 1
- mov w0, w20
+ ldr w23, [x20,2056]
+ str x0, [x19,-40]
+ lsl w23, w23, 1
+ mov w0, w23
bl ftl_malloc
- adrp x11, :got:p_map_block_table
- str x11, [x29,176]
- ldr x2, [x11, #:got_lo12:p_map_block_table]
- str x0, [x2]
- mov w0, w20
+ str x0, [x19,2168]
+ mov w0, w23
bl ftl_malloc
- adrp x10, :got:p_map_block_valid_page_count
- str x10, [x29,184]
- ldr x1, [x10, #:got_lo12:p_map_block_valid_page_count]
- str x0, [x1]
- adrp x1, :got:c_ftl_nand_max_vendor_blks
- ldr x20, [x1, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldrh w0, [x20]
+ str x0, [x19,2176]
+ ldrh w0, [x20,1962]
+ lsr w0, w0, 3
+ add w0, w0, 4
+ bl ftl_malloc
+ str x0, [x22,#:lo12:.LANCHOR0]
+ ldrh w0, [x20,2048]
lsl w0, w0, 1
bl ftl_malloc
- adrp x2, :got:p_vendor_block_table
- ldr x2, [x2, #:got_lo12:p_vendor_block_table]
- str x0, [x2]
- ldrh w0, [x20]
+ str x0, [x20,2080]
+ ldrh w0, [x20,2048]
lsl w0, w0, 1
bl ftl_malloc
- adrp x2, :got:p_vendor_block_valid_page_count
- ldr x2, [x2, #:got_lo12:p_vendor_block_valid_page_count]
- str x0, [x2]
- ldrh w0, [x20]
- adrp x20, :got:p_sys_spare_buf
+ str x0, [x19,2184]
+ ldrh w0, [x20,2048]
lsl w0, w0, 2
bl ftl_malloc
- adrp x1, :got:p_vendor_block_ver_table
- ldr x1, [x1, #:got_lo12:p_vendor_block_ver_table]
- str x0, [x1]
- adrp x1, :got:c_ftl_nand_vendor_region_num
- ldr x1, [x1, #:got_lo12:c_ftl_nand_vendor_region_num]
- str x1, [x29,216]
- ldrh w0, [x1]
+ str x0, [x19,2192]
+ ldrh w0, [x20,2050]
lsl w0, w0, 2
bl ftl_malloc
- adrp x2, :got:p_vendor_region_ppn_table
- ldr x1, [x29,216]
- ldr x2, [x2, #:got_lo12:p_vendor_region_ppn_table]
- str x0, [x2]
- ldrh w2, [x1]
+ str x0, [x19,2200]
+ ldrh w2, [x20,2050]
mov w1, 0
lsl w2, w2, 2
bl ftl_memset
- adrp x0, :got:c_ftl_nand_map_region_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_map_region_num]
- ldrh w0, [x0]
+ ldrh w0, [x20,2064]
lsl w0, w0, 2
bl ftl_malloc
- adrp x2, :got:p_map_region_ppn_table
- ldr x16, [x29,208]
- str x2, [x29,192]
- ldr x1, [x2, #:got_lo12:p_map_region_ppn_table]
- str x0, [x1]
- ldr w0, [x16]
+ str x0, [x19,2208]
+ ldr w0, [x20,2056]
lsl w0, w0, 2
bl ftl_malloc
- adrp x1, :got:p_map_block_ver_table
- str x1, [x29,200]
- ldr x16, [x1, #:got_lo12:p_map_block_ver_table]
- str x0, [x16]
- adrp x16, :got:c_ftl_nand_l2pmap_ram_region_num
- ldr x16, [x16, #:got_lo12:c_ftl_nand_l2pmap_ram_region_num]
- str x16, [x29,216]
- ldrh w0, [x16]
+ str x0, [x19,2216]
+ ldrh w0, [x20,2066]
lsl w0, w0, 4
bl ftl_malloc
- adrp x17, :got:p_l2p_ram_map
- ldr x12, [x29,144]
- ldr x16, [x29,216]
- ldr x17, [x17, #:got_lo12:p_l2p_ram_map]
- ldrh w16, [x16]
- str x0, [x17]
- ldrh w0, [x12]
- mul w0, w16, w0
+ str x0, [x19,144]
+ ldrh w1, [x20,2066]
+ ldrh w0, [x20,2036]
+ mul w0, w1, w0
bl ftl_malloc
- adrp x12, :got:p_l2p_map_buf
- ldr x12, [x12, #:got_lo12:p_l2p_map_buf]
- str x0, [x12]
+ str x0, [x19,2224]
+ ldrh w1, [x20,1962]
mov w0, 6
- ldrh w12, [x19]
- adrp x19, :got:p_io_spare_buf
- mul w0, w12, w0
+ mul w0, w1, w0
bl ftl_malloc
- adrp x12, :got:p_data_block_list_table
- adrp x16, :got:c_ftl_nand_bbm_buf_size
- adrp x17, :got:c_ftl_nand_die_num
- ldr x12, [x12, #:got_lo12:p_data_block_list_table]
- str x0, [x12]
- adrp x0, :got:c_ftl_nand_blks_per_die
- ldr x16, [x16, #:got_lo12:c_ftl_nand_bbm_buf_size]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_blks_per_die]
- str x16, [x29,208]
- ldrh w0, [x0]
+ str x0, [x19,-56]
+ ldrh w0, [x20,2022]
+ ldrh w1, [x20,1974]
add w0, w0, 31
asr w0, w0, 5
- strh w0, [x16]
- ldr x17, [x17, #:got_lo12:c_ftl_nand_die_num]
- str x17, [x29,216]
- ldrh w12, [x17]
- mul w0, w0, w12
+ strh w0, [x19,2232]
+ mul w0, w0, w1
lsl w0, w0, 2
bl ftl_malloc
- adrp x13, :got:gBbtInfo
- ldr x17, [x29,216]
- ldr x16, [x29,208]
- ldr x15, [x29,152]
- ldr x12, [x13, #:got_lo12:gBbtInfo]
- ldrh w18, [x17]
- ldrh w17, [x16]
- ldr x14, [x29,160]
- ldr x8, [x29,96]
- mov w16, w17
- ldr x7, [x29,104]
- ldr x6, [x29,112]
- ldr x5, [x29,120]
- ldr x4, [x29,128]
- ldr x3, [x29,136]
- ldr x9, [x29,168]
- ldr x11, [x29,176]
- ldr x10, [x29,184]
- ldr x2, [x29,192]
- ldr x1, [x29,200]
- str x0, [x12,32]
+ str x0, [x20,2144]
+ add x1, x20, 2112
+ ldrh w4, [x19,2232]
+ ldrh w5, [x20,1974]
mov w0, 1
- str x15, [x29,216]
- mov x15, x13
- str x14, [x29,208]
-.L725:
- cmp w0, w18
- add x12, x12, 8
- bcs .L727
- ldr x14, [x15, #:got_lo12:gBbtInfo]
+ mov w2, w4
+.L769:
+ cmp w0, w5
+ add x1, x1, 8
+ bcs .L869
+ ldr x3, [x20,2144]
add w0, w0, 1
- ldr x14, [x14,32]
- add x14, x14, x16, uxtw 2
- add w16, w16, w17
- str x14, [x12,32]
- b .L725
-.L727:
+ add x3, x3, x2, uxtw 2
+ add w2, w2, w4
+ str x3, [x1,32]
+ b .L769
+.L869:
+ add x1, x22, :lo12:.LANCHOR0
+.L771:
cmp w0, 8
- beq .L825
- ldr x12, [x13, #:got_lo12:gBbtInfo]
- add x12, x12, x0, uxtw 3
+ beq .L870
+ add x2, x1, x0, uxtw 3
add w0, w0, 1
- str xzr, [x12,32]
- b .L727
-.L825:
- ldr x11, [x11, #:got_lo12:p_map_block_table]
- ldr x0, [x11]
- cbnz x0, .L729
-.L731:
- adrp x0, .LC78
- adrp x1, .LANCHOR1
- add x0, x0, :lo12:.LC78
- add x1, x1, :lo12:.LANCHOR1
+ str xzr, [x2,2144]
+ b .L771
+.L870:
+ add x0, x21, :lo12:.LANCHOR2
+ ldr x1, [x0,2168]
+ cbnz x1, .L773
+.L775:
+ adrp x0, .LC79
+ adrp x1, .LANCHOR3
+ add x0, x0, :lo12:.LC79
+ add x1, x1, :lo12:.LANCHOR3
bl printk
mov w0, -1
- b .L730
-.L729:
- ldr x10, [x10, #:got_lo12:p_map_block_valid_page_count]
- ldr x0, [x10]
- cbz x0, .L731
- ldr x2, [x2, #:got_lo12:p_map_region_ppn_table]
- ldr x0, [x2]
- cbz x0, .L731
- ldr x1, [x1, #:got_lo12:p_map_block_ver_table]
- ldr x0, [x1]
- cbz x0, .L731
- adrp x0, :got:p_l2p_ram_map
- ldr x0, [x0, #:got_lo12:p_l2p_ram_map]
- ldr x0, [x0]
- cbz x0, .L731
- adrp x0, :got:p_l2p_map_buf
- ldr x0, [x0, #:got_lo12:p_l2p_map_buf]
- ldr x0, [x0]
- cbz x0, .L731
- adrp x0, :got:p_data_block_list_table
- ldr x0, [x0, #:got_lo12:p_data_block_list_table]
- ldr x0, [x0]
- cbz x0, .L731
- adrp x0, :got:gBbtInfo
- ldr x0, [x0, #:got_lo12:gBbtInfo]
- ldr x0, [x0,32]
- cbz x0, .L731
- ldr x9, [x9, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x9]
- cbz x0, .L731
- ldr x8, [x8, #:got_lo12:p_gc_blk_tbl]
- ldr x0, [x8]
- cbz x0, .L731
- ldr x7, [x7, #:got_lo12:p_gc_page_info]
- ldr x0, [x7]
- cbz x0, .L731
- ldr x6, [x6, #:got_lo12:req_read]
- ldr x0, [x6]
- cbz x0, .L731
- ldr x5, [x5, #:got_lo12:req_prgm]
- ldr x0, [x5]
- cbz x0, .L731
- ldr x4, [x4, #:got_lo12:req_erase]
- ldr x0, [x4]
- cbz x0, .L731
- ldr x3, [x3, #:got_lo12:req_gc]
- ldr x0, [x3]
- cbz x0, .L731
- ldr x28, [x28, #:got_lo12:req_gc_dst]
- ldr x0, [x28]
- cbz x0, .L731
- ldr x27, [x27, #:got_lo12:p_sys_data_buf]
- ldr x0, [x27]
- cbz x0, .L731
- ldr x26, [x26, #:got_lo12:p_sys_data_buf_1]
- ldr x0, [x26]
- cbz x0, .L731
- ldr x25, [x25, #:got_lo12:p_vendor_data_buf]
- ldr x0, [x25]
- cbz x0, .L731
- ldr x24, [x24, #:got_lo12:p_gc_data_buf]
- ldr x0, [x24]
- cbz x0, .L731
- ldr x23, [x23, #:got_lo12:p_io_data_buf_0]
- ldr x0, [x23]
- cbz x0, .L731
- ldr x22, [x22, #:got_lo12:p_io_data_buf_1]
- ldr x0, [x22]
- cbz x0, .L731
- ldr x21, [x21, #:got_lo12:gp_gc_page_buf_info]
- ldr x0, [x21]
- cbz x0, .L731
- ldr x20, [x20, #:got_lo12:p_sys_spare_buf]
- ldr x0, [x20]
- cbz x0, .L731
- ldr x19, [x19, #:got_lo12:p_io_spare_buf]
- ldr x0, [x19]
- cbz x0, .L731
- ldr x0, [x29,216]
- ldr x15, [x0, #:got_lo12:p_gc_spare_buf]
- ldr x0, [x15]
- cbz x0, .L731
- ldr x0, [x29,208]
- ldr x14, [x0, #:got_lo12:p_erase_count_table]
- ldr x0, [x14]
- cbz x0, .L731
- adrp x0, :got:p_swl_mul_table
- ldr x0, [x0, #:got_lo12:p_swl_mul_table]
- ldr x0, [x0]
- cbz x0, .L731
- adrp x0, :got:p_vendor_block_table
- ldr x0, [x0, #:got_lo12:p_vendor_block_table]
- ldr x0, [x0]
- cbz x0, .L731
- adrp x0, :got:p_vendor_block_valid_page_count
- ldr x0, [x0, #:got_lo12:p_vendor_block_valid_page_count]
- ldr x0, [x0]
- cbz x0, .L731
- adrp x0, :got:p_vendor_block_ver_table
- ldr x0, [x0, #:got_lo12:p_vendor_block_ver_table]
- ldr x0, [x0]
- cbz x0, .L731
- adrp x0, :got:p_vendor_region_ppn_table
- ldr x0, [x0, #:got_lo12:p_vendor_region_ppn_table]
- ldr x0, [x0]
- cbz x0, .L731
+ b .L774
+.L773:
+ ldr x1, [x0,2176]
+ cbz x1, .L775
+ ldr x1, [x0,2208]
+ cbz x1, .L775
+ ldr x1, [x0,2216]
+ cbz x1, .L775
+ ldr x1, [x0,144]
+ cbz x1, .L775
+ ldr x1, [x0,2224]
+ cbz x1, .L775
+ ldr x1, [x0,-56]
+ cbz x1, .L775
+ add x22, x22, :lo12:.LANCHOR0
+ ldr x1, [x22,2144]
+ cbz x1, .L775
+ ldr x0, [x0,-40]
+ cbz x0, .L775
+ add x0, x21, :lo12:.LANCHOR2
+ ldr x1, [x0,928]
+ cbz x1, .L775
+ ldr x1, [x0,944]
+ cbz x1, .L775
+ ldr x1, [x0,2048]
+ cbz x1, .L775
+ ldr x1, [x0,2064]
+ cbz x1, .L775
+ ldr x1, [x0,-88]
+ cbz x1, .L775
+ ldr x1, [x0,912]
+ cbz x1, .L775
+ ldr x1, [x0,2056]
+ cbz x1, .L775
+ ldr x1, [x0,-64]
+ cbz x1, .L775
+ ldr x1, [x0,2072]
+ cbz x1, .L775
+ ldr x0, [x0,2080]
+ cbz x0, .L775
+ add x0, x21, :lo12:.LANCHOR2
+ ldr x1, [x0,896]
+ cbz x1, .L775
+ ldr x1, [x0,2096]
+ cbz x1, .L775
+ ldr x1, [x0,2104]
+ cbz x1, .L775
+ ldr x1, [x0,888]
+ cbz x1, .L775
+ ldr x1, [x0,2112]
+ cbz x1, .L775
+ ldr x1, [x0,2120]
+ cbz x1, .L775
+ ldr x1, [x0,904]
+ cbz x1, .L775
+ ldr x1, [x0,-80]
+ cbz x1, .L775
+ ldr x0, [x0,2144]
+ cbz x0, .L775
+ adrp x0, .LANCHOR0+2080
+ ldr x0, [x0,#:lo12:.LANCHOR0+2080]
+ cbz x0, .L775
+ adrp x0, .LANCHOR2
+ add x0, x0, :lo12:.LANCHOR2
+ ldr x1, [x0,2184]
+ cbz x1, .L775
+ ldr x1, [x0,2192]
+ cbz x1, .L775
+ ldr x0, [x0,2200]
+ cbz x0, .L775
mov w0, 0
-.L730:
+.L774:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 224
+ ldr x25, [sp,64]
+ ldp x29, x30, [sp], 80
ret
.size FtlMemInit, .-FtlMemInit
.align 2
stp x29, x30, [sp, -32]!
add x29, sp, 0
stp x19, x20, [sp,16]
- mov x19, x1
- adrp x1, :got:c_ftl_nand_bbm_buf_size
mov x20, x0
- mov x0, x19
- ldr x1, [x1, #:got_lo12:c_ftl_nand_bbm_buf_size]
- ldrh w2, [x1]
+ adrp x0, .LANCHOR2+2232
+ mov x19, x1
+ ldrh w2, [x0,#:lo12:.LANCHOR2+2232]
+ mov x0, x1
mov w1, 0
lsl w2, w2, 2
bl ftl_memset
mov x3, 0
mov w0, 65535
mov w5, 1
-.L828:
+.L873:
ldrh w2, [x20,x3]
cmp w2, w0
- beq .L826
+ beq .L871
ubfx x4, x2, 5, 11
add x3, x3, 2
lsl x4, x4, 2
ldr w1, [x19,x4]
orr w2, w1, w2
str w2, [x19,x4]
- bne .L828
-.L826:
+ bne .L873
+.L871:
ldp x19, x20, [sp,16]
ldp x29, x30, [sp], 32
ret
.global FtlBbtMemInit
.type FtlBbtMemInit, %function
FtlBbtMemInit:
- adrp x0, :got:gBbtInfo
+ adrp x0, .LANCHOR0
mov w1, -1
stp x29, x30, [sp, -16]!
+ add x0, x0, :lo12:.LANCHOR0
mov w2, 16
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:gBbtInfo]
- add x0, x0, 12
+ add x0, x0, 2124
strh w1, [x0,-12]
mov w1, 255
strh wzr, [x0,-6]
.global FtlFreeSysBlkQueueInit
.type FtlFreeSysBlkQueueInit, %function
FtlFreeSysBlkQueueInit:
- adrp x1, :got:gSysFreeQueue
+ adrp x1, .LANCHOR0
mov w2, 2048
stp x29, x30, [sp, -16]!
+ add x1, x1, :lo12:.LANCHOR0
add x29, sp, 0
- ldr x1, [x1, #:got_lo12:gSysFreeQueue]
- strh wzr, [x1,2]
- strh wzr, [x1,4]
- strh wzr, [x1,6]
- strh w0, [x1],8
- mov x0, x1
+ strh w0, [x1,2208]
+ add x0, x1, 2216
+ strh wzr, [x1,2210]
+ strh wzr, [x1,2212]
+ strh wzr, [x1,2214]
mov w1, 0
bl ftl_memset
mov w0, 0
mov x0, x21
bl ftl_memset
mov w0, 0
-.L834:
+.L879:
ldrh w1, [x19,6]
cmp w1, w0
- bls .L847
+ bls .L892
ubfiz x1, x0, 2, 16
ldr w2, [x20,x1]
mov w1, 0
ubfx x2, x2, 10, 16
-.L835:
+.L880:
ldrh w3, [x19,10]
cmp w3, w1
- bls .L848
+ bls .L893
ubfiz x3, x1, 1, 16
ldrh w4, [x25,x3]
cmp w4, w2
- bne .L836
+ bne .L881
ldrh w4, [x21,x3]
add w4, w4, 1
strh w4, [x21,x3]
-.L836:
+.L881:
add w1, w1, 1
uxth w1, w1
- b .L835
-.L848:
+ b .L880
+.L893:
add w0, w0, 1
uxth w0, w0
- b .L834
-.L847:
+ b .L879
+.L892:
mov w24, 0
ldrh w26, [x21]
mov w20, w24
- adrp x27, :got:c_ftl_nand_page_pre_slc_blk
-.L839:
+ adrp x27, .LANCHOR0
+.L884:
ldrh w0, [x19,10]
cmp w0, w20
- bls .L849
+ bls .L894
ldrh w0, [x19]
uxtw x22, w20
cmp w0, w20
- bne .L840
- ldr x0, [x27, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
+ bne .L885
+ add x0, x27, :lo12:.LANCHOR0
ldrh w1, [x19,2]
- ldrh w0, [x0]
+ ldrh w0, [x0,2028]
cmp w1, w0
- bcs .L840
+ bcs .L885
strh w0, [x21,x22,lsl 1]
-.L840:
+.L885:
lsl x22, x22, 1
ldrh w23, [x21,x22]
cmp w26, w23
- bls .L841
+ bls .L886
mov w24, w20
mov w26, w23
-.L841:
- cbnz w23, .L842
+.L886:
+ cbnz w23, .L887
ldrh w0, [x25,x22]
- cbz w0, .L842
+ cbz w0, .L887
mov w1, 1
bl FtlFreeSysBlkQueueIn
strh w23, [x25,x22]
ldrh w0, [x19,8]
sub w0, w0, #1
strh w0, [x19,8]
-.L842:
+.L887:
add w20, w20, 1
uxth w20, w20
- b .L839
-.L849:
+ b .L884
+.L894:
mov w0, w24
ldr x27, [sp,80]
ldp x19, x20, [sp,16]
.global FtlL2PDataInit
.type FtlL2PDataInit, %function
FtlL2PDataInit:
- stp x29, x30, [sp, -64]!
+ stp x29, x30, [sp, -48]!
+ mov w1, 0
add x29, sp, 0
- stp x21, x22, [sp,32]
- adrp x22, :got:c_ftl_nand_max_map_blks
- str x23, [sp,48]
- adrp x23, :got:p_map_block_valid_page_count
- adrp x21, :got:c_ftl_nand_byte_pre_page
stp x19, x20, [sp,16]
- ldr x1, [x22, #:got_lo12:c_ftl_nand_max_map_blks]
- adrp x19, :got:c_ftl_nand_l2pmap_ram_region_num
- ldr x0, [x23, #:got_lo12:p_map_block_valid_page_count]
- adrp x20, :got:p_l2p_map_buf
- ldr w2, [x1]
- mov w1, 0
- ldr x0, [x0]
+ adrp x20, .LANCHOR0
+ adrp x19, .LANCHOR2
+ stp x21, x22, [sp,32]
+ add x21, x20, :lo12:.LANCHOR0
+ add x22, x19, :lo12:.LANCHOR2
+ ldr w2, [x21,2056]
+ ldr x0, [x22,2176]
lsl w2, w2, 1
bl ftl_memset
- ldr x1, [x21, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldr x0, [x20, #:got_lo12:p_l2p_map_buf]
- ldrh w3, [x1]
- ldr x1, [x19, #:got_lo12:c_ftl_nand_l2pmap_ram_region_num]
- ldr x0, [x0]
- ldrh w2, [x1]
+ ldrh w3, [x21,2036]
mov w1, 255
+ ldrh w2, [x21,2066]
+ ldr x0, [x22,2224]
mul w2, w3, w2
bl ftl_memset
mov w1, 0
- mov x3, x23
- adrp x5, :got:p_l2p_ram_map
- mov w6, -1
-.L851:
- ldr x0, [x19, #:got_lo12:c_ftl_nand_l2pmap_ram_region_num]
- ldrh w0, [x0]
+ mov w5, -1
+.L896:
+ add x3, x20, :lo12:.LANCHOR0
+ ldrh w0, [x3,2066]
cmp w0, w1
- bls .L853
- ldr x2, [x5, #:got_lo12:p_l2p_ram_map]
+ bls .L898
+ add x4, x19, :lo12:.LANCHOR2
ubfiz x0, x1, 4, 16
- ldr x4, [x2]
- add x4, x4, x0
- str wzr, [x4,4]
- ldr x4, [x2]
- strh w6, [x4,x0]
- ldr x2, [x2]
- ldr x4, [x20, #:got_lo12:p_l2p_map_buf]
+ ldr x2, [x4,144]
add x2, x2, x0
- ldr x0, [x21, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldr x4, [x4]
- ldrh w0, [x0]
+ str wzr, [x2,4]
+ ldr x2, [x4,144]
+ strh w5, [x2,x0]
+ ldr x2, [x4,144]
+ add x2, x2, x0
+ ldrh w0, [x3,2036]
+ ldr x3, [x4,2224]
mul w0, w0, w1
+ add w1, w1, 1
sxtw x0, w0
+ uxth w1, w1
and x0, x0, -4
- add x0, x4, x0
+ add x0, x3, x0
str x0, [x2,8]
- add w0, w1, 1
- uxth w1, w0
- b .L851
-.L853:
- adrp x0, :got:gL2pMapInfo
+ b .L896
+.L898:
+ add x0, x19, :lo12:.LANCHOR2
mov w2, -1
- ldr x0, [x0, #:got_lo12:gL2pMapInfo]
- strh w2, [x0,2]
- strh w2, [x0]
- ldr x1, [x22, #:got_lo12:c_ftl_nand_max_map_blks]
- ldr w1, [x1]
- strh w1, [x0,10]
- mov w1, -3902
- strh w1, [x0,4]
- adrp x1, :got:g_totle_map_block
- ldr x1, [x1, #:got_lo12:g_totle_map_block]
- ldrh w1, [x1]
- strh w1, [x0,8]
- adrp x1, :got:c_ftl_nand_map_region_num
- ldr x1, [x1, #:got_lo12:c_ftl_nand_map_region_num]
- ldrh w1, [x1]
- strh w1, [x0,6]
- adrp x1, :got:p_map_block_table
- ldr x1, [x1, #:got_lo12:p_map_block_table]
- ldr x1, [x1]
- str x1, [x0,16]
- adrp x1, :got:p_map_block_ver_table
- ldr x1, [x1, #:got_lo12:p_map_block_ver_table]
- ldr x1, [x1]
- str x1, [x0,24]
- ldr x1, [x3, #:got_lo12:p_map_block_valid_page_count]
- ldr x1, [x1]
- str x1, [x0,32]
- adrp x1, :got:p_map_region_ppn_table
- ldr x1, [x1, #:got_lo12:p_map_region_ppn_table]
- ldr x1, [x1]
- str x1, [x0,40]
+ add x1, x0, 2240
+ strh w2, [x0,2242]
+ strh w2, [x0,2240]
+ ldr w2, [x3,2056]
+ strh w2, [x0,2250]
+ mov w2, -3902
+ strh w2, [x0,2244]
+ ldrh w2, [x0,2304]
+ strh w2, [x0,2248]
+ ldrh w2, [x3,2064]
+ strh w2, [x0,2246]
+ ldr x2, [x0,2168]
+ str x2, [x0,2256]
+ ldr x2, [x0,2216]
+ str x2, [x0,2264]
+ ldr x2, [x0,2176]
+ str x2, [x0,2272]
+ ldr x0, [x0,2208]
+ str x0, [x1,40]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
- ldr x23, [sp,48]
- ldp x29, x30, [sp], 64
+ ldp x29, x30, [sp], 48
ret
.size FtlL2PDataInit, .-FtlL2PDataInit
.align 2
.global FtlVariablesInit
.type FtlVariablesInit, %function
FtlVariablesInit:
- adrp x0, :got:g_req_cache
- mov w1, -1
stp x29, x30, [sp, -32]!
- add x29, sp, 0
- ldr x0, [x0, #:got_lo12:g_req_cache]
- str x19, [sp,16]
- adrp x19, :got:c_ftl_nand_blk_pre_plane
- str xzr, [x0]
- adrp x0, :got:g_tmp_data_superblock_id
- ldr x0, [x0, #:got_lo12:g_tmp_data_superblock_id]
- strh w1, [x0]
- adrp x0, :got:g_totle_swl_count
- mov w1, -1
- ldr x0, [x0, #:got_lo12:g_totle_swl_count]
- str wzr, [x0]
- adrp x0, :got:ftl_gc_temp_power_lost_recovery_flag
- ldr x0, [x0, #:got_lo12:ftl_gc_temp_power_lost_recovery_flag]
- str wzr, [x0]
- adrp x0, :got:g_recovery_page_min_ver
- ldr x0, [x0, #:got_lo12:g_recovery_page_min_ver]
- str w1, [x0]
- adrp x0, :got:g_inkDie_check_enable
- adrp x1, :got:c_ftl_nand_max_vendor_blks
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- str wzr, [x0]
- adrp x0, :got:g_totle_vendor_block
- ldr x0, [x0, #:got_lo12:g_totle_vendor_block]
- strh wzr, [x0]
- adrp x0, :got:p_vendor_block_table
- ldr x1, [x1, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldr x0, [x0, #:got_lo12:p_vendor_block_table]
- ldrh w2, [x1]
+ mov w0, -1
mov w1, 0
- ldr x0, [x0]
+ add x29, sp, 0
+ stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR2
+ adrp x20, .LANCHOR0
+ add x19, x19, :lo12:.LANCHOR2
+ add x20, x20, :lo12:.LANCHOR0
+ strh w0, [x19,2320]
+ mov w0, -1
+ ldrh w2, [x20,2048]
+ str w0, [x19,2332]
+ ldr x0, [x20,2080]
lsl w2, w2, 1
+ str xzr, [x19,2312]
+ str wzr, [x19,2324]
+ str wzr, [x19,2328]
+ str wzr, [x19,160]
+ strh wzr, [x20,2072]
bl ftl_memset
- ldr x19, [x19, #:got_lo12:c_ftl_nand_blk_pre_plane]
- adrp x0, :got:p_erase_count_table
+ ldrh w2, [x20,1962]
mov w1, 0
- ldrh w2, [x19]
- ldr x0, [x0, #:got_lo12:p_erase_count_table]
+ ldr x0, [x19,-80]
lsl w2, w2, 1
- ldr x0, [x0]
bl ftl_memset
- adrp x0, :got:p_swl_mul_table
- ldrh w2, [x19]
+ ldrh w2, [x20,1962]
mov w1, 0
+ ldr x0, [x19,2144]
lsl w2, w2, 1
- ldr x0, [x0, #:got_lo12:p_swl_mul_table]
- ldr x0, [x0]
bl ftl_memset
- adrp x0, :got:g_sys_save_data
+ add x0, x19, 224
mov w1, 0
mov w2, 48
- ldr x0, [x0, #:got_lo12:g_sys_save_data]
bl ftl_memset
- adrp x0, :got:g_sys_ext_data
mov w1, 0
mov w2, 512
- ldr x0, [x0, #:got_lo12:g_sys_ext_data]
+ add x0, x19, 352
bl ftl_memset
bl FtlGcBufInit
bl FtlL2PDataInit
- ldr x19, [sp,16]
mov w0, 0
+ ldp x19, x20, [sp,16]
ldp x29, x30, [sp], 32
ret
.size FtlVariablesInit, .-FtlVariablesInit
.type SupperBlkListInit, %function
SupperBlkListInit:
stp x29, x30, [sp, -112]!
- adrp x0, :got:c_ftl_nand_blk_pre_plane
- mov w2, 6
+ mov w1, 0
add x29, sp, 0
stp x23, x24, [sp,48]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_blk_pre_plane]
- adrp x23, :got:p_data_block_list_table
+ adrp x24, .LANCHOR0
+ add x0, x24, :lo12:.LANCHOR0
stp x19, x20, [sp,16]
stp x21, x22, [sp,32]
stp x25, x26, [sp,64]
stp x27, x28, [sp,80]
- ldr x1, [x23, #:got_lo12:p_data_block_list_table]
- adrp x21, :got:g_num_data_superblocks
- ldrh w3, [x0]
- adrp x20, :got:g_num_free_superblocks
- mov w24, 0
- adrp x25, :got:c_ftl_nand_planes_num
- ldr x0, [x1]
- mov w1, 0
- mul w2, w3, w2
- mov w22, w24
- mov w19, w24
- adrp x26, :got:p_plane_order_table
- adrp x27, :got:c_ftl_nand_page_pre_blk
+ adrp x22, .LANCHOR2
+ mov w26, 6
+ add x20, x22, :lo12:.LANCHOR2
+ ldrh w2, [x0,1962]
+ mov w25, 0
+ mov x21, x20
+ mov w23, w25
+ mov w19, w25
+ ldr x0, [x20,-56]
+ mul w2, w2, w26
bl ftl_memset
- mov w28, 32768
- adrp x0, :got:p_free_data_block_list_head
- ldr x0, [x0, #:got_lo12:p_free_data_block_list_head]
- str xzr, [x0]
- adrp x0, :got:p_data_block_list_head
- ldr x0, [x0, #:got_lo12:p_data_block_list_head]
- str xzr, [x0]
- adrp x0, :got:p_data_block_list_tail
- ldr x0, [x0, #:got_lo12:p_data_block_list_tail]
- str xzr, [x0]
- ldr x0, [x21, #:got_lo12:g_num_data_superblocks]
- strh wzr, [x0]
- ldr x0, [x20, #:got_lo12:g_num_free_superblocks]
- strh wzr, [x0]
-.L856:
- adrp x0, :got:c_ftl_nand_data_blks_per_plane
- ldr x0, [x0, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w0, [x0]
- cmp w0, w19
- bls .L867
- mov w2, 0
- mov w4, w2
-.L862:
- ldr x0, [x25, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- cmp w0, w4
- bls .L868
- ldr x0, [x26, #:got_lo12:p_plane_order_table]
+ str xzr, [x20,-16]
+ str xzr, [x20,-48]
+ str xzr, [x20,-32]
+ strh wzr, [x20,-24]
+ strh wzr, [x20,-8]
+.L901:
+ add x0, x24, :lo12:.LANCHOR0
+ ldrh w1, [x0,1960]
+ cmp w1, w19
+ bls .L907
+ mov x28, 0
+ ldrh w3, [x0,1952]
+ ldrh w2, [x0,2026]
+ mov w20, w28
+ mov x27, x0
+.L908:
+ cmp w3, w28, uxth
+ bls .L912
+ add x0, x27, 1984
mov w1, w19
str x2, [x29,96]
- str x4, [x29,104]
- ldrb w0, [x0,w4,sxtw]
+ str x3, [x29,104]
+ ldrb w0, [x0,x28]
bl V2P_block
bl FtlBbmIsBadBlock
- ldr x4, [x29,104]
+ ldr x3, [x29,104]
ldr x2, [x29,96]
- cbnz w0, .L857
- ldr x0, [x27, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w0, [x0]
- add w2, w2, w0
- uxth w2, w2
-.L857:
- add w4, w4, 1
- uxth w4, w4
- b .L862
-.L868:
- cbz w2, .L859
- sdiv w2, w28, w2
-.L859:
- ldr x1, [x23, #:got_lo12:p_data_block_list_table]
- mov w0, 6
- umull x0, w19, w0
- ldr x1, [x1]
+ cbnz w0, .L902
+ add w20, w20, w2
+ uxth w20, w20
+.L902:
+ add x28, x28, 1
+ b .L908
+.L912:
+ cbz w20, .L904
+ mov w0, 32768
+ sdiv w20, w0, w20
+.L904:
+ ldr x1, [x21,-56]
+ umull x0, w19, w26
add x0, x1, x0
- strh w2, [x0,4]
- adrp x0, :got:g_active_superblock
- ldr x0, [x0, #:got_lo12:g_active_superblock]
- ldrh w0, [x0]
+ strh w20, [x0,4]
+ ldrh w0, [x21]
cmp w0, w19
- beq .L860
- adrp x0, :got:g_buffer_superblock
- ldr x0, [x0, #:got_lo12:g_buffer_superblock]
- ldrh w0, [x0]
+ beq .L905
+ ldrh w0, [x21,48]
cmp w0, w19
- beq .L860
- adrp x0, :got:g_gc_temp_superblock
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- ldrh w0, [x0]
+ beq .L905
+ ldrh w0, [x21,96]
cmp w0, w19
- beq .L860
- adrp x1, :got:p_valid_page_count_table
+ beq .L905
ubfiz x0, x19, 1, 16
- ldr x1, [x1, #:got_lo12:p_valid_page_count_table]
- ldr x1, [x1]
+ ldr x1, [x21,-40]
ldrh w0, [x1,x0]
- cbnz w0, .L861
- add w3, w24, 1
+ cbnz w0, .L906
+ add w4, w25, 1
mov w0, w19
- uxth w24, w3
+ uxth w25, w4
bl INSERT_FREE_LIST
- b .L860
-.L861:
- add w22, w22, 1
+ b .L905
+.L906:
+ add w23, w23, 1
mov w0, w19
- uxth w22, w22
+ uxth w23, w23
bl INSERT_DATA_LIST
-.L860:
+.L905:
add w19, w19, 1
uxth w19, w19
- b .L856
-.L867:
- ldr x21, [x21, #:got_lo12:g_num_data_superblocks]
+ b .L901
+.L907:
+ add x22, x22, :lo12:.LANCHOR2
mov w0, 0
- strh w22, [x21]
- ldr x20, [x20, #:got_lo12:g_num_free_superblocks]
- strh w24, [x20]
ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
+ ldp x27, x28, [sp,80]
+ strh w23, [x22,-24]
+ strh w25, [x22,-8]
ldp x23, x24, [sp,48]
+ ldp x21, x22, [sp,32]
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
ldp x29, x30, [sp], 112
ret
.size SupperBlkListInit, .-SupperBlkListInit
.global FtlGcPageVarInit
.type FtlGcPageVarInit, %function
FtlGcPageVarInit:
- adrp x0, :got:g_gc_blk_num
- mov w1, 255
stp x29, x30, [sp, -32]!
+ mov w1, 255
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:g_gc_blk_num]
- str x19, [sp,16]
- adrp x19, :got:c_ftl_nand_page_pre_super_blk
- strh wzr, [x0]
- adrp x0, :got:g_gc_page_offset
- ldr x0, [x0, #:got_lo12:g_gc_page_offset]
- strh wzr, [x0]
- adrp x0, :got:p_gc_blk_tbl
- ldr x19, [x19, #:got_lo12:c_ftl_nand_page_pre_super_blk]
- ldr x0, [x0, #:got_lo12:p_gc_blk_tbl]
- ldrh w2, [x19]
- ldr x0, [x0]
+ stp x19, x20, [sp,16]
+ adrp x20, .LANCHOR0
+ adrp x19, .LANCHOR2
+ add x20, x20, :lo12:.LANCHOR0
+ add x19, x19, :lo12:.LANCHOR2
+ ldrh w2, [x20,2030]
+ ldr x0, [x19,928]
lsl w2, w2, 1
+ strh wzr, [x19,924]
+ strh wzr, [x19,936]
bl ftl_memset
- adrp x0, :got:p_gc_page_info
- ldrh w3, [x19]
+ ldrh w3, [x20,2030]
mov w2, 12
+ ldr x0, [x19,944]
mov w1, 255
- ldr x0, [x0, #:got_lo12:p_gc_page_info]
mul w2, w3, w2
- ldr x0, [x0]
bl ftl_memset
bl FtlGcBufInit
- ldr x19, [sp,16]
+ ldp x19, x20, [sp,16]
ldp x29, x30, [sp], 32
ret
.size FtlGcPageVarInit, .-FtlGcPageVarInit
stp x29, x30, [sp, -16]!
mov w1, w0
add x29, sp, 0
- cbz w0, .L871
+ cbz w0, .L915
sub w2, w0, #1
cmp w2, 5
- bhi .L873
+ bhi .L917
bl HynixGetReadRetryDefault
- b .L871
-.L873:
+ b .L915
+.L917:
cmp w0, 49
- bne .L874
- adrp x0, :got:gReadRetryInfo
+ bne .L918
+ adrp x0, .LANCHOR0
mov w2, 64
- ldr x0, [x0, #:got_lo12:gReadRetryInfo]
- add x0, x0, 4
+ add x0, x0, :lo12:.LANCHOR0
+ add x0, x0, 764
strb w1, [x0,-4]
mov w1, 4
strb w1, [x0,-3]
mov w1, 15
strb w1, [x0,-2]
- adrp x1, :got:SamsungRefValue
- ldr x1, [x1, #:got_lo12:SamsungRefValue]
- b .L889
-.L874:
+ adrp x1, .LANCHOR1
+ add x1, x1, :lo12:.LANCHOR1
+ add x1, x1, 408
+ b .L933
+.L918:
sub w0, w0, #65
cmp w0, 1
- bls .L880
+ bls .L924
cmp w1, 33
- bne .L875
-.L880:
- adrp x0, :got:gReadRetryInfo
- ldr x0, [x0, #:got_lo12:gReadRetryInfo]
- strb w1, [x0]
+ bne .L919
+.L924:
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ strb w1, [x0,760]
mov w1, 4
- b .L890
-.L875:
+ b .L934
+.L919:
cmp w1, 67
- beq .L881
+ beq .L925
cmp w1, 34
- bne .L877
-.L881:
- adrp x0, :got:gReadRetryInfo
- ldr x0, [x0, #:got_lo12:gReadRetryInfo]
- strb w1, [x0]
+ bne .L921
+.L925:
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ strb w1, [x0,760]
mov w1, 5
-.L890:
- strb w1, [x0,1]
+.L934:
+ strb w1, [x0,761]
mov w1, 7
- strb w1, [x0,2]
- adrp x1, :got:ToshibaA19RefValue
- add x0, x0, 4
+ strb w1, [x0,762]
+ adrp x1, .LANCHOR1
+ add x1, x1, :lo12:.LANCHOR1
+ add x0, x0, 764
+ add x1, x1, 256
mov w2, 45
- ldr x1, [x1, #:got_lo12:ToshibaA19RefValue]
- b .L889
-.L877:
+ b .L933
+.L921:
cmp w1, 68
- beq .L882
+ beq .L926
cmp w1, 35
- bne .L871
-.L882:
- adrp x0, :got:gReadRetryInfo
+ bne .L915
+.L926:
+ adrp x0, .LANCHOR0
mov w2, 95
- ldr x0, [x0, #:got_lo12:gReadRetryInfo]
- add x0, x0, 4
+ add x0, x0, :lo12:.LANCHOR0
+ add x0, x0, 764
strb w1, [x0,-4]
mov w1, 5
strb w1, [x0,-3]
mov w1, 17
strb w1, [x0,-2]
- adrp x1, :got:Toshiba15RefValue
- ldr x1, [x1, #:got_lo12:Toshiba15RefValue]
-.L889:
+ adrp x1, .LANCHOR1
+ add x1, x1, :lo12:.LANCHOR1
+ add x1, x1, 304
+.L933:
bl ftl_memcpy
-.L871:
+.L915:
ldp x29, x30, [sp], 16
ret
.size FlashGetReadRetryDefault, .-FlashGetReadRetryDefault
.global FlashReadIdbData
.type FlashReadIdbData, %function
FlashReadIdbData:
- adrp x1, :got:gNandIDataBuf
- mov w2, 2048
stp x29, x30, [sp, -16]!
+ adrp x1, .LANCHOR2
+ mov w2, 2048
+ add x1, x1, :lo12:.LANCHOR2
add x29, sp, 0
- ldr x1, [x1, #:got_lo12:gNandIDataBuf]
+ add x1, x1, 2336
bl ftl_memcpy
mov w0, 0
ldp x29, x30, [sp], 16
stp x29, x30, [sp, -64]!
add x29, sp, 0
stp x19, x20, [sp,16]
- adrp x19, :got:NandFlashParaTbl
- str x23, [sp,48]
stp x21, x22, [sp,32]
- mov w20, 0
- adrp x23, :got:IDByte
- ldr x22, [x19, #:got_lo12:NandFlashParaTbl]
-.L896:
- ldr x1, [x23, #:got_lo12:IDByte]
- add x0, x22, 1
- ldrb w2, [x22]
+ adrp x20, .LANCHOR1
+ adrp x22, .LANCHOR0
+ add x21, x20, :lo12:.LANCHOR1
+ add x22, x22, :lo12:.LANCHOR0
+ str x23, [sp,48]
+ add x21, x21, 536
+ mov w19, 0
+ add x22, x22, 1620
+.L940:
+ ldrb w2, [x21]
+ add x0, x21, 1
+ mov x1, x22
bl FlashMemCmp8
- mov w21, w0
- cbnz w0, .L893
- ldr x19, [x19, #:got_lo12:NandFlashParaTbl]
- ubfiz x20, x20, 5, 32
- adds x19, x20, x19
- beq .L899
+ mov w23, w0
+ cbnz w0, .L937
+ add x0, x20, :lo12:.LANCHOR1
+ ubfiz x19, x19, 5, 32
+ add x1, x0, 536
+ adds x19, x1, x19
+ beq .L943
ldrb w3, [x19,22]
mov x2, 0
- adrp x4, .LANCHOR2
- b .L898
-.L893:
- add w20, w20, 1
- add x22, x22, 32
- cmp w20, 66
- bne .L896
- b .L899
-.L898:
- lsl x0, x2, 5
- add x5, x4, :lo12:.LANCHOR2
- mov w1, w2
- ldrb w0, [x0,x5]
- cmp w0, w3
- beq .L897
+ mov x1, x0
+ b .L942
+.L937:
+ add w19, w19, 1
+ add x21, x21, 32
+ cmp w19, 72
+ bne .L940
+ b .L943
+.L942:
+ add x4, x1, x2, lsl 5
+ mov w0, w2
+ ldrb w4, [x4,2840]
+ cmp w4, w3
+ beq .L941
add x2, x2, 1
cmp x2, 4
- bne .L898
- mov w1, w2
-.L897:
- adrp x0, :got:gNandOptPara
- adrp x2, .LANCHOR2
- add x2, x2, :lo12:.LANCHOR2
- ubfiz x1, x1, 5, 32
+ bne .L942
+ mov w0, w2
+.L941:
+ add x20, x20, :lo12:.LANCHOR1
+ ubfiz x1, x0, 5, 32
+ adrp x0, .LANCHOR0
+ add x2, x20, 2840
+ add x0, x0, :lo12:.LANCHOR0
add x1, x2, x1
+ add x0, x0, 88
mov w2, 32
- ldr x0, [x0, #:got_lo12:gNandOptPara]
bl ftl_memcpy
- adrp x0, :got:gNandParaInfo
+ add x0, x20, 472
mov x1, x19
mov w2, 32
- ldr x0, [x0, #:got_lo12:gNandParaInfo]
bl ftl_memcpy
- b .L894
-.L899:
- mov w21, -1
-.L894:
- mov w0, w21
+ b .L938
+.L943:
+ mov w23, -1
+.L938:
+ mov w0, w23
ldr x23, [sp,48]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
add x4, x0, 4096
add x21, x0, 512
add x2, x4, x2
- bne .L904
- cbz x3, .L905
+ bne .L948
+ cbz x3, .L949
mov x0, x2
mov x1, x3
mov w2, 1024
bl ftl_memcpy
-.L905:
- cbz x20, .L903
+.L949:
+ cbz x20, .L947
mov w0, 48
lsr w19, w19, 1
ldrb w1, [x20,1]
ldrb w1, [x20,3]
orr w0, w0, w1, lsl 24
str w0, [x21,w19,sxtw 2]
- b .L903
-.L904:
- cbz x3, .L908
+ b .L947
+.L948:
+ cbz x3, .L952
mov x1, x2
mov x0, x3
mov w2, 1024
bl ftl_memcpy
-.L908:
- cbz x20, .L903
+.L952:
+ cbz x20, .L947
mov w0, 48
lsr w19, w19, 1
mul w19, w19, w0
lsr w0, w0, 24
strb w1, [x20,2]
strb w0, [x20,3]
-.L903:
+.L947:
ldp x19, x20, [sp,16]
ldr x21, [sp,32]
ldp x29, x30, [sp], 48
.global FlashSramLoadStore
.type FlashSramLoadStore, %function
FlashSramLoadStore:
- adrp x4, :got:RK29_NANDC_REG_BASE
+ adrp x4, .LANCHOR4+32
mov x6, x0
stp x29, x30, [sp, -16]!
uxtw x1, w1
add x29, sp, 0
- ldr x4, [x4, #:got_lo12:RK29_NANDC_REG_BASE]
- ldr x4, [x4]
+ ldr x4, [x4,#:lo12:.LANCHOR4+32]
add x4, x4, 4096
- cbnz w2, .L921
+ cbnz w2, .L965
add x1, x4, x1
- b .L923
-.L921:
+ b .L967
+.L965:
add x0, x4, x1
mov x1, x6
-.L923:
+.L967:
mov w2, w3
bl ftl_memcpy
ldp x29, x30, [sp], 16
.global rk_ftl_get_capacity
.type rk_ftl_get_capacity, %function
rk_ftl_get_capacity:
- stp x29, x30, [sp, -16]!
- mov w0, -1
- add x29, sp, 0
- bl FtlGetCapacity
- ldp x29, x30, [sp], 16
+ adrp x0, .LANCHOR0+2068
+ ldr w0, [x0,#:lo12:.LANCHOR0+2068]
ret
.size rk_ftl_get_capacity, .-rk_ftl_get_capacity
.align 2
stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
mov x19, 0
- adrp x23, .LC79
- adrp x21, .LC80
- adrp x24, .LC72
+ adrp x23, .LC80
+ adrp x21, .LC81
+ adrp x24, .LC73
stp x25, x26, [sp,64]
str x27, [sp,80]
mov x22, x1
mov w25, w2
uxtw x26, w3
mov w20, w19
- add x23, x23, :lo12:.LC79
- add x21, x21, :lo12:.LC80
- add x24, x24, :lo12:.LC72
-.L930:
+ add x23, x23, :lo12:.LC80
+ add x21, x21, :lo12:.LC81
+ add x24, x24, :lo12:.LC73
+.L974:
cmp x19, x26
- beq .L938
- cbnz w20, .L931
+ beq .L982
+ cbnz w20, .L975
mov x0, x23
mov x1, x27
mov w2, w19
bl printk
-.L931:
+.L975:
cmp w25, 4
mov x0, x21
- bne .L932
+ bne .L976
ldr w1, [x22,x19,lsl 2]
- b .L937
-.L932:
+ b .L981
+.L976:
cmp w25, 2
- bne .L934
+ bne .L978
ldrsh w1, [x22,x19,lsl 1]
- b .L937
-.L934:
+ b .L981
+.L978:
ldrb w1, [x22,x19]
-.L937:
+.L981:
bl printk
add w20, w20, 1
cmp w20, 15
- bls .L935
- adrp x1, .LC81
+ bls .L979
+ adrp x1, .LC82
mov x0, x24
- add x1, x1, :lo12:.LC81
+ add x1, x1, :lo12:.LC82
mov w20, 0
bl printk
-.L935:
+.L979:
add x19, x19, 1
- b .L930
-.L938:
- adrp x0, .LC72
- adrp x1, .LC81
- add x1, x1, :lo12:.LC81
- add x0, x0, :lo12:.LC72
+ b .L974
+.L982:
+ adrp x0, .LC73
+ adrp x1, .LC82
+ add x1, x1, :lo12:.LC82
+ add x0, x0, :lo12:.LC73
bl printk
ldr x27, [sp,80]
ldp x19, x20, [sp,16]
.type NandcXferComp, %function
NandcXferComp:
stp x29, x30, [sp, -80]!
- adrp x1, :got:gNandChipMap
ubfiz x0, x0, 4, 8
add x29, sp, 0
- stp x21, x22, [sp,32]
- ldr x1, [x1, #:got_lo12:gNandChipMap]
- adrp x21, :got:gNandcVer
stp x19, x20, [sp,16]
+ adrp x20, .LANCHOR0
str x23, [sp,48]
- ldr x19, [x1,x0]
- ldr x0, [x21, #:got_lo12:gNandcVer]
- ldr w0, [x0]
+ add x1, x20, :lo12:.LANCHOR0
+ add x2, x1, 24
+ stp x21, x22, [sp,32]
+ ldr x19, [x2,x0]
+ ldr w0, [x1,20]
cmp w0, 3
- bls .L970
+ bls .L1014
ldr w0, [x19,16]
- tbz x0, 2, .L970
+ tbz x0, 2, .L1014
mov x0, x19
bl wait_for_nandc_xfer_completed
- ldr w20, [x19,16]
+ ldr w21, [x19,16]
ldr w0, [x19,8]
- ubfx x20, x20, 1, 1
+ ubfx x21, x21, 1, 1
str w0, [x29,64]
- cbz w20, .L941
- adrp x22, .LC82
- adrp x23, .LC83
- mov w20, 0
- add x22, x22, :lo12:.LC82
- add x23, x23, :lo12:.LC83
-.L942:
+ cbz w21, .L985
+ adrp x22, .LC83
+ adrp x23, .LC84
+ mov w21, 0
+ add x22, x22, :lo12:.LC83
+ add x23, x23, :lo12:.LC84
+.L986:
ldr w2, [x19,28]
ldr w1, [x29,64]
ubfx x2, x2, 16, 5
ubfx x1, x1, 22, 6
cmp w2, w1
- bge .L950
- ldr x0, [x21, #:got_lo12:gNandcVer]
- ldr w0, [x0]
+ bge .L994
+ add x0, x20, :lo12:.LANCHOR0
+ ldr w0, [x0,20]
cmp w0, 5
- bhi .L943
-.L946:
- add w20, w20, 1
- and w0, w20, 16777215
- cbnz w0, .L942
+ bhi .L987
+.L990:
+ add w21, w21, 1
+ and w0, w21, 16777215
+ cbnz w0, .L986
ldr w2, [x19,28]
- mov w1, w20
+ mov w1, w21
ldr w3, [x29,64]
mov x0, x22
ubfx x2, x2, 16, 5
mov w2, 4
mov w3, 512
bl rknand_print_hex
- b .L942
-.L943:
+ b .L986
+.L987:
ldr w0, [x19]
str w0, [x29,72]
ldr w0, [x29,72]
- tbz x0, 13, .L946
+ tbz x0, 13, .L990
ldr w0, [x29,72]
- tbz x0, 17, .L946
-.L950:
- adrp x19, :got:gMasterInfo
- ldr x19, [x19, #:got_lo12:gMasterInfo]
+ tbz x0, 17, .L990
+.L994:
+ add x19, x20, :lo12:.LANCHOR0
+ add x19, x19, 1888
ldr w0, [x19,40]
- cbz w0, .L951
+ cbz w0, .L995
ldr w1, [x29,64]
mov w2, 0
ldr w0, [x19,32]
ubfx x1, x1, 22, 5
lsl w1, w1, 7
bl rknand_dma_unmap_single
- b .L951
-.L941:
- adrp x21, .LC84
- adrp x22, .LC83
- add x21, x21, :lo12:.LC84
- add x22, x22, :lo12:.LC83
-.L952:
+ b .L995
+.L985:
+ adrp x22, .LC85
+ adrp x23, .LC84
+ add x22, x22, :lo12:.LC85
+ add x23, x23, :lo12:.LC84
+.L996:
ldr w0, [x29,64]
- tbnz x0, 20, .L978
+ tbnz x0, 20, .L1022
ldr w0, [x19,8]
- add w20, w20, 1
+ add w21, w21, 1
str w0, [x29,64]
- and w0, w20, 16777215
- cbnz w0, .L952
+ and w0, w21, 16777215
+ cbnz w0, .L996
ldr w2, [x29,64]
- mov w1, w20
+ mov w1, w21
ldr w3, [x19,28]
- mov x0, x21
+ mov x0, x22
ubfx x3, x3, 16, 5
bl printk
- mov x0, x22
+ mov x0, x23
mov x1, x19
mov w2, 4
mov w3, 512
bl rknand_print_hex
- b .L952
-.L978:
- adrp x0, :got:gNandcDumpWriteEn
- mov x20, x0
- ldr x1, [x0, #:got_lo12:gNandcDumpWriteEn]
- ldr w1, [x1]
- cbz w1, .L955
+ b .L996
+.L1022:
+ add x0, x20, :lo12:.LANCHOR0
+ ldr w0, [x0,1936]
+ cbz w0, .L999
mov x0, x19
bl NandcSendDumpDataStart
-.L955:
- adrp x21, :got:gMasterInfo
- ldr x21, [x21, #:got_lo12:gMasterInfo]
+.L999:
+ add x21, x20, :lo12:.LANCHOR0
+ add x21, x21, 1888
ldr w0, [x21,40]
- cbz w0, .L956
+ cbz w0, .L1000
ldr w1, [x29,64]
mov w2, 1
ldr w0, [x21,32]
ubfx x1, x1, 22, 5
lsl w1, w1, 7
bl rknand_dma_unmap_single
-.L956:
- ldr x0, [x20, #:got_lo12:gNandcDumpWriteEn]
- ldr w0, [x0]
- cbz w0, .L951
+.L1000:
+ add x0, x20, :lo12:.LANCHOR0
+ ldr w0, [x0,1936]
+ cbz w0, .L995
mov x0, x19
bl NandcSendDumpDataDone
-.L951:
- adrp x0, :got:gMasterInfo
- ldr x0, [x0, #:got_lo12:gMasterInfo]
- str wzr, [x0,40]
- b .L939
-.L970:
+.L995:
+ add x20, x20, :lo12:.LANCHOR0
+ str wzr, [x20,1928]
+ b .L983
+.L1014:
ldr w0, [x19,8]
str w0, [x29,64]
ldr w0, [x29,64]
- tbz x0, 20, .L970
-.L939:
+ tbz x0, 20, .L1014
+.L983:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldr x23, [sp,48]
.global NandcXferData
.type NandcXferData, %function
NandcXferData:
- stp x29, x30, [sp, -176]!
+ stp x29, x30, [sp, -192]!
add x29, sp, 0
- stp x23, x24, [sp,48]
- uxtb w24, w0
- adrp x0, :got:gNandChipMap
- stp x19, x20, [sp,16]
- uxtb w20, w1
- sbfiz x1, x24, 4, 32
- ldr x0, [x0, #:got_lo12:gNandChipMap]
- uxtb w23, w2
stp x21, x22, [sp,32]
+ adrp x22, __stack_chk_guard
+ uxtb w21, w1
stp x25, x26, [sp,64]
+ stp x19, x20, [sp,16]
+ stp x23, x24, [sp,48]
stp x27, x28, [sp,80]
- mov x25, x3
- mov x21, x4
- ldr x19, [x0,x1]
+ uxtb w26, w0
+ adrp x19, .LANCHOR0
+ ldr x0, [x22,#:lo12:__stack_chk_guard]
+ uxtb w25, w2
+ str x0, [x29,184]
+ add x0, x19, :lo12:.LANCHOR0
+ add x0, x0, x26, sxtw 4
+ str x22, [x29,104]
+ ldr x20, [x0,24]
and x0, x3, 63
- cbnz x0, .L980
- cbnz x4, .L981
- add x21, x29, 112
+ mov x27, x3
+ mov x23, x4
+ cbnz x0, .L1024
+ cbnz x4, .L1025
+ add x0, x29, 120
mov w1, 255
- mov x0, x21
mov w2, 64
+ add x23, x29, 120
bl ftl_memset
-.L981:
- mov w0, w24
- mov w1, w20
- mov w2, w23
+.L1025:
+ mov w0, w26
+ mov w1, w21
+ mov w2, w25
mov w3, 0
- mov x4, x25
- mov x5, x21
- mov w22, 0
+ mov x4, x27
+ mov x5, x23
+ mov w24, 0
bl NandcXferStart
- mov w0, w24
+ mov w0, w26
bl NandcXferComp
- cbnz w20, .L982
- adrp x0, :got:gNandcEccBits
- ubfx x2, x23, 1, 7
+ cbnz w21, .L1026
+ add x1, x19, :lo12:.LANCHOR0
+ ubfx x2, x25, 1, 7
mov w3, 128
- adrp x5, :got:gMasterInfo
- add x2, x21, x2, lsl 2
- ldr x1, [x0, #:got_lo12:gNandcEccBits]
- ldr w1, [x1]
- cmp w1, 25
- mov w1, 64
- csel w3, w1, w3, cc
- mov w1, w20
-.L984:
- cmp x21, x2
- add w4, w1, w3
- beq .L1026
- ldr x6, [x5, #:got_lo12:gMasterInfo]
- and x1, x1, 4294967292
- add x21, x21, 4
- ldr x6, [x6,8]
- ldr w1, [x6,x1]
- strb w1, [x21,-4]
- lsr w6, w1, 8
- strb w6, [x21,-3]
- lsr w6, w1, 16
- strb w6, [x21,-2]
- lsr w1, w1, 24
- strb w1, [x21,-1]
- mov w1, w4
- b .L984
-.L1026:
- ldr x0, [x0, #:got_lo12:gNandcEccBits]
- lsr w23, w23, 2
- ldr w5, [x0]
- adrp x0, :got:gNandcVer
- ldr x0, [x0, #:got_lo12:gNandcVer]
- ldr w4, [x0]
+ add x2, x23, x2, lsl 2
+ ldr w0, [x1,1940]
+ cmp w0, 25
+ mov w0, 64
+ csel w3, w0, w3, cc
+ mov w0, w21
+.L1028:
+ cmp x23, x2
+ add w4, w0, w3
+ beq .L1072
+ ldr x5, [x1,1896]
+ and x0, x0, 4294967292
+ add x23, x23, 4
+ ldr w0, [x5,x0]
+ strb w0, [x23,-4]
+ lsr w5, w0, 8
+ strb w5, [x23,-3]
+ lsr w5, w0, 16
+ strb w5, [x23,-2]
+ lsr w0, w0, 24
+ strb w0, [x23,-1]
+ mov w0, w4
+ b .L1028
+.L1072:
+ add x0, x19, :lo12:.LANCHOR0
+ lsr w25, w25, 2
+ ldr w5, [x0,1940]
+ ldr w4, [x0,20]
mov w0, 0
- mov w22, w0
-.L986:
- cmp w0, w23
- bcs .L982
- cbz w5, .L982
+ mov w24, w0
+.L1030:
+ cmp w0, w25
+ bcs .L1026
+ cbz w5, .L1026
uxtw x1, w0
add x1, x1, 8
- ldr w1, [x19,x1,lsl 2]
- str w1, [x29,104]
- ldr w1, [x29,104]
- tbnz x1, 2, .L1010
- ldr w3, [x29,104]
+ ldr w1, [x20,x1,lsl 2]
+ str w1, [x29,112]
+ ldr w1, [x29,112]
+ tbnz x1, 2, .L1055
+ ldr w3, [x29,112]
ubfx x3, x3, 15, 1
- cbnz w3, .L1010
+ cbnz w3, .L1055
cmp w4, 5
- bls .L988
- ldr w2, [x29,104]
+ bls .L1032
+ ldr w2, [x29,112]
ubfx x6, x2, 3, 5
- ldr w2, [x29,104]
- ldr w1, [x29,104]
+ ldr w2, [x29,112]
+ ldr w1, [x29,112]
ubfx x2, x2, 27, 1
ubfx x3, x1, 16, 5
- ldr w1, [x29,104]
+ ldr w1, [x29,112]
orr w2, w6, w2, lsl 5
ubfx x1, x1, 29, 1
orr w1, w3, w1, lsl 5
- ldr w3, [x29,104]
+ ldr w3, [x29,112]
cmp w2, w1
- bls .L989
- ldr w1, [x29,104]
+ bls .L1033
+ ldr w1, [x29,112]
ubfx x3, x3, 3, 5
ubfx x1, x1, 27, 1
+ b .L1070
+.L1033:
+ ldr w1, [x29,112]
+ ubfx x3, x3, 16, 5
+ ubfx x1, x1, 29, 1
+.L1070:
orr w3, w3, w1, lsl 5
- b .L990
-.L989:
- ubfx x1, x3, 16, 5
- ldr w3, [x29,104]
- ubfx x3, x3, 29, 1
- b .L1025
-.L988:
+ b .L1034
+.L1032:
cmp w4, 3
- bls .L990
- ldr w2, [x29,104]
+ bls .L1034
+ ldr w2, [x29,112]
ubfx x6, x2, 3, 5
- ldr w2, [x29,104]
- ldr w1, [x29,104]
+ ldr w2, [x29,112]
+ ldr w1, [x29,112]
ubfx x2, x2, 28, 1
ubfx x3, x1, 16, 5
- ldr w1, [x29,104]
+ ldr w1, [x29,112]
orr w2, w6, w2, lsl 5
ubfx x1, x1, 30, 1
orr w1, w3, w1, lsl 5
- ldr w3, [x29,104]
+ ldr w3, [x29,112]
cmp w2, w1
- bls .L991
+ bls .L1035
ubfx x1, x3, 3, 5
- ldr w3, [x29,104]
+ ldr w3, [x29,112]
ubfx x3, x3, 28, 1
- b .L1025
-.L991:
+ b .L1071
+.L1035:
ubfx x1, x3, 16, 5
- ldr w3, [x29,104]
+ ldr w3, [x29,112]
ubfx x3, x3, 30, 1
-.L1025:
+.L1071:
orr w3, w1, w3, lsl 5
-.L990:
- cmp w22, w3
- csel w22, w22, w3, cs
- b .L987
-.L1010:
- mov w22, -1
-.L987:
+.L1034:
+ cmp w24, w3
+ csel w24, w24, w3, cs
+ b .L1031
+.L1055:
+ mov w24, -1
+.L1031:
add w0, w0, 1
- b .L986
-.L982:
- str wzr, [x19,16]
- b .L993
-.L980:
- cmp w20, 1
- bne .L1024
- mov w22, 0
- mov w27, 2
-.L994:
- cmp w22, w23
- bcs .L1027
- and w26, w22, 3
- mov x3, x25
- cbz x25, .L996
- ubfiz x0, x22, 9, 23
- add x3, x25, x0
-.L996:
- cmp x21, xzr
- mov x0, x19
- csel w4, w27, wzr, ne
+ b .L1030
+.L1026:
+ str wzr, [x20,16]
+ b .L1037
+.L1024:
+ cmp w21, 1
+ bne .L1069
+ mov w24, 0
+ mov w22, 2
+.L1038:
+ cmp w24, w25
+ bcs .L1073
+ and w28, w24, 3
+ mov x3, x27
+ cbz x27, .L1040
+ ubfiz x0, x24, 9, 23
+ add x3, x27, x0
+.L1040:
+ cmp x23, xzr
+ mov x0, x20
+ csel w4, w22, wzr, ne
mov w1, 1
- mov w2, w26
- mul w4, w4, w22
- add w22, w22, 2
- add x4, x21, x4
+ mov w2, w28
+ mul w4, w4, w24
+ add w24, w24, 2
+ add x4, x23, x4
bl NandcCopy1KB
mov x4, 0
- mov w0, w24
+ mov w0, w26
mov w1, 1
mov w2, 2
- mov w3, w26
+ mov w3, w28
mov x5, x4
bl NandcXferStart
- mov w0, w24
+ mov w0, w26
bl NandcXferComp
- b .L994
-.L1027:
- mov w22, 0
- b .L993
-.L1024:
+ b .L1038
+.L1073:
+ mov w24, 0
+ b .L1037
+.L1069:
mov w1, 0
mov x4, 0
- mov w26, 0
- mov w0, w24
+ mov w22, 0
+ mov w0, w26
mov w2, 2
mov w3, w1
mov x5, x4
- mov w22, w26
- mov w27, 2
+ mov w24, w22
bl NandcXferStart
-.L999:
- cmp w26, w23
- bcs .L993
- mov w0, w24
- add w28, w26, 2
+.L1043:
+ cmp w22, w25
+ bcs .L1037
+ mov w0, w26
+ add w28, w22, 2
bl NandcXferComp
- ldr w0, [x19,32]
- cmp w28, w23
- str w0, [x29,104]
- bcs .L1000
+ ldr w0, [x20,32]
+ cmp w28, w25
+ str w0, [x29,112]
+ bcs .L1044
mov x4, 0
- mov w0, w24
+ mov w0, w26
mov w1, 0
mov w2, 2
and w3, w28, 3
mov x5, x4
bl NandcXferStart
-.L1000:
- ldr w0, [x29,104]
- tbnz x0, 2, .L1015
- ldr w0, [x29,104]
+.L1044:
+ ldr w0, [x29,112]
+ tbnz x0, 2, .L1060
+ ldr w0, [x29,112]
ubfx x1, x0, 3, 5
- ldr w0, [x29,104]
+ ldr w0, [x29,112]
ubfx x0, x0, 27, 1
orr w0, w1, w0, lsl 5
- cmp w22, w0
- csel w22, w22, w0, cs
- b .L1001
-.L1015:
- mov w22, -1
-.L1001:
- and w2, w26, 3
- mov x3, x25
- cbz x25, .L1002
- ubfiz x3, x26, 9, 23
- add x3, x25, x3
-.L1002:
- cmp x21, xzr
- mov x0, x19
- csel w4, w27, wzr, ne
+ cmp w24, w0
+ csel w24, w24, w0, cs
+ b .L1045
+.L1060:
+ mov w24, -1
+.L1045:
+ and w2, w22, 3
+ mov x3, x27
+ cbz x27, .L1046
+ ubfiz x3, x22, 9, 23
+ add x3, x27, x3
+.L1046:
+ cmp x23, xzr
+ mov w0, 2
+ csel w4, w0, wzr, ne
mov w1, 0
- mul w4, w4, w26
- mov w26, w28
- add x4, x21, x4
+ mov x0, x20
+ mul w4, w4, w22
+ mov w22, w28
+ add x4, x23, x4
bl NandcCopy1KB
- b .L999
-.L993:
- cbnz w20, .L1005
- adrp x0, :got:gNandcVer
- ldr x0, [x0, #:got_lo12:gNandcVer]
- ldr w0, [x0]
+ b .L1043
+.L1037:
+ cbnz w21, .L1049
+ add x19, x19, :lo12:.LANCHOR0
+ ldr w0, [x19,20]
cmp w0, 5
- bls .L1005
- ldr w0, [x19]
+ bls .L1049
+ ldr w0, [x20]
mov w1, 8192
movk w1, 0x2, lsl 16
and w1, w0, w1
cmp w1, 139264
- bne .L1005
+ bne .L1049
orr w0, w0, 131072
- mov w22, -1
- str w0, [x19]
-.L1005:
- mov w0, w22
+ mov w24, -1
+ str w0, [x20]
+.L1049:
+ ldr x1, [x29,104]
+ mov w0, w24
+ ldr x2, [x29,184]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1051
+ bl __stack_chk_fail
+.L1051:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 176
+ ldp x29, x30, [sp], 192
ret
.size NandcXferData, .-NandcXferData
.align 2
add x29, sp, 0
stp x19, x20, [sp,16]
uxtb w19, w0
- adrp x0, :got:gNandParaInfo
+ adrp x0, .LANCHOR1+481
str x21, [sp,32]
mov x21, x2
- ldr x0, [x0, #:got_lo12:gNandParaInfo]
- ldrb w20, [x0,9]
- cbnz w19, .L1029
- adrp x0, :got:gNandIDBResBlkNum
- adrp x5, :got:gBlockPageAlignSize
- ldr x0, [x0, #:got_lo12:gNandIDBResBlkNum]
- ldr x5, [x5, #:got_lo12:gBlockPageAlignSize]
- ldrb w0, [x0]
- ldr w2, [x5]
- mul w0, w0, w2
+ ldrb w20, [x0,#:lo12:.LANCHOR1+481]
+ cbnz w19, .L1075
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrb w5, [x0,9]
+ ldr w0, [x0,12]
+ mul w0, w5, w0
cmp w1, w0
mov w0, 4
csel w20, w20, w0, cs
-.L1029:
+.L1075:
mov w0, w19
str x4, [x29,48]
str x1, [x29,56]
FlashDdrTunningRead:
stp x29, x30, [sp, -128]!
add x29, sp, 0
- stp x23, x24, [sp,48]
- uxtb w24, w0
- adrp x0, :got:gpNandc
+ stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR0
+ add x19, x19, :lo12:.LANCHOR0
stp x21, x22, [sp,32]
+ stp x23, x24, [sp,48]
+ stp x27, x28, [sp,80]
stp x25, x26, [sp,64]
- ldr x0, [x0, #:got_lo12:gpNandc]
+ uxtb w23, w0
mov w22, 6
- stp x27, x28, [sp,80]
- stp x19, x20, [sp,16]
- mov w26, w1
- mov x25, x2
- ldr x0, [x0]
- mov x23, x3
- mov w27, w4
+ ldr x0, [x19,128]
+ mov w24, w1
+ mov x28, x2
+ mov x27, x3
+ mov w25, w4
mov w21, 1024
ldr w0, [x0,304]
str w0, [x29,124]
- adrp x0, :got:gNandcVer
- ldr x0, [x0, #:got_lo12:gNandcVer]
- ldr w0, [x0]
+ ldr w0, [x19,20]
cmp w0, 8
mov w0, 12
csel w22, w22, w0, cc
- cbz w4, .L1032
+ cbz w4, .L1078
mov w0, 1
- adrp x19, :got:gFlashInterfaceMode
bl FlashSetInterfaceMode
mov w0, 1
bl NandcSetMode
- mov w0, w24
+ mov w0, w23
bl FlashReset
- mov w1, w26
- mov x2, x25
- mov x3, x23
- mov w0, w24
+ mov w1, w24
+ mov x2, x28
+ mov x3, x27
+ mov w0, w23
bl FlashReadRawPage
- ldr x19, [x19, #:got_lo12:gFlashInterfaceMode]
mov w21, w0
- ldrb w0, [x19]
+ ldrb w0, [x19,1844]
bl FlashSetInterfaceMode
- ldrb w0, [x19]
+ ldrb w0, [x19,1844]
bl NandcSetMode
cmn w21, #1
- bne .L1033
-.L1042:
+ bne .L1079
+.L1088:
mov w21, -1
- b .L1034
-.L1033:
- adrp x0, .LC85
- mov w1, w26
- add x0, x0, :lo12:.LC85
+ b .L1080
+.L1079:
+ adrp x0, .LC86
+ mov w1, w24
+ add x0, x0, :lo12:.LC86
mov w2, w21
bl printk
cmp w21, 9
- bhi .L1035
- adrp x1, :got:IDByte
- sxtw x0, w24
- lsl x2, x0, 3
- ldr x1, [x1, #:got_lo12:IDByte]
- ldrb w1, [x1,x2]
- cmp w1, 173
- bne .L1035
- adrp x1, :got:gNandChipMap
- lsl x0, x0, 4
- ldr x1, [x1, #:got_lo12:gNandChipMap]
- ldr x0, [x1,x0]
+ bhi .L1081
+ add x19, x19, x23, sxtw 4
+ ldr x0, [x19,24]
ldr w1, [x0,3840]
ldr w1, [x0]
orr w1, w1, 131072
str w1, [x0]
-.L1035:
- adrp x0, :got:FlashDdrTunningReadCount
- ldr x0, [x0, #:got_lo12:FlashDdrTunningReadCount]
- ldr w1, [x0]
+.L1081:
+ adrp x0, .LANCHOR4
+ add x0, x0, :lo12:.LANCHOR4
+ ldr w1, [x0,40]
add w1, w1, 1
- str w1, [x0]
+ str w1, [x0,40]
cmp w1, 2047
- bls .L1034
- mov x23, 0
- str wzr, [x0]
- mov x25, x23
-.L1032:
+ bls .L1080
+ mov x27, 0
+ str wzr, [x0,40]
+ mov x28, x27
+.L1078:
mov w19, 0
- mov w28, -1
+ mov w26, -1
mov w5, w19
mov w6, w19
mov w20, w19
-.L1040:
+.L1086:
mov w0, w22
str x5, [x29,104]
str x6, [x29,112]
bl NandcSetDdrPara
- mov w1, w26
- mov w0, w24
- mov x2, x25
- mov x3, x23
+ mov w1, w24
+ mov w0, w23
+ mov x2, x28
+ mov x3, x27
bl FlashReadRawPage
add w1, w21, 1
ldr x6, [x29,112]
cmp w0, w1
ldr x5, [x29,104]
- bhi .L1036
+ bhi .L1082
cmp w0, 2
- bhi .L1046
+ bhi .L1092
add w20, w20, 1
cmp w20, 9
- bls .L1046
+ bls .L1092
sub w19, w22, w20
mov w21, w0
- mov w28, 0
- b .L1038
-.L1036:
+ mov w26, 0
+ b .L1084
+.L1082:
cmp w6, w20
- bcs .L1047
+ bcs .L1093
cmp w20, 7
sub w5, w19, w20
- bhi .L1048
+ bhi .L1094
mov w6, w20
- b .L1047
-.L1046:
- mov x23, 0
+ b .L1093
+.L1092:
+ mov x27, 0
mov w19, w22
mov w21, w0
- mov w28, 0
- mov x25, x23
- b .L1037
-.L1047:
+ mov w26, 0
+ mov x28, x27
+ b .L1083
+.L1093:
mov w20, 0
-.L1037:
+.L1083:
add w22, w22, 2
cmp w22, 69
- bls .L1040
-.L1038:
+ bls .L1086
+.L1084:
cmp w6, w20
csel w19, w19, w5, cc
- b .L1039
-.L1048:
+ b .L1085
+.L1094:
mov w19, w5
-.L1039:
- cbz w19, .L1041
- adrp x0, .LC86
+.L1085:
+ cbz w19, .L1087
+ adrp x0, .LC87
mov w1, w19
- add x0, x0, :lo12:.LC86
+ add x0, x0, :lo12:.LC87
bl printk
mov w0, w19
bl NandcSetDdrPara
-.L1041:
- cbz w28, .L1034
- adrp x0, .LC87
- mov w1, w24
- add x0, x0, :lo12:.LC87
- mov w2, w26
+.L1087:
+ cbz w26, .L1080
+ adrp x0, .LC88
+ mov w1, w23
+ add x0, x0, :lo12:.LC88
+ mov w2, w24
bl printk
- cbz w27, .L1042
+ cbz w25, .L1088
ldr w0, [x29,124]
lsr w0, w0, 8
bl NandcSetDdrPara
-.L1034:
+.L1080:
mov w0, w21
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
FlashReadPage:
stp x29, x30, [sp, -80]!
add x29, sp, 0
- stp x19, x20, [sp,16]
- uxtb w20, w0
- str x25, [sp,64]
- mov w0, w20
- stp x23, x24, [sp,48]
stp x21, x22, [sp,32]
- mov x24, x2
+ uxtb w21, w0
mov w22, w1
+ mov w0, w21
+ stp x23, x24, [sp,48]
+ stp x19, x20, [sp,16]
+ stp x25, x26, [sp,64]
+ mov x24, x2
mov x23, x3
bl FlashReadRawPage
cmn w0, #1
mov w19, w0
- bne .L1064
- adrp x21, :got:gNandRandomizer
- ldr x21, [x21, #:got_lo12:gNandRandomizer]
- ldrb w25, [x21]
- cbnz w25, .L1065
-.L1067:
- adrp x0, :got:gFlashToggleModeEn
- ldr x0, [x0, #:got_lo12:gFlashToggleModeEn]
- ldrb w0, [x0]
- cbz w0, .L1064
- b .L1082
-.L1065:
- mov w0, w20
+ bne .L1104
+ adrp x20, .LANCHOR0
+ add x25, x20, :lo12:.LANCHOR0
+ ldrb w26, [x25,16]
+ cbnz w26, .L1105
+.L1107:
+ add x20, x20, :lo12:.LANCHOR0
+ ldrb w0, [x20,1864]
+ cbz w0, .L1104
+ b .L1122
+.L1105:
+ mov w0, w21
mov w1, w22
mov x2, x24
mov x3, x23
- strb wzr, [x21]
+ strb wzr, [x25,16]
bl FlashReadRawPage
- strb w25, [x21]
+ strb w26, [x25,16]
cmn w0, #1
- beq .L1067
+ beq .L1107
mov w19, w0
- b .L1064
-.L1082:
- adrp x0, :got:gpNandc
+ b .L1104
+.L1122:
+ ldr x0, [x20,128]
mov w1, w22
mov x2, x24
mov x3, x23
mov w4, 1
- ldr x0, [x0, #:got_lo12:gpNandc]
- ldr x0, [x0]
- ldr w21, [x0,304]
- mov w0, w20
+ ldr w25, [x0,304]
+ mov w0, w21
bl FlashDdrTunningRead
cmn w0, #1
mov w19, w0
- beq .L1068
- adrp x1, :got:gNandFlashEccBits
- ldr x1, [x1, #:got_lo12:gNandFlashEccBits]
- ldrb w0, [x1]
+ beq .L1108
+ ldrb w0, [x20,1944]
cmp w19, w0, lsr 1
- bls .L1064
-.L1068:
- lsr w0, w21, 8
+ bls .L1104
+.L1108:
+ lsr w0, w25, 8
bl NandcSetDdrPara
-.L1064:
- adrp x0, :got:gpReadRetrial
+.L1104:
+ adrp x0, .LANCHOR4+48
cmn w19, #1
- ldr x0, [x0, #:got_lo12:gpReadRetrial]
- ldr x4, [x0]
- bne .L1069
- cbz x4, .L1069
+ ldr x4, [x0,#:lo12:.LANCHOR4+48]
+ bne .L1109
+ cbz x4, .L1109
mov w1, w22
mov x2, x24
mov x3, x23
- mov w0, w20
+ mov w0, w21
blr x4
mov w19, w0
- adrp x0, .LC88
+ adrp x0, .LC89
mov w1, w19
- add x0, x0, :lo12:.LC88
- mov w2, w20
+ add x0, x0, :lo12:.LC89
+ mov w2, w21
mov w3, w22
bl printk
-.L1069:
+.L1109:
mov w0, w19
- ldr x25, [sp,64]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
ldp x29, x30, [sp], 80
ret
.size FlashReadPage, .-FlashReadPage
stp x29, x30, [sp, -48]!
add x29, sp, 0
stp x19, x20, [sp,16]
- adrp x19, :got:gFlashInterfaceMode
+ adrp x19, .LANCHOR0
mov w20, w1
stp x21, x22, [sp,32]
+ add x22, x19, :lo12:.LANCHOR0
uxtb w21, w0
- ldr x22, [x19, #:got_lo12:gFlashInterfaceMode]
- ldrb w0, [x22]
+ ldrb w0, [x22,1844]
bl FlashSetInterfaceMode
- ldrb w0, [x22]
+ ldrb w0, [x22,1844]
bl NandcSetMode
mov x2, 0
mov w1, w20
bl FlashDdrTunningRead
mov w22, w0
mov x2, 0
- mov w1, w20
mov w0, w21
+ mov w1, w20
mov x3, x2
bl FlashReadRawPage
cmn w0, #1
- mov x1, x19
- adrp x19, :got:gFlashToggleModeEn
- beq .L1087
+ beq .L1127
cmn w22, #1
- bne .L1084
-.L1087:
- ldr x0, [x1, #:got_lo12:gFlashInterfaceMode]
- ldrb w0, [x0]
- tbz x0, 0, .L1084
+ bne .L1124
+.L1127:
+ add x20, x19, :lo12:.LANCHOR0
+ ldrb w0, [x20,1844]
+ tbz x0, 0, .L1124
mov w0, 1
bl FlashSetInterfaceMode
mov w0, 1
bl NandcSetMode
- ldr x19, [x19, #:got_lo12:gFlashToggleModeEn]
- strb wzr, [x19]
- b .L1086
-.L1084:
- ldr x19, [x19, #:got_lo12:gFlashToggleModeEn]
+ strb wzr, [x20,1864]
+ b .L1126
+.L1124:
+ add x19, x19, :lo12:.LANCHOR0
mov w0, 1
- strb w0, [x19]
-.L1086:
+ strb w0, [x19,1864]
+.L1126:
mov w0, 0
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
.global FlashLoadPhyInfo
.type FlashLoadPhyInfo, %function
FlashLoadPhyInfo:
- stp x29, x30, [sp, -144]!
- mov w0, 60
+ stp x29, x30, [sp, -128]!
add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x20, :got:gNandParaInfo
- mov w19, 0
- strb w0, [x29,136]
+ stp x27, x28, [sp,80]
+ adrp x27, __stack_chk_guard
+ stp x23, x24, [sp,48]
+ adrp x24, .LANCHOR0
+ adrp x23, .LANCHOR4
+ ldr x0, [x27,#:lo12:__stack_chk_guard]
+ add x1, x24, :lo12:.LANCHOR0
+ str x0, [x29,120]
+ mov w0, 60
+ strb w0, [x29,112]
mov w0, 40
- strb w0, [x29,137]
+ strb w0, [x29,113]
mov w0, 24
- strb w0, [x29,138]
+ strb w0, [x29,114]
mov w0, 16
stp x21, x22, [sp,32]
- strb w0, [x29,139]
- adrp x22, :got:gFlashPageBuffer0
- ldr x0, [x20, #:got_lo12:gNandParaInfo]
- adrp x21, :got:gpFlashSaveInfo
- stp x23, x24, [sp,48]
stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- ldr x1, [x22, #:got_lo12:gFlashPageBuffer0]
- adrp x23, :got:gNandFlashInfoBlockAddr
- ldrh w0, [x0,10]
- mov w24, 4
- str w0, [x29,124]
+ stp x19, x20, [sp,16]
+ strb w0, [x29,115]
+ adrp x22, .LANCHOR1
+ add x0, x23, :lo12:.LANCHOR4
+ add x21, x22, :lo12:.LANCHOR1
+ ldr x1, [x1,1856]
+ add x21, x21, 472
+ mov w20, 0
+ mov w26, 4
+ str x1, [x0,56]
mov w25, -1
- ldr x0, [x21, #:got_lo12:gpFlashSaveInfo]
- adrp x26, :got:gNandOptPara
- ldr x1, [x1]
- adrp x27, :got:gReadRetryInfo
- str x21, [x29,112]
- str x1, [x0]
- ldr x0, [x23, #:got_lo12:gNandFlashInfoBlockAddr]
- str wzr, [x0]
-.L1095:
- add w28, w19, 1
- mov x21, 0
-.L1097:
- add x0, x29, 136
- ldrb w0, [x21,x0]
+ str wzr, [x0,64]
+ mov w0, 0
+ ldrh w28, [x21,10]
+ bl flash_enter_slc_mode
+.L1135:
+ add w0, w20, 1
+ mov x19, 0
+ str w0, [x29,104]
+.L1137:
+ add x0, x29, 112
+ ldrb w0, [x19,x0]
bl FlashBchSel
- ldr x6, [x22, #:got_lo12:gFlashPageBuffer0]
+ add x5, x24, :lo12:.LANCHOR0
mov w0, 0
- mov w1, w19
+ mov w1, w20
mov x3, 0
- str x6, [x29,104]
- ldr x2, [x6]
+ str x5, [x29,96]
+ ldr x2, [x5,1856]
bl FlashReadRawPage
cmn w0, #1
- bne .L1096
- ldr x6, [x29,104]
+ bne .L1136
+ ldr x5, [x29,96]
mov w0, 0
- mov w1, w28
+ ldr w1, [x29,104]
mov x3, 0
- ldr x2, [x6]
+ ldr x2, [x5,1856]
bl FlashReadRawPage
cmn w0, #1
- bne .L1096
- add x21, x21, 1
- cmp x21, 4
- beq .L1098
- b .L1097
-.L1099:
- ldr w21, [x0,8]
+ bne .L1136
+ add x19, x19, 1
+ cmp x19, 4
+ beq .L1138
+ b .L1137
+.L1139:
+ add x0, x2, 12
mov w1, 2036
- add x0, x0, 12
+ str x2, [x29,104]
mov w25, -1
bl JSHash
- cmp w21, w0
- beq .L1109
-.L1098:
- ldr w0, [x29,124]
- subs w24, w24, #1
- add w19, w19, w0
- bne .L1095
- b .L1106
-.L1096:
- ldr x0, [x29,112]
- mov w1, 20036
- movk w1, 0x4e41, lsl 16
- ldr x28, [x0, #:got_lo12:gpFlashSaveInfo]
- ldr x0, [x28]
- ldr w2, [x0]
- cmp w2, w1
- bne .L1098
- cbnz w25, .L1099
- ldr x20, [x20, #:got_lo12:gNandParaInfo]
- adrp x0, :got:gNandFlashIdbBlockAddr
- ldrh w1, [x20,10]
- ldr x0, [x0, #:got_lo12:gNandFlashIdbBlockAddr]
- udiv w19, w19, w1
- add w19, w19, 1
- str w19, [x0]
- b .L1106
-.L1109:
- ldr x21, [x20, #:got_lo12:gNandParaInfo]
- mov w2, 32
- ldr x1, [x28]
+ ldr x2, [x29,104]
+ ldr w1, [x2,8]
+ cmp w1, w0
+ beq .L1149
+.L1138:
+ subs w26, w26, #1
+ add w20, w20, w28
+ bne .L1135
+ mov w0, w26
+ bl flash_exit_slc_mode
+.L1140:
+ ldr x2, [x29,120]
+ mov w0, w25
+ ldr x1, [x27,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1145
+ bl __stack_chk_fail
+.L1136:
+ add x19, x23, :lo12:.LANCHOR4
+ mov w0, 20036
+ movk w0, 0x4e41, lsl 16
+ ldr x2, [x19,56]
+ ldr w1, [x2]
+ cmp w1, w0
+ bne .L1138
+ cbnz w25, .L1139
+ add x22, x22, :lo12:.LANCHOR1
+ ldrh w0, [x22,482]
+ udiv w20, w20, w0
+ add w20, w20, 1
+ str w20, [x19,68]
+ b .L1140
+.L1149:
+ add x1, x2, 160
mov x0, x21
- add x1, x1, 160
+ mov w2, 32
+ add x25, x24, :lo12:.LANCHOR0
bl ftl_memcpy
- ldr x1, [x28]
+ ldr x1, [x19,56]
mov w2, 32
- ldr x0, [x26, #:got_lo12:gNandOptPara]
+ add x0, x25, 88
add x1, x1, 192
bl ftl_memcpy
- ldr x1, [x28]
+ ldr x1, [x19,56]
mov w2, 852
- ldr x0, [x27, #:got_lo12:gReadRetryInfo]
+ add x0, x25, 760
add x1, x1, 224
bl ftl_memcpy
- adrp x1, :got:gFlashToggleModeEn
- ldr x2, [x28]
- ldr x1, [x1, #:got_lo12:gFlashToggleModeEn]
- ldr w0, [x2,1076]
- strb w0, [x1]
- ldrh w1, [x21,10]
- ldr x0, [x23, #:got_lo12:gNandFlashInfoBlockAddr]
- udiv w1, w19, w1
- str w19, [x0]
- adrp x0, :got:gNandFlashIdbBlockAddr
- add w3, w1, 1
- ldr x0, [x0, #:got_lo12:gNandFlashIdbBlockAddr]
- cbz w1, .L1101
- str w3, [x0]
- b .L1102
-.L1101:
- mov w1, 2
- str w1, [x0]
-.L1102:
- adrp x0, :got:gNandIDBResBlkNumSaveInFlash
- ldrh w1, [x2,14]
+ str w20, [x19,64]
+ ldr x1, [x19,56]
+ ldr w0, [x1,1076]
+ strb w0, [x25,1864]
+ ldrh w0, [x21,10]
+ udiv w0, w20, w0
+ add w2, w0, 1
+ cbz w0, .L1141
+ str w2, [x19,68]
+ b .L1142
+.L1141:
+ mov w0, 2
+ str w0, [x19,68]
+.L1142:
+ add x0, x23, :lo12:.LANCHOR4
+ ldrh w1, [x1,14]
mov w25, 0
- ldr x0, [x0, #:got_lo12:gNandIDBResBlkNumSaveInFlash]
- strb w1, [x0]
- b .L1098
-.L1106:
- mov w0, w25
+ strb w1, [x0,72]
+ b .L1138
+.L1145:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 144
+ ldp x29, x30, [sp], 128
ret
.size FlashLoadPhyInfo, .-FlashLoadPhyInfo
.align 2
.global ToshibaReadRetrial
.type ToshibaReadRetrial, %function
ToshibaReadRetrial:
- stp x29, x30, [sp, -96]!
+ stp x29, x30, [sp, -128]!
add x29, sp, 0
stp x23, x24, [sp,48]
uxtb w23, w0
mov w0, w23
+ str w1, [x29,116]
stp x19, x20, [sp,16]
- stp x25, x26, [sp,64]
- stp x21, x22, [sp,32]
stp x27, x28, [sp,80]
- mov x26, x2
- mov w27, w1
- mov x25, x3
+ stp x21, x22, [sp,32]
+ stp x25, x26, [sp,64]
+ mov x27, x2
+ mov x26, x3
+ adrp x19, .LANCHOR0
bl NandcWaitFlashReady
- mov w0, w23
- adrp x20, :got:g_retryMode
+ add x2, x19, :lo12:.LANCHOR0
+ sbfiz x0, x23, 4, 32
+ add x1, x2, 24
mov w22, 0
- bl NandcGetChipIf
- mov x19, x0
- ldr x0, [x20, #:got_lo12:g_retryMode]
- ldrb w0, [x0]
+ add x3, x1, x0
+ ldr x24, [x1,x0]
+ ldrb w0, [x3,8]
+ str x0, [x29,120]
+ add x20, x0, 8
+ mov x28, x0
+ ldrb w0, [x2,752]
+ add x20, x24, x20, lsl 8
sub w0, w0, #67
uxtb w0, w0
cmp w0, 1
- bls .L1111
- adrp x0, :got:gFlashToggleModeEn
- ldr x0, [x0, #:got_lo12:gFlashToggleModeEn]
- ldrb w0, [x0]
- cbz w0, .L1112
+ bls .L1151
+ ldrb w0, [x2,1864]
+ cbz w0, .L1152
mov w0, w22
mov w22, 1
bl NandcSetDdrMode
-.L1112:
- mov w0, 92
- str w0, [x19,8]
- mov w0, 197
- str w0, [x19,8]
-.L1111:
+.L1152:
+ ubfiz x0, x28, 8, 8
+ mov w2, 92
+ add x0, x24, x0
+ str w2, [x0,2056]
+ mov w2, 197
+ str w2, [x0,2056]
+.L1151:
+ ldr x0, [x29,120]
mov w21, 1
- mov w24, -1
-.L1113:
- adrp x0, :got:g_maxRetryCount
- ldr x0, [x0, #:got_lo12:g_maxRetryCount]
- ldrb w0, [x0]
+ mov w25, -1
+ add x0, x0, 8
+ lsl x0, x0, 8
+ str x0, [x29,104]
+ ubfiz x0, x28, 8, 8
+ str x0, [x29,96]
+.L1153:
+ adrp x0, .LANCHOR4
+ add x0, x0, :lo12:.LANCHOR4
+ ldrb w0, [x0,73]
add w0, w0, 1
cmp w21, w0
- bcs .L1138
- ldr x0, [x20, #:got_lo12:g_retryMode]
+ bcs .L1178
+ add x0, x19, :lo12:.LANCHOR0
mov w1, w21
- ldrb w0, [x0]
+ ldrb w0, [x0,752]
sub w0, w0, #67
uxtb w0, w0
cmp w0, 1
- mov x0, x19
- bhi .L1114
+ mov x0, x20
+ bhi .L1154
bl SandiskSetRRPara
- b .L1115
-.L1114:
+ b .L1155
+.L1154:
bl ToshibaSetRRPara
-.L1115:
- ldr x0, [x20, #:got_lo12:g_retryMode]
- ldrb w0, [x0]
+.L1155:
+ add x0, x19, :lo12:.LANCHOR0
+ ldrb w0, [x0,752]
cmp w0, 34
- bne .L1116
- adrp x0, :got:g_maxRetryCount
- ldr x0, [x0, #:got_lo12:g_maxRetryCount]
- ldrb w0, [x0]
+ bne .L1156
+ adrp x0, .LANCHOR4
+ add x0, x0, :lo12:.LANCHOR4
+ ldrb w0, [x0,73]
sub w0, w0, #3
cmp w21, w0
- bne .L1116
- mov w0, 179
- str w0, [x19,8]
-.L1116:
- mov w0, 38
- str w0, [x19,8]
- mov w0, 93
- str w0, [x19,8]
- cbz w22, .L1117
+ bne .L1156
+ ldr x0, [x29,104]
+ mov w1, 179
+ add x0, x24, x0
+ str w1, [x0,8]
+.L1156:
+ ldr x0, [x29,96]
+ mov w1, 38
+ add x0, x24, x0
+ str w1, [x0,2056]
+ mov w1, 93
+ str w1, [x0,2056]
+ cbz w22, .L1157
mov w0, 4
bl NandcSetDdrMode
+ ldr w1, [x29,116]
mov w0, w23
- mov w1, w27
- mov x2, x26
- mov x3, x25
+ mov x2, x27
+ mov x3, x26
bl FlashReadRawPage
mov w28, w0
mov w0, 0
bl NandcSetDdrMode
- b .L1118
-.L1117:
+ b .L1158
+.L1157:
+ ldr w1, [x29,116]
mov w0, w23
- mov w1, w27
- mov x2, x26
- mov x3, x25
+ mov x2, x27
+ mov x3, x26
bl FlashReadRawPage
mov w28, w0
-.L1118:
+.L1158:
cmn w28, #1
- beq .L1119
- adrp x0, :got:gNandFlashEccBits
- cmn w24, #1
- csel w24, w24, w28, ne
- ldr x0, [x0, #:got_lo12:gNandFlashEccBits]
- ldrb w0, [x0]
+ beq .L1159
+ add x0, x19, :lo12:.LANCHOR0
+ cmn w25, #1
+ csel w25, w25, w28, ne
+ ldrb w0, [x0,1944]
add w0, w0, w0, lsl 1
cmp w28, w0, lsr 2
- bcc .L1121
- mov x25, 0
- mov x26, x25
-.L1119:
+ bcc .L1161
+ mov x26, 0
+ mov x27, x26
+.L1159:
add w21, w21, 1
- b .L1113
-.L1138:
- mov w28, w24
-.L1121:
- ldr x20, [x20, #:got_lo12:g_retryMode]
+ b .L1153
+.L1178:
+ mov w28, w25
+.L1161:
+ add x0, x19, :lo12:.LANCHOR0
mov w1, 0
- ldrb w0, [x20]
+ ldrb w0, [x0,752]
sub w0, w0, #67
uxtb w0, w0
cmp w0, 1
- mov x0, x19
- bhi .L1123
+ mov x0, x20
+ bhi .L1163
bl SandiskSetRRPara
- b .L1124
-.L1123:
+ b .L1164
+.L1163:
bl ToshibaSetRRPara
-.L1124:
+.L1164:
+ ldr x0, [x29,120]
+ add x19, x19, :lo12:.LANCHOR0
+ add x0, x0, 8
+ add x24, x24, x0, lsl 8
mov w0, 255
- str w0, [x19,8]
- adrp x0, :got:gNandFlashEccBits
- ldr x0, [x0, #:got_lo12:gNandFlashEccBits]
- ldrb w0, [x0]
+ str w0, [x24,8]
+ ldrb w0, [x19,1944]
add w0, w0, w0, lsl 1
cmp w28, w0, lsr 2
- bcc .L1125
+ bcc .L1165
cmn w28, #1
mov w0, 256
csel w28, w28, w0, eq
-.L1125:
+.L1165:
mov w0, w23
bl NandcWaitFlashReady
- cbz w22, .L1126
+ cbz w22, .L1166
mov w0, 4
bl NandcSetDdrMode
-.L1126:
+.L1166:
mov w0, w28
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 96
+ ldp x29, x30, [sp], 128
ret
.size ToshibaReadRetrial, .-ToshibaReadRetrial
.align 2
stp x29, x30, [sp, -96]!
add x29, sp, 0
stp x21, x22, [sp,32]
- uxtb w21, w0
+ uxtb w22, w0
str x27, [sp,80]
- mov w0, w21
- mov x22, x3
+ mov w0, w22
+ adrp x27, .LANCHOR4
stp x19, x20, [sp,16]
stp x23, x24, [sp,48]
stp x25, x26, [sp,64]
- mov w23, w1
- mov x25, x2
+ mov x24, x2
+ mov w25, w1
+ mov x23, x3
+ adrp x20, .LANCHOR0
bl NandcWaitFlashReady
- mov w20, 1
- mov w0, w21
+ mov w26, 1
+ add x0, x20, :lo12:.LANCHOR0
+ sbfiz x1, x22, 4, 32
+ add x0, x0, 24
mov w19, -1
- adrp x26, :got:g_maxRetryCount
- adrp x27, :got:gNandFlashEccBits
- bl NandcGetChipIf
- mov x24, x0
-.L1140:
- ldr x0, [x26, #:got_lo12:g_maxRetryCount]
- ldrb w4, [x0]
- add w4, w4, 1
- cmp w20, w4
- bcs .L1143
- mov x0, x24
- mov w1, w20
+ add x2, x0, x1
+ ldr x0, [x0,x1]
+ ldrb w21, [x2,8]
+ add x21, x21, 8
+ add x21, x0, x21, lsl 8
+.L1180:
+ add x0, x27, :lo12:.LANCHOR4
+ ldrb w0, [x0,73]
+ add w0, w0, 1
+ cmp w26, w0
+ bcs .L1183
+ mov x0, x21
+ mov w1, w26
bl SamsungSetRRPara
- mov w0, w21
- mov w1, w23
- mov x2, x25
- mov x3, x22
+ mov w0, w22
+ mov w1, w25
+ mov x2, x24
+ mov x3, x23
bl FlashReadRawPage
cmn w0, #1
- mov w4, w0
- beq .L1141
+ beq .L1181
+ add x1, x20, :lo12:.LANCHOR0
cmn w19, #1
csel w19, w19, w0, ne
- ldr x0, [x27, #:got_lo12:gNandFlashEccBits]
- ldrb w2, [x0]
- add w2, w2, w2, lsl 1
- cmp w4, w2, lsr 2
- bcc .L1146
- mov x22, 0
- mov x25, x22
-.L1141:
- add w20, w20, 1
- b .L1140
-.L1146:
- mov w19, w4
-.L1143:
- mov x0, x24
+ ldrb w1, [x1,1944]
+ add w1, w1, w1, lsl 1
+ cmp w0, w1, lsr 2
+ bcc .L1186
+ mov x23, 0
+ mov x24, x23
+.L1181:
+ add w26, w26, 1
+ b .L1180
+.L1186:
+ mov w19, w0
+.L1183:
+ mov x0, x21
mov w1, 0
+ add x20, x20, :lo12:.LANCHOR0
bl SamsungSetRRPara
- adrp x0, :got:gNandFlashEccBits
- ldr x0, [x0, #:got_lo12:gNandFlashEccBits]
- ldrb w0, [x0]
+ ldrb w0, [x20,1944]
add w0, w0, w0, lsl 1
cmp w19, w0, lsr 2
- bcc .L1145
+ bcc .L1185
cmn w19, #1
mov w0, 256
csel w19, w19, w0, eq
-.L1145:
+.L1185:
mov w0, w19
ldr x27, [sp,80]
ldp x19, x20, [sp,16]
.global MicronReadRetrial
.type MicronReadRetrial, %function
MicronReadRetrial:
- stp x29, x30, [sp, -96]!
+ stp x29, x30, [sp, -128]!
add x29, sp, 0
- stp x21, x22, [sp,32]
- uxtb w22, w0
- mov w21, 0
- mov w0, w22
- stp x19, x20, [sp,16]
stp x23, x24, [sp,48]
+ uxtb w24, w0
+ mov w23, 0
+ mov w0, w24
+ stp x19, x20, [sp,16]
stp x25, x26, [sp,64]
stp x27, x28, [sp,80]
+ stp x21, x22, [sp,32]
mov w25, w1
- mov x24, x2
- mov x23, x3
+ mov x27, x2
+ mov x26, x3
+ adrp x21, .LANCHOR0
bl NandcWaitFlashReady
- mov w0, w22
- mov w20, -1
- mov w26, 239
- mov w27, 137
- bl NandcGetChipIf
- adrp x28, :got:gNandFlashEccBits
- mov x19, x0
-.L1156:
- str w26, [x19,8]
+ mov w19, -1
+ add x0, x21, :lo12:.LANCHOR0
+ sbfiz x1, x24, 4, 32
+ add x0, x0, 24
+ adrp x4, .LANCHOR4
+ add x2, x0, x1
+ mov w6, 239
+ mov w7, 137
+ ldr x28, [x0,x1]
+ ldrb w20, [x2,8]
+ lsl x5, x20, 8
+.L1193:
+ add x0, x4, :lo12:.LANCHOR4
+ ldrb w0, [x0,73]
+ cmp w23, w0
+ bcs .L1196
+ add x22, x28, x5
mov w0, 200
- str w27, [x19,4]
- add w21, w21, 1
+ str x4, [x29,96]
+ add w23, w23, 1
+ str x5, [x29,104]
+ str w6, [x22,2056]
+ str w7, [x22,2052]
+ str x6, [x29,112]
+ str x7, [x29,120]
bl NandcDelayns
- str w21, [x19]
- str wzr, [x19]
- mov w0, w22
- str wzr, [x19]
+ str w23, [x22,2048]
+ mov w0, w24
+ str wzr, [x22,2048]
mov w1, w25
- str wzr, [x19]
- mov x2, x24
- mov x3, x23
+ str wzr, [x22,2048]
+ mov x2, x27
+ str wzr, [x22,2048]
+ mov x3, x26
bl FlashReadRawPage
cmn w0, #1
- beq .L1153
- ldr x1, [x28, #:got_lo12:gNandFlashEccBits]
- cmn w20, #1
- csel w20, w20, w0, ne
- ldrb w2, [x1]
+ ldr x7, [x29,120]
+ ldr x6, [x29,112]
+ ldr x5, [x29,104]
+ ldr x4, [x29,96]
+ beq .L1193
+ add x1, x21, :lo12:.LANCHOR0
+ cmn w19, #1
+ csel w19, w19, w0, ne
+ ldrb w2, [x1,1944]
add w2, w2, w2, lsl 1
cmp w0, w2, lsr 2
- bcc .L1158
- mov x23, 0
- mov x24, x23
-.L1153:
- cmp w21, 7
- bne .L1156
- b .L1155
-.L1158:
- mov w20, w0
-.L1155:
+ bcc .L1199
+ mov x26, 0
+ mov x27, x26
+ b .L1193
+.L1199:
+ mov w19, w0
+.L1196:
+ add x20, x28, x20, lsl 8
mov w0, 239
- str w0, [x19,8]
+ add x21, x21, :lo12:.LANCHOR0
+ str w0, [x20,2056]
mov w0, 137
- str w0, [x19,4]
+ str w0, [x20,2052]
mov w0, 200
bl NandcDelayns
- str wzr, [x19]
- str wzr, [x19]
- adrp x0, :got:gNandFlashEccBits
- str wzr, [x19]
- str wzr, [x19]
- ldr x0, [x0, #:got_lo12:gNandFlashEccBits]
- ldrb w0, [x0]
+ str wzr, [x20,2048]
+ ldrb w0, [x21,1944]
+ str wzr, [x20,2048]
+ str wzr, [x20,2048]
add w0, w0, w0, lsl 1
- cmp w20, w0, lsr 2
- bcc .L1157
- cmn w20, #1
+ str wzr, [x20,2048]
+ cmp w19, w0, lsr 2
+ bcc .L1198
+ cmn w19, #1
mov w0, 256
- csel w20, w20, w0, eq
-.L1157:
- mov w0, w20
+ csel w19, w19, w0, eq
+.L1198:
+ mov w0, w19
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 96
+ ldp x29, x30, [sp], 128
ret
.size MicronReadRetrial, .-MicronReadRetrial
.align 2
stp x29, x30, [sp, -112]!
add x29, sp, 0
stp x21, x22, [sp,32]
- adrp x21, :got:gReadRetryInfo
+ adrp x21, .LANCHOR0
uxtb x22, w0
- stp x23, x24, [sp,48]
stp x27, x28, [sp,80]
- ldr x0, [x21, #:got_lo12:gReadRetryInfo]
+ add x28, x21, :lo12:.LANCHOR0
mov w27, w1
- stp x19, x20, [sp,16]
- stp x25, x26, [sp,64]
+ add x0, x28, 760
add x1, x0, x22
- mov x26, x2
- ldrb w25, [x0,2]
mov w0, w22
+ stp x23, x24, [sp,48]
+ stp x25, x26, [sp,64]
+ stp x19, x20, [sp,16]
+ mov x26, x2
mov x24, x3
- mov x23, x22
ldrb w20, [x1,12]
+ mov x23, x22
+ ldrb w25, [x28,762]
bl NandcWaitFlashReady
- mov w28, 0
+ mov w4, 0
mov w19, -1
- adrp x4, :got:gNandFlashEccBits
-.L1166:
- cmp w28, w25
- bcs .L1170
+ add x5, x28, 764
+.L1206:
+ cmp w4, w25
+ bcs .L1210
add w20, w20, 1
- ldr x2, [x21, #:got_lo12:gReadRetryInfo]
+ ldrb w1, [x28,761]
+ mov x2, x5
mov w0, w23
- str x4, [x29,104]
uxtb w20, w20
- add x2, x2, 4
+ str x4, [x29,96]
cmp w20, w25
- ldrb w1, [x2,-3]
+ str x5, [x29,104]
csel w20, w20, wzr, cc
mov w3, w20
bl HynixSetRRPara
mov x3, x24
bl FlashReadRawPage
cmn w0, #1
- ldr x4, [x29,104]
- beq .L1168
- ldr x1, [x4, #:got_lo12:gNandFlashEccBits]
+ ldr x5, [x29,104]
+ ldr x4, [x29,96]
+ beq .L1208
+ ldrb w1, [x28,1944]
cmn w19, #1
csel w19, w19, w0, ne
- ldrb w1, [x1]
add w1, w1, w1, lsl 1
cmp w0, w1, lsr 2
- bcc .L1173
+ bcc .L1213
mov x24, 0
mov x26, x24
-.L1168:
- add w28, w28, 1
- b .L1166
-.L1173:
+.L1208:
+ add w4, w4, 1
+ b .L1206
+.L1213:
mov w19, w0
-.L1170:
- ldr x21, [x21, #:got_lo12:gReadRetryInfo]
- adrp x0, :got:gNandFlashEccBits
- add x21, x21, x22
- strb w20, [x21,12]
- ldr x0, [x0, #:got_lo12:gNandFlashEccBits]
- ldrb w0, [x0]
+.L1210:
+ add x21, x21, :lo12:.LANCHOR0
+ add x22, x21, x22
+ ldrb w0, [x21,1944]
+ strb w20, [x22,772]
add w0, w0, w0, lsl 1
cmp w19, w0, lsr 2
- bcc .L1172
+ bcc .L1212
cmn w19, #1
mov w0, 256
csel w19, w19, w0, eq
-.L1172:
+.L1212:
mov w0, w19
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
add x29, sp, 0
stp x19, x20, [sp,16]
uxtb w19, w0
- adrp x0, :got:gNandParaInfo
+ adrp x0, .LANCHOR1+481
stp x21, x22, [sp,32]
mov w20, w1
mov x22, x2
- ldr x0, [x0, #:got_lo12:gNandParaInfo]
- ldrb w21, [x0,9]
- cbnz w19, .L1180
- adrp x0, :got:gNandIDBResBlkNum
- adrp x1, :got:gBlockPageAlignSize
- ldr x0, [x0, #:got_lo12:gNandIDBResBlkNum]
- ldr x1, [x1, #:got_lo12:gBlockPageAlignSize]
- ldrb w0, [x0]
- ldr w1, [x1]
- mul w0, w0, w1
- cmp w20, w0
- bcs .L1180
- adrp x0, :got:g_slc2KBNand
- ldr x0, [x0, #:got_lo12:g_slc2KBNand]
- ldrb w0, [x0]
- cbnz w0, .L1181
+ ldrb w21, [x0,#:lo12:.LANCHOR1+481]
+ cbnz w19, .L1220
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrb w1, [x0,9]
+ ldr w2, [x0,12]
+ mul w1, w1, w2
+ cmp w20, w1
+ bcs .L1220
+ ldrb w0, [x0,8]
+ cbnz w0, .L1221
sub w21, w21, #2
- b .L1180
-.L1181:
+ b .L1220
+.L1221:
mov w21, 4
-.L1180:
+.L1220:
mov w0, w19
str x4, [x29,56]
bl NandcWaitFlashReady
.global FlashSavePhyInfo
.type FlashSavePhyInfo, %function
FlashSavePhyInfo:
- stp x29, x30, [sp, -112]!
+ stp x29, x30, [sp, -80]!
add x29, sp, 0
stp x23, x24, [sp,48]
- adrp x23, :got:gFlashPageBuffer0
- adrp x24, :got:gFlashPageBuffer1
- stp x21, x22, [sp,32]
- adrp x22, :got:gpFlashSaveInfo
+ adrp x23, .LANCHOR0
stp x19, x20, [sp,16]
- ldr x20, [x23, #:got_lo12:gFlashPageBuffer0]
- ldr x19, [x22, #:got_lo12:gpFlashSaveInfo]
+ stp x21, x22, [sp,32]
+ add x20, x23, :lo12:.LANCHOR0
+ adrp x22, .LANCHOR4
+ add x19, x22, :lo12:.LANCHOR4
+ mov w21, 0
stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- adrp x25, :got:gBlockPageAlignSize
- adrp x26, :got:gNandFlashIdbBlockAddr
- ldr x0, [x20]
- adrp x27, :got:gNandFlashInfoBlockAddr
- str x0, [x19]
- adrp x0, :got:gNandFlashIDBEccBits
- ldr x0, [x0, #:got_lo12:gNandFlashIDBEccBits]
- ldrb w0, [x0]
+ ldr x0, [x20,1856]
+ str x0, [x19,56]
+ ldrb w0, [x19,74]
bl FlashBchSel
- ldr x0, [x20]
+ ldr x0, [x20,1856]
mov w1, 0
mov w2, 2048
bl ftl_memset
- ldr x1, [x19]
+ ldr x1, [x19,56]
mov w0, 20036
movk w0, 0x4e41, lsl 16
mov w2, 32
str w0, [x1]
- adrp x1, :got:gNandMaxDie
- ldr x0, [x19]
- ldr x1, [x1, #:got_lo12:gNandMaxDie]
+ ldr x0, [x19,56]
+ ldrb w1, [x20,1845]
add x0, x0, 16
- ldrb w1, [x1]
strh w1, [x0,-4]
- adrp x1, :got:gNandIDBResBlkNum
- ldr x1, [x1, #:got_lo12:gNandIDBResBlkNum]
- ldrb w1, [x1]
+ ldrb w1, [x20,9]
strh w1, [x0,-2]
- adrp x1, :got:gFlashToggleModeEn
- ldr x1, [x1, #:got_lo12:gFlashToggleModeEn]
- ldrb w1, [x1]
+ ldrb w1, [x20,1864]
str w1, [x0,1060]
- adrp x1, :got:IDByte
- ldr x1, [x1, #:got_lo12:IDByte]
+ add x1, x20, 1620
bl ftl_memcpy
- adrp x1, :got:DieCsIndex
- ldr x0, [x19]
+ ldr x0, [x19,56]
+ add x1, x20, 1848
mov w2, 8
add x0, x0, 80
- ldr x1, [x1, #:got_lo12:DieCsIndex]
bl ftl_memcpy
- adrp x1, :got:DieAddrs
- ldr x0, [x19]
+ ldr x0, [x19,56]
+ add x1, x20, 708
mov w2, 32
add x0, x0, 96
- ldr x1, [x1, #:got_lo12:DieAddrs]
bl ftl_memcpy
- adrp x1, :got:gNandParaInfo
- ldr x0, [x19]
+ ldr x0, [x19,56]
+ adrp x1, .LANCHOR1
+ add x1, x1, :lo12:.LANCHOR1
mov w2, 32
+ add x1, x1, 472
add x0, x0, 160
- ldr x1, [x1, #:got_lo12:gNandParaInfo]
bl ftl_memcpy
- adrp x1, :got:gNandOptPara
- ldr x0, [x19]
+ ldr x0, [x19,56]
+ add x1, x20, 88
mov w2, 32
add x0, x0, 192
- ldr x1, [x1, #:got_lo12:gNandOptPara]
bl ftl_memcpy
- adrp x1, :got:gReadRetryInfo
- ldr x0, [x19]
+ ldr x0, [x19,56]
+ add x1, x20, 760
mov w2, 852
add x0, x0, 224
- ldr x1, [x1, #:got_lo12:gReadRetryInfo]
bl ftl_memcpy
- ldr x20, [x19]
+ ldr x20, [x19,56]
mov w1, 2036
add x0, x20, 12
bl JSHash
str w0, [x20,8]
- ldr x0, [x19]
- mov w1, 1592
- str w1, [x0,4]
- ldr x0, [x24, #:got_lo12:gFlashPageBuffer1]
- ldr x0, [x0]
- str x0, [x19]
- mov w19, 0
- mov w20, w19
-.L1185:
- ldr x21, [x25, #:got_lo12:gBlockPageAlignSize]
+ mov w0, 1592
+ str w0, [x20,4]
+ ldr x0, [x19,80]
+ str x0, [x19,56]
+ mov w0, 0
+ mov w19, w21
+ bl flash_enter_slc_mode
+.L1225:
+ add x20, x23, :lo12:.LANCHOR0
mov w2, 0
mov w0, 0
- ldr w1, [x21]
- mul w1, w20, w1
+ add x24, x22, :lo12:.LANCHOR4
+ add w26, w19, 1
+ ldr w1, [x20,12]
+ mul w1, w19, w1
bl FlashEraseBlock
- ldr x28, [x23, #:got_lo12:gFlashPageBuffer0]
- ldr w1, [x21]
+ ldr w1, [x20,12]
mov x3, 0
+ ldr x2, [x20,1856]
mov w0, 0
- ldr x2, [x28]
- mul w1, w20, w1
+ mul w1, w19, w1
bl FlashProgPage
- ldr w1, [x21]
+ ldr w1, [x20,12]
mov x3, 0
- ldr x2, [x28]
+ ldr x2, [x20,1856]
mov w0, 0
- add w28, w20, 1
- mul w1, w20, w1
+ mul w1, w19, w1
add w1, w1, 1
bl FlashProgPage
- ldr w1, [x21]
+ ldr w1, [x20,12]
mov w0, 0
- ldr x2, [x24, #:got_lo12:gFlashPageBuffer1]
+ ldr x2, [x24,80]
mov x3, 0
- mul w1, w20, w1
- ldr x2, [x2]
+ mul w1, w19, w1
bl FlashReadRawPage
cmn w0, #1
- beq .L1186
- ldr x0, [x22, #:got_lo12:gpFlashSaveInfo]
- mov w1, 20036
- movk w1, 0x4e41, lsl 16
- ldr x0, [x0]
- ldr w2, [x0]
- cmp w2, w1
- bne .L1186
- ldr w2, [x0,8]
+ beq .L1223
+ ldr x25, [x24,56]
+ mov w0, 20036
+ movk w0, 0x4e41, lsl 16
+ ldr w1, [x25]
+ cmp w1, w0
+ bne .L1223
mov w1, 2036
- add x0, x0, 12
- str x2, [x29,104]
+ add x0, x25, 12
bl JSHash
- ldr x2, [x29,104]
- cmp w2, w0
- bne .L1186
- ldr x0, [x26, #:got_lo12:gNandFlashIdbBlockAddr]
- str w28, [x0]
- ldr w0, [x21]
- ldr x1, [x27, #:got_lo12:gNandFlashInfoBlockAddr]
- mul w20, w20, w0
- str w20, [x1]
- cbnz w19, .L1187
- mov w19, 1
-.L1186:
- cmp w28, 4
- mov w20, w28
- bne .L1185
- eor w0, w19, 1
- neg w0, w0
- b .L1184
-.L1187:
+ ldr w1, [x25,8]
+ cmp w1, w0
+ bne .L1223
+ ldr w0, [x20,12]
+ cmp w21, 1
+ str w26, [x24,68]
+ mul w19, w19, w0
+ str w19, [x24,64]
+ beq .L1226
+ mov w21, 1
+.L1223:
+ cmp w26, 4
+ mov w19, w26
+ bne .L1225
+ b .L1224
+.L1226:
+ mov w21, 2
+.L1224:
mov w0, 0
-.L1184:
+ bl flash_exit_slc_mode
+ cmp w21, wzr
+ csetm w0, eq
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 112
+ ldp x29, x30, [sp], 80
ret
.size FlashSavePhyInfo, .-FlashSavePhyInfo
.align 2
.type FlashReadIdbDataRaw, %function
FlashReadIdbDataRaw:
stp x29, x30, [sp, -128]!
- mov w1, 60
- mov w2, 2048
add x29, sp, 0
- stp x23, x24, [sp,48]
+ stp x21, x22, [sp,32]
+ adrp x22, __stack_chk_guard
stp x25, x26, [sp,64]
- strb w1, [x29,120]
- mov w1, 40
- strb w1, [x29,121]
- mov w1, 24
- strb w1, [x29,122]
- mov w1, 16
- strb w1, [x29,123]
- adrp x1, :got:gNandFlashEccBits
+ mov x26, x0
+ ldr x0, [x22,#:lo12:__stack_chk_guard]
+ str x0, [x29,120]
+ mov w0, 60
+ strb w0, [x29,112]
+ mov w0, 40
+ strb w0, [x29,113]
+ mov w0, 24
stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
- ldr x1, [x1, #:got_lo12:gNandFlashEccBits]
- adrp x21, .LC89
+ strb w0, [x29,114]
+ adrp x19, .LANCHOR0
+ mov w0, 16
+ strb w0, [x29,115]
+ add x0, x19, :lo12:.LANCHOR0
+ stp x23, x24, [sp,48]
stp x27, x28, [sp,80]
- mov w19, 2
- mov w28, -1
- ldrb w22, [x1]
- adrp x24, :got:gNandIDBResBlkNum
+ ldr w1, [x0,1872]
+ ldrb w27, [x0,1944]
+ mov w0, 12336
+ movk w0, 0x5638, lsl 16
+ cmp w1, w0
+ bne .L1232
+ mov w0, 0
+ bl flash_enter_slc_mode
+.L1232:
+ adrp x24, .LC90
+ mov x0, x26
mov w1, 0
- adrp x25, :got:gBlockPageAlignSize
- adrp x26, :got:gFlashPageBuffer0
- add x21, x21, :lo12:.LC89
- mov x23, x0
+ mov w2, 2048
+ mov w25, -1
+ mov w20, 2
+ add x24, x24, :lo12:.LC90
+ adrp x28, .LANCHOR4
bl ftl_memset
-.L1193:
- ldr x0, [x24, #:got_lo12:gNandIDBResBlkNum]
- ldrb w0, [x0]
- cmp w19, w0
- bcs .L1197
- mov x27, 0
-.L1195:
- add x0, x29, 120
- ldrb w4, [x27,x0]
+.L1233:
+ add x0, x19, :lo12:.LANCHOR0
+ ldrb w0, [x0,9]
+ cmp w20, w0
+ bcs .L1237
+ mov x23, 0
+.L1235:
+ add x0, x29, 112
+ add x21, x19, :lo12:.LANCHOR0
+ ldrb w4, [x23,x0]
str x4, [x29,104]
mov w0, w4
bl FlashBchSel
- ldr x20, [x26, #:got_lo12:gFlashPageBuffer0]
- ldr x0, [x25, #:got_lo12:gBlockPageAlignSize]
- mov x3, 0
- ldr x2, [x20]
- ldr w1, [x0]
+ ldr w1, [x21,12]
mov w0, 0
- mul w1, w19, w1
+ ldr x2, [x21,1856]
+ mov x3, 0
+ mul w1, w20, w1
bl FlashReadRawPage
cmn w0, #1
ldr x4, [x29,104]
- bne .L1194
- add x27, x27, 1
- cmp x27, 4
- bne .L1195
- b .L1196
-.L1194:
- ldr x0, [x20]
+ bne .L1234
+ add x23, x23, 1
+ cmp x23, 4
+ bne .L1235
+ b .L1236
+.L1234:
+ ldr x0, [x21,1856]
ldr w1, [x0]
mov w0, 35899
movk w0, 0xfcdc, lsl 16
cmp w1, w0
- bne .L1196
+ bne .L1236
mov w1, w4
- mov x0, x21
+ mov x0, x24
bl printk
- ldr x1, [x20]
- mov x0, x23
+ ldr x1, [x21,1856]
+ mov x0, x26
mov w2, 2048
bl ftl_memcpy
- adrp x0, :got:gNandIDBResBlkNum
- ldr x1, [x20]
- ldr x0, [x0, #:got_lo12:gNandIDBResBlkNum]
- ldr w1, [x1,512]
- strb w1, [x0]
- adrp x1, :got:gNandFlashIdbBlockAddr
- ldr x1, [x1, #:got_lo12:gNandFlashIdbBlockAddr]
- ldr w0, [x1]
- cmp w0, w19
- bls .L1199
- mov w28, 0
- str w19, [x1]
+ ldr x0, [x21,1856]
+ ldr w0, [x0,512]
+ strb w0, [x21,9]
+ add x0, x28, :lo12:.LANCHOR4
+ ldr w1, [x0,68]
+ cmp w1, w20
+ bls .L1241
+ mov w25, 0
+ str w20, [x0,68]
bl FlashSavePhyInfo
-.L1196:
- add w19, w19, 1
- b .L1193
-.L1199:
- mov w28, 0
-.L1197:
- mov w0, w22
+.L1236:
+ add w20, w20, 1
+ b .L1233
+.L1241:
+ mov w25, 0
+.L1237:
+ mov w0, w27
+ add x19, x19, :lo12:.LANCHOR0
bl FlashBchSel
- mov w0, w28
+ ldr w1, [x19,1872]
+ mov w0, 12336
+ movk w0, 0x5638, lsl 16
+ cmp w1, w0
+ bne .L1238
+ mov w0, 0
+ bl flash_exit_slc_mode
+.L1238:
+ ldr x2, [x29,120]
+ mov w0, w25
+ ldr x1, [x22,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1240
+ bl __stack_chk_fail
+.L1240:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
stp x29, x30, [sp, -112]!
add x29, sp, 0
stp x19, x20, [sp,16]
- mov x19, x0
- mov w0, 32768
+ adrp x19, .LANCHOR0
+ add x20, x19, :lo12:.LANCHOR0
stp x21, x22, [sp,32]
+ mov x22, x0
+ mov w0, 32768
stp x23, x24, [sp,48]
- stp x27, x28, [sp,80]
stp x25, x26, [sp,64]
+ stp x27, x28, [sp,80]
+ adrp x23, .LANCHOR4
bl ftl_malloc
- adrp x20, :got:gNandIDBResBlkNum
- adrp x1, :got:gFlashPageBuffer0
- adrp x24, :got:gNandIDBResBlkNumSaveInFlash
- adrp x23, :got:gFlashToggleModeEn
- adrp x22, :got:g_slc2KBNand
- adrp x25, :got:gNandFlashIDBEccBits
- adrp x21, :got:IDByte
- ldr x1, [x1, #:got_lo12:gFlashPageBuffer0]
- adrp x27, .LC90
- mov w28, 0
- add x27, x27, :lo12:.LC90
- str x0, [x1]
+ add x21, x23, :lo12:.LANCHOR4
+ str x0, [x20,1856]
mov w0, 32768
+ add x24, x20, 24
+ adrp x25, .LC91
+ mov w28, 0
bl ftl_malloc
- adrp x1, :got:gFlashPageBuffer1
- ldr x1, [x1, #:got_lo12:gFlashPageBuffer1]
- str x0, [x1]
+ str x0, [x21,80]
mov w0, 4096
+ mov w27, 144
bl ftl_malloc
- adrp x1, :got:gFlashSpareBuffer
- ldr x1, [x1, #:got_lo12:gFlashSpareBuffer]
- str x0, [x1]
+ str x0, [x21,88]
mov w0, 32768
bl ftl_malloc
- adrp x1, :got:gFlashProgCheckBuffer
- ldr x1, [x1, #:got_lo12:gFlashProgCheckBuffer]
- str x0, [x1]
+ str x0, [x21,96]
mov w0, 4096
bl ftl_malloc
- adrp x1, :got:gFlashProgCheckSpareBuffer
- ldr x1, [x1, #:got_lo12:gFlashProgCheckSpareBuffer]
- str x0, [x1]
- mov w1, 50
- ldr x0, [x20, #:got_lo12:gNandIDBResBlkNum]
- strb w1, [x0]
- ldr x0, [x24, #:got_lo12:gNandIDBResBlkNumSaveInFlash]
- strb w1, [x0]
- adrp x1, :got:gNandFlashIdbBlockAddr
+ str x0, [x21,104]
mov w0, 128
- ldr x1, [x1, #:got_lo12:gNandFlashIdbBlockAddr]
- str wzr, [x1]
- adrp x1, :got:gBlockPageAlignSize
- ldr x1, [x1, #:got_lo12:gBlockPageAlignSize]
- str w0, [x1]
- adrp x1, :got:FlashDdrTunningReadCount
- ldr x0, [x23, #:got_lo12:gFlashToggleModeEn]
- strb wzr, [x0]
- ldr x1, [x1, #:got_lo12:FlashDdrTunningReadCount]
- str wzr, [x1]
- mov w1, 60
- ldr x0, [x22, #:got_lo12:g_slc2KBNand]
- strb wzr, [x0]
- ldr x0, [x25, #:got_lo12:gNandFlashIDBEccBits]
- strb w1, [x0]
- mov x0, x19
+ str w0, [x20,12]
+ mov w0, 60
+ mov w1, 50
+ strb w0, [x21,74]
+ mov x0, x22
+ strb wzr, [x20,1864]
+ strb w1, [x20,9]
+ strb wzr, [x20,8]
+ add x20, x20, 1620
+ strb w1, [x21,72]
+ mov x26, x20
+ str wzr, [x21,68]
+ str wzr, [x21,40]
bl NandcInit
- ldr x19, [x21, #:got_lo12:IDByte]
- str x24, [x29,104]
-.L1207:
- uxtb w26, w28
- mov w0, w26
+ add x0, x25, :lo12:.LC91
+ str x0, [x29,104]
+.L1249:
+ uxtb w25, w28
+ mov w0, w25
bl FlashReset
- mov w0, w26
- bl NandcGetChipIf
- mov x24, x0
- mov w0, w26
+ ldrb w22, [x24,8]
+ ldr x21, [x24]
+ mov w0, w25
+ ubfiz x22, x22, 8, 8
+ add x21, x21, x22
bl NandcFlashCs
- mov w0, 144
- str w0, [x24,8]
- str wzr, [x24,4]
mov w0, 200
+ str w27, [x21,2056]
+ str wzr, [x21,2052]
bl NandcDelayns
- ldr w0, [x24]
- strb w0, [x19]
- ldr w0, [x24]
- strb w0, [x19,1]
- ldr w0, [x24]
- strb w0, [x19,2]
- ldr w0, [x24]
- strb w0, [x19,3]
- ldr w0, [x24]
- strb w0, [x19,4]
- ldr w0, [x24]
- strb w0, [x19,5]
- ldr w0, [x24]
- strb w0, [x19,6]
- ldr w0, [x24]
- strb w0, [x19,7]
- mov w0, w26
+ ldr w0, [x21,2048]
+ strb w0, [x20]
+ ldr w0, [x21,2048]
+ strb w0, [x20,1]
+ ldr w0, [x21,2048]
+ strb w0, [x20,2]
+ ldr w0, [x21,2048]
+ strb w0, [x20,3]
+ ldr w0, [x21,2048]
+ strb w0, [x20,4]
+ ldr w0, [x21,2048]
+ strb w0, [x20,5]
+ ldr w0, [x21,2048]
+ strb w0, [x20,6]
+ ldr w0, [x21,2048]
+ strb w0, [x20,7]
+ mov w0, w25
bl NandcFlashDeCs
- ldrb w2, [x19]
+ ldrb w2, [x20]
sub w0, w2, #1
uxtb w0, w0
cmp w0, 253
- bhi .L1204
- ldrb w3, [x19,1]
- mov x0, x27
- ldrb w4, [x19,2]
+ bhi .L1246
+ ldr x0, [x29,104]
add w1, w28, 1
- ldrb w5, [x19,3]
- ldrb w6, [x19,4]
- ldrb w7, [x19,5]
+ ldrb w3, [x20,1]
+ ldrb w4, [x20,2]
+ ldrb w5, [x20,3]
+ ldrb w6, [x20,4]
+ ldrb w7, [x20,5]
bl printk
-.L1204:
- cbnz w28, .L1205
- ldr x1, [x21, #:got_lo12:IDByte]
- ldrb w0, [x1]
+.L1246:
+ cbnz w28, .L1247
+ ldrb w0, [x26]
sub w0, w0, #1
uxtb w0, w0
cmp w0, 253
- bhi .L1243
- ldrb w0, [x1,1]
+ bhi .L1287
+ ldrb w0, [x26,1]
cmp w0, 255
- beq .L1243
- bl FlashCs123Init
-.L1205:
+ beq .L1287
+.L1247:
add w28, w28, 1
- add x19, x19, 8
+ add x24, x24, 16
cmp w28, 4
- bne .L1207
- ldr x0, [x21, #:got_lo12:IDByte]
- ldrb w0, [x0]
- cmp w0, 173
- beq .L1208
- adrp x0, :got:gBootDdrMode
- ldr x0, [x0, #:got_lo12:gBootDdrMode]
- ldr w0, [x0]
+ add x20, x20, 8
+ bne .L1249
+ add x0, x19, :lo12:.LANCHOR0
+ ldrb w1, [x0,1620]
+ cmp w1, 173
+ beq .L1250
+ ldr w0, [x0,1868]
bl NandcSetDdrMode
-.L1208:
- adrp x26, :got:gReadRetryInfo
+.L1250:
+ add x20, x19, :lo12:.LANCHOR0
mov w1, 0
+ add x0, x20, 760
mov w2, 852
- adrp x19, :got:gpNandParaInfo
- adrp x27, :got:gNandRandomizer
- ldr x0, [x26, #:got_lo12:gReadRetryInfo]
bl ftl_memset
- adrp x0, :got:gNandParaInfo
- ldr x1, [x19, #:got_lo12:gpNandParaInfo]
- mov x28, x0
- ldr x2, [x0, #:got_lo12:gNandParaInfo]
- str x2, [x1]
- ldr x1, [x27, #:got_lo12:gNandRandomizer]
- strb wzr, [x1]
- ldr x1, [x21, #:got_lo12:IDByte]
- ldrb w2, [x1,1]
+ strb wzr, [x20,16]
+ ldrb w2, [x20,1621]
+ adrp x1, .LANCHOR1
+ add x0, x1, :lo12:.LANCHOR1
cmp w2, 218
- cset w1, eq
- cbnz w1, .L1244
+ add x0, x0, 472
+ cset w3, eq
+ str x0, [x20,744]
+ add x20, x20, 1620
+ cbnz w3, .L1251
cmp w2, 241
- bne .L1209
-.L1244:
- ldr x0, [x22, #:got_lo12:g_slc2KBNand]
- mov w2, 1
- strb w2, [x0]
- mov w2, 16
- ldr x0, [x20, #:got_lo12:gNandIDBResBlkNum]
- strb w2, [x0]
- ldr x25, [x25, #:got_lo12:gNandFlashIDBEccBits]
- strb w2, [x25]
- ldr x0, [x21, #:got_lo12:IDByte]
- ldrb w0, [x0]
+ beq .L1251
+ cmp w2, 220
+ bne .L1252
+ ldrb w0, [x20,3]
+ cmp w0, 149
+ bne .L1252
+.L1251:
+ add x0, x19, :lo12:.LANCHOR0
+ mov w4, 1
+ mov w5, 16
+ strb w4, [x0,8]
+ add x4, x23, :lo12:.LANCHOR4
+ strb w5, [x0,9]
+ ldrb w0, [x0,1620]
+ strb w5, [x4,74]
+ add x5, x1, :lo12:.LANCHOR1
cmp w0, 152
- bne .L1211
+ strb w0, [x5,2969]
+ bne .L1253
mov w0, 24
- strb w0, [x25]
-.L1211:
- adrp x25, :got:gSlcNandParaInfo
- cbz w1, .L1212
- ldr x0, [x25, #:got_lo12:gSlcNandParaInfo]
- mov w1, 2048
- strh w1, [x0,14]
-.L1212:
- adrp x0, :got:gNandOptPara
- adrp x1, .LANCHOR2
- add x1, x1, :lo12:.LANCHOR2
+ strb w0, [x4,74]
+.L1253:
+ cbz w3, .L1254
+ add x0, x1, :lo12:.LANCHOR1
+ mov w2, 2048
+ strh w2, [x0,2982]
+ mov w2, -38
+ b .L1312
+.L1254:
+ cmp w2, 220
+ bne .L1255
+ add x0, x1, :lo12:.LANCHOR1
+ mov w2, 4096
+ strh w2, [x0,2982]
+ mov w2, -36
+.L1312:
+ strb w2, [x0,2970]
+.L1255:
+ add x20, x1, :lo12:.LANCHOR1
+ add x0, x19, :lo12:.LANCHOR0
+ add x1, x20, 2872
mov w2, 32
- add x1, x1, 32
- ldr x0, [x0, #:got_lo12:gNandOptPara]
+ add x0, x0, 88
bl ftl_memcpy
- ldr x0, [x28, #:got_lo12:gNandParaInfo]
+ add x0, x20, 472
+ add x1, x20, 2968
mov w2, 32
- ldr x1, [x25, #:got_lo12:gSlcNandParaInfo]
bl ftl_memcpy
-.L1209:
- ldr x0, [x22, #:got_lo12:g_slc2KBNand]
- ldrb w0, [x0]
- cbnz w0, .L1213
+.L1252:
+ add x20, x19, :lo12:.LANCHOR0
+ ldrb w0, [x20,8]
+ cbnz w0, .L1256
bl FlashLoadPhyInfoInRam
- cbnz w0, .L1215
- ldr x0, [x19, #:got_lo12:gpNandParaInfo]
- adrp x25, :got:gFlashInterfaceMode
- ldr x0, [x0]
- ldr x25, [x25, #:got_lo12:gFlashInterfaceMode]
+ cbnz w0, .L1258
+ ldr x0, [x20,744]
ldrb w1, [x0,17]
and w0, w1, 7
- strb w0, [x25]
- tbnz x1, 0, .L1215
- ldr x1, [x23, #:got_lo12:gFlashToggleModeEn]
- mov w2, 1
- strb w2, [x1]
+ strb w0, [x20,1844]
+ tbnz x1, 0, .L1258
+ mov w1, 1
+ strb w1, [x20,1864]
bl FlashSetInterfaceMode
- ldrb w0, [x25]
+ ldrb w0, [x20,1844]
bl NandcSetMode
-.L1215:
+.L1258:
+ add x20, x19, :lo12:.LANCHOR0
+ ldr x0, [x20,744]
+ ldrb w0, [x0,26]
+ strb w0, [x20,120]
bl FlashLoadPhyInfo
- cbz w0, .L1213
- adrp x0, :got:gBootDdrMode
- ldr x0, [x0, #:got_lo12:gBootDdrMode]
- ldr w0, [x0]
- cbz w0, .L1218
+ cbz w0, .L1256
+ ldr w0, [x20,1868]
+ cbz w0, .L1261
mov w0, 1
bl FlashSetInterfaceMode
mov w0, 1
- b .L1275
-.L1218:
- adrp x25, :got:gFlashInterfaceMode
- ldr x25, [x25, #:got_lo12:gFlashInterfaceMode]
- ldrb w0, [x25]
+ b .L1313
+.L1261:
+ ldrb w0, [x20,1844]
bl FlashSetInterfaceMode
- ldrb w0, [x25]
-.L1275:
+ ldrb w0, [x20,1844]
+.L1313:
bl NandcSetMode
bl FlashLoadPhyInfo
- cbz w0, .L1213
+ cbz w0, .L1256
mov w0, 1
+ add x20, x19, :lo12:.LANCHOR0
bl FlashSetInterfaceMode
mov w0, 1
bl NandcSetMode
- ldr x25, [x19, #:got_lo12:gpNandParaInfo]
- adrp x0, .LC91
- add x0, x0, :lo12:.LC91
- ldr x1, [x25]
+ ldr x1, [x20,744]
+ adrp x0, .LC92
+ add x0, x0, :lo12:.LC92
ldrh w1, [x1,14]
bl printk
bl FlashLoadPhyInfoInRam
cmn w0, #1
- beq .L1206
+ beq .L1248
bl FlashDieInfoInit
- ldr x0, [x25]
+ ldr x0, [x20,744]
ldrb w0, [x0,19]
bl FlashGetReadRetryDefault
- adrp x1, :got:gTotleBlock
- ldr x0, [x25]
- ldr x1, [x1, #:got_lo12:gTotleBlock]
+ adrp x1, .LANCHOR2+2022
+ ldr x0, [x20,744]
+ ldrh w1, [x1,#:lo12:.LANCHOR2+2022]
ldrb w2, [x0,9]
- ldrh w1, [x1]
add w1, w1, 4095
cmp w2, w1, lsr 12
- blt .L1220
+ blt .L1263
ldrh w1, [x0,14]
add w1, w1, 255
cmp w2, w1, lsr 8
- bge .L1221
-.L1220:
+ bge .L1264
+.L1263:
ldrh w1, [x0,14]
and w1, w1, -256
strh w1, [x0,14]
-.L1221:
- adrp x0, :got:gFlashInterfaceMode
- ldr x0, [x0, #:got_lo12:gFlashInterfaceMode]
- ldrb w0, [x0]
+.L1264:
+ add x0, x19, :lo12:.LANCHOR0
+ ldrb w0, [x0,1844]
tst w0, 6
- beq .L1222
+ beq .L1265
bl FlashSavePhyInfo
- adrp x1, :got:gNandFlashInfoBlockAddr
+ add x1, x23, :lo12:.LANCHOR4
mov w0, 0
- ldr x1, [x1, #:got_lo12:gNandFlashInfoBlockAddr]
- ldr w1, [x1]
+ ldr w1, [x1,64]
bl FlashDdrParaScan
-.L1222:
+.L1265:
bl FlashSavePhyInfo
-.L1213:
- ldr x0, [x19, #:got_lo12:gpNandParaInfo]
- adrp x25, :got:gFlashInterfaceMode
- ldr x27, [x27, #:got_lo12:gNandRandomizer]
- adrp x3, :got:gpReadRetrial
- ldr x4, [x0]
- ldrh w0, [x4,16]
- ubfx x1, x0, 7, 1
- strb w1, [x27]
- adrp x1, :got:gMultiPageReadEn
- ubfx x2, x0, 3, 1
- ldr x1, [x1, #:got_lo12:gMultiPageReadEn]
- strb w2, [x1]
- adrp x1, :got:gMultiPageProgEn
- ubfx x2, x0, 4, 1
- ldr x1, [x1, #:got_lo12:gMultiPageProgEn]
- strb w2, [x1]
- ubfx x2, x0, 8, 3
- ldr x1, [x25, #:got_lo12:gFlashInterfaceMode]
- strb w2, [x1]
- ldr x6, [x3, #:got_lo12:gpReadRetrial]
- str xzr, [x6]
- tbz x0, 6, .L1224
- adrp x1, :got:g_retryMode
- ldrb w0, [x4,19]
- ldr x1, [x1, #:got_lo12:g_retryMode]
- strb w0, [x1]
- adrp x1, :got:g_maxRegNum
- ldr x26, [x26, #:got_lo12:gReadRetryInfo]
- ldr x2, [x1, #:got_lo12:g_maxRegNum]
- ldrb w5, [x26,1]
- strb w5, [x2]
- adrp x2, :got:g_maxRetryCount
- ldrb w7, [x26,2]
- ldr x5, [x2, #:got_lo12:g_maxRetryCount]
- strb w7, [x5]
- sub w5, w0, #1
- uxtb w5, w5
- cmp w5, 5
- bhi .L1225
- adrp x1, :got:HynixReadRetrial
+.L1256:
+ add x1, x19, :lo12:.LANCHOR0
+ ldr x3, [x1,744]
+ ldrb w0, [x3,26]
+ strb w0, [x1,120]
+ ldrh w0, [x3,16]
+ ubfx x2, x0, 7, 1
+ strb w2, [x1,16]
+ add x2, x23, :lo12:.LANCHOR4
+ ubfx x4, x0, 3, 1
+ strb w4, [x2,112]
+ ubfx x4, x0, 4, 1
+ str xzr, [x2,48]
+ strb w4, [x1,1945]
+ ubfx x4, x0, 8, 3
+ strb w4, [x1,1844]
+ tbz x0, 6, .L1267
+ ldrb w0, [x3,19]
+ ldrb w4, [x1,762]
+ strb w4, [x2,73]
+ sub w4, w0, #1
+ ldrb w5, [x1,761]
+ uxtb w4, w4
+ strb w0, [x1,752]
+ strb w5, [x1,753]
+ cmp w4, 5
+ bhi .L1268
sub w0, w0, #5
+ adrp x4, HynixReadRetrial
+ add x4, x4, :lo12:HynixReadRetrial
+ str x4, [x2,48]
uxtb w0, w0
- ldr x1, [x1, #:got_lo12:HynixReadRetrial]
cmp w0, 1
- str x1, [x6]
- bhi .L1224
- adrp x0, :got:gNandcDumpWriteEn
- mov w1, 1
- ldr x0, [x0, #:got_lo12:gNandcDumpWriteEn]
- str w1, [x0]
- b .L1224
-.L1225:
- sub w5, w0, #17
- uxtb w5, w5
- cmp w5, 1
- bhi .L1227
- adrp x0, :got:MicronReadRetrial
- ldr x0, [x0, #:got_lo12:MicronReadRetrial]
- b .L1277
-.L1227:
- sub w5, w0, #65
- uxtb w5, w5
- cmp w5, 1
- bls .L1245
- cmp w0, 33
- bne .L1228
-.L1245:
- adrp x0, :got:ToshibaReadRetrial
- ldr x3, [x3, #:got_lo12:gpReadRetrial]
- ldr x0, [x0, #:got_lo12:ToshibaReadRetrial]
- str x0, [x3]
- mov w0, 4
- ldr x1, [x1, #:got_lo12:g_maxRegNum]
- strb w0, [x1]
+ bhi .L1267
+ mov w0, 1
+ str w0, [x1,1936]
+ b .L1267
+.L1268:
+ sub w1, w0, #17
+ uxtb w1, w1
+ cmp w1, 2
+ bhi .L1270
+ adrp x1, MicronReadRetrial
+ cmp w0, 19
+ add x1, x1, :lo12:MicronReadRetrial
+ str x1, [x2,48]
+ beq .L1271
mov w0, 7
- ldr x2, [x2, #:got_lo12:g_maxRetryCount]
- strb w0, [x2]
- b .L1224
-.L1228:
- sub w5, w0, #67
- uxtb w5, w5
- cmp w5, 1
- sub w5, w0, #34
- cset w7, ls
- uxtb w5, w5
- cmp w5, 1
- bls .L1246
- cbz w7, .L1230
-.L1246:
- adrp x5, :got:ToshibaReadRetrial
- ldr x3, [x3, #:got_lo12:gpReadRetrial]
+ b .L1314
+.L1271:
+ mov w0, 15
+.L1314:
+ strb w0, [x2,73]
+ b .L1267
+.L1270:
+ sub w1, w0, #65
+ uxtb w1, w1
+ cmp w1, 1
+ bls .L1288
+ cmp w0, 33
+ bne .L1272
+.L1288:
+ add x0, x23, :lo12:.LANCHOR4
+ adrp x1, ToshibaReadRetrial
+ add x1, x1, :lo12:ToshibaReadRetrial
+ mov w2, 4
+ str x1, [x0,48]
+ add x1, x19, :lo12:.LANCHOR0
+ strb w2, [x1,753]
+ mov w1, 7
+ strb w1, [x0,73]
+ b .L1267
+.L1272:
+ sub w1, w0, #67
+ uxtb w1, w1
+ cmp w1, 1
+ sub w1, w0, #34
+ cset w4, ls
+ uxtb w1, w1
+ cmp w1, 1
+ bls .L1289
+ cbz w4, .L1274
+.L1289:
+ add x2, x23, :lo12:.LANCHOR4
+ adrp x1, ToshibaReadRetrial
+ add x1, x1, :lo12:ToshibaReadRetrial
cmp w0, 35
- ldr x5, [x5, #:got_lo12:ToshibaReadRetrial]
- str x5, [x3]
- ldr x2, [x2, #:got_lo12:g_maxRetryCount]
- beq .L1232
+ str x1, [x2,48]
+ beq .L1276
cmp w0, 68
- beq .L1232
+ beq .L1276
mov w0, 7
- b .L1276
-.L1232:
- mov w0, 17
+ strb w0, [x2,73]
+ b .L1277
.L1276:
- strb w0, [x2]
- mov w0, 4
- ldr x1, [x1, #:got_lo12:g_maxRegNum]
- cbnz w7, .L1278
- mov w0, 5
-.L1278:
- strb w0, [x1]
- b .L1224
-.L1230:
- cmp w0, 49
- bne .L1224
- adrp x0, :got:SamsungReadRetrial
- ldr x0, [x0, #:got_lo12:SamsungReadRetrial]
+ add x0, x23, :lo12:.LANCHOR4
+ mov w1, 17
+ strb w1, [x0,73]
.L1277:
- str x0, [x6]
-.L1224:
- ldrh w2, [x4,10]
- ldrb w1, [x4,12]
- ldrb w0, [x4,18]
+ add x0, x19, :lo12:.LANCHOR0
+ mov w1, 4
+ cbnz w4, .L1315
+ mov w1, 5
+.L1315:
+ strb w1, [x0,753]
+ b .L1267
+.L1274:
+ cmp w0, 49
+ bne .L1267
+ adrp x0, SamsungReadRetrial
+ add x0, x0, :lo12:SamsungReadRetrial
+ str x0, [x2,48]
+.L1267:
+ ldrh w2, [x3,10]
+ ldrb w1, [x3,12]
+ ldrb w0, [x3,18]
sdiv w1, w2, w1
bl BuildFlashLsbPageTable
bl FlashDieInfoInit
- ldr x0, [x21, #:got_lo12:IDByte]
- ldrb w0, [x0]
- cmp w0, 44
- bne .L1235
- ldr x0, [x23, #:got_lo12:gFlashToggleModeEn]
- ldrb w1, [x0]
- cbz w1, .L1235
- strb wzr, [x0]
+ add x0, x19, :lo12:.LANCHOR0
+ ldrb w1, [x0,1620]
+ cmp w1, 44
+ bne .L1279
+ ldrb w1, [x0,1864]
+ cbz w1, .L1279
+ strb wzr, [x0,1864]
mov w0, 1
bl FlashSetInterfaceMode
mov w0, 1
bl NandcSetMode
-.L1235:
- ldr x25, [x25, #:got_lo12:gFlashInterfaceMode]
- ldrb w0, [x25]
+.L1279:
+ mov w0, 0
+ bl flash_enter_slc_mode
+ add x1, x19, :lo12:.LANCHOR0
+ ldrb w0, [x1,1844]
tst w0, 6
- beq .L1236
- ldr x23, [x23, #:got_lo12:gFlashToggleModeEn]
- ldrb w1, [x23]
- cbnz w1, .L1237
- tbnz x0, 0, .L1236
-.L1237:
- adrp x1, :got:gNandFlashInfoBlockAddr
+ beq .L1280
+ ldrb w1, [x1,1864]
+ cbnz w1, .L1281
+ tbnz x0, 0, .L1280
+.L1281:
+ add x1, x23, :lo12:.LANCHOR4
mov w0, 0
- ldr x1, [x1, #:got_lo12:gNandFlashInfoBlockAddr]
- ldr w1, [x1]
+ ldr w1, [x1,64]
bl FlashDdrParaScan
-.L1236:
- ldr x0, [x19, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
+.L1280:
+ mov w0, 0
+ add x20, x19, :lo12:.LANCHOR0
+ bl flash_exit_slc_mode
+ ldr x0, [x20,744]
ldrb w0, [x0,20]
bl FlashBchSel
- adrp x0, :got:gNandIDataBuf
- ldr x0, [x0, #:got_lo12:gNandIDataBuf]
+ adrp x0, .LANCHOR2
+ add x0, x0, :lo12:.LANCHOR2
+ add x0, x0, 2336
bl FlashReadIdbDataRaw
- cbnz w0, .L1238
- ldr x0, [x29,104]
- ldr x24, [x0, #:got_lo12:gNandIDBResBlkNumSaveInFlash]
- ldr x0, [x20, #:got_lo12:gNandIDBResBlkNum]
- ldrb w1, [x24]
- ldrb w2, [x0]
- cmp w2, w1
- bls .L1239
- strb w1, [x0]
-.L1239:
- ldr x0, [x20, #:got_lo12:gNandIDBResBlkNum]
- ldrb w0, [x0]
+ cbnz w0, .L1282
+ add x23, x23, :lo12:.LANCHOR4
+ ldrb w1, [x20,9]
+ ldrb w0, [x23,72]
+ cmp w1, w0
+ bls .L1283
+ strb w0, [x20,9]
+.L1283:
+ add x0, x19, :lo12:.LANCHOR0
+ ldrb w0, [x0,9]
cmp w0, 15
- bhi .L1240
-.L1238:
- ldr x0, [x20, #:got_lo12:gNandIDBResBlkNum]
+ bhi .L1284
+.L1282:
+ add x0, x19, :lo12:.LANCHOR0
mov w1, 16
- strb w1, [x0]
-.L1240:
+ strb w1, [x0,9]
+.L1284:
mov w0, 18928
+ add x19, x19, :lo12:.LANCHOR0
movk w0, 0x2, lsl 16
bl FlashTimingCfg
- bl FlashPrintInfo
- ldr x19, [x19, #:got_lo12:gpNandParaInfo]
- adrp x0, :got:gNandPhyInfo
- ldr x4, [x19]
- ldr x0, [x0, #:got_lo12:gNandPhyInfo]
- ldrb w1, [x4,12]
- strh w1, [x0,8]
- ldrh w3, [x4,14]
- ldrb w1, [x4,7]
- str w1, [x0,4]
- ldr x21, [x21, #:got_lo12:IDByte]
- ldr w1, [x21]
- str w1, [x0]
- adrp x1, :got:gNandMaxDie
- ldr x1, [x1, #:got_lo12:gNandMaxDie]
- ldrb w1, [x1]
- strh w1, [x0,10]
- ldrb w1, [x4,13]
- strh w1, [x0,12]
- strh w3, [x0,14]
- ldrh w1, [x4,10]
- strh w1, [x0,16]
- ldrb w2, [x4,12]
- ldrh w1, [x4,10]
- sdiv w1, w1, w2
- strh w1, [x0,18]
- ldrb w2, [x4,9]
- strh w2, [x0,20]
- ldrh w5, [x4,10]
- ldrb w1, [x4,9]
- mul w1, w1, w5
+ ldr x1, [x19,744]
+ ldrb w2, [x1,12]
+ strh w2, [x19,176]
+ ldrh w4, [x1,14]
+ ldrb w2, [x1,7]
+ str w2, [x19,172]
+ ldr w2, [x19,1620]
+ str w2, [x19,168]
+ ldrb w2, [x19,1845]
+ strh w2, [x19,178]
+ ldrb w2, [x1,13]
+ strh w2, [x19,180]
+ strh w4, [x19,182]
+ ldrh w2, [x1,10]
+ strh w2, [x19,184]
+ ldrb w3, [x1,12]
+ ldrh w2, [x1,10]
+ sdiv w2, w2, w3
+ strh w2, [x19,186]
+ ldrb w3, [x1,9]
+ strh w3, [x19,188]
+ ldrh w5, [x1,10]
+ ldrb w2, [x1,9]
+ mul w2, w2, w5
mov w5, 512
- strh w5, [x0,24]
- uxth w1, w1
- strh w1, [x0,22]
- ldr x20, [x20, #:got_lo12:gNandIDBResBlkNum]
- ldrb w5, [x20]
- strh w5, [x0,26]
- ldr x22, [x22, #:got_lo12:g_slc2KBNand]
- ldrb w5, [x22]
+ strh w5, [x19,192]
+ ldrb w5, [x19,9]
+ strh w5, [x19,194]
+ uxth w2, w2
+ ldrb w5, [x19,8]
+ strh w2, [x19,190]
cmp w5, 1
- bne .L1241
- lsl w1, w1, 1
- mov w5, 16
- lsr w3, w3, 1
+ bne .L1285
lsl w2, w2, 1
- strh w1, [x0,22]
- mov w1, 8
- strb w5, [x20]
- strh w3, [x0,14]
- strh w2, [x0,20]
- strh w1, [x0,26]
-.L1241:
- ldrb w0, [x4,20]
+ mov w5, 16
+ lsr w4, w4, 1
+ lsl w3, w3, 1
+ strh w2, [x19,190]
+ mov w2, 8
+ strb w5, [x19,9]
+ strh w4, [x19,182]
+ strh w3, [x19,188]
+ strh w2, [x19,194]
+.L1285:
+ ldrb w0, [x1,20]
bl FlashBchSel
bl FlashSuspend
mov w0, 0
- b .L1206
-.L1243:
+ b .L1248
+.L1287:
mov w0, -2
-.L1206:
+.L1248:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
.global FlashPageProgMsbFFData
.type FlashPageProgMsbFFData, %function
FlashPageProgMsbFFData:
- stp x29, x30, [sp, -80]!
- adrp x3, :got:gpNandParaInfo
+ stp x29, x30, [sp, -112]!
add x29, sp, 0
+ stp x23, x24, [sp,48]
+ adrp x23, .LANCHOR0
stp x21, x22, [sp,32]
- uxtb w22, w0
- ldr x0, [x3, #:got_lo12:gpNandParaInfo]
+ uxtb w21, w0
+ add x0, x23, :lo12:.LANCHOR0
stp x19, x20, [sp,16]
- stp x23, x24, [sp,48]
stp x25, x26, [sp,64]
- uxtb w19, w2
- mov x20, x3
- ldr x0, [x0]
- ldrb w2, [x0,19]
- cmp w2, 35
- cset w4, eq
- cmp w2, 68
- cset w0, eq
- orr w4, w4, w0
- cbnz w4, .L1284
- sub w2, w2, #5
- uxtb w2, w2
- cmp w2, 1
- bhi .L1279
-.L1284:
- mov w21, w1
- adrp x24, :got:mlcPageToSlcPageTbl
- mov w25, 65535
- adrp x26, :got:gFlashPageBuffer1
-.L1282:
- ldr x0, [x20, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
+ stp x27, x28, [sp,80]
+ uxth w22, w2
+ ldr x2, [x0,744]
+ ldrb w24, [x2,19]
+ ldrb w2, [x0,120]
+ cbz w2, .L1317
+ ldr w2, [x0,1872]
+ mov w0, 12336
+ movk w0, 0x5638, lsl 16
+ cmp w2, w0
+ beq .L1316
+.L1317:
+ sub w0, w24, #5
+ uxtb w0, w0
+ cmp w0, 1
+ bls .L1319
+ cmp w24, 68
+ beq .L1319
+ cmp w24, 35
+ beq .L1319
+ sub w0, w24, #17
+ uxtb w0, w0
+ cmp w0, 2
+ bhi .L1316
+.L1319:
+ mov w27, w1
+ sub w24, w24, #17
+ add x23, x23, :lo12:.LANCHOR0
+ add x26, x23, 24
+ add x26, x26, x21, sxtw 4
+.L1322:
+ ldr x0, [x23,744]
ldrh w0, [x0,10]
- cmp w0, w19
- bls .L1279
- ldr x0, [x24, #:got_lo12:mlcPageToSlcPageTbl]
- ldrh w0, [x0,w19,sxtw 1]
- cmp w0, w25
- bne .L1279
- ldr x23, [x26, #:got_lo12:gFlashPageBuffer1]
+ cmp w0, w22
+ bls .L1316
+ adrp x0, .LANCHOR2
+ add x0, x0, :lo12:.LANCHOR2
+ add x0, x0, 996
+ ldrh w1, [x0,w22,sxtw 1]
+ mov w0, 65535
+ cmp w1, w0
+ bne .L1316
+ adrp x25, .LANCHOR4
mov w1, 255
+ add x19, x25, :lo12:.LANCHOR4
mov w2, 32768
- ldr x0, [x23]
+ ldr x0, [x19,80]
bl ftl_memset
- ldr x2, [x23]
- add w1, w19, w21
- mov w0, w22
+ uxtb w0, w24
+ cmp w0, 1
+ bhi .L1323
+ adrp x28, .LANCHOR1
+ add x28, x28, :lo12:.LANCHOR1
+ ldr w1, [x28,3000]
+ cbz w1, .L1324
+ ldrb w20, [x26,8]
+ mov w0, w21
+ ldr x19, [x26]
+ ubfiz x20, x20, 8, 8
+ str x1, [x29,104]
+ add x19, x19, x20
+ bl NandcFlashCs
+ mov w0, 239
+ mov w20, 146
+ str w0, [x19,2056]
+ mov w0, w21
+ str w20, [x19,2052]
+ str wzr, [x19,2048]
+ str wzr, [x19,2048]
+ str wzr, [x19,2048]
+ str wzr, [x19,2048]
+ bl NandcFlashDeCs
+ ldr x1, [x29,104]
+ cmp w1, 1
+ bne .L1325
+ mov w0, w21
+ bl NandcFlashCs
+ mov w0, 238
+ str w0, [x19,2056]
+ str w20, [x19,2052]
+ mov w0, 2000
+ bl NandcDelayns
+ ldr w20, [x19,2048]
+ mov w0, w21
+ uxtb w20, w20
+ bl NandcFlashDeCs
+ cbnz w20, .L1326
+ mov w0, 2
+ str w0, [x28,3000]
+ b .L1325
+.L1326:
+ str wzr, [x28,3000]
+ b .L1316
+.L1325:
+ add x25, x25, :lo12:.LANCHOR4
+ add w1, w22, w27
mov x3, 0
- add w19, w19, 1
+ mov w0, w21
+ ldr x2, [x25,80]
bl FlashProgPage
- uxtb w19, w19
- b .L1282
-.L1279:
+ mov w0, w21
+ bl NandcFlashCs
+ mov w0, 239
+ str w0, [x19,2056]
+ mov w0, 146
+ str w0, [x19,2052]
+ mov w0, 1
+ str w0, [x19,2048]
+ str wzr, [x19,2048]
+ mov w0, w21
+ str wzr, [x19,2048]
+ str wzr, [x19,2048]
+ bl NandcFlashDeCs
+ b .L1324
+.L1323:
+ ldr x2, [x19,80]
+ mov w0, w21
+ add w1, w22, w27
+ mov x3, 0
+ bl FlashProgPage
+.L1324:
+ add w22, w22, 1
+ uxth w22, w22
+ b .L1322
+.L1316:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x29, x30, [sp], 80
+ ldp x27, x28, [sp,80]
+ ldp x29, x30, [sp], 112
ret
.size FlashPageProgMsbFFData, .-FlashPageProgMsbFFData
.align 2
- .global FlashProgPageDp
- .type FlashProgPageDp, %function
-FlashProgPageDp:
- stp x29, x30, [sp, -80]!
+ .global FlashReadSlc2KPages
+ .type FlashReadSlc2KPages, %function
+FlashReadSlc2KPages:
+ stp x29, x30, [sp, -144]!
add x29, sp, 0
+ stp x21, x22, [sp,32]
+ adrp x21, __stack_chk_guard
+ mov w22, 0
+ stp x25, x26, [sp,64]
+ mov w25, w1
+ ldr x1, [x21,#:lo12:__stack_chk_guard]
+ str x1, [x29,136]
+ adrp x1, .LANCHOR1+481
stp x19, x20, [sp,16]
- uxtb w19, w0
- adrp x0, :got:gNandParaInfo
stp x23, x24, [sp,48]
- stp x21, x22, [sp,32]
- ldr x0, [x0, #:got_lo12:gNandParaInfo]
- mov w20, w1
- str x5, [x29,72]
- mov x24, x2
- mov x21, x3
- mov x23, x4
- ldrb w22, [x0,9]
- mov w0, w19
+ adrp x20, .LANCHOR0
+ adrp x23, .LC93
+ adrp x24, .LC95
+ ldrb w26, [x1,#:lo12:.LANCHOR1+481]
+ stp x27, x28, [sp,80]
+ mov x19, x0
+ mov w27, w2
+ add x20, x20, :lo12:.LANCHOR0
+ add x23, x23, :lo12:.LC93
+ add x24, x24, :lo12:.LC95
+.L1338:
+ cmp w22, w25
+ beq .L1373
+ mov w1, w27
+ sub w4, w25, w22
+ mov x0, x19
+ add x2, x29, 132
+ add x3, x29, 128
+ bl LogAddr2PhyAddr
+ ldr w0, [x29,128]
+ adrp x5, .LANCHOR0
+ ldrb w1, [x20,1845]
+ cmp w0, w1
+ bcc .L1339
+ mov w0, -1
+ str w0, [x19]
+ b .L1340
+.L1339:
+ add x0, x20, x0, uxtw
+ ldrb w28, [x0,1848]
+ str x5, [x29,104]
+ mov w0, w28
bl NandcWaitFlashReady
- mov w0, w19
+ mov w0, w28
bl NandcFlashCs
- mov w0, w19
- mov w1, w20
- bl FlashProgFirstCmd
- mov w2, w22
- mov x3, x24
- mov x4, x21
- mov w0, w19
- mov w1, 1
- adrp x21, :got:gBlockPageAlignSize
- bl NandcXferData
- mov w1, w20
- mov w0, w19
- bl FlashProgDpFirstCmd
- mov w0, w19
+ ldr w1, [x29,132]
+ mov w0, w28
+ bl FlashReadCmd
+ mov w0, w28
bl NandcWaitFlashReady
- ldr x21, [x21, #:got_lo12:gBlockPageAlignSize]
- mov w0, w19
- ldr w1, [x21]
- add w1, w20, w1
- bl FlashProgDpSecondCmd
- ldr x5, [x29,72]
- mov w2, w22
- mov x3, x23
- mov w0, w19
- mov x4, x5
- mov w1, 1
+ ldr x3, [x19,8]
+ mov w1, 0
+ ldr x4, [x19,16]
+ mov w2, w26
+ mov w0, w28
bl NandcXferData
- ldr w1, [x21]
- mov w0, w19
- add w1, w20, w1
- bl FlashProgSecondCmd
- mov w0, w19
- bl NandcWaitFlashReady
- mov w1, w20
- mov w0, w19
- bl FlashReadStatus
- mov w20, w0
- mov w0, w19
+ mov w6, w0
+ ldr w2, [x20,12]
+ mov w0, w28
+ ldr w1, [x29,132]
+ str x6, [x29,112]
+ add w1, w2, w1
+ bl FlashReadCmd
+ ldr x0, [x19,8]
+ mov w1, 0
+ mov w2, w26
+ cmp x0, xzr
+ add x3, x0, 2048
+ ldr x0, [x19,16]
+ csel x3, x3, xzr, ne
+ add x4, x0, 8
+ cmp x0, xzr
+ csel x4, x4, xzr, ne
+ mov w0, w28
+ bl NandcXferData
+ mov w1, w0
+ mov w0, w28
+ str x1, [x29,120]
bl NandcFlashDeCs
- and w0, w20, 1
+ ldr x5, [x29,104]
+ ldr x1, [x29,120]
+ add x0, x5, :lo12:.LANCHOR0
+ ldr x6, [x29,112]
+ cmp w1, w6
+ ldrb w0, [x0,1944]
+ csel w3, w1, w6, cs
+ add w0, w0, w0, lsl 1
+ cmp w3, w0, lsr 2
+ bls .L1343
+ cmn w3, #1
+ mov w0, 256
+ csel w3, w3, w0, eq
+.L1343:
+ cmp w3, 256
+ beq .L1355
+ cmn w3, #1
+ bne .L1344
+.L1355:
+ str w3, [x19]
+ b .L1346
+.L1344:
+ str wzr, [x19]
+.L1346:
+ ldr x0, [x19,16]
+ cbz x0, .L1347
+ ldr w1, [x0,8]
+ cmn w1, #1
+ bne .L1347
+ ldr w0, [x0]
+ cmn w0, #1
+ beq .L1347
+ str w1, [x19]
+.L1347:
+ ldr w3, [x19]
+ cmn w3, #1
+ bne .L1340
+ add x5, x5, :lo12:.LANCHOR0
+ ldr w1, [x19,4]
+ mov x0, x23
+ ldrb w2, [x5,1944]
+ bl printk
+ ldr x1, [x19,8]
+ cbz x1, .L1349
+ adrp x0, .LC94
+ mov w2, 4
+ add x0, x0, :lo12:.LC94
+ mov w3, 8
+ bl rknand_print_hex
+.L1349:
+ ldr x1, [x19,16]
+ cbz x1, .L1340
+ mov w2, 4
+ mov x0, x24
+ mov w3, w2
+ bl rknand_print_hex
+.L1340:
+ add w22, w22, 1
+ add x19, x19, 56
+ b .L1338
+.L1373:
+ ldr x2, [x29,136]
+ mov w0, 0
+ ldr x1, [x21,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1352
+ bl __stack_chk_fail
+.L1352:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
- ldp x29, x30, [sp], 80
+ ldp x25, x26, [sp,64]
+ ldp x27, x28, [sp,80]
+ ldp x29, x30, [sp], 144
ret
- .size FlashProgPageDp, .-FlashProgPageDp
+ .size FlashReadSlc2KPages, .-FlashReadSlc2KPages
.align 2
.global FlashReadPages
.type FlashReadPages, %function
FlashReadPages:
- stp x29, x30, [sp, -160]!
+ stp x29, x30, [sp, -176]!
+ adrp x3, __stack_chk_guard
add x29, sp, 0
- stp x23, x24, [sp,48]
- mov x24, x0
- adrp x0, :got:gNandParaInfo
stp x21, x22, [sp,32]
+ ldr x4, [x3,#:lo12:__stack_chk_guard]
+ adrp x22, .LANCHOR0
+ str x4, [x29,168]
+ adrp x4, .LANCHOR1+481
stp x25, x26, [sp,64]
- ldr x0, [x0, #:got_lo12:gNandParaInfo]
- adrp x26, :got:gNandRandomizer
- stp x27, x28, [sp,80]
stp x19, x20, [sp,16]
- mov w23, 0
- mov w27, w1
- ldrb w0, [x0,9]
- mov w22, w23
- str w0, [x29,140]
- ldr x0, [x26, #:got_lo12:gNandRandomizer]
- str w2, [x29,132]
- ldrb w0, [x0]
- str w0, [x29,136]
+ ldrb w4, [x4,#:lo12:.LANCHOR1+481]
+ mov x25, x0
+ str w4, [x29,156]
+ add x4, x22, :lo12:.LANCHOR0
+ stp x23, x24, [sp,48]
+ stp x27, x28, [sp,80]
+ str w1, [x29,152]
+ ldrb w5, [x4,16]
+ ldrb w23, [x4,8]
+ str w2, [x29,140]
+ str w5, [x29,136]
+ str x3, [x29,128]
+ cbz w23, .L1411
+ bl FlashReadSlc2KPages
+ b .L1376
+.L1411:
adrp x0, .LC93
+ mov w24, w23
add x0, x0, :lo12:.LC93
+ str x0, [x29,120]
+ adrp x0, .LC95
+ add x0, x0, :lo12:.LC95
str x0, [x29,112]
- adrp x0, .LC94
- add x0, x0, :lo12:.LC94
+ adrp x0, .LC96
+ add x0, x0, :lo12:.LC96
str x0, [x29,104]
- adrp x0, .LC92
- add x0, x0, :lo12:.LC92
- str x0, [x29,96]
-.L1290:
- cmp w22, w27
- bcs .L1358
- mov w25, 56
- ldr w1, [x29,132]
- sub w4, w27, w22
- add x2, x29, 156
- umull x25, w22, w25
- add x3, x29, 152
- add x21, x24, x25
+.L1375:
+ ldr w0, [x29,152]
+ cmp w24, w0
+ bcs .L1459
+ mov w27, 56
+ ldr w0, [x29,152]
+ ldr w1, [x29,140]
+ add x2, x29, 164
+ umull x27, w24, w27
+ sub w4, w0, w24
+ add x3, x29, 160
+ add x21, x25, x27
mov x0, x21
+ ldr w28, [x21,4]
bl LogAddr2PhyAddr
+ add x2, x22, :lo12:.LANCHOR0
mov w19, w0
- adrp x0, :got:gNandMaxDie
- ldr w1, [x29,152]
- ldr x0, [x0, #:got_lo12:gNandMaxDie]
- ldrb w0, [x0]
- cmp w1, w0
- bcc .L1291
+ ldr w0, [x29,160]
+ ldrb w1, [x2,1845]
+ cmp w0, w1
+ bcc .L1377
mov w0, -1
- str w0, [x24,x25]
- b .L1292
-.L1291:
- adrp x0, :got:DieCsIndex
- ldr x0, [x0, #:got_lo12:DieCsIndex]
- ldrb w20, [x0,w1,uxtw]
- adrp x0, :got:gMultiPageReadEn
- ldr x0, [x0, #:got_lo12:gMultiPageReadEn]
- ldrb w0, [x0]
+ str w0, [x25,x27]
+ b .L1378
+.L1377:
+ add x0, x2, x0, uxtw
+ adrp x26, .LANCHOR4
+ ldrb w20, [x0,1848]
+ add x0, x26, :lo12:.LANCHOR4
+ str x2, [x29,144]
+ ldrb w0, [x0,112]
cmp w0, wzr
mov w0, w20
csel w19, w19, wzr, ne
bl NandcWaitFlashReady
- adrp x1, :got:gpNandParaInfo
- str x1, [x29,120]
- ldr x0, [x1, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
+ ldr x2, [x29,144]
+ ldr x0, [x2,744]
ldrb w0, [x0,19]
sub w0, w0, #1
uxtb w0, w0
cmp w0, 5
- bhi .L1294
- adrp x2, :got:gReadRetryInfo
- sxtw x1, w20
- ldr x2, [x2, #:got_lo12:gReadRetryInfo]
- add x0, x2, x1
- ldrb w3, [x0,12]
- adrp x0, :got:read_retry_cur_offset
- ldr x0, [x0, #:got_lo12:read_retry_cur_offset]
- ldrb w0, [x0,x1]
+ bhi .L1380
+ sxtw x0, w20
+ add x1, x2, 760
+ add x3, x1, x0
+ add x0, x2, x0
+ ldrb w3, [x3,12]
+ ldrb w0, [x0,1616]
cmp w0, w3
- beq .L1294
- ldrb w1, [x2,1]
+ beq .L1380
+ ldrb w1, [x2,761]
mov w0, w20
- add x2, x2, 4
+ add x2, x2, 764
bl HynixSetRRPara
-.L1294:
+.L1380:
mov w0, w20
bl NandcFlashCs
-.L1295:
+ ldr w0, [x29,140]
+ cmp w0, 1
+ cset w0, eq
+ orr w0, w0, w28, lsr 31
+ str w0, [x29,144]
+ cbz w0, .L1387
+ add x0, x22, :lo12:.LANCHOR0
+ ldrb w0, [x0,120]
+ cbz w0, .L1387
+ mov w0, w20
+ bl flash_enter_slc_mode
+.L1387:
cmp w20, 255
- ldr w1, [x29,156]
- bne .L1327
+ ldr w1, [x29,164]
+ bne .L1416
cmn w1, #1
cset w0, ne
- cbz w0, .L1323
-.L1327:
- cbz w19, .L1298
- adrp x0, :got:gBlockPageAlignSize
- ldr x0, [x0, #:got_lo12:gBlockPageAlignSize]
- ldr w2, [x0]
+ cbz w0, .L1412
+.L1416:
+ cbz w19, .L1384
+ add x0, x22, :lo12:.LANCHOR0
+ ldr w2, [x0,12]
mov w0, w20
add w2, w1, w2
bl FlashReadDpCmd
- b .L1299
-.L1298:
+ b .L1385
+.L1384:
mov w0, w20
bl FlashReadCmd
- b .L1299
-.L1323:
+ b .L1385
+.L1412:
mov w19, w0
-.L1296:
- ldrb w2, [x29,140]
- mov w1, 0
- ldr x3, [x21,8]
+.L1382:
+ ldrb w2, [x29,156]
mov w0, w20
+ ldr x3, [x21,8]
+ mov w1, 0
ldr x4, [x21,16]
bl NandcXferData
+ cmn w0, #1
mov w28, w0
- mov w0, 0
- bl NandcReadDontCaseBusyEn
- cmn w28, #1
- bne .L1300
- ldr x0, [x26, #:got_lo12:gNandRandomizer]
- ldrb w1, [x0]
- cbz w1, .L1300
- strb wzr, [x0]
+ bne .L1386
+ add x0, x22, :lo12:.LANCHOR0
+ ldrb w1, [x0,16]
+ cbz w1, .L1386
+ strb wzr, [x0,16]
mov w19, 0
- b .L1295
-.L1300:
- cbz w19, .L1301
- adrp x0, :got:gBlockPageAlignSize
- ldr w1, [x29,156]
- ldr x0, [x0, #:got_lo12:gBlockPageAlignSize]
- ldr w2, [x0]
+ b .L1387
+.L1386:
+ cbz w19, .L1388
+ add x0, x22, :lo12:.LANCHOR0
+ ldr w1, [x29,164]
+ ldr w2, [x0,12]
mov w0, w20
add w1, w2, w1
bl FlashReadDpDataOutCmd
- add w0, w22, 1
+ add w0, w24, 1
mov w4, 56
- ldrb w2, [x29,140]
+ ldrb w2, [x29,156]
mov w1, 0
umull x4, w0, w4
mov w0, w20
- add x4, x24, x4
+ add x4, x25, x4
ldr x3, [x4,8]
ldr x4, [x4,16]
bl NandcXferData
cmn w0, #1
mov w23, w0
csel w19, w19, wzr, ne
-.L1301:
+.L1388:
mov w0, w20
bl NandcFlashDeCs
- ldr x0, [x26, #:got_lo12:gNandRandomizer]
+ add x6, x22, :lo12:.LANCHOR0
+ ldrb w0, [x29,136]
cmn w28, #1
- ldrb w1, [x29,136]
- strb w1, [x0]
- bne .L1308
- adrp x0, :got:gFlashToggleModeEn
- ldr x0, [x0, #:got_lo12:gFlashToggleModeEn]
- ldrb w0, [x0]
- cbnz w0, .L1303
-.L1307:
- adrp x0, :got:gpReadRetrial
- ldr x0, [x0, #:got_lo12:gpReadRetrial]
- ldr x19, [x0]
- cbnz x19, .L1304
- b .L1359
-.L1303:
- adrp x0, :got:gpNandc
- ldr w1, [x29,156]
- ldr x2, [x21,8]
+ strb w0, [x6,16]
+ bne .L1395
+ ldrb w0, [x6,1864]
+ cbnz w0, .L1390
+.L1394:
+ add x0, x26, :lo12:.LANCHOR4
+ ldr x19, [x0,48]
+ cbnz x19, .L1391
+ b .L1460
+.L1390:
+ ldr x0, [x6,128]
mov w4, 1
+ ldr w1, [x29,164]
+ ldr x2, [x21,8]
ldr x3, [x21,16]
- ldr x0, [x0, #:got_lo12:gpNandc]
- ldr x0, [x0]
ldr w19, [x0,304]
mov w0, w20
+ str x6, [x29,96]
bl FlashDdrTunningRead
cmn w0, #1
mov w28, w0
- beq .L1306
- adrp x1, :got:gNandFlashEccBits
- ldr x1, [x1, #:got_lo12:gNandFlashEccBits]
- ldrb w0, [x1]
+ beq .L1393
+ ldr x6, [x29,96]
+ ldrb w0, [x6,1944]
cmp w28, w0, lsr 1
- bls .L1325
-.L1306:
+ bls .L1414
+.L1393:
lsr w0, w19, 8
bl NandcSetDdrPara
cmn w28, #1
- beq .L1307
- b .L1325
-.L1304:
- ldr w1, [x29,156]
+ beq .L1394
+ b .L1414
+.L1391:
+ ldr w1, [x29,164]
mov w0, w20
ldr x2, [x21,8]
ldr x3, [x21,16]
cmn w0, #1
mov w28, w0
mov w19, 0
- bne .L1309
- ldr x0, [x29,120]
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
+ bne .L1396
+ add x2, x22, :lo12:.LANCHOR0
+ ldr x0, [x2,744]
ldrb w0, [x0,19]
sub w0, w0, #1
uxtb w0, w0
cmp w0, 5
- bhi .L1310
- adrp x2, :got:gReadRetryInfo
+ bhi .L1397
+ ldrb w1, [x2,761]
mov w0, w20
+ add x2, x2, 764
mov w3, w19
- ldr x2, [x2, #:got_lo12:gReadRetryInfo]
- add x2, x2, 4
- ldrb w1, [x2,-3]
bl HynixSetRRPara
-.L1310:
- ldr w1, [x29,156]
+.L1397:
+ ldr w1, [x29,164]
mov w0, w20
ldr x2, [x21,8]
mov w19, 0
ldr x3, [x21,16]
bl FlashReadRawPage
mov w28, w0
- adrp x2, :got:gNandFlashEccBits
- ldr x0, [x29,96]
+ add x2, x22, :lo12:.LANCHOR0
+ ldr x0, [x29,104]
ldr w1, [x21,4]
mov w3, w28
- ldr x2, [x2, #:got_lo12:gNandFlashEccBits]
- ldrb w2, [x2]
+ ldrb w2, [x2,1944]
bl printk
- b .L1309
-.L1359:
- ldr w1, [x29,156]
+ b .L1396
+.L1460:
+ ldr w1, [x29,164]
mov w0, w20
ldr x2, [x21,8]
ldr x3, [x21,16]
bl FlashReadRawPage
mov w28, w0
- b .L1309
-.L1325:
+ b .L1396
+.L1414:
mov w19, 0
-.L1308:
- adrp x0, :got:gNandFlashEccBits
- ldr x0, [x0, #:got_lo12:gNandFlashEccBits]
- ldrb w0, [x0]
+.L1395:
+ add x0, x22, :lo12:.LANCHOR0
+ ldrb w0, [x0,1944]
add w0, w0, w0, lsl 1
cmp w28, w0, lsr 2
- bls .L1309
- adrp x0, :got:gpReadRetrial
- ldr x0, [x0, #:got_lo12:gpReadRetrial]
- ldr x0, [x0]
+ bls .L1396
+ add x0, x26, :lo12:.LANCHOR4
+ ldr x0, [x0,48]
cmp x0, xzr
mov w0, 256
csel w28, w28, w0, ne
-.L1309:
+.L1396:
cmp w28, 256
- beq .L1328
+ beq .L1417
cmn w28, #1
- bne .L1311
-.L1328:
- str w28, [x24,x25]
- b .L1313
-.L1311:
- str wzr, [x24,x25]
-.L1313:
- ldr w3, [x24,x25]
+ bne .L1398
+.L1417:
+ str w28, [x25,x27]
+ b .L1400
+.L1398:
+ str wzr, [x25,x27]
+.L1400:
+ ldr w3, [x25,x27]
cmn w3, #1
- bne .L1315
- adrp x2, :got:gNandFlashEccBits
+ bne .L1402
+ add x2, x22, :lo12:.LANCHOR0
ldr w1, [x21,4]
- ldr x0, [x29,112]
- ldr x2, [x2, #:got_lo12:gNandFlashEccBits]
- ldrb w2, [x2]
+ ldr x0, [x29,120]
+ ldrb w2, [x2,1944]
bl printk
ldr x1, [x21,16]
- cbz x1, .L1315
+ cbz x1, .L1402
mov w2, 4
- ldr x0, [x29,104]
+ ldr x0, [x29,112]
mov w3, w2
bl rknand_print_hex
-.L1315:
- cbz w19, .L1317
- adrp x0, :got:gNandFlashEccBits
- ldr x0, [x0, #:got_lo12:gNandFlashEccBits]
- ldrb w0, [x0]
+.L1402:
+ cbz w19, .L1404
+ add x0, x22, :lo12:.LANCHOR0
+ ldrb w0, [x0,1944]
add w0, w0, w0, lsl 1
cmp w23, w0, lsr 2
- bls .L1318
- adrp x0, :got:gpReadRetrial
- ldr x0, [x0, #:got_lo12:gpReadRetrial]
- ldr x0, [x0]
+ bls .L1405
+ add x26, x26, :lo12:.LANCHOR4
+ ldr x0, [x26,48]
cmp x0, xzr
mov w0, 256
csel w23, w23, w0, ne
-.L1318:
- add w0, w22, 1
+.L1405:
+ add w0, w24, 1
mov w1, 56
cmp w23, 256
umull x0, w0, w1
- beq .L1329
+ beq .L1418
cmn w23, #1
- bne .L1319
-.L1329:
- str w23, [x24,x0]
- b .L1317
-.L1319:
- str wzr, [x24,x0]
-.L1317:
- add w22, w22, w19
-.L1292:
- add w22, w22, 1
- b .L1290
-.L1299:
+ bne .L1406
+.L1418:
+ str w23, [x25,x0]
+ b .L1404
+.L1406:
+ str wzr, [x25,x0]
+.L1404:
+ ldr w0, [x29,144]
+ add w24, w24, w19
+ cbz w0, .L1378
+ add x0, x22, :lo12:.LANCHOR0
+ ldrb w0, [x0,120]
+ cbz w0, .L1378
+ mov w0, w20
+ bl flash_exit_slc_mode
+.L1378:
+ add w24, w24, 1
+ b .L1375
+.L1459:
+ mov w0, 0
+.L1376:
+ ldr x1, [x29,128]
+ ldr x2, [x29,168]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1410
+ bl __stack_chk_fail
+.L1385:
mov w0, w20
bl NandcWaitFlashReady
- cbz w19, .L1296
- ldr w1, [x29,156]
+ cbz w19, .L1382
+ ldr w1, [x29,164]
mov w0, w20
bl FlashReadDpDataOutCmd
- b .L1296
-.L1358:
- mov w0, 0
+ b .L1382
+.L1410:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 160
+ ldp x29, x30, [sp], 176
ret
.size FlashReadPages, .-FlashReadPages
.align 2
.global FlashLoadFactorBbt
.type FlashLoadFactorBbt, %function
FlashLoadFactorBbt:
- adrp x0, :got:gNandPhyInfo
- mov w2, 16
stp x29, x30, [sp, -192]!
+ mov w2, 16
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:gNandPhyInfo]
stp x23, x24, [sp,48]
+ adrp x23, __stack_chk_guard
+ adrp x24, .LANCHOR4
+ stp x21, x22, [sp,32]
+ adrp x22, .LANCHOR0
+ ldr x0, [x23,#:lo12:__stack_chk_guard]
+ str x0, [x29,184]
+ add x0, x22, :lo12:.LANCHOR0
stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
- adrp x23, :got:FbbtBlk
- adrp x24, :got:gFlashSpareBuffer
- ldrh w1, [x0,12]
+ stp x27, x28, [sp,80]
+ add x19, x24, :lo12:.LANCHOR4
mov w27, -1
- ldrh w21, [x0,14]
- adrp x26, .LC95
- ldr x0, [x23, #:got_lo12:FbbtBlk]
- add x28, x29, 136
- add x26, x26, :lo12:.LC95
+ ldrh w1, [x0,180]
+ adrp x26, .LC97
+ ldrh w21, [x0,182]
+ add x0, x19, 120
+ add x26, x26, :lo12:.LC97
mul w21, w1, w21
mov w1, 0
- bl ftl_memset
uxth w21, w21
- ldr x0, [x24, #:got_lo12:gFlashSpareBuffer]
+ bl ftl_memset
add w25, w21, w27
+ ldr x0, [x19,88]
mov w3, 0
- str xzr, [x29,144]
+ str x0, [x29,144]
+ str xzr, [x29,136]
+ sub w0, w21, #8
mov w19, w3
uxth w25, w25
- ldr x0, [x0]
- str x0, [x29,152]
- sub w0, w21, #16
str w0, [x29,124]
-.L1361:
- adrp x22, :got:gNandMaxDie
- ldr x1, [x22, #:got_lo12:gNandMaxDie]
- ldrb w1, [x1]
+.L1462:
+ add x1, x22, :lo12:.LANCHOR0
+ ldrb w1, [x1,1845]
cmp w1, w19
- bls .L1371
- mul w4, w19, w21
+ bls .L1473
+ mul w5, w19, w21
mov w20, w25
- mov w5, 61664
-.L1362:
+ mov w6, 61664
+.L1463:
ldr w0, [x29,124]
cmp w20, w0
- ble .L1364
- add w1, w4, w20
- mov x0, x28
+ ble .L1465
+ add w1, w5, w20
+ add x0, x29, 128
lsl w1, w1, 10
- str w1, [x28,4]
+ str w1, [x29,132]
mov w1, 1
- str x5, [x29,96]
+ str x6, [x29,96]
mov w2, w1
str x3, [x29,104]
- str x4, [x29,112]
+ str x5, [x29,112]
bl FlashReadPages
- ldr w0, [x28]
- ldr x4, [x29,112]
+ ldr w0, [x29,128]
+ ldr x5, [x29,112]
cmn w0, #1
ldr x3, [x29,104]
- ldr x5, [x29,96]
- beq .L1363
- ldr x0, [x24, #:got_lo12:gFlashSpareBuffer]
- ldr x0, [x0]
+ ldr x6, [x29,96]
+ beq .L1464
+ add x28, x24, :lo12:.LANCHOR4
+ ldr x0, [x28,88]
ldrh w0, [x0]
- cmp w0, w5
- bne .L1363
+ cmp w0, w6
+ bne .L1464
mov x0, x26
mov w1, w19
mov w2, w20
str x3, [x29,112]
+ add x28, x28, 120
bl printk
ldr x3, [x29,112]
- ldr x0, [x23, #:got_lo12:FbbtBlk]
+ strh w20, [x28,w19,sxtw 1]
add w3, w3, 1
- strh w20, [x0,w19,sxtw 1]
uxth w3, w3
- b .L1364
-.L1363:
+ b .L1465
+.L1464:
sub w20, w20, #1
uxth w20, w20
- b .L1362
-.L1364:
- ldr x22, [x22, #:got_lo12:gNandMaxDie]
+ b .L1463
+.L1465:
+ add x0, x22, :lo12:.LANCHOR0
add w19, w19, 1
uxtb w19, w19
- ldrb w1, [x22]
- cmp w1, w3
+ ldrb w0, [x0,1845]
+ cmp w0, w3
csel w27, w27, wzr, ne
- b .L1361
-.L1371:
+ b .L1462
+.L1473:
+ ldr x2, [x29,184]
mov w0, w27
+ ldr x1, [x23,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1469
+ bl __stack_chk_fail
+.L1469:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ret
.size FlashLoadFactorBbt, .-FlashLoadFactorBbt
.align 2
- .global FtlLoadFactoryBbt
- .type FtlLoadFactoryBbt, %function
-FtlLoadFactoryBbt:
- adrp x1, :got:p_sys_data_buf
- adrp x0, :got:req_sys
- stp x29, x30, [sp, -112]!
+ .global FlashProgSlc2KPages
+ .type FlashProgSlc2KPages, %function
+FlashProgSlc2KPages:
+ stp x29, x30, [sp, -192]!
add x29, sp, 0
- ldr x1, [x1, #:got_lo12:p_sys_data_buf]
stp x21, x22, [sp,32]
+ adrp x22, __stack_chk_guard
+ adrp x21, .LANCHOR0
+ stp x23, x24, [sp,48]
+ mov w23, w1
+ str w3, [x29,108]
+ ldr x1, [x22,#:lo12:__stack_chk_guard]
+ mov w24, 0
+ str x1, [x29,184]
+ adrp x1, .LANCHOR1+481
stp x25, x26, [sp,64]
stp x27, x28, [sp,80]
+ ldrb w26, [x1,#:lo12:.LANCHOR1+481]
+ mov w25, w2
stp x19, x20, [sp,16]
- stp x23, x24, [sp,48]
- ldr x2, [x0, #:got_lo12:req_sys]
- adrp x20, :got:gBbtInfo
- ldr x1, [x1]
+ mov x28, x0
+ mov x19, x0
+ add x21, x21, :lo12:.LANCHOR0
+ mov w27, -1
+.L1475:
+ cmp w24, w23
+ beq .L1505
+ mov w1, w25
+ sub w4, w23, w24
+ mov x0, x28
+ add x2, x29, 120
+ add x3, x29, 124
+ bl LogAddr2PhyAddr
+ ldr w0, [x29,124]
+ ldrb w1, [x21,1845]
+ cmp w0, w1
+ bcc .L1476
+ str w27, [x28]
+ b .L1477
+.L1476:
+ add x0, x21, x0, uxtw
+ ldrb w20, [x0,1848]
+ mov w0, w20
+ bl NandcWaitFlashReady
+ mov w0, w20
+ bl NandcFlashCs
+ ldr w1, [x29,120]
+ mov w0, w20
+ bl FlashProgFirstCmd
+ ldr x3, [x28,8]
+ mov w2, w26
+ ldr x4, [x28,16]
+ mov w1, 1
+ mov w0, w20
+ bl NandcXferData
+ ldr w1, [x29,120]
+ mov w0, w20
+ bl FlashProgSecondCmd
+ mov w0, w20
+ bl NandcWaitFlashReady
+ ldr w1, [x29,120]
+ mov w0, w20
+ bl FlashReadStatus
+ sbfx x0, x0, 0, 1
+ str w0, [x28]
+ mov w0, w20
+ ldr w1, [x29,120]
+ ldr w2, [x21,12]
+ add w1, w2, w1
+ bl FlashProgFirstCmd
+ ldr x0, [x28,8]
+ mov w1, 1
+ mov w2, w26
+ cmp x0, xzr
+ add x3, x0, 2048
+ ldr x0, [x28,16]
+ csel x3, x3, xzr, ne
+ add x4, x0, 8
+ cmp x0, xzr
+ csel x4, x4, xzr, ne
+ mov w0, w20
+ bl NandcXferData
+ adrp x0, .LANCHOR0
+ ldr w1, [x29,120]
+ add x0, x0, :lo12:.LANCHOR0
+ ldr w2, [x0,12]
+ mov w0, w20
+ add w1, w2, w1
+ bl FlashProgSecondCmd
+ mov w0, w20
+ bl NandcWaitFlashReady
+ ldr w1, [x29,120]
+ mov w0, w20
+ bl FlashReadStatus
+ tbz x0, 0, .L1480
+ str w27, [x28]
+.L1480:
+ mov w0, w20
+ bl NandcFlashDeCs
+.L1477:
+ add w24, w24, 1
+ add x28, x28, 56
+ b .L1475
+.L1505:
+ ldr w0, [x29,108]
mov w21, 0
- mov x22, x0
- adrp x25, :got:c_ftl_nand_die_num
- str x1, [x2,8]
- adrp x1, :got:p_sys_spare_buf
- mov w26, -1
- adrp x27, :got:c_ftl_nand_blks_per_die
- mov w28, 61664
- ldr x1, [x1, #:got_lo12:p_sys_spare_buf]
- ldr x24, [x1]
- str x24, [x2,16]
- ldr x20, [x20, #:got_lo12:gBbtInfo]
-.L1373:
- ldr x0, [x25, #:got_lo12:c_ftl_nand_die_num]
- ldrh w0, [x0]
- cmp w21, w0
- bcs .L1382
- strh w26, [x20,12]
- adrp x3, :got:c_ftl_nand_blks_per_die
- ldr x0, [x27, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w19, [x0]
- sub w19, w19, #1
- uxth w19, w19
-.L1374:
- ldr x0, [x3, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w1, [x0]
- sub w0, w1, #16
- cmp w19, w0
- ble .L1376
- ldr x23, [x22, #:got_lo12:req_sys]
- madd w1, w21, w1, w19
- mov x0, x23
- str x3, [x29,104]
- lsl w1, w1, 10
- str w1, [x23,4]
+ cbnz w0, .L1482
+.L1489:
+ ldr x2, [x29,184]
+ mov w0, 0
+ ldr x1, [x22,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1490
+ bl __stack_chk_fail
+.L1482:
+ adrp x24, .LC101
+ adrp x26, .LC100
+ adrp x27, .LC99
+ add x24, x24, :lo12:.LC101
+ add x26, x26, :lo12:.LC100
+ add x27, x27, :lo12:.LC99
+.L1504:
+ cmp w21, w23
+ beq .L1489
+ ldr w0, [x19]
+ cmn w0, #1
+ bne .L1483
+ adrp x0, .LC98
+ ldr w1, [x19,4]
+ add x0, x0, :lo12:.LC98
+ bl printk
+ b .L1484
+.L1483:
+ adrp x20, .LANCHOR4
+ sub w4, w23, w21
+ add x28, x20, :lo12:.LANCHOR4
+ add x3, x29, 124
+ mov w1, w25
+ add x2, x29, 120
+ mov x0, x19
+ bl LogAddr2PhyAddr
+ ldr x0, [x28,96]
+ mov x1, x19
+ mov x2, 56
+ str wzr, [x0]
+ ldr x0, [x28,104]
+ str wzr, [x0]
+ add x0, x29, 128
+ bl memcpy
+ ldr x0, [x28,96]
mov w1, 1
- mov w2, w1
+ str x0, [x29,136]
+ mov w2, w25
+ ldr x0, [x28,104]
+ str x0, [x29,144]
+ add x0, x29, 128
bl FlashReadPages
- ldr w0, [x23]
- ldr x3, [x29,104]
- cmn w0, #1
- beq .L1375
- ldrh w0, [x24]
- cmp w0, w28
- bne .L1375
- strh w19, [x20,12]
- b .L1376
-.L1375:
- sub w19, w19, #1
- uxth w19, w19
- b .L1374
-.L1376:
+ ldr w28, [x29,128]
+ cmn w28, #1
+ bne .L1485
+ ldr w1, [x19,4]
+ mov x0, x27
+ bl printk
+ str w28, [x19]
+.L1485:
+ ldr x0, [x19,16]
+ cbz x0, .L1486
+ ldr w2, [x0]
+ add x0, x20, :lo12:.LANCHOR4
+ ldr x0, [x0,104]
+ ldr w3, [x0]
+ cmp w2, w3
+ beq .L1486
+ ldr w1, [x19,4]
+ mov x0, x26
+ bl printk
+ mov w0, -1
+ str w0, [x19]
+.L1486:
+ ldr x0, [x19,8]
+ cbz x0, .L1484
+ add x20, x20, :lo12:.LANCHOR4
+ ldr w2, [x0]
+ ldr x0, [x20,96]
+ ldr w3, [x0]
+ cmp w2, w3
+ beq .L1484
+ ldr w1, [x19,4]
+ mov x0, x24
+ bl printk
+ mov w0, -1
+ str w0, [x19]
+.L1484:
add w21, w21, 1
- add x20, x20, 2
- b .L1373
-.L1382:
- mov w0, 0
+ add x19, x19, 56
+ b .L1504
+.L1490:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 112
+ ldp x29, x30, [sp], 192
ret
- .size FtlLoadFactoryBbt, .-FtlLoadFactoryBbt
+ .size FlashProgSlc2KPages, .-FlashProgSlc2KPages
.align 2
- .global FtlGetLastWrittenPage
- .type FtlGetLastWrittenPage, %function
-FtlGetLastWrittenPage:
- stp x29, x30, [sp, -208]!
- cmp w1, 1
+ .global FtlLoadFactoryBbt
+ .type FtlLoadFactoryBbt, %function
+FtlLoadFactoryBbt:
+ stp x29, x30, [sp, -80]!
+ adrp x0, .LANCHOR2
add x29, sp, 0
- stp x23, x24, [sp,48]
stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR4
+ add x0, x0, :lo12:.LANCHOR2
+ add x19, x19, :lo12:.LANCHOR4
stp x21, x22, [sp,32]
stp x25, x26, [sp,64]
- mov w24, w1
- bne .L1384
- adrp x1, :got:c_ftl_nand_page_pre_slc_blk
- ldr x1, [x1, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- b .L1394
-.L1384:
- adrp x1, :got:c_ftl_nand_page_pre_blk
- ldr x1, [x1, #:got_lo12:c_ftl_nand_page_pre_blk]
-.L1394:
- ldrh w19, [x1]
- lsl w21, w0, 10
- add x22, x29, 88
- mov w1, 1
- sub w19, w19, #1
- mov w2, w24
- str xzr, [x29,96]
- add x25, x29, 144
- sxth w19, w19
- str x25, [x29,104]
- orr w0, w19, w21
- str w0, [x29,92]
- mov x0, x22
- bl FlashReadPages
- ldr w0, [x29,144]
- cmn w0, #1
- bne .L1386
+ stp x23, x24, [sp,48]
+ add x19, x19, 136
+ adrp x22, .LANCHOR0
+ ldr x1, [x0,-64]
+ add x21, x22, :lo12:.LANCHOR0
+ ldr x24, [x0,2112]
+ add x21, x21, 2112
+ str x1, [x19,8]
+ mov w23, 0
+ str x24, [x19,16]
+ mov w25, -1
+ mov w26, 61664
+.L1507:
+ add x0, x22, :lo12:.LANCHOR0
+ ldrh w1, [x0,1974]
+ cmp w23, w1
+ bcs .L1516
+ ldrh w20, [x0,2022]
+ strh w25, [x21,12]
+.L1509:
+ add x0, x22, :lo12:.LANCHOR0
+ sub w20, w20, #1
+ uxth w20, w20
+ ldrh w0, [x0,2022]
+ sub w1, w0, #16
+ cmp w20, w1
+ ble .L1510
+ madd w0, w23, w0, w20
+ mov w1, 1
+ lsl w0, w0, 10
+ mov w2, w1
+ str w0, [x19,4]
+ mov x0, x19
+ bl FlashReadPages
+ ldr w0, [x19]
+ cmn w0, #1
+ beq .L1509
+ ldrh w0, [x24]
+ cmp w0, w26
+ bne .L1509
+ strh w20, [x21,12]
+.L1510:
+ add w23, w23, 1
+ add x21, x21, 2
+ b .L1507
+.L1516:
+ mov w0, 0
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
+ ldp x29, x30, [sp], 80
+ ret
+ .size FtlLoadFactoryBbt, .-FtlLoadFactoryBbt
+ .align 2
+ .global FtlGetLastWrittenPage
+ .type FtlGetLastWrittenPage, %function
+FtlGetLastWrittenPage:
+ stp x29, x30, [sp, -208]!
+ adrp x3, .LANCHOR0
+ add x29, sp, 0
+ stp x21, x22, [sp,32]
+ adrp x21, __stack_chk_guard
+ add x3, x3, :lo12:.LANCHOR0
+ stp x23, x24, [sp,48]
+ mov w24, w1
+ ldr x1, [x21,#:lo12:__stack_chk_guard]
+ cmp w24, 1
+ stp x19, x20, [sp,16]
+ stp x25, x26, [sp,64]
+ str x1, [x29,200]
+ bne .L1518
+ ldrh w19, [x3,2028]
+ b .L1519
+.L1518:
+ ldrh w19, [x3,2026]
+.L1519:
+ sub w19, w19, #1
+ lsl w22, w0, 10
+ mov w1, 1
+ mov w2, w24
+ sxth w19, w19
+ str xzr, [x29,88]
+ orr w0, w19, w22
+ str w0, [x29,84]
+ add x0, x29, 80
+ add x25, x29, 136
+ str x25, [x29,96]
+ bl FlashReadPages
+ ldr w0, [x29,136]
+ cmn w0, #1
+ bne .L1520
mov w23, 0
mov w26, 2
-.L1387:
+.L1521:
cmp w23, w19
- bgt .L1386
+ bgt .L1520
add w3, w23, w19
mov w1, 1
mov w2, w24
sdiv w20, w3, w26
sxth w0, w20
- orr w0, w0, w21
- str w0, [x22,4]
- mov x0, x22
+ orr w0, w0, w22
+ str w0, [x29,84]
+ add x0, x29, 80
bl FlashReadPages
ldr w0, [x25]
cmn w0, #1
- bne .L1388
+ bne .L1522
ldr w0, [x25,4]
cmn w0, #1
- bne .L1388
- ldr w0, [x22]
+ bne .L1522
+ ldr w0, [x29,80]
cmn w0, #1
- beq .L1388
+ beq .L1522
sub w19, w20, #1
sxth w19, w19
- b .L1387
-.L1388:
+ b .L1521
+.L1522:
add w20, w20, 1
sxth w23, w20
- b .L1387
-.L1386:
+ b .L1521
+.L1520:
+ ldr x2, [x29,200]
mov w0, w19
+ ldr x1, [x21,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1525
+ bl __stack_chk_fail
+.L1525:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
.global FtlLoadBbt
.type FtlLoadBbt, %function
FtlLoadBbt:
- stp x29, x30, [sp, -64]!
- adrp x0, :got:p_sys_spare_buf
+ stp x29, x30, [sp, -80]!
add x29, sp, 0
- stp x21, x22, [sp,32]
- adrp x21, :got:req_sys
stp x23, x24, [sp,48]
+ adrp x23, .LANCHOR4
+ adrp x24, .LANCHOR2
stp x19, x20, [sp,16]
- ldr x1, [x21, #:got_lo12:req_sys]
- adrp x23, :got:c_ftl_nand_blks_per_die
- mov w24, 61649
- str xzr, [x1,8]
- ldr x0, [x0, #:got_lo12:p_sys_spare_buf]
- ldr x20, [x0]
- str x20, [x1,16]
+ add x0, x24, :lo12:.LANCHOR2
+ add x19, x23, :lo12:.LANCHOR4
+ stp x21, x22, [sp,32]
+ str x25, [sp,64]
+ add x19, x19, 136
+ adrp x20, .LANCHOR0
+ str xzr, [x19,8]
+ ldr x22, [x0,2112]
+ mov w25, 61649
+ str x22, [x19,16]
bl FtlBbtMemInit
- ldr x0, [x23, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w19, [x0]
- sub w19, w19, #1
- uxth w19, w19
-.L1396:
- ldr x0, [x23, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w0, [x0]
+ add x0, x20, :lo12:.LANCHOR0
+ ldrh w21, [x0,2022]
+ sub w21, w21, #1
+ uxth w21, w21
+.L1530:
+ add x0, x20, :lo12:.LANCHOR0
+ ldrh w0, [x0,2022]
sub w0, w0, #48
- cmp w19, w0
- ble .L1399
- ldr x22, [x21, #:got_lo12:req_sys]
- lsl w0, w19, 10
+ cmp w21, w0
+ ble .L1533
+ lsl w0, w21, 10
mov w1, 1
+ str w0, [x19,4]
mov w2, w1
- str w0, [x22,4]
- mov x0, x22
+ mov x0, x19
bl FlashReadPages
- ldr w0, [x22]
+ ldr w0, [x19]
cmn w0, #1
- bne .L1397
- ldr w0, [x22,4]
+ bne .L1531
+ ldr w0, [x19,4]
mov w1, 1
mov w2, w1
add w0, w0, 1
- str w0, [x22,4]
- mov x0, x22
+ str w0, [x19,4]
+ mov x0, x19
bl FlashReadPages
-.L1397:
- ldr x0, [x21, #:got_lo12:req_sys]
- ldr w0, [x0]
+.L1531:
+ ldr w0, [x19]
cmn w0, #1
- beq .L1398
- ldrh w0, [x20]
- cmp w0, w24
- bne .L1398
- adrp x0, :got:gBbtInfo
- ldr w1, [x20,4]
- ldr x0, [x0, #:got_lo12:gBbtInfo]
+ beq .L1532
+ ldrh w0, [x22]
+ cmp w0, w25
+ bne .L1532
+ add x1, x20, :lo12:.LANCHOR0
+ add x0, x1, 2112
+ strh w21, [x1,2112]
+ ldr w1, [x22,4]
str w1, [x0,8]
- strh w19, [x0]
- ldrh w1, [x20,8]
+ ldrh w1, [x22,8]
strh w1, [x0,4]
- b .L1399
-.L1398:
- sub w19, w19, #1
- uxth w19, w19
- b .L1396
-.L1399:
- adrp x19, :got:gBbtInfo
+ b .L1533
+.L1532:
+ sub w21, w21, #1
+ uxth w21, w21
+ b .L1530
+.L1533:
+ add x21, x20, :lo12:.LANCHOR0
mov w2, 65535
mov w0, -1
- ldr x22, [x19, #:got_lo12:gBbtInfo]
- ldrh w1, [x22]
+ ldrh w1, [x21,2112]
cmp w1, w2
- beq .L1401
- ldrh w1, [x22,4]
+ beq .L1535
+ ldrh w1, [x21,2116]
cmp w1, w2
- beq .L1403
- ldr x23, [x21, #:got_lo12:req_sys]
+ beq .L1537
+ add x25, x23, :lo12:.LANCHOR4
lsl w1, w1, 10
- mov x0, x23
- str w1, [x23,4]
+ add x0, x25, 136
+ str w1, [x0,4]
mov w1, 1
mov w2, w1
bl FlashReadPages
- ldr w0, [x23]
+ ldr w0, [x25,136]
cmn w0, #1
- beq .L1403
- ldrh w1, [x20]
+ beq .L1537
+ ldrh w1, [x22]
mov w0, 61649
cmp w1, w0
- bne .L1403
- ldr w0, [x20,4]
- ldr w1, [x22,8]
+ bne .L1537
+ ldr w0, [x22,4]
+ ldr w1, [x21,2120]
cmp w0, w1
- bls .L1403
- str w0, [x22,8]
- ldrh w1, [x22,4]
- ldrh w0, [x20,8]
- strh w1, [x22]
- strh w0, [x22,4]
-.L1403:
- ldr x23, [x19, #:got_lo12:gBbtInfo]
+ bls .L1537
+ str w0, [x21,2120]
+ ldrh w1, [x21,2116]
+ ldrh w0, [x22,8]
+ strh w1, [x21,2112]
+ strh w0, [x21,2116]
+.L1537:
+ add x25, x20, :lo12:.LANCHOR0
mov w1, 1
- adrp x24, :got:p_sys_data_buf
- ldrh w0, [x23]
+ add x21, x23, :lo12:.LANCHOR4
+ add x21, x21, 136
+ ldrh w0, [x25,2112]
bl FtlGetLastWrittenPage
- sxth w22, w0
+ sxth w19, w0
add w0, w0, 1
- strh w0, [x23,2]
-.L1405:
- tbnz w22, #31, .L1410
- ldr x0, [x19, #:got_lo12:gBbtInfo]
+ strh w0, [x25,2114]
+.L1539:
+ tbnz w19, #31, .L1544
+ ldrh w0, [x25,2112]
mov w1, 1
- ldr x23, [x21, #:got_lo12:req_sys]
mov w2, w1
- ldrh w0, [x0]
- orr w0, w22, w0, lsl 10
- str w0, [x23,4]
- ldr x0, [x24, #:got_lo12:p_sys_data_buf]
- ldr x0, [x0]
- str x0, [x23,8]
- mov x0, x23
+ orr w0, w19, w0, lsl 10
+ str w0, [x21,4]
+ add x0, x24, :lo12:.LANCHOR2
+ ldr x0, [x0,-64]
+ str x0, [x21,8]
+ mov x0, x21
bl FlashReadPages
- ldr w0, [x23]
+ ldr w0, [x21]
cmn w0, #1
- beq .L1406
-.L1410:
- ldr x0, [x19, #:got_lo12:gBbtInfo]
- ldrh w1, [x20,10]
- strh w1, [x0,6]
- mov w1, 65535
- ldrh w0, [x20,12]
- cmp w0, w1
- bne .L1407
- b .L1408
-.L1406:
- sub w22, w22, #1
- sxth w22, w22
- b .L1405
-.L1407:
- adrp x1, :got:c_ftl_nand_sys_blks_per_plane
- ldr x1, [x1, #:got_lo12:c_ftl_nand_sys_blks_per_plane]
- ldr w2, [x1]
+ beq .L1540
+.L1544:
+ add x1, x20, :lo12:.LANCHOR0
+ ldrh w0, [x22,10]
+ mov w2, 65535
+ strh w0, [x1,2118]
+ ldrh w0, [x22,12]
+ cmp w0, w2
+ bne .L1541
+ b .L1542
+.L1540:
+ sub w19, w19, #1
+ sxth w19, w19
+ b .L1539
+.L1541:
+ ldr w2, [x1,1948]
cmp w0, w2
- beq .L1408
- adrp x1, :got:c_ftl_nand_blk_pre_plane
- ldr x1, [x1, #:got_lo12:c_ftl_nand_blk_pre_plane]
- ldrh w1, [x1]
+ beq .L1542
+ ldrh w1, [x1,1962]
lsr w1, w1, 2
cmp w0, w1
- bcs .L1408
+ bcs .L1542
cmp w2, w1
- bcs .L1408
+ bcs .L1542
bl FtlSysBlkNumInit
-.L1408:
- mov x20, 0
- adrp x22, :got:c_ftl_nand_die_num
- adrp x23, :got:c_ftl_nand_bbm_buf_size
-.L1411:
- ldr x0, [x22, #:got_lo12:c_ftl_nand_die_num]
- mov w1, w20
- add x20, x20, 1
- ldrh w0, [x0]
+.L1542:
+ add x20, x20, :lo12:.LANCHOR0
+ mov x19, 0
+ add x21, x20, 2112
+ add x23, x23, :lo12:.LANCHOR4
+.L1545:
+ ldrh w0, [x20,1974]
+ mov w1, w19
+ add x19, x19, 1
cmp w1, w0
- bcs .L1426
- ldr x0, [x23, #:got_lo12:c_ftl_nand_bbm_buf_size]
- ldr x3, [x21, #:got_lo12:req_sys]
- ldrh w2, [x0]
- ldr x0, [x19, #:got_lo12:gBbtInfo]
- ldr x3, [x3,8]
- add x0, x0, x20, lsl 3
+ bcs .L1560
+ add x0, x24, :lo12:.LANCHOR2
+ ldr x3, [x23,144]
+ ldrh w2, [x0,2232]
+ add x0, x21, x19, lsl 3
mul w1, w1, w2
- lsl w2, w2, 2
ldr x0, [x0,24]
+ lsl w2, w2, 2
add x1, x3, x1, lsl 2
bl ftl_memcpy
- b .L1411
-.L1426:
+ b .L1545
+.L1560:
mov w0, 0
-.L1401:
+.L1535:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
- ldp x29, x30, [sp], 64
+ ldr x25, [sp,64]
+ ldp x29, x30, [sp], 80
ret
.size FtlLoadBbt, .-FtlLoadBbt
.align 2
stp x29, x30, [sp, -48]!
uxth x1, w1
add x29, sp, 0
+ stp x19, x20, [sp,16]
+ adrp x20, .LANCHOR2
+ add x20, x20, :lo12:.LANCHOR2
stp x21, x22, [sp,32]
uxth w21, w0
- adrp x0, :got:p_map_region_ppn_table
- stp x19, x20, [sp,16]
- ubfiz x2, x21, 2, 16
- adrp x20, :got:p_l2p_ram_map
- ldr x0, [x0, #:got_lo12:p_map_region_ppn_table]
- ldr x0, [x0]
- ldr w22, [x0,x2]
- cbnz w22, .L1428
- ldr x20, [x20, #:got_lo12:p_l2p_ram_map]
- adrp x2, :got:c_ftl_nand_byte_pre_page
+ ubfiz x0, x21, 2, 16
+ ldr x2, [x20,2208]
+ ldr w22, [x2,x0]
+ cbnz w22, .L1562
+ ldr x0, [x20,144]
lsl x19, x1, 4
+ adrp x2, .LANCHOR0+2036
mov w1, 255
- ldr x0, [x20]
- ldr x2, [x2, #:got_lo12:c_ftl_nand_byte_pre_page]
add x0, x0, x19
- ldrh w2, [x2]
+ ldrh w2, [x2,#:lo12:.LANCHOR0+2036]
ldr x0, [x0,8]
bl ftl_memset
- ldr x0, [x20]
+ ldr x0, [x20,144]
strh w21, [x0,x19]
- ldr x1, [x20]
+ ldr x1, [x20,144]
add x19, x1, x19
str w22, [x19,4]
- b .L1429
-.L1428:
- adrp x0, :got:req_sys
+ b .L1563
+.L1562:
lsl x19, x1, 4
- ldr x0, [x0, #:got_lo12:req_sys]
- str w22, [x0,4]
- ldr x20, [x20, #:got_lo12:p_l2p_ram_map]
- ldr x1, [x20]
+ ldr x1, [x20,144]
+ adrp x0, .LANCHOR4
+ add x0, x0, :lo12:.LANCHOR4
add x1, x1, x19
+ add x0, x0, 136
ldr x1, [x1,8]
str x1, [x0,8]
- adrp x1, :got:p_sys_spare_buf
- ldr x1, [x1, #:got_lo12:p_sys_spare_buf]
- ldr x1, [x1]
+ ldr x1, [x20,2112]
str x1, [x0,16]
mov w1, 1
mov w2, w1
+ str w22, [x0,4]
bl FlashReadPages
- ldr x0, [x20]
+ ldr x0, [x20,144]
add x0, x0, x19
str wzr, [x0,4]
- ldr x0, [x20]
+ ldr x0, [x20,144]
strh w21, [x0,x19]
-.L1429:
+.L1563:
mov w0, 0
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
FtlVendorPartRead:
stp x29, x30, [sp, -176]!
add x29, sp, 0
+ stp x23, x24, [sp,48]
+ adrp x23, __stack_chk_guard
+ mov x24, x2
stp x21, x22, [sp,32]
+ stp x25, x26, [sp,64]
mov w22, w0
- adrp x0, :got:c_ftl_nand_sec_pre_page_shift
- stp x19, x20, [sp,16]
- stp x23, x24, [sp,48]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sec_pre_page_shift]
+ adrp x25, .LANCHOR0
+ ldr x0, [x23,#:lo12:__stack_chk_guard]
mov w21, w1
- stp x25, x26, [sp,64]
+ str x0, [x29,168]
+ add x0, x25, :lo12:.LANCHOR0
+ stp x19, x20, [sp,16]
stp x27, x28, [sp,80]
add w1, w22, w1
- mov x23, x2
- ldrh w3, [x0]
- adrp x0, :got:c_ftl_vendor_part_size
+ str x23, [x29,104]
+ ldrh w3, [x0,2034]
mov w20, -1
- ldr x0, [x0, #:got_lo12:c_ftl_vendor_part_size]
- ldrh w0, [x0]
+ ldrh w0, [x0,2020]
cmp w1, w0
- bhi .L1431
- lsr w24, w22, w3
+ bhi .L1565
+ lsr w23, w22, w3
mov w20, 0
- add x25, x29, 120
- adrp x26, :got:p_vendor_data_buf
-.L1432:
- cbz w21, .L1431
- adrp x0, :got:p_vendor_region_ppn_table
- ldr x0, [x0, #:got_lo12:p_vendor_region_ppn_table]
- ldr x0, [x0]
- ldr w1, [x0,w24,uxtw 2]
- adrp x0, :got:c_ftl_nand_sec_pre_page
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w19, [x0]
+ adrp x26, .LANCHOR2
+.L1566:
+ cbz w21, .L1565
+ add x4, x26, :lo12:.LANCHOR2
+ ldr x0, [x4,2200]
+ ldr w1, [x0,w23,uxtw 2]
+ add x0, x25, :lo12:.LANCHOR0
+ ldrh w19, [x0,2032]
uxth w0, w21
udiv w27, w22, w19
msub w27, w27, w19, w22
cmp w19, w21
csel w19, w0, w19, hi
lsl w28, w19, 9
- cbz w1, .L1434
- ldr x5, [x26, #:got_lo12:p_vendor_data_buf]
+ cbz w1, .L1568
+ ldr x0, [x4,2080]
ubfiz x27, x27, 9, 16
- str w1, [x25,4]
+ str w1, [x29,116]
mov w1, 1
+ str x0, [x29,120]
mov w2, w1
- str x5, [x29,104]
- ldr x0, [x5]
- str x0, [x25,8]
- mov x0, x25
- str xzr, [x25,16]
+ add x0, x29, 112
+ str x4, [x29,96]
+ str xzr, [x29,128]
bl FlashReadPages
- ldr x5, [x29,104]
+ ldr x4, [x29,96]
mov w2, w28
- ldr w0, [x25]
- ldr x1, [x5]
+ ldr w0, [x29,112]
+ ldr x1, [x4,2080]
cmn w0, #1
- mov x0, x23
+ mov x0, x24
csinv w20, w20, wzr, ne
add x1, x1, x27
bl ftl_memcpy
- b .L1436
-.L1434:
- mov x0, x23
+ b .L1570
+.L1568:
+ mov x0, x24
mov w2, w28
bl ftl_memset
-.L1436:
- add w24, w24, 1
+.L1570:
+ add w23, w23, 1
sub w21, w21, w19
add w22, w22, w19
- add x23, x23, x28, sxtw
- b .L1432
-.L1431:
+ add x24, x24, x28, sxtw
+ b .L1566
+.L1565:
+ ldr x1, [x29,104]
mov w0, w20
+ ldr x2, [x29,168]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1572
+ bl __stack_chk_fail
+.L1572:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
stp x29, x30, [sp, -32]!
mov w0, 64
add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x20, :got:g_ect_tbl_info_size
- adrp x19, :got:gp_ect_tbl_info
- ldr x20, [x20, #:got_lo12:g_ect_tbl_info_size]
- ldr x19, [x19, #:got_lo12:gp_ect_tbl_info]
- ldrh w1, [x20]
- ldr x2, [x19]
+ str x19, [sp,16]
+ adrp x19, .LANCHOR2
+ add x19, x19, :lo12:.LANCHOR2
+ ldrh w1, [x19,2136]
+ ldr x2, [x19,2152]
bl FtlVendorPartRead
- ldr x0, [x19]
+ ldr x0, [x19,2152]
ldr w1, [x0]
mov w0, 17221
movk w0, 0x4254, lsl 16
cmp w1, w0
- beq .L1440
- adrp x0, .LC72
- adrp x1, .LC96
- add x1, x1, :lo12:.LC96
- add x0, x0, :lo12:.LC72
+ beq .L1575
+ adrp x0, .LC73
+ adrp x1, .LC102
+ add x1, x1, :lo12:.LC102
+ add x0, x0, :lo12:.LC73
bl printk
- ldrh w2, [x20]
+ ldrh w2, [x19,2136]
mov w1, 0
- ldr x0, [x19]
+ ldr x0, [x19,2152]
lsl w2, w2, 9
bl ftl_memset
-.L1440:
+.L1575:
mov w0, 0
- ldp x19, x20, [sp,16]
+ ldr x19, [sp,16]
ldp x29, x30, [sp], 32
ret
.size FtlLoadEctTbl, .-FtlLoadEctTbl
.global Ftl_load_ext_data
.type Ftl_load_ext_data, %function
Ftl_load_ext_data:
- stp x29, x30, [sp, -32]!
+ stp x29, x30, [sp, -48]!
mov w1, 1
mov w0, 0
add x29, sp, 0
stp x19, x20, [sp,16]
- adrp x19, :got:g_sys_ext_data
- ldr x20, [x19, #:got_lo12:g_sys_ext_data]
- mov x2, x20
+ adrp x19, .LANCHOR2
+ str x21, [sp,32]
+ add x20, x19, :lo12:.LANCHOR2
+ add x21, x20, 352
+ mov x2, x21
bl FtlVendorPartRead
- ldr w1, [x20]
+ ldr w1, [x20,352]
mov w0, 19539
movk w0, 0x4654, lsl 16
cmp w1, w0
- beq .L1442
- mov x0, x20
+ beq .L1577
+ mov x0, x21
mov w1, 0
mov w2, 512
bl ftl_memset
mov w0, 19539
movk w0, 0x4654, lsl 16
- str w0, [x20]
-.L1442:
- ldr x0, [x19, #:got_lo12:g_sys_ext_data]
- mov w1, 19539
- movk w1, 0x4654, lsl 16
- adrp x20, :got:g_totle_slc_erase_count
- ldr w2, [x0]
+ str w0, [x20,352]
+.L1577:
+ add x0, x19, :lo12:.LANCHOR2
+ mov w2, 19539
+ movk w2, 0x4654, lsl 16
+ ldr w3, [x0,352]
+ cmp w3, w2
+ bne .L1578
+ ldr w2, [x0,440]
+ str w2, [x0,188]
+ ldr w2, [x0,444]
+ str w2, [x0,192]
+ ldr w2, [x0,360]
+ str w2, [x0,184]
+ ldr w2, [x0,364]
+ str w2, [x0,172]
+ ldr w2, [x0,368]
+ str w2, [x0,164]
+ ldr w2, [x0,372]
+ str w2, [x0,180]
+ ldr w2, [x0,380]
+ str w2, [x0,208]
+ ldr w2, [x0,384]
+ str w2, [x0,-72]
+ ldr w2, [x0,388]
+ str w2, [x0,168]
+ ldr w2, [x0,392]
+ str w2, [x0,176]
+ ldr w2, [x0,396]
+ str w2, [x0,216]
+ ldr w1, [x0,412]
+ ldr w2, [x0,400]
+ str w2, [x0,220]
+ str w1, [x0,344]
+.L1578:
+ add x0, x19, :lo12:.LANCHOR2
+ mov w1, 34661
+ movk w1, 0x1234, lsl 16
+ ldr w2, [x0,420]
+ str wzr, [x0,2024]
cmp w2, w1
- bne .L1443
- adrp x1, :got:g_totle_write_sector
- ldr w2, [x0,88]
- ldr x1, [x1, #:got_lo12:g_totle_write_sector]
- str w2, [x1]
- adrp x1, :got:g_totle_read_sector
- ldr w2, [x0,92]
- ldr x1, [x1, #:got_lo12:g_totle_read_sector]
- str w2, [x1]
- adrp x1, :got:g_totle_gc_page_count
- ldr w2, [x0,8]
- ldr x1, [x1, #:got_lo12:g_totle_gc_page_count]
- str w2, [x1]
- adrp x1, :got:g_totle_write_page_count
- ldr w2, [x0,12]
- ldr x1, [x1, #:got_lo12:g_totle_write_page_count]
- str w2, [x1]
- adrp x1, :got:g_totle_read_page_count
- ldr w2, [x0,16]
- ldr x1, [x1, #:got_lo12:g_totle_read_page_count]
- str w2, [x1]
- adrp x1, :got:g_totle_l2p_write_count
- ldr w2, [x0,20]
- ldr x1, [x1, #:got_lo12:g_totle_l2p_write_count]
- str w2, [x1]
- ldr w2, [x0,28]
- ldr x1, [x20, #:got_lo12:g_totle_slc_erase_count]
- str w2, [x1]
- adrp x1, :got:g_totle_sys_slc_erase_count
- ldr w2, [x0,32]
- ldr x1, [x1, #:got_lo12:g_totle_sys_slc_erase_count]
- str w2, [x1]
- adrp x1, :got:g_totle_discard_page_count
- ldr w2, [x0,36]
- ldr x1, [x1, #:got_lo12:g_totle_discard_page_count]
- str w2, [x1]
- adrp x1, :got:g_totle_cache_write_count
- ldr w2, [x0,40]
- ldr x1, [x1, #:got_lo12:g_totle_cache_write_count]
- str w2, [x1]
- adrp x1, :got:g_max_erase_count
- ldr w2, [x0,44]
- ldr x1, [x1, #:got_lo12:g_max_erase_count]
- str w2, [x1]
- adrp x1, :got:g_min_erase_count
- ldr x1, [x1, #:got_lo12:g_min_erase_count]
- ldr w2, [x0,48]
- ldr w0, [x0,60]
- str w2, [x1]
- adrp x1, :got:g_all_blk_used_slc_mode
- ldr x1, [x1, #:got_lo12:g_all_blk_used_slc_mode]
- str w0, [x1]
-.L1443:
- adrp x0, :got:g_SlcPartLbaEndSector
- ldr x0, [x0, #:got_lo12:g_SlcPartLbaEndSector]
- str wzr, [x0]
- mov w0, 34661
- movk w0, 0x1234, lsl 16
- ldr x19, [x19, #:got_lo12:g_sys_ext_data]
- ldr w1, [x19,68]
- cmp w1, w0
- bne .L1444
- adrp x0, :got:g_inkDie_check_enable
+ bne .L1579
mov w1, 1
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- str w1, [x0]
- adrp x0, .LC72
- adrp x1, .LC97
- add x0, x0, :lo12:.LC72
- add x1, x1, :lo12:.LC97
+ str w1, [x0,160]
+ adrp x0, .LC73
+ adrp x1, .LC103
+ add x0, x0, :lo12:.LC73
+ add x1, x1, :lo12:.LC103
bl printk
-.L1444:
- adrp x0, :got:c_mlc_erase_count_value
- ldr x2, [x20, #:got_lo12:g_totle_slc_erase_count]
- adrp x3, :got:g_totle_avg_erase_count
- ldr x0, [x0, #:got_lo12:c_mlc_erase_count_value]
- ldr x3, [x3, #:got_lo12:g_totle_avg_erase_count]
- ldrh w1, [x0]
- adrp x0, :got:g_totle_mlc_erase_count
- ldr x0, [x0, #:got_lo12:g_totle_mlc_erase_count]
- ldr w4, [x0]
- ldr w0, [x2]
- madd w0, w1, w4, w0
- adrp x1, :got:c_ftl_nand_data_blks_per_plane
- ldr x1, [x1, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w1, [x1]
+.L1579:
+ adrp x2, .LANCHOR0
+ add x19, x19, :lo12:.LANCHOR2
+ add x2, x2, :lo12:.LANCHOR0
+ ldr x21, [sp,32]
+ ldr w3, [x19,204]
+ ldrh w1, [x2,2016]
+ ldr w0, [x19,208]
+ madd w0, w1, w3, w0
+ ldrh w1, [x2,1960]
udiv w0, w0, w1
- str w0, [x3]
+ str w0, [x19,212]
ldp x19, x20, [sp,16]
- ldp x29, x30, [sp], 32
+ ldp x29, x30, [sp], 48
ret
.size Ftl_load_ext_data, .-Ftl_load_ext_data
.align 2
- .global FtlScanSysBlk
- .type FtlScanSysBlk, %function
-FtlScanSysBlk:
- stp x29, x30, [sp, -160]!
- mov w1, 0
- add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x19, :got:g_totle_map_block
- stp x21, x22, [sp,32]
+ .global StorageSysDataLoad
+ .type StorageSysDataLoad, %function
+StorageSysDataLoad:
+ stp x29, x30, [sp, -48]!
+ mov x2, 512
+ add x29, sp, 0
+ stp x19, x20, [sp,16]
+ mov w20, w0
+ mov x19, x1
+ mov x0, x1
+ mov w1, 0
+ bl memset
+ bl rknand_device_lock
+ mov x2, x19
+ mov w1, 1
+ add w0, w20, 512
+ bl FtlVendorPartRead
+ str x0, [x29,40]
+ bl rknand_device_unlock
+ ldr x0, [x29,40]
+ ldp x19, x20, [sp,16]
+ ldp x29, x30, [sp], 48
+ ret
+ .size StorageSysDataLoad, .-StorageSysDataLoad
+ .align 2
+ .global FtlScanSysBlk
+ .type FtlScanSysBlk, %function
+FtlScanSysBlk:
+ stp x29, x30, [sp, -128]!
+ mov w1, 0
+ add x29, sp, 0
+ stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR0
+ stp x21, x22, [sp,32]
+ add x20, x19, :lo12:.LANCHOR0
+ adrp x22, .LANCHOR2
+ add x21, x22, :lo12:.LANCHOR2
stp x23, x24, [sp,48]
- ldr x0, [x19, #:got_lo12:g_totle_map_block]
- adrp x24, :got:p_map_block_ver_table
- stp x27, x28, [sp,80]
stp x25, x26, [sp,64]
- adrp x28, :got:g_totle_vendor_block
- strh wzr, [x0]
- adrp x25, :got:c_ftl_nand_max_map_blks
- adrp x21, :got:p_map_block_table
- adrp x27, :got:c_ftl_nand_max_vendor_blks
- adrp x23, :got:p_vendor_block_ver_table
- ldr x0, [x28, #:got_lo12:g_totle_vendor_block]
- strh wzr, [x0]
- ldr x20, [x25, #:got_lo12:c_ftl_nand_max_map_blks]
- ldr x0, [x24, #:got_lo12:p_map_block_ver_table]
- ldr w2, [x20]
- ldr x0, [x0]
+ stp x27, x28, [sp,80]
+ strh wzr, [x21,2304]
+ mov x24, x22
+ ldr w2, [x20,2056]
+ mov w22, 65535
+ ldr x0, [x21,2216]
lsl w2, w2, 2
+ strh wzr, [x20,2072]
bl ftl_memset
- ldr x0, [x21, #:got_lo12:p_map_block_table]
+ ldr w2, [x20,2056]
mov w1, 0
- ldr w2, [x20]
- adrp x20, :got:p_vendor_block_table
- ldr x0, [x0]
+ ldr x0, [x21,2168]
lsl w2, w2, 1
bl ftl_memset
- ldr x22, [x27, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldr x0, [x23, #:got_lo12:p_vendor_block_ver_table]
+ ldrh w2, [x20,2048]
mov w1, 0
- ldrh w2, [x22]
- ldr x0, [x0]
+ ldr x0, [x21,2192]
lsl w2, w2, 2
bl ftl_memset
- ldr x0, [x20, #:got_lo12:p_vendor_block_table]
+ ldrh w2, [x20,2048]
mov w1, 0
- ldrh w2, [x22]
- adrp x22, :got:gSysInfo
- ldr x0, [x0]
+ ldr x0, [x20,2080]
lsl w2, w2, 1
bl ftl_memset
- ldr x0, [x22, #:got_lo12:gSysInfo]
+ add x0, x21, 280
mov w1, 255
mov w2, 12
bl ftl_memset
- str x28, [x29,144]
- adrp x0, :got:c_ftl_nand_data_blks_per_plane
- str x25, [x29,136]
- str x27, [x29,128]
- str x22, [x29,120]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w0, [x0]
- str w0, [x29,156]
-.L1446:
- adrp x0, :got:c_ftl_nand_blk_pre_plane
- ldr w1, [x29,156]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_blk_pre_plane]
- ldrh w0, [x0]
- cmp w0, w1
- bls .L1522
- mov w22, 0
- adrp x25, :got:c_ftl_nand_byte_pre_oob
- mov w27, w22
- mov w26, 4
-.L1489:
- adrp x0, :got:c_ftl_nand_planes_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- cmp w0, w27
- bls .L1523
- adrp x0, :got:p_plane_order_table
- ldrh w1, [x29,156]
- ldr x0, [x0, #:got_lo12:p_plane_order_table]
- ldrb w0, [x0,w27,sxtw]
+ ldrh w21, [x20,1960]
+.L1582:
+ add x1, x19, :lo12:.LANCHOR0
+ ldrh w0, [x1,1962]
+ cmp w0, w21
+ bls .L1625
+ mov x27, 0
+ ldrh w5, [x1,1952]
+ ldrh w4, [x1,2038]
+ mov w20, w27
+ mov x23, x1
+.L1626:
+ cmp w5, w27, uxth
+ bls .L1657
+ add x0, x23, 1984
+ mov w1, w21
+ str x4, [x29,112]
+ str x5, [x29,120]
+ ldrb w0, [x0,x27]
bl V2P_block
uxth w28, w0
bl FtlBbmIsBadBlock
- cbnz w0, .L1447
- adrp x1, :got:req_read
+ ldr x5, [x29,120]
+ ldr x4, [x29,112]
+ cbnz w0, .L1583
+ add x2, x24, :lo12:.LANCHOR2
mov w0, 56
lsl w28, w28, 10
- umull x0, w22, w0
- ldr x2, [x1, #:got_lo12:req_read]
- ldr x1, [x2]
+ mov w3, 4
+ umull x0, w20, w0
+ ldr x1, [x2,2048]
add x1, x1, x0
str w28, [x1,4]
- ldr x1, [x2]
- adrp x2, :got:p_gc_spare_buf
- add x1, x1, x0
- str xzr, [x1,8]
- ldr x0, [x25, #:got_lo12:c_ftl_nand_byte_pre_oob]
- ldr x2, [x2, #:got_lo12:p_gc_spare_buf]
- ldrh w0, [x0]
- ldr x2, [x2]
- mul w0, w22, w0
- add w22, w22, 1
- sdiv w0, w0, w26
- uxth w22, w22
- add x0, x2, x0, sxtw 2
- str x0, [x1,16]
-.L1447:
- add w27, w27, 1
- uxth w27, w27
- b .L1489
-.L1523:
- adrp x0, :got:req_read
- mov w1, w22
+ ldr x1, [x2,2048]
+ ldr x2, [x2,904]
+ add x0, x1, x0
+ mul w1, w20, w4
+ add w20, w20, 1
+ str xzr, [x0,8]
+ sdiv w1, w1, w3
+ uxth w20, w20
+ add x1, x2, x1, sxtw 2
+ str x1, [x0,16]
+.L1583:
+ add x27, x27, 1
+ b .L1626
+.L1657:
+ add x0, x24, :lo12:.LANCHOR2
+ mov w1, w20
mov w2, 1
- mov x27, 0
- mov w28, 65535
- ldr x0, [x0, #:got_lo12:req_read]
- ldr x0, [x0]
+ mov x23, 0
+ mov w27, 61634
+ mov w28, 61574
+ ldr x0, [x0,2048]
bl FlashReadPages
-.L1449:
- cmp w22, w27, uxth
- bls .L1524
+.L1585:
+ cmp w20, w23, uxth
+ bls .L1658
+ add x7, x24, :lo12:.LANCHOR2
mov x0, 56
- mul x5, x27, x0
- adrp x0, :got:req_read
- ldr x6, [x0, #:got_lo12:req_read]
- ldr x2, [x6]
- add x1, x2, x5
- ldr w7, [x2,x5]
+ mul x6, x23, x0
+ ldr x2, [x7,2048]
+ add x1, x2, x6
+ ldr w8, [x2,x6]
ldr w0, [x1,4]
- cmn w7, #1
+ cmn w8, #1
ldr x26, [x1,16]
ubfx x25, x0, 10, 16
- bne .L1451
+ bne .L1587
add w0, w0, 1
str w0, [x1,4]
mov w1, 1
- str x7, [x29,96]
- ldr x0, [x6]
+ str x8, [x29,104]
+ ldr x0, [x7,2048]
mov w2, w1
- str x6, [x29,104]
- add x0, x0, x5
- str x5, [x29,112]
+ str x7, [x29,112]
+ add x0, x0, x6
+ str x6, [x29,120]
bl FlashReadPages
ldrh w0, [x26]
- ldr x5, [x29,112]
- cmp w0, w28
- ldr x6, [x29,104]
- ldr x7, [x29,96]
- bne .L1451
- ldr x0, [x6]
- str w7, [x0,x5]
-.L1451:
- adrp x0, :got:req_read
- ldr x0, [x0, #:got_lo12:req_read]
- ldr x0, [x0]
- ldr w0, [x0,x5]
- cmn w0, #1
- beq .L1453
- adrp x0, :got:g_GlobalSysVersion
- ldr x0, [x0, #:got_lo12:g_GlobalSysVersion]
- ldr w0, [x0]
+ ldr x6, [x29,120]
+ cmp w0, w22
+ ldr x7, [x29,112]
+ ldr x8, [x29,104]
+ bne .L1587
+ ldr x0, [x7,2048]
+ str w8, [x0,x6]
+.L1587:
+ add x0, x24, :lo12:.LANCHOR2
+ ldr x1, [x0,2048]
+ ldr w1, [x1,x6]
+ cmn w1, #1
+ beq .L1589
+ ldr w0, [x0,196]
cmn w0, #1
- beq .L1454
+ beq .L1590
ldr w1, [x26,4]
cmp w0, w1
- bhi .L1455
-.L1454:
+ bhi .L1591
+.L1590:
ldr w0, [x26,4]
cmn w0, #1
- beq .L1455
- adrp x1, :got:g_GlobalSysVersion
+ beq .L1591
+ add x1, x24, :lo12:.LANCHOR2
add w0, w0, 1
- ldr x1, [x1, #:got_lo12:g_GlobalSysVersion]
- str w0, [x1]
-.L1455:
+ str w0, [x1,196]
+.L1591:
ldrh w0, [x26]
mov w1, 61604
cmp w0, w1
- beq .L1457
- bhi .L1458
- mov w1, 61574
- cmp w0, w1
- bne .L1456
- ldr x0, [x29,128]
- ldr x6, [x23, #:got_lo12:p_vendor_block_ver_table]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldr x6, [x6]
- ldrh w5, [x0]
- ldr x0, [x29,144]
- sub w1, w5, #1
- ldr x0, [x0, #:got_lo12:g_totle_vendor_block]
+ beq .L1593
+ bhi .L1594
+ cmp w0, w28
+ bne .L1592
+ add x0, x19, :lo12:.LANCHOR0
+ add x7, x24, :lo12:.LANCHOR2
+ ldrh w6, [x0,2048]
+ ldrh w0, [x0,2072]
+ sub w1, w6, #1
+ ldr x7, [x7,2192]
sxth w2, w1
- ldrh w0, [x0]
sub w1, w1, w0
- b .L1474
-.L1458:
- mov w1, 61634
- cmp w0, w1
- beq .L1460
- cmp w0, w28
- bne .L1456
+ b .L1610
+.L1594:
+ cmp w0, w27
+ beq .L1596
+ cmp w0, w22
+ bne .L1592
mov w0, w25
mov w1, 0
- b .L1519
-.L1460:
- ldr x0, [x29,136]
- ldr x6, [x24, #:got_lo12:p_map_block_ver_table]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_max_map_blks]
- ldr x6, [x6]
- ldr w5, [x0]
- ldr x0, [x19, #:got_lo12:g_totle_map_block]
- uxth w1, w5
- ldrh w0, [x0]
+ b .L1655
+.L1596:
+ add x0, x19, :lo12:.LANCHOR0
+ add x7, x24, :lo12:.LANCHOR2
+ ldr w6, [x0,2056]
+ ldrh w0, [x7,2304]
+ ldr x7, [x7,2216]
+ uxth w1, w6
sub w2, w1, #1
sub w1, w1, w0
- sxth w2, w2
sub w1, w1, #1
+ sxth w2, w2
sxth w1, w1
-.L1462:
+.L1598:
cmp w2, w1
- ble .L1525
- sbfiz x7, x2, 2, 32
- ldr w10, [x26,4]
- sxth x8, w2
- ldr w9, [x6,x7]
- cmp w10, w9
- bls .L1463
- ldr w1, [x6]
- cbnz w1, .L1464
- cmp w0, w5
- bne .L1465
-.L1464:
- ldr x0, [x21, #:got_lo12:p_map_block_table]
+ ble .L1659
+ sbfiz x8, x2, 2, 32
+ ldr w11, [x26,4]
+ sxth x9, w2
+ ldr w10, [x7,x8]
+ cmp w11, w10
+ bls .L1599
+ ldr w1, [x7]
+ cbnz w1, .L1600
+ cmp w0, w6
+ bne .L1601
+.L1600:
+ add x0, x24, :lo12:.LANCHOR2
mov w1, 1
- str x8, [x29,96]
- str x2, [x29,104]
- ldr x0, [x0]
- str x7, [x29,112]
+ str x9, [x29,104]
+ str x2, [x29,112]
+ ldr x0, [x0,2168]
+ str x8, [x29,120]
ldrh w0, [x0]
bl FtlFreeSysBlkQueueIn
- ldr x7, [x29,112]
- ldr x2, [x29,104]
- ldr x8, [x29,96]
- b .L1466
-.L1465:
- ldr x1, [x19, #:got_lo12:g_totle_map_block]
+ ldr x8, [x29,120]
+ ldr x2, [x29,112]
+ ldr x9, [x29,104]
+ b .L1602
+.L1601:
+ add x1, x24, :lo12:.LANCHOR2
add w0, w0, 1
- strh w0, [x1]
-.L1466:
+ strh w0, [x1,2304]
+.L1602:
mov w0, 0
-.L1467:
+.L1603:
cmp w0, w2
- beq .L1526
- ldr x1, [x24, #:got_lo12:p_map_block_ver_table]
- ldr x6, [x1]
+ beq .L1660
+ add x6, x24, :lo12:.LANCHOR2
sxtw x1, w0
- lsl x5, x1, 2
+ lsl x7, x1, 2
lsl x1, x1, 1
- add x9, x6, x5
add w0, w0, 1
+ ldr x10, [x6,2216]
sxth w0, w0
- ldr w9, [x9,4]
- str w9, [x6,x5]
- ldr x5, [x21, #:got_lo12:p_map_block_table]
- ldr x5, [x5]
- add x6, x5, x1
- ldrh w6, [x6,2]
- strh w6, [x5,x1]
- b .L1467
-.L1526:
- ldr x0, [x24, #:got_lo12:p_map_block_ver_table]
- ldr w1, [x26,4]
- ldr x0, [x0]
- str w1, [x0,x7]
- ldr x0, [x21, #:got_lo12:p_map_block_table]
- ldr x0, [x0]
- strh w25, [x0,x8,lsl 1]
- tbz w2, #31, .L1518
- b .L1453
-.L1463:
+ add x11, x10, x7
+ ldr w11, [x11,4]
+ str w11, [x10,x7]
+ ldr x6, [x6,2168]
+ add x7, x6, x1
+ ldrh w7, [x7,2]
+ strh w7, [x6,x1]
+ b .L1603
+.L1660:
+ add x0, x24, :lo12:.LANCHOR2
+ ldr w6, [x26,4]
+ ldr x1, [x0,2216]
+ str w6, [x1,x8]
+ ldr x1, [x0,2168]
+ strh w25, [x1,x9,lsl 1]
+ tbz w2, #31, .L1654
+ b .L1589
+.L1599:
sub w2, w2, #1
sxth w2, w2
- b .L1462
-.L1525:
- tbz w2, #31, .L1473
- b .L1453
-.L1518:
- ldr x1, [x29,136]
- ldr x0, [x19, #:got_lo12:g_totle_map_block]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_max_map_blks]
- ldrh w0, [x0]
- ldr w1, [x1]
+ b .L1598
+.L1659:
+ tbz w2, #31, .L1609
+ b .L1589
+.L1654:
+ add x1, x19, :lo12:.LANCHOR0
+ ldrh w0, [x0,2304]
+ ldr w1, [x1,2056]
sub w1, w1, w0
sub w1, w1, #1
cmp w2, w1, sxth
- bgt .L1456
-.L1473:
- ldr x1, [x19, #:got_lo12:g_totle_map_block]
+ bgt .L1592
+.L1609:
+ add x1, x24, :lo12:.LANCHOR2
add w0, w0, 1
sxtw x2, w2
- strh w0, [x1]
- ldr w1, [x26,4]
- ldr x0, [x24, #:got_lo12:p_map_block_ver_table]
- ldr x0, [x0]
- str w1, [x0,x2,lsl 2]
- ldr x0, [x21, #:got_lo12:p_map_block_table]
- b .L1520
-.L1482:
- sbfiz x7, x2, 2, 32
- ldr w10, [x26,4]
- sxth x8, w2
- ldr w9, [x6,x7]
- cmp w10, w9
- bhi .L1527
+ ldr w4, [x26,4]
+ strh w0, [x1,2304]
+ ldr x0, [x1,2216]
+ str w4, [x0,x2,lsl 2]
+ ldr x0, [x1,2168]
+ b .L1656
+.L1618:
+ sbfiz x8, x2, 2, 32
+ ldr w11, [x26,4]
+ sxth x9, w2
+ ldr w10, [x7,x8]
+ cmp w11, w10
+ bhi .L1661
sub w2, w2, #1
sxth w2, w2
-.L1474:
+.L1610:
cmp w2, w1
- bgt .L1482
- b .L1481
-.L1527:
- ldr w1, [x6]
- cbnz w1, .L1476
- cmp w0, w5
- bne .L1477
-.L1476:
- ldr x0, [x20, #:got_lo12:p_vendor_block_table]
+ bgt .L1618
+ b .L1617
+.L1661:
+ ldr w1, [x7]
+ cbnz w1, .L1612
+ cmp w0, w6
+ bne .L1613
+.L1612:
+ add x0, x19, :lo12:.LANCHOR0
mov w1, 1
- str x8, [x29,96]
- str x7, [x29,104]
- ldr x0, [x0]
- str x2, [x29,112]
+ str x9, [x29,104]
+ str x8, [x29,112]
+ ldr x0, [x0,2080]
+ str x2, [x29,120]
ldrh w0, [x0]
bl FtlFreeSysBlkQueueIn
- ldr x2, [x29,112]
- ldr x7, [x29,104]
- ldr x8, [x29,96]
- b .L1478
-.L1477:
- ldr x1, [x29,144]
+ ldr x2, [x29,120]
+ ldr x8, [x29,112]
+ ldr x9, [x29,104]
+ b .L1614
+.L1613:
+ add x1, x19, :lo12:.LANCHOR0
add w0, w0, 1
- ldr x1, [x1, #:got_lo12:g_totle_vendor_block]
- strh w0, [x1]
-.L1478:
+ strh w0, [x1,2072]
+.L1614:
mov w0, 0
-.L1479:
+.L1615:
cmp w0, w2
- beq .L1528
- ldr x1, [x23, #:got_lo12:p_vendor_block_ver_table]
- ldr x6, [x1]
+ beq .L1662
+ add x1, x24, :lo12:.LANCHOR2
+ ldr x7, [x1,2192]
sxtw x1, w0
- lsl x5, x1, 2
+ lsl x6, x1, 2
lsl x1, x1, 1
- add x9, x6, x5
+ add x10, x7, x6
add w0, w0, 1
sxth w0, w0
- ldr w9, [x9,4]
- str w9, [x6,x5]
- ldr x5, [x20, #:got_lo12:p_vendor_block_table]
- ldr x5, [x5]
- add x6, x5, x1
- ldrh w6, [x6,2]
- strh w6, [x5,x1]
- b .L1479
-.L1528:
- ldr x0, [x23, #:got_lo12:p_vendor_block_ver_table]
+ ldr w10, [x10,4]
+ str w10, [x7,x6]
+ add x6, x19, :lo12:.LANCHOR0
+ ldr x6, [x6,2080]
+ add x7, x6, x1
+ ldrh w7, [x7,2]
+ strh w7, [x6,x1]
+ b .L1615
+.L1662:
+ add x0, x24, :lo12:.LANCHOR2
ldr w1, [x26,4]
- ldr x0, [x0]
- str w1, [x0,x7]
- ldr x0, [x20, #:got_lo12:p_vendor_block_table]
- ldr x0, [x0]
- strh w25, [x0,x8,lsl 1]
-.L1481:
- tbnz w2, #31, .L1453
- ldr x0, [x29,144]
- ldr x5, [x0, #:got_lo12:g_totle_vendor_block]
- ldr x0, [x29,128]
- ldrh w1, [x5]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldrh w0, [x0]
+ ldr x0, [x0,2192]
+ str w1, [x0,x8]
+ add x0, x19, :lo12:.LANCHOR0
+ ldr x0, [x0,2080]
+ strh w25, [x0,x9,lsl 1]
+.L1617:
+ tbnz w2, #31, .L1589
+ add x1, x19, :lo12:.LANCHOR0
+ ldrh w0, [x1,2048]
+ ldrh w6, [x1,2072]
sub w0, w0, #1
- sub w0, w0, w1
+ sub w0, w0, w6
cmp w2, w0, sxth
- bgt .L1456
- add w1, w1, 1
- strh w1, [x5]
+ bgt .L1592
+ add x0, x24, :lo12:.LANCHOR2
sxtw x2, w2
- ldr w1, [x26,4]
- ldr x0, [x23, #:got_lo12:p_vendor_block_ver_table]
- ldr x0, [x0]
- str w1, [x0,x2,lsl 2]
- ldr x0, [x20, #:got_lo12:p_vendor_block_table]
-.L1520:
- ldr x0, [x0]
+ add w6, w6, 1
+ ldr w4, [x26,4]
+ strh w6, [x1,2072]
+ ldr x0, [x0,2192]
+ str w4, [x0,x2,lsl 2]
+ ldr x0, [x1,2080]
+.L1656:
strh w25, [x0,x2,lsl 1]
- b .L1456
-.L1457:
- ldr x0, [x29,120]
- ldr x0, [x0, #:got_lo12:gSysInfo]
- ldrh w1, [x0]
- cmp w1, w28
- beq .L1521
- ldrh w0, [x0,4]
- cmp w0, w28
- beq .L1486
+ b .L1592
+.L1593:
+ add x0, x24, :lo12:.LANCHOR2
+ add x1, x0, 280
+ ldrh w2, [x0,280]
+ cmp w2, w22
+ bne .L1621
+ strh w25, [x0,280]
+ ldr w0, [x26,4]
+ str w0, [x1,8]
+ b .L1592
+.L1621:
+ ldrh w0, [x1,4]
+ cmp w0, w22
+ beq .L1622
mov w1, 1
bl FtlFreeSysBlkQueueIn
-.L1486:
- ldr x0, [x29,120]
- ldr w1, [x26,4]
- ldr x0, [x0, #:got_lo12:gSysInfo]
- ldr w2, [x0,8]
- cmp w2, w1
- bcs .L1487
- ldrh w1, [x0]
- strh w1, [x0,4]
-.L1521:
+.L1622:
+ add x1, x24, :lo12:.LANCHOR2
+ ldr w2, [x26,4]
+ add x0, x1, 280
+ ldr w6, [x0,8]
+ cmp w6, w2
+ bcs .L1623
+ ldrh w2, [x1,280]
+ strh w2, [x0,4]
+ strh w25, [x1,280]
ldr w1, [x26,4]
- strh w25, [x0]
str w1, [x0,8]
- b .L1456
-.L1487:
+ b .L1592
+.L1623:
strh w25, [x0,4]
- b .L1456
-.L1453:
+ b .L1592
+.L1589:
mov w0, w25
mov w1, 1
-.L1519:
+.L1655:
bl FtlFreeSysBlkQueueIn
-.L1456:
- add x27, x27, 1
- b .L1449
-.L1524:
- ldr w0, [x29,156]
- add w26, w0, 1
- uxth w0, w26
- str w0, [x29,156]
- b .L1446
-.L1522:
- ldr x0, [x21, #:got_lo12:p_map_block_table]
- ldr x1, [x0]
- ldrh w0, [x1]
- cbz w0, .L1490
-.L1493:
- ldr x0, [x20, #:got_lo12:p_vendor_block_table]
- ldr x2, [x0]
+.L1592:
+ add x23, x23, 1
+ b .L1585
+.L1658:
+ add w21, w21, 1
+ uxth w21, w21
+ b .L1582
+.L1625:
+ add x4, x24, :lo12:.LANCHOR2
+ ldr x2, [x4,2168]
ldrh w0, [x2]
- cbz w0, .L1491
- b .L1513
-.L1490:
- ldr x19, [x19, #:got_lo12:g_totle_map_block]
- ldrh w2, [x19]
- cbz w2, .L1493
- ldr x2, [x29,136]
- ldr x2, [x2, #:got_lo12:c_ftl_nand_max_map_blks]
- ldr w2, [x2]
-.L1494:
- cmp w0, w2
- bcs .L1493
- ldrh w3, [x1,w0,sxtw 1]
- cbz w3, .L1495
- mov w6, w0
-.L1496:
- ldr x1, [x29,136]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_max_map_blks]
- ldr w1, [x1]
+ cbz w0, .L1627
+.L1630:
+ add x1, x19, :lo12:.LANCHOR0
+ ldr x2, [x1,2080]
+ ldrh w0, [x2]
+ cbz w0, .L1628
+ b .L1649
+.L1627:
+ ldrh w4, [x4,2304]
+ cbz w4, .L1630
+ ldr w1, [x1,2056]
+.L1631:
+ cmp w0, w1
+ bcs .L1630
+ ldrh w4, [x2,w0,sxtw 1]
+ cbz w4, .L1632
+ mov w7, w0
+.L1633:
+ add x1, x19, :lo12:.LANCHOR0
+ ldr w1, [x1,2056]
cmp w0, w1
- bcs .L1493
- ldr x3, [x21, #:got_lo12:p_map_block_table]
- sxtw x5, w0
- sub w1, w0, w6
- lsl x2, x5, 1
+ bcs .L1630
+ add x2, x24, :lo12:.LANCHOR2
+ sxtw x6, w0
+ sub w1, w0, w7
+ lsl x4, x6, 1
add w0, w0, 1
- ldr x4, [x3]
+ ldr x5, [x2,2168]
sxtw x1, w1
sxth w0, w0
- ldrh w7, [x4,x2]
- strh w7, [x4,x1,lsl 1]
- ldr x4, [x24, #:got_lo12:p_map_block_ver_table]
- ldr x4, [x4]
- ldr w5, [x4,x5,lsl 2]
- str w5, [x4,x1,lsl 2]
- ldr x1, [x3]
- strh wzr, [x1,x2]
- b .L1496
-.L1495:
+ ldrh w8, [x5,x4]
+ strh w8, [x5,x1,lsl 1]
+ ldr x5, [x2,2216]
+ ldr w6, [x5,x6,lsl 2]
+ str w6, [x5,x1,lsl 2]
+ ldr x1, [x2,2168]
+ strh wzr, [x1,x4]
+ b .L1633
+.L1632:
add w0, w0, 1
sxth w0, w0
- b .L1494
-.L1491:
- ldr x1, [x29,144]
- ldr x1, [x1, #:got_lo12:g_totle_vendor_block]
- ldrh w1, [x1]
- cbz w1, .L1513
- ldr x1, [x29,128]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldrh w1, [x1]
-.L1499:
+ b .L1631
+.L1628:
+ ldrh w4, [x1,2072]
+ cbz w4, .L1649
+ ldrh w1, [x1,2048]
+.L1636:
cmp w0, w1
- mov w6, w0
- bge .L1513
- ldrh w3, [x2,w0,sxtw 1]
- cbz w3, .L1500
-.L1501:
- ldr x1, [x29,128]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldrh w1, [x1]
+ mov w7, w0
+ bge .L1649
+ ldrh w4, [x2,w0,sxtw 1]
+ cbz w4, .L1637
+.L1638:
+ add x2, x19, :lo12:.LANCHOR0
+ ldrh w1, [x2,2048]
cmp w0, w1
- bge .L1513
- ldr x3, [x20, #:got_lo12:p_vendor_block_table]
- sxtw x5, w0
- sub w1, w0, w6
- lsl x2, x5, 1
- add w0, w0, 1
- ldr x4, [x3]
+ bge .L1649
+ sxtw x6, w0
+ sub w1, w0, w7
+ ldr x5, [x2,2080]
+ lsl x4, x6, 1
sxtw x1, w1
+ add w0, w0, 1
+ ldrh w8, [x5,x4]
sxth w0, w0
- ldrh w7, [x4,x2]
- strh w7, [x4,x1,lsl 1]
- ldr x4, [x23, #:got_lo12:p_vendor_block_ver_table]
- ldr x4, [x4]
- ldr w5, [x4,x5,lsl 2]
- str w5, [x4,x1,lsl 2]
- ldr x1, [x3]
- strh wzr, [x1,x2]
- b .L1501
-.L1500:
+ strh w8, [x5,x1,lsl 1]
+ add x5, x24, :lo12:.LANCHOR2
+ ldr x5, [x5,2192]
+ ldr w6, [x5,x6,lsl 2]
+ str w6, [x5,x1,lsl 2]
+ ldr x1, [x2,2080]
+ strh wzr, [x1,x4]
+ b .L1638
+.L1637:
add w0, w0, 1
sxth w0, w0
- b .L1499
-.L1513:
+ b .L1636
+.L1649:
mov w0, 0
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 160
+ ldp x29, x30, [sp], 128
ret
.size FtlScanSysBlk, .-FtlScanSysBlk
.align 2
.type FtlLoadSysInfo, %function
FtlLoadSysInfo:
stp x29, x30, [sp, -80]!
- adrp x0, :got:p_sys_spare_buf
+ mov w1, 0
add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x20, :got:req_sys
- str x25, [sp,64]
stp x21, x22, [sp,32]
+ adrp x22, .LANCHOR4
+ adrp x21, .LANCHOR2
+ stp x19, x20, [sp,16]
+ add x20, x21, :lo12:.LANCHOR2
+ add x19, x22, :lo12:.LANCHOR4
stp x23, x24, [sp,48]
- ldr x1, [x20, #:got_lo12:req_sys]
- adrp x22, :got:c_ftl_nand_data_blks_per_plane
- adrp x21, :got:p_valid_page_count_table
- adrp x23, :got:gSysInfo
- str xzr, [x1,8]
- ldr x0, [x0, #:got_lo12:p_sys_spare_buf]
- ldr x0, [x0]
- str x0, [x1,16]
- ldr x1, [x22, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldr x0, [x21, #:got_lo12:p_valid_page_count_table]
- ldrh w2, [x1]
- mov w1, 0
- ldr x0, [x0]
+ str x25, [sp,64]
+ add x19, x19, 136
+ adrp x23, .LANCHOR0
+ str xzr, [x19,8]
+ ldr x0, [x20,2112]
+ add x25, x20, 280
+ str x0, [x19,16]
+ add x0, x23, :lo12:.LANCHOR0
+ ldrh w2, [x0,1960]
+ ldr x0, [x20,-40]
lsl w2, w2, 1
bl ftl_memset
- ldr x24, [x23, #:got_lo12:gSysInfo]
+ ldrh w0, [x20,280]
mov w1, 65535
- ldrh w0, [x24]
cmp w0, w1
- bne .L1530
-.L1534:
+ bne .L1664
+.L1668:
mov w19, -1
- b .L1531
-.L1530:
+ b .L1665
+.L1664:
mov w1, 1
- adrp x25, :got:p_sys_data_buf
bl FtlGetLastWrittenPage
- sxth w19, w0
+ sxth w24, w0
add w0, w0, 1
- strh w0, [x24,2]
-.L1532:
- tbnz w19, #31, .L1537
- ldr x0, [x23, #:got_lo12:gSysInfo]
+ strh w0, [x25,2]
+.L1666:
+ tbnz w24, #31, .L1671
+ ldrh w0, [x20,280]
mov w1, 1
- ldr x24, [x20, #:got_lo12:req_sys]
mov w2, w1
- ldrh w0, [x0]
- orr w0, w19, w0, lsl 10
- str w0, [x24,4]
- ldr x0, [x25, #:got_lo12:p_sys_data_buf]
- ldr x0, [x0]
- str x0, [x24,8]
- mov x0, x24
+ orr w0, w24, w0, lsl 10
+ str w0, [x19,4]
+ ldr x0, [x20,-64]
+ str x0, [x19,8]
+ mov x0, x19
bl FlashReadPages
- ldr w0, [x24]
+ ldr w0, [x19]
cmn w0, #1
- beq .L1533
-.L1537:
- adrp x24, :got:g_sys_save_data
- ldr x20, [x20, #:got_lo12:req_sys]
+ beq .L1667
+.L1671:
+ add x24, x22, :lo12:.LANCHOR4
+ add x19, x21, :lo12:.LANCHOR2
+ add x20, x19, 224
mov w2, 48
- ldr x19, [x24, #:got_lo12:g_sys_save_data]
- ldr x1, [x20,8]
- mov x0, x19
+ add x22, x23, :lo12:.LANCHOR0
+ mov x0, x20
+ ldr x1, [x24,144]
bl ftl_memcpy
- ldr x22, [x22, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldr x21, [x21, #:got_lo12:p_valid_page_count_table]
- ldr x1, [x20,8]
- ldrh w2, [x22]
- ldr x0, [x21]
+ ldr x1, [x24,144]
+ ldrh w2, [x22,1960]
+ ldr x0, [x19,-40]
add x1, x1, 48
lsl w2, w2, 1
bl ftl_memcpy
- ldr w1, [x19]
+ ldrh w2, [x22,1960]
+ ldr x3, [x24,144]
+ ldr x0, [x23,#:lo12:.LANCHOR0]
+ uxth x1, w2
+ lsr w2, w2, 3
+ add x1, x1, 24
+ add w2, w2, 4
+ lsr x1, x1, 1
+ add x1, x3, x1, lsl 2
+ bl ftl_memcpy
+ ldr w1, [x19,224]
mov w0, 19539
movk w0, 0x4654, lsl 16
- mov x2, x24
cmp w1, w0
- beq .L1544
- b .L1534
-.L1533:
- sub w19, w19, #1
- sxth w19, w19
- b .L1532
-.L1544:
- ldr x23, [x23, #:got_lo12:gSysInfo]
- adrp x0, :got:c_ftl_nand_die_num
- ldrh w3, [x19,8]
- ldrb w1, [x19,10]
- strh w3, [x23,6]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_die_num]
- ldrh w0, [x0]
+ beq .L1678
+ b .L1668
+.L1667:
+ sub w24, w24, #1
+ sxth w24, w24
+ b .L1666
+.L1678:
+ ldrb w1, [x20,10]
+ ldrh w0, [x22,1974]
+ ldrh w2, [x20,8]
+ strh w2, [x19,286]
cmp w1, w0
- bne .L1534
- adrp x0, :got:g_MaxLbn
- adrp x4, :got:c_ftl_nand_sec_pre_page
- ldrh w6, [x19,14]
- adrp x20, :got:g_gc_superblock
- ldr x0, [x0, #:got_lo12:g_MaxLbn]
- str w3, [x0]
- adrp x0, :got:c_ftl_nand_page_pre_blk
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w1, [x0]
- adrp x0, :got:g_MaxLpn
- ldr x0, [x0, #:got_lo12:g_MaxLpn]
- mul w1, w1, w3
- str w1, [x0]
- adrp x0, :got:g_MaxLbaSector
- ldr x4, [x4, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldr x0, [x0, #:got_lo12:g_MaxLbaSector]
- ldrh w4, [x4]
- mul w1, w1, w4
- str w1, [x0]
- adrp x1, :got:c_ftl_nand_max_data_blks
- adrp x0, :got:gBbtInfo
- adrp x4, :got:c_ftl_nand_data_op_blks_per_plane
- ldr x1, [x1, #:got_lo12:c_ftl_nand_max_data_blks]
- ldr x0, [x0, #:got_lo12:gBbtInfo]
- ldr x4, [x4, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- ldr w1, [x1]
- ldrh w0, [x0,6]
+ bne .L1668
+ ldrh w1, [x22,2026]
+ ldrh w0, [x22,2032]
+ str w2, [x24,192]
+ mul w1, w1, w2
+ str w1, [x22,2104]
+ strh wzr, [x19,298]
+ mul w1, w1, w0
+ str w1, [x22,2068]
+ ldrh w0, [x22,2118]
+ ldr w1, [x22,1964]
+ strb wzr, [x19,302]
sub w0, w1, w0
- adrp x1, :got:c_ftl_nand_planes_num
- sub w0, w0, w3
- adrp x3, :got:g_active_superblock
- ldr x1, [x1, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w1, [x1]
+ ldrh w1, [x22,1952]
+ sub w0, w0, w2
+ ldrh w2, [x20,14]
+ strb wzr, [x19,304]
udiv w0, w0, w1
- ldrh w1, [x19,16]
- strh w0, [x4]
- lsr w4, w1, 6
+ strh w0, [x19,272]
+ adrp x0, .LANCHOR2
+ strh w2, [x0,#:lo12:.LANCHOR2]
+ ldrh w0, [x20,16]
+ lsr w1, w0, 6
+ strh w1, [x19,2]
+ mov w1, -1
+ strh w1, [x19,296]
+ ldrh w1, [x20,18]
+ and w0, w0, 63
+ strh w1, [x19,48]
+ ldrh w1, [x20,20]
+ strb w0, [x19,6]
+ lsr w3, w1, 6
and w1, w1, 63
- ldr x0, [x3, #:got_lo12:g_active_superblock]
- strb w1, [x0,6]
- ldrb w1, [x19,11]
- strh w6, [x0]
- strh w4, [x0,2]
- strb w1, [x0,8]
- mov w0, -1
- ldr x1, [x20, #:got_lo12:g_gc_superblock]
- strh w0, [x1]
- strh wzr, [x1,2]
- strb wzr, [x1,6]
- strb wzr, [x1,8]
- adrp x1, :got:g_buffer_superblock
- ldrh w0, [x19,18]
- ldr x4, [x1, #:got_lo12:g_buffer_superblock]
- strh w0, [x4]
- ldrh w5, [x19,20]
- lsr w0, w5, 6
- strh w0, [x4,2]
- ldrb w0, [x19,12]
- and w5, w5, 63
- strb w0, [x4,8]
- adrp x0, :got:g_gc_temp_superblock
- strb w5, [x4,6]
- mov x21, x0
- ldrh w5, [x19,22]
- ldr x4, [x0, #:got_lo12:g_gc_temp_superblock]
- strh w5, [x4]
- ldrh w5, [x19,24]
- lsr w7, w5, 6
- and w5, w5, 63
- strb w5, [x4,6]
- ldrb w5, [x19,13]
- strh w7, [x4,2]
- strb w5, [x4,8]
- adrp x4, :got:g_totle_gc_page_count
- ldr w5, [x19,32]
- ldr x4, [x4, #:got_lo12:g_totle_gc_page_count]
- str wzr, [x4]
- adrp x4, :got:g_totle_write_page_count
- ldr x4, [x4, #:got_lo12:g_totle_write_page_count]
- str wzr, [x4]
- adrp x4, :got:g_totle_read_page_count
- ldr x4, [x4, #:got_lo12:g_totle_read_page_count]
- str wzr, [x4]
- adrp x4, :got:g_totle_l2p_write_count
- ldr x4, [x4, #:got_lo12:g_totle_l2p_write_count]
- str wzr, [x4]
- adrp x4, :got:g_totle_mlc_erase_count
- ldr x4, [x4, #:got_lo12:g_totle_mlc_erase_count]
- str w5, [x4]
- adrp x4, :got:g_totle_slc_erase_count
- ldr w5, [x19,40]
- mov x19, x1
- ldr x4, [x4, #:got_lo12:g_totle_slc_erase_count]
- str wzr, [x4]
- adrp x4, :got:g_max_erase_count
- ldr x4, [x4, #:got_lo12:g_max_erase_count]
- str wzr, [x4]
- adrp x4, :got:g_totle_cache_write_count
- ldr x4, [x4, #:got_lo12:g_totle_cache_write_count]
- str wzr, [x4]
- adrp x4, :got:g_GlobalSysVersion
- ldr x4, [x4, #:got_lo12:g_GlobalSysVersion]
- ldr w7, [x4]
- cmp w5, w7
- bls .L1538
- str w5, [x4]
-.L1538:
- adrp x0, :got:g_GlobalDataVersion
- ldr x2, [x2, #:got_lo12:g_sys_save_data]
- ldr x0, [x0, #:got_lo12:g_GlobalDataVersion]
- ldr w1, [x2,36]
- ldr w2, [x0]
- cmp w1, w2
- bls .L1539
- str w1, [x0]
-.L1539:
+ strb w1, [x19,54]
+ ldrb w1, [x20,12]
+ strb w1, [x19,56]
+ ldrh w1, [x20,22]
+ strh w1, [x19,96]
+ ldrh w1, [x20,24]
+ ldrb w0, [x20,11]
+ strh w3, [x19,50]
+ lsr w3, w1, 6
+ and w1, w1, 63
+ strb w0, [x19,8]
+ strb w1, [x19,102]
+ strh w3, [x19,98]
+ ldrb w1, [x20,13]
+ strb w1, [x19,104]
+ ldr w0, [x20,32]
+ str w0, [x19,204]
+ ldr w1, [x19,196]
+ ldr w0, [x20,40]
+ str wzr, [x19,184]
+ str wzr, [x19,172]
+ cmp w0, w1
+ str wzr, [x19,164]
+ str wzr, [x19,180]
+ str wzr, [x19,208]
+ str wzr, [x19,216]
+ str wzr, [x19,176]
+ bls .L1672
+ str w0, [x19,196]
+.L1672:
+ add x0, x21, :lo12:.LANCHOR2
+ ldr w1, [x0,260]
+ ldr w3, [x0,200]
+ cmp w1, w3
+ bls .L1673
+ str w1, [x0,200]
+.L1673:
mov w0, 65535
- cmp w6, w0
- beq .L1540
- ldr x0, [x3, #:got_lo12:g_active_superblock]
+ cmp w2, w0
+ beq .L1674
+ add x0, x21, :lo12:.LANCHOR2
bl make_superblock
-.L1540:
- ldr x0, [x19, #:got_lo12:g_buffer_superblock]
+.L1674:
+ add x1, x21, :lo12:.LANCHOR2
+ add x0, x1, 48
+ ldrh w2, [x1,48]
mov w1, 65535
- ldrh w2, [x0]
cmp w2, w1
- beq .L1541
+ beq .L1675
bl make_superblock
-.L1541:
- ldr x0, [x21, #:got_lo12:g_gc_temp_superblock]
+.L1675:
+ add x1, x21, :lo12:.LANCHOR2
+ add x0, x1, 96
+ ldrh w2, [x1,96]
mov w1, 65535
- ldrh w2, [x0]
cmp w2, w1
- beq .L1542
+ beq .L1676
bl make_superblock
-.L1542:
- ldr x0, [x20, #:got_lo12:g_gc_superblock]
+.L1676:
+ add x21, x21, :lo12:.LANCHOR2
mov w1, 65535
+ add x0, x21, 296
mov w19, 0
- ldrh w2, [x0]
+ ldrh w2, [x21,296]
cmp w2, w1
- beq .L1531
+ beq .L1665
bl make_superblock
-.L1531:
+.L1665:
mov w0, w19
ldr x25, [sp,64]
ldp x19, x20, [sp,16]
.global FtlGcScanTempBlk
.type FtlGcScanTempBlk, %function
FtlGcScanTempBlk:
- stp x29, x30, [sp, -128]!
+ stp x29, x30, [sp, -144]!
add x29, sp, 0
stp x19, x20, [sp,16]
- adrp x19, .LANCHOR2
- stp x25, x26, [sp,64]
- mov x26, x0
- add x0, x19, :lo12:.LANCHOR2
+ adrp x19, .LANCHOR1
stp x23, x24, [sp,48]
+ mov x24, x0
+ add x0, x19, :lo12:.LANCHOR1
+ stp x25, x26, [sp,64]
stp x21, x22, [sp,32]
stp x27, x28, [sp,80]
- mov w23, w1
- ldrh w25, [x0,128]
+ str x19, [x29,136]
+ mov w25, w1
+ ldrh w28, [x0,3004]
mov w0, 65535
+ cmp w28, w0
+ beq .L1699
+ cbnz w28, .L1680
+ b .L1681
+.L1699:
+ mov w28, 0
+.L1680:
+ adrp x0, .LANCHOR0+2026
+ ldrh w0, [x0,#:lo12:.LANCHOR0+2026]
cmp w25, w0
- beq .L1566
- cbnz w25, .L1546
- b .L1547
-.L1566:
- mov w25, 0
-.L1546:
- adrp x0, :got:c_ftl_nand_page_pre_blk
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w0, [x0]
- cmp w23, w0
- bne .L1548
-.L1547:
+ bne .L1682
+.L1681:
bl FtlGcPageVarInit
-.L1548:
- mov w22, -1
+.L1682:
+ mov w23, -1
mov w20, 0
mov w21, 65535
- adrp x24, :got:req_read
-.L1560:
- ldrh w0, [x26]
- strb wzr, [x26,8]
+ adrp x26, .LANCHOR0
+ adrp x27, .LANCHOR2
+.L1693:
+ ldrh w0, [x24]
+ strb wzr, [x24,8]
cmp w0, w21
- beq .L1567
-.L1550:
-.L1563:
- adrp x0, :got:c_ftl_nand_planes_num
- adrp x1, :got:c_ftl_nand_byte_pre_oob
- mov x2, x26
- mov w27, 0
+ beq .L1700
+.L1684:
+.L1696:
+ add x0, x26, :lo12:.LANCHOR0
+ mov x2, x24
+ mov w19, 0
mov w10, 4
- adrp x11, :got:p_gc_spare_buf
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_byte_pre_oob]
- ldrh w6, [x0]
- ldrh w9, [x1]
- add x6, x26, x6, lsl 1
-.L1551:
+ ldrh w6, [x0,1952]
+ ldrh w9, [x0,2038]
+ add x6, x24, x6, lsl 1
+.L1685:
cmp x2, x6
- beq .L1575
+ beq .L1710
ldrh w1, [x2,16]
cmp w1, w21
- beq .L1552
- ldr x8, [x24, #:got_lo12:req_read]
+ beq .L1686
+ add x7, x27, :lo12:.LANCHOR2
mov w0, 56
- orr w1, w25, w1, lsl 10
- add w5, w27, 1
- umull x0, w27, w0
- ldr x7, [x8]
- add x7, x7, x0
- str w1, [x7,4]
- ldr x1, [x8]
+ orr w1, w28, w1, lsl 10
+ add w5, w19, 1
+ umull x0, w19, w0
+ ldr x8, [x7,2048]
+ add x8, x8, x0
+ str w1, [x8,4]
+ ldr x1, [x7,2048]
+ ldr x7, [x7,904]
add x0, x1, x0
- mul w1, w27, w9
- uxth w27, w5
+ mul w1, w19, w9
+ uxth w19, w5
str xzr, [x0,8]
sdiv w1, w1, w10
- ldr x7, [x11, #:got_lo12:p_gc_spare_buf]
- ldr x7, [x7]
add x1, x7, x1, sxtw 2
str x1, [x0,16]
-.L1552:
+.L1686:
add x2, x2, 2
- b .L1551
-.L1575:
- ldr x0, [x24, #:got_lo12:req_read]
- mov w1, w27
+ b .L1685
+.L1710:
+ add x0, x27, :lo12:.LANCHOR2
+ mov w1, w19
mov w2, 0
- mov x28, 0
- ldr x0, [x0]
+ mov x22, 0
+ ldr x0, [x0,2048]
bl FlashReadPages
-.L1554:
- cmp w27, w28, uxth
- bls .L1576
+.L1688:
+ cmp w19, w22, uxth
+ bls .L1711
+ adrp x0, .LANCHOR2
+ add x7, x0, :lo12:.LANCHOR2
mov x0, 56
- mul x6, x28, x0
- adrp x0, :got:req_read
- str x6, [x29,112]
- ldr x8, [x0, #:got_lo12:req_read]
+ str x7, [x29,96]
+ mul x8, x22, x0
+ ldr x10, [x7,2048]
str x8, [x29,104]
- ldr x0, [x8]
- add x0, x0, x6
- ldr w1, [x0,4]
- str x1, [x29,120]
- lsr w0, w1, 10
+ add x9, x10, x8
+ str x10, [x29,112]
+ str x9, [x29,120]
+ ldr w1, [x9,4]
+ str x1, [x29,128]
+ lsr x0, x1, 10
bl P2V_plane
uxth w2, w0
+ ldr x10, [x29,112]
ldr x8, [x29,104]
- ldr x6, [x29,112]
- ldr x0, [x8]
- add x8, x0, x6
- ldr w6, [x0,x6]
- cbnz w6, .L1555
- ldr x6, [x8,16]
- add x28, x28, 1
- ldr x1, [x29,120]
- ldrh w0, [x6]
+ ldr x1, [x29,128]
+ ldr x7, [x29,96]
+ ldr w0, [x10,x8]
+ cbnz w0, .L1689
+ ldr x9, [x29,120]
+ add x22, x22, 1
+ ldr x8, [x9,16]
+ ldrh w0, [x8]
cmp w0, w21
- bne .L1556
- adrp x0, :got:ftl_gc_temp_power_lost_recovery_flag
- mov w1, 1
- ldr x0, [x0, #:got_lo12:ftl_gc_temp_power_lost_recovery_flag]
- str w1, [x0]
- b .L1549
-.L1556:
- ldr w0, [x6,12]
- ldr w2, [x6,8]
+ bne .L1690
+ mov w0, 1
+ str w0, [x7,2328]
+ b .L1683
+.L1690:
+ ldr w0, [x8,12]
+ ldr w2, [x8,8]
bl FtlGcUpdatePage
- b .L1554
-.L1555:
- adrp x0, :got:g_inkDie_check_enable
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w0, [x0]
- cbz w0, .L1557
- adrp x0, :got:p_erase_count_table
- ldrh w1, [x26]
- ldr x0, [x0, #:got_lo12:p_erase_count_table]
- ldr x0, [x0]
- ldrh w0, [x0,x1,lsl 1]
- cmp w0, 119
- bls .L1558
-.L1557:
- cmn w6, #1
- bne .L1559
-.L1558:
- ldr w22, [x8,4]
-.L1559:
- adrp x0, :got:p_valid_page_count_table
- ldrh w1, [x26]
- mov w25, 0
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x0]
- strh wzr, [x0,x1,lsl 1]
- ldrh w0, [x26]
+ b .L1688
+.L1689:
+ ldr w2, [x7,160]
+ cbz w2, .L1691
+ ldrh w3, [x24]
+ ldr x2, [x7,-80]
+ ldrh w2, [x2,x3,lsl 1]
+ cmp w2, 119
+ bls .L1692
+.L1691:
+ cmn w0, #1
+ csel w1, w1, w23, eq
+.L1692:
+ adrp x0, .LANCHOR2
+ ldrh w2, [x24]
+ add x22, x0, :lo12:.LANCHOR2
+ str x1, [x29,128]
+ mov w28, 0
+ ldr x0, [x22,-40]
+ strh wzr, [x0,x2,lsl 1]
+ ldrh w0, [x24]
bl INSERT_FREE_LIST
mov w0, -1
- strh w0, [x26]
+ strh w0, [x24]
bl FtlGcPageVarInit
- b .L1560
-.L1576:
+ ldr x1, [x29,128]
+ mov w23, w1
+ b .L1693
+.L1711:
add w20, w20, 1
- add w3, w25, 1
- cmp w20, w23
- adrp x0, :got:c_ftl_nand_page_pre_blk
- uxth w25, w3
- bcs .L1562
-.L1564:
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w0, [x0]
- cmp w0, w25
- bhi .L1563
- b .L1567
-.L1562:
- add x2, x19, :lo12:.LANCHOR2
- ldrh w1, [x2,128]
- cmp w1, w21
- beq .L1564
- add w1, w1, w20
- strh w1, [x2,128]
- ldr x1, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w1, [x1]
- cmp w1, w25
- bls .L1564
- b .L1565
-.L1567:
+ add w3, w28, 1
+ cmp w20, w25
+ uxth w28, w3
+ bcs .L1695
+.L1697:
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrh w0, [x0,2026]
+ cmp w0, w28
+ bhi .L1696
+ b .L1700
+.L1695:
+ ldr x0, [x29,136]
+ add x1, x0, :lo12:.LANCHOR1
+ ldrh w0, [x1,3004]
+ cmp w0, w21
+ beq .L1697
+ add w0, w0, w20
+ strh w0, [x1,3004]
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrh w0, [x0,2026]
+ cmp w0, w28
+ bls .L1697
+ b .L1698
+.L1700:
mov w2, 0
-.L1549:
- add x19, x19, :lo12:.LANCHOR2
+.L1683:
+ ldr x0, [x29,136]
+ mov w1, w28
+ strh w28, [x24,2]
+ add x19, x0, :lo12:.LANCHOR1
mov w0, -1
- strh w25, [x26,2]
- mov w1, w25
- strb w2, [x26,6]
- strh w0, [x19,128]
- mov x0, x26
+ strb w2, [x24,6]
+ strh w0, [x19,3004]
+ mov x0, x24
bl ftl_sb_update_avl_pages
-.L1565:
- mov w0, w22
+.L1698:
+ mov w0, w23
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 128
+ ldp x29, x30, [sp], 144
ret
.size FtlGcScanTempBlk, .-FtlGcScanTempBlk
.align 2
.global FlashProgPages
.type FlashProgPages, %function
FlashProgPages:
- stp x29, x30, [sp, -192]!
+ stp x29, x30, [sp, -208]!
+ adrp x4, __stack_chk_guard
+ adrp x7, .LANCHOR1+481
add x29, sp, 0
stp x19, x20, [sp,16]
- mov x19, x0
- adrp x0, :got:gpNandParaInfo
+ ldr x5, [x4,#:lo12:__stack_chk_guard]
+ adrp x20, .LANCHOR0
+ str x5, [x29,200]
+ add x5, x20, :lo12:.LANCHOR0
stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
- mov w24, w1
stp x25, x26, [sp,64]
stp x27, x28, [sp,80]
- mov w26, w2
+ ldrb w7, [x7,#:lo12:.LANCHOR1+481]
+ mov x19, x0
+ ldr x6, [x5,744]
+ mov w25, w1
+ ldrb w5, [x5,8]
+ mov w23, w2
str w3, [x29,120]
- ldr x0, [x0]
- mov w21, 0
+ mov w22, 0
+ str w7, [x29,124]
+ str x4, [x29,112]
+ ldrb w6, [x6,19]
+ cbz w5, .L1713
+ bl FlashProgSlc2KPages
+ b .L1714
+.L1713:
+ sub w0, w6, #1
mov w27, 56
- ldrb w1, [x0,19]
- adrp x0, :got:gNandParaInfo
- ldr x0, [x0, #:got_lo12:gNandParaInfo]
- ldrb w28, [x0,9]
- add x0, x29, 128
- str x0, [x29,112]
- add x0, x29, 132
- str x0, [x29,104]
- sub w0, w1, #1
- str w0, [x29,100]
-.L1578:
- cmp w21, w24
- adrp x20, :got:gNandMaxDie
- bcs .L1620
- umull x20, w21, w27
- ldr x2, [x29,112]
- mov w1, w26
- add x25, x19, x20
- ldr x3, [x29,104]
- sub w4, w24, w21
- mov x0, x25
+ mov x28, 24
+ str w0, [x29,108]
+.L1765:
+ cmp w22, w25
+ bcs .L1766
+ umull x21, w22, w27
+ sub w4, w25, w22
+ add x2, x29, 136
+ add x26, x19, x21
+ mov w1, w23
+ mov x0, x26
+ add x3, x29, 140
bl LogAddr2PhyAddr
- mov w23, w0
- adrp x1, :got:gNandMaxDie
- ldr w0, [x29,132]
- ldr x1, [x1, #:got_lo12:gNandMaxDie]
- ldrb w2, [x1]
- cmp w0, w2
- bcc .L1579
+ mov w24, w0
+ add x2, x20, :lo12:.LANCHOR0
+ ldr w0, [x29,140]
+ ldrb w4, [x2,1845]
+ cmp w0, w4
+ bcc .L1715
mov w0, -1
- str w0, [x19,x20]
- b .L1580
-.L1579:
- adrp x1, :got:gMultiPageProgEn
- adrp x22, :got:gDieOp
- ldr x1, [x1, #:got_lo12:gMultiPageProgEn]
- ldr x3, [x22, #:got_lo12:gDieOp]
- ldrb w1, [x1]
+ str w0, [x19,x21]
+ b .L1716
+.L1715:
+ ldrb w1, [x2,1945]
+ add x3, x2, 1652
cmp w1, wzr
uxtw x1, w0
- mov x0, 24
- csel w23, w23, wzr, ne
- madd x0, x1, x0, x3
+ csel w24, w24, wzr, ne
+ madd x0, x1, x28, x3
ldr x0, [x0,8]
- cbz x0, .L1582
- cmp w2, 1
- bne .L1583
- adrp x0, :got:gpNandc
- ldr x0, [x0, #:got_lo12:gpNandc]
- ldr x0, [x0]
+ cbz x0, .L1718
+ cmp w4, 1
+ bne .L1719
+ ldr x0, [x2,128]
bl NandcIqrWaitFlashReady
-.L1583:
- ldrb w0, [x29,132]
+.L1719:
+ ldrb w0, [x29,140]
bl FlashWaitCmdDone
-.L1582:
- ldr x2, [x22, #:got_lo12:gDieOp]
- mov x0, 24
- ldr w1, [x29,132]
- madd x0, x1, x0, x2
- ldr w2, [x29,128]
- str x25, [x0,8]
+.L1718:
+ add x0, x20, :lo12:.LANCHOR0
+ ldr w2, [x29,140]
+ add x0, x0, 1652
+ ldr w1, [x29,136]
+ madd x0, x2, x28, x0
+ str x26, [x0,8]
str xzr, [x0,16]
- str w2, [x0,4]
- cbz w23, .L1584
- add w2, w21, 1
- umull x2, w2, w27
- add x2, x19, x2
- str x2, [x0,16]
-.L1584:
- adrp x0, :got:DieCsIndex
- ldr x22, [x22, #:got_lo12:gDieOp]
- ldr x0, [x0, #:got_lo12:DieCsIndex]
- ldrb w20, [x0,x1]
- mov x0, 24
- mul x1, x1, x0
- adrp x0, :got:gNandMaxDie
- strb w20, [x22,x1]
- ldr x0, [x0, #:got_lo12:gNandMaxDie]
- ldrb w0, [x0]
+ str w1, [x0,4]
+ cbz w24, .L1720
+ add w1, w22, 1
+ umull x1, w1, w27
+ add x1, x19, x1
+ str x1, [x0,16]
+.L1720:
+ add x1, x20, :lo12:.LANCHOR0
+ add x0, x1, x2
+ madd x2, x2, x28, x1
+ ldrb w21, [x0,1848]
+ ldrb w0, [x1,1845]
+ strb w21, [x2,1652]
cmp w0, 1
- mov w0, w20
- bne .L1585
+ bne .L1721
+ mov w0, w21
bl NandcWaitFlashReady
- b .L1586
-.L1585:
+ b .L1722
+.L1721:
+ mov w0, w21
+ str x1, [x29,96]
bl NandcFlashCs
- adrp x0, :got:DieAddrs
- ldr w1, [x29,132]
- ldr x0, [x0, #:got_lo12:DieAddrs]
- ldr w0, [x0,x1,lsl 2]
- ldr w1, [x29,128]
+ ldr x1, [x29,96]
+ ldr w0, [x29,140]
+ add x1, x1, 708
+ ldr w0, [x1,x0,lsl 2]
+ ldr w1, [x29,136]
cmp w0, wzr
- mov w0, w20
+ mov w0, w21
cset w2, ne
bl FlashWaitReadyEN
- mov w0, w20
+ mov w0, w21
bl NandcFlashDeCs
-.L1586:
- ldr w0, [x29,100]
+.L1722:
+ ldr w0, [x29,108]
cmp w0, 5
- bhi .L1587
- adrp x0, :got:read_retry_cur_offset
- ldr x0, [x0, #:got_lo12:read_retry_cur_offset]
- ldrb w0, [x0,w20,sxtw]
- cbz w0, .L1587
- adrp x2, :got:gReadRetryInfo
- mov w0, w20
+ bhi .L1723
+ add x2, x20, :lo12:.LANCHOR0
+ add x0, x2, x21, sxtw
+ ldrb w0, [x0,1616]
+ cbz w0, .L1723
+ ldrb w1, [x2,761]
+ mov w0, w21
+ add x2, x2, 764
mov w3, 0
- ldr x2, [x2, #:got_lo12:gReadRetryInfo]
- add x2, x2, 4
- ldrb w1, [x2,-3]
bl HynixSetRRPara
-.L1587:
- mov w0, w20
+.L1723:
+ mov w0, w21
bl NandcFlashCs
- ldr w1, [x29,128]
- mov w0, w20
+ cmp w23, 1
+ bne .L1724
+ add x0, x20, :lo12:.LANCHOR0
+ ldrb w0, [x0,120]
+ cbz w0, .L1724
+ mov w0, w21
+ bl flash_enter_slc_mode
+.L1724:
+ ldr w1, [x29,136]
+ mov w0, w21
bl FlashProgFirstCmd
- ldr x3, [x25,8]
- mov w0, w20
- ldr x4, [x25,16]
+ ldrb w2, [x29,124]
+ mov w0, w21
+ ldr x3, [x26,8]
mov w1, 1
- mov w2, w28
+ ldr x4, [x26,16]
bl NandcXferData
- cbz w23, .L1588
- ldr w1, [x29,128]
- mov w0, w20
+ cbz w24, .L1725
+ ldr w1, [x29,136]
+ mov w0, w21
+ add x26, x20, :lo12:.LANCHOR0
bl FlashProgDpFirstCmd
- adrp x0, :got:DieAddrs
- ldr w1, [x29,132]
- ldr x0, [x0, #:got_lo12:DieAddrs]
+ ldr w1, [x29,140]
+ add x0, x26, 708
ldr w0, [x0,x1,lsl 2]
- ldr w1, [x29,128]
+ ldr w1, [x29,136]
cmp w0, wzr
- mov w0, w20
+ mov w0, w21
cset w2, ne
bl FlashWaitReadyEN
- adrp x0, :got:gBlockPageAlignSize
- ldr w1, [x29,128]
- ldr x0, [x0, #:got_lo12:gBlockPageAlignSize]
- ldr w2, [x0]
- mov w0, w20
+ ldr w2, [x26,12]
+ mov w0, w21
+ ldr w1, [x29,136]
add w1, w2, w1
bl FlashProgDpSecondCmd
- add w4, w21, 1
- mov w0, w20
+ add w4, w22, 1
+ ldrb w2, [x29,124]
+ mov w0, w21
mov w1, 1
- mov w2, w28
umull x4, w4, w27
add x4, x19, x4
ldr x3, [x4,8]
ldr x4, [x4,16]
bl NandcXferData
-.L1588:
- ldr w1, [x29,128]
- mov w0, w20
- add w21, w21, w23
+.L1725:
+ ldr w1, [x29,136]
+ mov w0, w21
+ add w22, w22, w24
bl FlashProgSecondCmd
- mov w0, w20
+ mov w0, w21
bl NandcFlashDeCs
-.L1580:
- add w21, w21, 1
- b .L1578
-.L1620:
- adrp x0, :got:gpNandc
- mov w21, 0
- ldr x0, [x0, #:got_lo12:gpNandc]
- ldr x0, [x0]
+.L1716:
+ add w22, w22, 1
+ b .L1765
+.L1766:
+ add x20, x20, :lo12:.LANCHOR0
+ mov x21, 0
+ add x22, x20, 1652
+ mov x24, 24
+ ldr x0, [x20,128]
bl NandcIqrWaitFlashReady
-.L1590:
- ldr x0, [x20, #:got_lo12:gNandMaxDie]
- ldrb w0, [x0]
- cmp w21, w0
- bcs .L1621
+.L1727:
+ ldrb w0, [x20,1845]
+ cmp w0, w21
+ bls .L1767
mov w0, w21
- add w21, w21, 1
bl FlashWaitCmdDone
- b .L1590
-.L1621:
+ cmp w23, 1
+ bne .L1728
+ ldrb w0, [x20,120]
+ cbz w0, .L1728
+ mul x0, x21, x24
+ ldrb w0, [x0,x22]
+ bl flash_exit_slc_mode
+.L1728:
+ add x21, x21, 1
+ b .L1727
+.L1767:
ldr w0, [x29,120]
- cbz w0, .L1619
- adrp x23, .LC101
- adrp x25, .LC100
- adrp x27, .LC99
- mov w22, 0
- add x23, x23, :lo12:.LC101
- add x25, x25, :lo12:.LC100
- add x27, x27, :lo12:.LC99
-.L1593:
- cmp w22, w24
- beq .L1619
+ cbnz w0, .L1730
+.L1738:
+ mov w0, 0
+ b .L1714
+.L1730:
+ adrp x22, .LC101
+ adrp x24, .LC100
+ adrp x26, .LC99
+ mov w21, 0
+ add x22, x22, :lo12:.LC101
+ add x24, x24, :lo12:.LC100
+ add x26, x26, :lo12:.LC99
+.L1731:
+ cmp w21, w25
+ beq .L1738
ldr w0, [x19]
cmn w0, #1
- bne .L1594
+ bne .L1732
adrp x0, .LC98
ldr w1, [x19,4]
add x0, x0, :lo12:.LC98
bl printk
- b .L1595
-.L1594:
- sub w4, w24, w22
- mov w1, w26
- add x2, x29, 128
- add x3, x29, 132
+ b .L1733
+.L1732:
+ adrp x20, .LANCHOR4
+ sub w4, w25, w21
+ add x27, x20, :lo12:.LANCHOR4
+ add x3, x29, 140
+ mov w1, w23
+ add x2, x29, 136
mov x0, x19
- adrp x20, :got:gFlashProgCheckBuffer
- adrp x21, :got:gFlashProgCheckSpareBuffer
bl LogAddr2PhyAddr
- ldr x4, [x20, #:got_lo12:gFlashProgCheckBuffer]
- add x3, x29, 136
+ ldr x0, [x27,96]
mov x1, x19
mov x2, 56
- str x4, [x29,120]
- ldr x0, [x4]
str wzr, [x0]
- ldr x28, [x21, #:got_lo12:gFlashProgCheckSpareBuffer]
- ldr x0, [x28]
+ ldr x0, [x27,104]
str wzr, [x0]
- mov x0, x3
+ add x0, x29, 144
bl memcpy
- mov x3, x0
- ldr x4, [x29,120]
+ ldr x0, [x27,96]
mov w1, 1
- mov w2, w26
- ldr x0, [x4]
- str x0, [x29,144]
- ldr x0, [x28]
str x0, [x29,152]
- mov x0, x3
+ mov w2, w23
+ ldr x0, [x27,104]
+ str x0, [x29,160]
+ add x0, x29, 144
bl FlashReadPages
- ldr w28, [x29,136]
- cmn w28, #1
- bne .L1596
+ ldr w27, [x29,144]
+ cmn w27, #1
+ bne .L1734
ldr w1, [x19,4]
- mov x0, x27
+ mov x0, x26
bl printk
- str w28, [x19]
-.L1596:
+ str w27, [x19]
+.L1734:
ldr x0, [x19,16]
- cbz x0, .L1597
- ldr x21, [x21, #:got_lo12:gFlashProgCheckSpareBuffer]
+ cbz x0, .L1735
ldr w2, [x0]
- ldr x0, [x21]
+ add x0, x20, :lo12:.LANCHOR4
+ ldr x0, [x0,104]
ldr w3, [x0]
cmp w2, w3
- beq .L1597
+ beq .L1735
ldr w1, [x19,4]
- mov x0, x25
+ mov x0, x24
bl printk
mov w0, -1
str w0, [x19]
-.L1597:
+.L1735:
ldr x0, [x19,8]
- cbz x0, .L1595
- ldr x20, [x20, #:got_lo12:gFlashProgCheckBuffer]
+ cbz x0, .L1733
+ add x20, x20, :lo12:.LANCHOR4
ldr w2, [x0]
- ldr x0, [x20]
+ ldr x0, [x20,96]
ldr w3, [x0]
cmp w2, w3
- beq .L1595
+ beq .L1733
ldr w1, [x19,4]
- mov x0, x23
+ mov x0, x22
bl printk
mov w0, -1
str w0, [x19]
-.L1595:
- add w22, w22, 1
+.L1733:
+ add w21, w21, 1
add x19, x19, 56
- b .L1593
-.L1619:
- mov w0, 0
+ b .L1731
+.L1714:
+ ldr x1, [x29,112]
+ ldr x2, [x29,200]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1739
+ bl __stack_chk_fail
+.L1739:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 192
+ ldp x29, x30, [sp], 208
ret
.size FlashProgPages, .-FlashProgPages
.align 2
- .type FlashTestBlk.part.19, %function
-FlashTestBlk.part.19:
+ .type FlashTestBlk.part.17, %function
+FlashTestBlk.part.17:
stp x29, x30, [sp, -176]!
mov w1, 165
mov w2, 32
add x29, sp, 0
stp x19, x20, [sp,16]
- adrp x20, :got:gFlashPageBuffer1
str x21, [sp,32]
- uxth w21, w0
- add x19, x29, 56
- lsl w21, w21, 10
- ldr x20, [x20, #:got_lo12:gFlashPageBuffer1]
- ldr x0, [x20]
+ adrp x19, .LANCHOR4
+ adrp x21, __stack_chk_guard
+ add x19, x19, :lo12:.LANCHOR4
+ uxth w20, w0
+ lsl w20, w20, 10
+ ldr x0, [x21,#:lo12:__stack_chk_guard]
+ str x0, [x29,168]
+ ldr x0, [x19,80]
+ str x0, [x29,56]
+ add x0, x29, 104
str x0, [x29,64]
- add x0, x29, 112
- str x0, [x29,72]
bl ftl_memset
- ldr x0, [x20]
- mov w2, 8
+ ldr x0, [x19,80]
mov w1, 90
+ mov w2, 8
bl ftl_memset
- str w21, [x29,60]
- mov x0, x19
+ str w20, [x29,52]
mov w1, 1
+ add x0, x29, 48
+ mov w2, w1
bl FlashEraseBlocks
mov w1, 1
- mov x0, x19
+ add x0, x29, 48
mov w2, w1
mov w3, w1
bl FlashProgPages
- ldr w0, [x29,56]
- mov w1, 1
+ ldr w0, [x29,48]
+ mov w1, 0
+ mov w2, 1
cmn w0, #1
- mov x0, x19
- csetm w20, eq
+ add x0, x29, 48
+ csetm w19, eq
bl FlashEraseBlocks
- ldr x21, [sp,32]
- mov w0, w20
+ ldr x2, [x29,168]
+ mov w0, w19
+ ldr x1, [x21,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L1769
+ bl __stack_chk_fail
+.L1769:
ldp x19, x20, [sp,16]
+ ldr x21, [sp,32]
ldp x29, x30, [sp], 176
ret
- .size FlashTestBlk.part.19, .-FlashTestBlk.part.19
+ .size FlashTestBlk.part.17, .-FlashTestBlk.part.17
.align 2
.global FlashTestBlk
.type FlashTestBlk, %function
FlashTestBlk:
- adrp x1, :got:gNandFlashIdbBlockAddr
- uxth w2, w0
+ uxth w1, w0
+ adrp x0, .LANCHOR4+68
stp x29, x30, [sp, -16]!
- mov w0, 0
add x29, sp, 0
- ldr x1, [x1, #:got_lo12:gNandFlashIdbBlockAddr]
- ldr w1, [x1]
- cmp w2, w1
- bcc .L1624
- mov w0, w2
- bl FlashTestBlk.part.19
-.L1624:
+ ldr w2, [x0,#:lo12:.LANCHOR4+68]
+ mov w0, 0
+ cmp w1, w2
+ bcc .L1771
+ mov w0, w1
+ bl FlashTestBlk.part.17
+.L1771:
ldp x29, x30, [sp], 16
ret
.size FlashTestBlk, .-FlashTestBlk
.global FlashMakeFactorBbt
.type FlashMakeFactorBbt, %function
FlashMakeFactorBbt:
- adrp x5, :got:gFlashSpareBuffer
- adrp x4, :got:gNandPhyInfo
stp x29, x30, [sp, -256]!
- adrp x3, :got:gpNandParaInfo
- adrp x2, :got:gBlockPageAlignSize
+ adrp x2, __stack_chk_guard
+ adrp x4, .LANCHOR0
add x29, sp, 0
- ldr x0, [x5, #:got_lo12:gFlashSpareBuffer]
- stp x19, x20, [sp,16]
stp x21, x22, [sp,32]
- stp x23, x24, [sp,48]
+ ldr x0, [x2,#:lo12:__stack_chk_guard]
+ adrp x22, .LANCHOR4
+ str x0, [x29,248]
+ add x0, x22, :lo12:.LANCHOR4
+ stp x19, x20, [sp,16]
stp x25, x26, [sp,64]
stp x27, x28, [sp,80]
- ldr x1, [x4, #:got_lo12:gNandPhyInfo]
+ stp x23, x24, [sp,48]
+ mov x20, x4
+ str x2, [x29,112]
+ ldr x0, [x0,88]
+ add x25, x20, :lo12:.LANCHOR0
+ str x0, [x29,160]
+ add x0, x4, :lo12:.LANCHOR0
mov w19, 0
- ldr x0, [x0]
- str x0, [x29,184]
- ldrh w22, [x1,14]
- ldrh w0, [x1,12]
- adrp x1, :got:g_slc2KBNand
- str x1, [x29,128]
- str x5, [x29,160]
- mul w22, w0, w22
- ldr x0, [x3, #:got_lo12:gpNandParaInfo]
- str x4, [x29,168]
- str x3, [x29,152]
- uxth w22, w22
- ldr x0, [x0]
- str x2, [x29,136]
- ldrb w0, [x0,24]
- str w0, [x29,180]
- ldr x0, [x2, #:got_lo12:gBlockPageAlignSize]
- ldrh w25, [x0]
- ldr x0, [x1, #:got_lo12:g_slc2KBNand]
- ubfiz w1, w25, 1, 15
- ldrb w0, [x0]
+ add x28, x25, 708
+ ldrh w1, [x0,180]
+ ldrh w21, [x0,182]
+ mul w21, w1, w21
+ ldr x1, [x0,744]
+ uxth w21, w21
+ ldrb w1, [x1,24]
+ str w1, [x29,128]
+ ldrh w1, [x0,12]
+ str w1, [x29,172]
+ ldrb w0, [x0,8]
+ ubfiz w1, w1, 1, 15
cmp w0, 1
- adrp x0, .LC102
- csel w25, w1, w25, eq
- add x0, x0, :lo12:.LC102
+ ldr w0, [x29,172]
+ csel w0, w1, w0, eq
+ str w0, [x29,172]
+ adrp x0, .LC104
mov w1, 1
+ add x0, x0, :lo12:.LC104
bl printk
- ldr x0, [x29,160]
+ add x0, x22, :lo12:.LANCHOR4
mov w1, 0
mov w2, 4096
- ldr x0, [x0, #:got_lo12:gFlashSpareBuffer]
- ldr x0, [x0]
+ ldr x0, [x0,88]
bl ftl_memset
- lsr w0, w22, 4
- str w0, [x29,176]
- ldr w0, [x29,180]
+ lsr w0, w21, 4
+ str w0, [x29,168]
+ ldr w0, [x29,128]
and w0, w0, 1
- str w0, [x29,112]
- ldr w0, [x29,180]
- and w0, w0, 2
- uxtb w0, w0
str w0, [x29,108]
- sub w0, w22, #1
+ sub w0, w21, #1
uxth w0, w0
- str w0, [x29,104]
-.L1628:
- adrp x0, :got:gNandMaxDie
- str x0, [x29,144]
- ldr x1, [x0, #:got_lo12:gNandMaxDie]
- ldrb w1, [x1]
- cmp w1, w19
- bls .L1673
- adrp x0, :got:FbbtBlk
- str x0, [x29,120]
+ str w0, [x29,124]
+.L1775:
+ ldrb w0, [x25,1845]
+ cmp w0, w19
+ bls .L1827
+ add x0, x22, :lo12:.LANCHOR4
sxtw x24, w19
- ldr x1, [x0, #:got_lo12:FbbtBlk]
- ldrh w20, [x1,w19,sxtw 1]
- cbnz w20, .L1655
- ldr x1, [x29,168]
- adrp x21, :got:gFlashPageBuffer0
- mov w26, w20
- mov w23, w20
- ldr x1, [x1, #:got_lo12:gNandPhyInfo]
- ldr x0, [x21, #:got_lo12:gFlashPageBuffer0]
- ldrh w2, [x1,20]
+ add x0, x0, 120
+ ldrh w20, [x0,w19,sxtw 1]
+ cbnz w20, .L1806
+ ldrh w2, [x25,188]
mov w1, w20
- ldr x0, [x0]
+ ldr x0, [x25,1856]
+ mov w26, w20
lsl w2, w2, 9
+ mov w23, w20
bl ftl_memset
- adrp x0, :got:DieCsIndex
- ldr x0, [x0, #:got_lo12:DieCsIndex]
- ldrb w27, [x0,x24]
- ldr w0, [x29,180]
- and w0, w0, 4
+ add x0, x25, x24
+ ldrb w27, [x0,1848]
+ ldr w0, [x29,128]
+ and w0, w0, 2
uxtb w0, w0
- str w0, [x29,116]
-.L1630:
- uxth w28, w26
- cmp w28, w22
- bcs .L1640
+ str w0, [x29,120]
+.L1777:
+ uxth w0, w26
+ str w0, [x29,144]
+ cmp w0, w21
+ bcs .L1787
mov w0, -1
- strb w0, [x29,198]
- strb w0, [x29,199]
- ldr w0, [x29,112]
- cbz w0, .L1632
- adrp x0, :got:DieAddrs
- add x2, x29, 198
- ldr x0, [x0, #:got_lo12:DieAddrs]
- ldr w3, [x0,x24,lsl 2]
+ strb w0, [x29,190]
+ strb w0, [x29,191]
+ ldr w0, [x29,108]
+ cbz w0, .L1779
+ ldr w3, [x28,x24,lsl 2]
mov w0, w27
+ add x2, x29, 190
add w3, w20, w3
str x3, [x29,96]
mov w1, w3
bl FlashReadSpare
- ldr x0, [x29,128]
+ ldrb w0, [x25,8]
ldr x3, [x29,96]
- ldr x0, [x0, #:got_lo12:g_slc2KBNand]
- ldrb w0, [x0]
cmp w0, 1
- bne .L1632
- ldr x0, [x29,136]
- add x2, x29, 199
- ldr x0, [x0, #:got_lo12:gBlockPageAlignSize]
- ldr w1, [x0]
+ bne .L1779
+ ldr w1, [x25,12]
mov w0, w27
+ add x2, x29, 191
add w1, w3, w1
bl FlashReadSpare
- ldrb w0, [x29,198]
- ldrb w1, [x29,199]
+ ldrb w0, [x29,190]
+ ldrb w1, [x29,191]
and w0, w1, w0
- strb w0, [x29,198]
-.L1632:
- ldr w0, [x29,108]
- cbz w0, .L1634
- ldr x0, [x29,152]
- add x2, x29, 199
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
+ strb w0, [x29,190]
+.L1779:
+ ldr w0, [x29,120]
+ cbz w0, .L1781
+ ldr x0, [x25,744]
+ add x2, x29, 191
ldrh w1, [x0,10]
- adrp x0, :got:DieAddrs
+ ldr w0, [x28,x24,lsl 2]
sub w1, w1, #1
- ldr x0, [x0, #:got_lo12:DieAddrs]
- ldr w0, [x0,x24,lsl 2]
add w1, w1, w0
mov w0, w27
add w1, w1, w20
bl FlashReadSpare
-.L1634:
- ldr x0, [x29,152]
- ldrb w1, [x29,198]
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
- ldr x0, [x0]
+.L1781:
+ ldr x0, [x25,744]
+ ldrb w1, [x29,190]
ldrb w0, [x0,7]
cmp w0, 8
- beq .L1656
+ beq .L1807
cmp w0, 1
- bne .L1635
-.L1656:
+ bne .L1782
+.L1807:
mov w0, 1
- cbz w1, .L1637
- ldrb w0, [x29,199]
+ cbz w1, .L1784
+ ldrb w0, [x29,191]
cmp w0, wzr
cset w0, eq
- b .L1637
-.L1635:
+ b .L1784
+.L1782:
cmp w1, 255
mov w0, 1
- bne .L1637
- ldrb w0, [x29,199]
+ bne .L1784
+ ldrb w0, [x29,191]
cmp w0, 255
cset w0, ne
-.L1637:
- ldr w1, [x29,116]
- cbz w1, .L1638
- adrp x0, :got:DieAddrs
- ldr x0, [x0, #:got_lo12:DieAddrs]
- ldr w1, [x0,x24,lsl 2]
+.L1784:
+ ldr x1, [x29,128]
+ tbz x1, 2, .L1785
+ ldr w1, [x28,x24,lsl 2]
mov w0, w27
add w1, w20, w1
bl SandiskProgTestBadBlock
-.L1638:
- cbz w0, .L1639
- adrp x0, .LC103
+.L1785:
+ cbz w0, .L1786
+ adrp x0, .LC105
mov w1, w19
mov w2, w26
- add x0, x0, :lo12:.LC103
+ add x0, x0, :lo12:.LC105
add w23, w23, 1
bl printk
- ldr x0, [x21, #:got_lo12:gFlashPageBuffer0]
- ubfx x1, x28, 5, 11
- lsl x1, x1, 2
+ ldr x0, [x29,144]
uxth w23, w23
- ldr x2, [x0]
+ ldr x2, [x25,1856]
+ ubfx x1, x0, 5, 11
+ ldrb w3, [x29,144]
+ lsl x1, x1, 2
mov w0, 1
- lsl w28, w0, w28
- ldr w0, [x2,x1]
- orr w28, w0, w28
- ldr x0, [x29,144]
- str w28, [x2,x1]
- ldr w1, [x29,176]
- ldr x0, [x0, #:got_lo12:gNandMaxDie]
- ldrb w0, [x0]
+ lsl w0, w0, w3
+ ldr w3, [x2,x1]
+ orr w0, w3, w0
+ str w0, [x2,x1]
+ ldr w1, [x29,168]
+ ldrb w0, [x25,1845]
mul w0, w1, w0
cmp w23, w0
- bgt .L1640
-.L1639:
+ bgt .L1787
+.L1786:
+ ldr w0, [x29,172]
add w26, w26, 1
- add w20, w20, w25
- b .L1630
-.L1640:
- adrp x0, .LC104
+ add w20, w20, w0
+ b .L1777
+.L1787:
+ adrp x0, .LC106
mov w1, w19
- add x0, x0, :lo12:.LC104
+ add x0, x0, :lo12:.LC106
mov w2, w23
bl printk
- ldr x0, [x29,144]
- ldr w1, [x29,176]
- ldr x0, [x0, #:got_lo12:gNandMaxDie]
- ldrb w0, [x0]
+ ldrb w0, [x25,1845]
+ ldr w1, [x29,168]
mul w0, w1, w0
cmp w23, w0
- blt .L1642
- ldr x1, [x29,168]
- ldr x0, [x21, #:got_lo12:gFlashPageBuffer0]
- ldr x1, [x1, #:got_lo12:gNandPhyInfo]
- ldr x0, [x0]
- ldrh w2, [x1,20]
+ blt .L1789
+ ldrh w2, [x25,188]
mov w1, 0
+ ldr x0, [x25,1856]
lsl w2, w2, 9
bl ftl_memset
-.L1642:
- cbnz w19, .L1644
- adrp x27, :got:gNandFlashIdbBlockAddr
- adrp x23, .LC105
+.L1789:
+ cbnz w19, .L1791
+ add x0, x22, :lo12:.LANCHOR4
+ adrp x26, .LC107
mov w20, w19
- adrp x26, :got:gNandIDBResBlkNum
- add x23, x23, :lo12:.LC105
- ldr x0, [x27, #:got_lo12:gNandFlashIdbBlockAddr]
- ldrh w28, [x0]
-.L1645:
- ldr x0, [x26, #:got_lo12:gNandIDBResBlkNum]
- ldrb w0, [x0]
- cmp w28, w0
- bcs .L1674
- mov w0, w28
+ add x26, x26, :lo12:.LC107
+ mov w23, 1
+ ldrh w27, [x0,68]
+.L1792:
+ ldrb w0, [x25,9]
+ cmp w0, w27
+ bls .L1828
+ mov w0, w27
bl FlashTestBlk
- cbz w0, .L1646
- mov w1, w28
- mov x0, x23
+ cbz w0, .L1793
+ mov w1, w27
+ mov x0, x26
+ add w20, w20, 1
bl printk
- ldr x0, [x21, #:got_lo12:gFlashPageBuffer0]
- ubfx x1, x28, 5, 11
+ ubfx x1, x27, 5, 11
+ ldr x2, [x25,1856]
+ lsl x1, x1, 2
+ lsl w0, w23, w27
+ uxth w20, w20
+ ldr w3, [x2,x1]
+ orr w0, w3, w0
+ str w0, [x2,x1]
+.L1793:
+ add w27, w27, 1
+ uxth w27, w27
+ b .L1792
+.L1828:
+ adrp x26, .LC107
+ ldr w23, [x29,124]
+ sub w27, w21, #50
+ add x26, x26, :lo12:.LC107
+.L1795:
+ cmp w23, w27
+ ble .L1829
+ mov w0, w23
+ bl FlashTestBlk
+ cbz w0, .L1796
+ mov w1, w23
+ mov x0, x26
+ bl printk
+ ubfx x1, x23, 5, 11
+ ldr x3, [x25,1856]
lsl x1, x1, 2
- add w2, w20, 1
- ldr x3, [x0]
mov w0, 1
- lsl w0, w0, w28
- uxth w20, w2
- ldr w4, [x3,x1]
- orr w0, w4, w0
+ lsl w0, w0, w23
+ ldr w5, [x3,x1]
+ orr w0, w5, w0
str w0, [x3,x1]
-.L1646:
- add w28, w28, 1
- uxth w28, w28
- b .L1645
-.L1674:
- ldr x27, [x27, #:got_lo12:gNandFlashIdbBlockAddr]
- ldr w1, [x27]
+.L1796:
+ sub w2, w23, #1
+ uxth w23, w2
+ b .L1795
+.L1829:
+ add x1, x22, :lo12:.LANCHOR4
+ ldrb w0, [x25,9]
+ ldr w1, [x1,68]
sub w0, w0, w1
cmp w20, w0
- bcc .L1644
- ldr x1, [x29,168]
- ldr x0, [x21, #:got_lo12:gFlashPageBuffer0]
- ldr x1, [x1, #:got_lo12:gNandPhyInfo]
- ldr x0, [x0]
- ldrh w2, [x1,20]
+ bcc .L1791
+ ldrh w2, [x25,188]
mov w1, 0
+ ldr x0, [x25,1856]
lsl w2, w2, 9
bl ftl_memset
-.L1644:
- adrp x23, .LC106
- ldr w27, [x29,104]
- mul w26, w19, w22
- add x23, x23, :lo12:.LC106
- mov w20, -3872
- add x28, x29, 200
-.L1649:
+.L1791:
+ adrp x23, .LC108
+ ldr w27, [x29,124]
+ mul w26, w19, w21
+ add x23, x23, :lo12:.LC108
+ add x20, x22, :lo12:.LANCHOR4
+.L1799:
mov w2, w27
mov x0, x23
mov w1, w19
bl printk
- ldr x0, [x21, #:got_lo12:gFlashPageBuffer0]
- ldr x2, [x0]
-.L1650:
+ ldr x2, [x25,1856]
+.L1800:
ubfx x0, x27, 5, 11
- ldr w1, [x2,x0,lsl 2]
- lsr w1, w1, w27
- and w0, w1, 1
- tbz x1, 0, .L1675
+ ldr w0, [x2,x0,lsl 2]
+ lsr w0, w0, w27
+ and w1, w0, 1
+ tbz x0, 0, .L1830
sub w27, w27, #1
uxth w27, w27
- b .L1650
-.L1675:
- ldr x1, [x29,120]
- ldr x1, [x1, #:got_lo12:FbbtBlk]
- strh w27, [x1,x24,lsl 1]
- ldr x1, [x29,184]
- strh w20, [x1]
- strh w27, [x1,2]
- strh w0, [x1,8]
- add w1, w27, w26
- lsl w1, w1, 10
- ldr x0, [x21, #:got_lo12:gFlashPageBuffer0]
- ldr x0, [x0]
- str x0, [x28,8]
+ b .L1800
+.L1830:
+ add x0, x20, 120
+ mov w2, -3872
+ strh w27, [x0,x24,lsl 1]
ldr x0, [x29,160]
- ldr x0, [x0, #:got_lo12:gFlashSpareBuffer]
- str w1, [x28,4]
+ strh w2, [x0]
+ strh w27, [x0,2]
+ strh w1, [x0,8]
mov w1, 1
- ldr x0, [x0]
- str x0, [x28,16]
- mov x0, x28
+ ldr x0, [x25,1856]
+ mov w2, w1
+ str x0, [x29,200]
+ ldr x0, [x20,88]
+ str x0, [x29,208]
+ add w0, w27, w26
+ lsl w0, w0, 10
+ str w0, [x29,196]
+ add x0, x29, 192
bl FlashEraseBlocks
mov w1, 1
- mov x0, x28
+ add x0, x29, 192
mov w2, w1
mov w3, w1
bl FlashProgPages
- ldr w0, [x28]
- cbz w0, .L1655
+ ldr w0, [x29,192]
+ cbz w0, .L1806
sub w27, w27, #1
uxth w27, w27
- b .L1649
-.L1655:
+ b .L1799
+.L1806:
add w19, w19, 1
uxtb w19, w19
- b .L1628
-.L1673:
+ b .L1775
+.L1827:
+ ldr x0, [x29,112]
+ ldr x1, [x29,248]
+ ldr x0, [x0,#:lo12:__stack_chk_guard]
+ cmp x1, x0
+ beq .L1803
+ bl __stack_chk_fail
+.L1803:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
stp x29, x30, [sp, -128]!
add x29, sp, 0
stp x21, x22, [sp,32]
- uxth w21, w0
- adrp x0, :got:g_cur_erase_blk
+ adrp x22, .LANCHOR0
stp x19, x20, [sp,16]
- stp x23, x24, [sp,48]
- ldr x0, [x0, #:got_lo12:g_cur_erase_blk]
- uxtb w23, w1
+ add x20, x22, :lo12:.LANCHOR0
stp x25, x26, [sp,64]
stp x27, x28, [sp,80]
- mov w25, 0
- str w21, [x0]
- mov w20, w25
- mov w19, w25
- mov w24, 56
- adrp x26, :got:p_plane_order_table
- adrp x27, :got:c_ftl_nand_byte_pre_oob
- mov w28, 4
-.L1677:
- adrp x0, :got:c_ftl_nand_planes_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- cmp w0, w25
- bls .L1715
- adrp x1, :got:req_erase
- umull x0, w25, w24
- ldr x1, [x1, #:got_lo12:req_erase]
- ldr x1, [x1]
+ stp x23, x24, [sp,48]
+ uxth w25, w0
+ mov w28, 0
+ ldrb w0, [x20,120]
+ uxtb w26, w1
+ str w0, [x29,124]
+ mov w21, w28
+ str w25, [x20,2108]
+ mov w19, w28
+ adrp x24, .LANCHOR2
+ mov w27, 56
+.L1832:
+ ldrh w0, [x20,1952]
+ cmp w0, w28
+ bls .L1865
+ add x1, x24, :lo12:.LANCHOR2
+ umull x0, w28, w27
+ ldr x1, [x1,-88]
str wzr, [x1,x0]
- mov w1, w21
- ldr x0, [x26, #:got_lo12:p_plane_order_table]
- ldrb w0, [x0,w25,sxtw]
+ add x0, x20, 1984
+ mov w1, w25
+ ldrb w0, [x0,w28,sxtw]
bl V2P_block
- uxth w22, w0
- mov w1, w22
- cbnz w23, .L1678
-.L1682:
+ uxth w23, w0
+ mov w1, w23
+ cbz w26, .L1833
+ str x1, [x29,112]
+ bl IsBlkInVendorPart
+ ldr x1, [x29,112]
+ cbnz w0, .L1834
+.L1833:
mov w0, w1
bl FtlBbmIsBadBlock
- cbnz w0, .L1716
- adrp x1, :got:req_erase
- lsl w22, w22, 10
- umull x0, w20, w24
- ldr x1, [x1, #:got_lo12:req_erase]
- ldr x3, [x1]
- add x3, x3, x0
- str w22, [x3,4]
- adrp x3, :got:p_io_spare_buf
- ldr x1, [x1]
+ cbnz w0, .L1835
+ adrp x1, .LANCHOR2
+ lsl w23, w23, 10
+ add x3, x1, :lo12:.LANCHOR2
+ mov w2, 4
+ umull x0, w21, w27
+ ldr x1, [x3,-88]
add x1, x1, x0
+ str w23, [x1,4]
+ ldr x1, [x3,-88]
+ ldr x3, [x3,2120]
+ add x1, x1, x0
+ ldrh w0, [x20,2038]
+ mul w0, w21, w0
+ add w21, w21, 1
str xzr, [x1,8]
- ldr x0, [x27, #:got_lo12:c_ftl_nand_byte_pre_oob]
- ldr x3, [x3, #:got_lo12:p_io_spare_buf]
- ldrh w0, [x0]
- ldr x3, [x3]
- mul w0, w20, w0
- add w20, w20, 1
- sdiv w0, w0, w28
- uxth w20, w20
+ sdiv w0, w0, w2
+ uxth w21, w21
add x0, x3, x0, sxtw 2
str x0, [x1,16]
- b .L1681
-.L1678:
- str x1, [x29,120]
- bl IsBlkInVendorPart
- ldr x1, [x29,120]
- cbnz w0, .L1681
- b .L1682
-.L1716:
+ b .L1834
+.L1835:
add w19, w19, 1
uxth w19, w19
-.L1681:
- add w2, w25, 1
- uxth w25, w2
- b .L1677
-.L1715:
- cbz w20, .L1685
- adrp x22, :got:req_erase
- mov w1, w20
+.L1834:
+ add w2, w28, 1
+ uxth w28, w2
+ b .L1832
+.L1865:
+ cbz w21, .L1838
+ ldr w0, [x29,124]
+ adrp x20, .LANCHOR2
+ mov w2, w21
mov x24, 0
- mov x25, 56
- ldr x0, [x22, #:got_lo12:req_erase]
- ldr x0, [x0]
+ cmp w0, wzr
+ add x0, x20, :lo12:.LANCHOR2
+ cset w23, ne
+ mov x27, 56
+ mov w1, w23
+ ldr x0, [x0,-88]
bl FlashEraseBlocks
-.L1686:
- cmp w20, w24, uxth
- bls .L1717
- ldr x1, [x22, #:got_lo12:req_erase]
- mul x0, x24, x25
- ldr x1, [x1]
+.L1839:
+ cmp w21, w24, uxth
+ bls .L1866
+ add x1, x20, :lo12:.LANCHOR2
+ mul x0, x24, x27
+ ldr x1, [x1,-88]
add x2, x1, x0
ldr w0, [x1,x0]
cmn w0, #1
- bne .L1687
+ bne .L1840
ldr w0, [x2,4]
add w19, w19, 1
lsr w0, w0, 10
uxth w19, w19
bl FtlBbmMapBadBlock
-.L1687:
+.L1840:
add x24, x24, 1
- b .L1686
-.L1717:
- cmp w23, wzr
- cset w26, ne
- cbz w26, .L1703
- adrp x0, :got:g_inkDie_check_enable
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w0, [x0]
- cbz w0, .L1703
- adrp x0, :got:c_ftl_nand_page_pre_slc_blk
- mov w23, 5
- mov w27, 1
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w25, [x0]
- udiv w23, w25, w23
- sub w23, w23, #1
- uxth w0, w23
- str w0, [x29,120]
- b .L1689
-.L1703:
+ b .L1839
+.L1866:
+ cbnz w26, .L1842
mov w0, 6
- mov w27, 0
- str w0, [x29,120]
- mov w25, 1
-.L1689:
+ uxth w23, w23
+ str w0, [x29,124]
+ mov w27, 1
+ b .L1843
+.L1842:
+ add x0, x22, :lo12:.LANCHOR0
+ mov w23, 1
+ ldrh w27, [x0,2028]
+ lsr w0, w27, 2
+ str w0, [x29,124]
+.L1843:
mov w24, 0
- mov w28, 56
-.L1701:
- mov w23, 0
- mov w20, w23
-.L1690:
- adrp x0, :got:c_ftl_nand_planes_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- cmp w0, w23
- bls .L1718
- ldr x1, [x22, #:got_lo12:req_erase]
- umull x0, w23, w28
- ldr x1, [x1]
+ add x22, x22, :lo12:.LANCHOR0
+.L1853:
+ mov w28, 0
+ mov w21, w28
+.L1844:
+ ldrh w0, [x22,1952]
+ cmp w0, w28
+ bls .L1867
+ add x1, x20, :lo12:.LANCHOR2
+ mov w0, 56
+ umull x0, w28, w0
+ ldr x1, [x1,-88]
str wzr, [x1,x0]
- adrp x0, :got:p_plane_order_table
- mov w1, w21
- ldr x0, [x0, #:got_lo12:p_plane_order_table]
- ldrb w0, [x0,w23,sxtw]
+ add x0, x22, 1984
+ mov w1, w25
+ ldrb w0, [x0,w28,sxtw]
bl V2P_block
uxth w2, w0
- str w2, [x29,116]
+ str w2, [x29,112]
mov w1, w2
- cbnz w26, .L1691
-.L1694:
+ cbz w26, .L1845
+ str x1, [x29,104]
+ bl IsBlkInVendorPart
+ ldr x1, [x29,104]
+ cbnz w0, .L1846
+.L1845:
mov w0, w1
bl FtlBbmIsBadBlock
- cbnz w0, .L1693
- ldr x4, [x22, #:got_lo12:req_erase]
- umull x0, w20, w28
- ldr w2, [x29,116]
- ldr x1, [x4]
- add x1, x1, x0
- add w3, w24, w2, lsl 10
+ cbnz w0, .L1846
+ add x3, x20, :lo12:.LANCHOR2
+ mov w0, 56
+ ldr w2, [x29,112]
+ umull x0, w21, w0
+ ldr x1, [x3,-88]
+ add w4, w24, w2, lsl 10
mov w2, 4
- str w3, [x1,4]
- ldr x1, [x4]
add x1, x1, x0
- adrp x0, :got:p_io_data_buf_0
- ldr x0, [x0, #:got_lo12:p_io_data_buf_0]
- ldr x0, [x0]
+ str w4, [x1,4]
+ ldr x1, [x3,-88]
+ add x1, x1, x0
+ ldr x0, [x3,2096]
+ ldr x3, [x3,2104]
str x0, [x1,8]
- adrp x0, :got:c_ftl_nand_byte_pre_oob
- ldr x0, [x0, #:got_lo12:c_ftl_nand_byte_pre_oob]
- ldrh w0, [x0]
- mul w0, w20, w0
- add w20, w20, 1
+ ldrh w0, [x22,2038]
+ mul w0, w21, w0
+ add w21, w21, 1
sdiv w0, w0, w2
- adrp x2, :got:p_io_data_buf_1
- uxth w20, w20
- ldr x3, [x2, #:got_lo12:p_io_data_buf_1]
- ldr x3, [x3]
+ uxth w21, w21
add x0, x3, x0, sxtw 2
str x0, [x1,16]
- b .L1693
-.L1691:
- str x1, [x29,104]
- bl IsBlkInVendorPart
- ldr x1, [x29,104]
- cbz w0, .L1694
-.L1693:
- add w2, w23, 1
- uxth w23, w2
- b .L1690
-.L1718:
- cbz w20, .L1685
- ldr x0, [x22, #:got_lo12:req_erase]
- mov w1, w20
- mov w2, w27
+.L1846:
+ add w2, w28, 1
+ uxth w28, w2
+ b .L1844
+.L1867:
+ cbz w21, .L1838
+ add x0, x20, :lo12:.LANCHOR2
+ mov w1, w21
+ mov w2, w23
mov w3, 1
- mov x23, 0
- ldr x0, [x0]
+ mov x28, 0
+ ldr x0, [x0,-88]
bl FlashProgPages
-.L1697:
- cmp w20, w23, uxth
- bls .L1719
- ldr x1, [x22, #:got_lo12:req_erase]
+.L1849:
+ cmp w21, w28, uxth
+ bls .L1868
+ add x1, x20, :lo12:.LANCHOR2
mov x0, 56
- mul x0, x23, x0
- ldr x3, [x1]
+ mul x0, x28, x0
+ ldr x3, [x1,-88]
add x1, x3, x0
ldr w0, [x3,x0]
cmn w0, #1
- bne .L1698
+ bne .L1850
ldr w0, [x1,4]
add w19, w19, 1
lsr w0, w0, 10
uxth w19, w19
bl FtlBbmMapBadBlock
- b .L1699
-.L1698:
- cbz w26, .L1699
+ b .L1851
+.L1850:
+ cbz w26, .L1851
ldr w0, [x1,4]
mov w1, 1
lsr w0, w0, 10
bl FtlFreeSysBlkQueueIn
-.L1699:
- add x23, x23, 1
- b .L1697
-.L1719:
- ldr w0, [x29,120]
+.L1851:
+ add x28, x28, 1
+ b .L1849
+.L1868:
+ ldr w0, [x29,124]
add w24, w24, w0
uxth w24, w24
- cmp w24, w25
- bcc .L1701
- cmp w21, 63
- bhi .L1685
- ldr x22, [x22, #:got_lo12:req_erase]
- mov w1, w20
- ldr x0, [x22]
+ cmp w24, w27
+ bcc .L1853
+ cmp w25, 63
+ bhi .L1838
+ add x20, x20, :lo12:.LANCHOR2
+ mov w1, w23
+ mov w2, w21
+ ldr x0, [x20,-88]
bl FlashEraseBlocks
-.L1685:
+.L1838:
mov w0, w19
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
.global FtlBbmTblFlush
.type FtlBbmTblFlush, %function
FtlBbmTblFlush:
- stp x29, x30, [sp, -112]!
+ stp x29, x30, [sp, -96]!
+ mov w1, 0
add x29, sp, 0
stp x21, x22, [sp,32]
- adrp x21, :got:p_sys_data_buf
- adrp x22, :got:p_sys_spare_buf
+ adrp x22, .LANCHOR2
+ str x27, [sp,80]
stp x19, x20, [sp,16]
- adrp x20, :got:req_sys
- mov x19, 0
- ldr x0, [x21, #:got_lo12:p_sys_data_buf]
- stp x25, x26, [sp,64]
+ add x2, x22, :lo12:.LANCHOR2
+ adrp x19, .LANCHOR4
+ adrp x20, .LANCHOR0
+ mov x21, 0
stp x23, x24, [sp,48]
- stp x27, x28, [sp,80]
- ldr x1, [x20, #:got_lo12:req_sys]
- adrp x24, :got:c_ftl_nand_die_num
- ldr x0, [x0]
- adrp x25, :got:gBbtInfo
- adrp x26, :got:c_ftl_nand_bbm_buf_size
- str x0, [x1,8]
- ldr x2, [x22, #:got_lo12:p_sys_spare_buf]
- ldr x2, [x2]
- str x2, [x1,16]
- adrp x2, :got:c_ftl_nand_byte_pre_page
- mov w1, 0
- ldr x2, [x2, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldrh w2, [x2]
+ stp x25, x26, [sp,64]
+ add x24, x19, :lo12:.LANCHOR4
+ add x20, x20, :lo12:.LANCHOR0
+ ldr x0, [x2,-64]
+ add x23, x20, 2112
+ ldr x2, [x2,2112]
+ str x2, [x24,152]
+ ldrh w2, [x20,2036]
+ str x0, [x24,144]
bl ftl_memset
- str x21, [x29,104]
- str x22, [x29,96]
-.L1721:
- ldr x1, [x24, #:got_lo12:c_ftl_nand_die_num]
- mov w0, w19
- adrp x23, :got:gBbtInfo
- add x19, x19, 1
- ldrh w1, [x1]
+.L1870:
+ ldrh w1, [x20,1974]
+ mov w0, w21
+ add x21, x21, 1
cmp w0, w1
- bge .L1728
- ldr x1, [x26, #:got_lo12:c_ftl_nand_bbm_buf_size]
- ldrh w2, [x1]
- ldr x1, [x20, #:got_lo12:req_sys]
+ bge .L1877
+ add x1, x22, :lo12:.LANCHOR2
+ ldr x3, [x24,144]
+ ldrh w2, [x1,2232]
+ add x1, x23, x21, lsl 3
+ ldr x1, [x1,24]
mul w0, w0, w2
- ldr x3, [x1,8]
- lsl w2, w2, 2
- ldr x1, [x25, #:got_lo12:gBbtInfo]
add x0, x3, x0, sxtw 2
- add x1, x1, x19, lsl 3
- ldr x1, [x1,24]
+ lsl w2, w2, 2
bl ftl_memcpy
- b .L1721
-.L1728:
- ldr x0, [x20, #:got_lo12:req_sys]
+ b .L1870
+.L1877:
+ add x19, x19, :lo12:.LANCHOR4
mov w1, 255
+ add x19, x19, 136
mov w2, 16
- adrp x24, .LC107
- adrp x25, .LC108
- mov w26, 0
- ldr x21, [x0,16]
- add x24, x24, :lo12:.LC107
- adrp x27, :got:c_ftl_nand_page_pre_slc_blk
- adrp x28, :got:req_erase
+ adrp x25, .LC109
+ adrp x26, .LC110
+ ldr x21, [x19,16]
+ mov w24, 0
+ add x25, x25, :lo12:.LC109
+ add x26, x26, :lo12:.LC110
mov x0, x21
- add x25, x25, :lo12:.LC108
bl ftl_memset
mov w0, -3887
strh w0, [x21]
- ldr x0, [x23, #:got_lo12:gBbtInfo]
- ldr w1, [x0,8]
- str w1, [x21,4]
- ldrh w1, [x0]
- strh w1, [x21,2]
- ldrh w1, [x0,4]
- ldrh w0, [x0,6]
+ ldr w0, [x23,8]
+ str w0, [x21,4]
+ ldrh w0, [x20,2112]
+ strh w0, [x21,2]
+ ldrh w0, [x23,4]
+ strh w0, [x21,8]
+ ldrh w0, [x23,6]
strh w0, [x21,10]
- adrp x0, :got:c_ftl_nand_sys_blks_per_plane
- strh w1, [x21,8]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sys_blks_per_plane]
- ldr w0, [x0]
+ ldr w0, [x20,1948]
strh w0, [x21,12]
-.L1723:
- ldr x0, [x29,104]
- ldr x22, [x20, #:got_lo12:req_sys]
- ldr x0, [x0, #:got_lo12:p_sys_data_buf]
- ldr x0, [x0]
- str x0, [x22,8]
- ldr x0, [x29,96]
- ldr x0, [x0, #:got_lo12:p_sys_spare_buf]
- str wzr, [x22]
- ldr x0, [x0]
- str x0, [x22,16]
- ldr x19, [x23, #:got_lo12:gBbtInfo]
- ldrh w4, [x21,10]
- ldrh w1, [x19]
- ldrh w2, [x19,2]
- ldrh w3, [x19,4]
+.L1872:
+ add x27, x22, :lo12:.LANCHOR2
+ ldrh w1, [x20,2112]
+ ldrh w2, [x20,2114]
+ ldrh w3, [x20,2116]
+ ldr x0, [x27,-64]
+ str x0, [x19,8]
+ ldr x0, [x27,2112]
+ str x0, [x19,16]
orr w0, w2, w1, lsl 10
- str w0, [x22,4]
- mov x0, x24
+ str w0, [x19,4]
+ mov x0, x25
+ ldrh w4, [x21,10]
+ str wzr, [x19]
bl printk
mov w1, 1
- mov x0, x22
+ mov x0, x19
mov w2, w1
mov w3, w1
bl FlashProgPages
- ldr x0, [x27, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w1, [x19,2]
- ldrh w0, [x0]
+ ldrh w0, [x20,2028]
+ ldrh w1, [x20,2114]
sub w0, w0, #1
cmp w1, w0
- blt .L1724
- ldr w0, [x19,8]
- ldrh w1, [x19]
+ blt .L1873
+ ldr w0, [x20,2120]
+ strh wzr, [x20,2114]
add w0, w0, 1
- str w0, [x19,8]
+ str w0, [x20,2120]
str w0, [x21,4]
- strh w1, [x21,8]
- ldrh w0, [x19,4]
- strh w0, [x19]
- strh w1, [x19,4]
- lsl w0, w0, 10
- strh wzr, [x19,2]
- str w0, [x22,4]
- ldr x1, [x28, #:got_lo12:req_erase]
- ldr x2, [x1]
- str w0, [x2,4]
- ldr x0, [x1]
+ ldrh w0, [x20,2112]
+ ldrh w1, [x20,2116]
+ strh w0, [x21,8]
+ strh w0, [x20,2116]
+ ldr x0, [x27,-88]
+ strh w1, [x20,2112]
+ lsl w1, w1, 10
+ str w1, [x19,4]
+ str w1, [x0,4]
mov w1, 1
+ mov w2, w1
+ ldr x0, [x27,-88]
bl FlashEraseBlocks
mov w1, 1
- mov x0, x22
+ mov x0, x19
mov w2, w1
mov w3, w1
bl FlashProgPages
-.L1724:
- bl FtlBbtInfoPrint
- ldr x1, [x23, #:got_lo12:gBbtInfo]
- ldrh w0, [x1,2]
+.L1873:
+ ldrh w0, [x20,2114]
add w0, w0, 1
- strh w0, [x1,2]
- ldr x1, [x20, #:got_lo12:req_sys]
- ldr w0, [x1]
+ strh w0, [x20,2114]
+ ldr w0, [x19]
cmn w0, #1
- bne .L1725
- ldr w1, [x1,4]
- mov x0, x25
+ bne .L1874
+ ldr w1, [x19,4]
+ mov x0, x26
bl printk
- b .L1723
-.L1725:
- cbnz w26, .L1729
- mov w26, 1
- b .L1723
-.L1729:
+ b .L1872
+.L1874:
+ cbnz w24, .L1878
+ mov w24, 1
+ b .L1872
+.L1878:
mov w0, 0
+ ldr x27, [sp,80]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 112
+ ldp x29, x30, [sp], 96
ret
.size FtlBbmTblFlush, .-FtlBbmTblFlush
.align 2
allocate_data_superblock:
stp x29, x30, [sp, -128]!
add x29, sp, 0
- stp x19, x20, [sp,16]
stp x21, x22, [sp,32]
+ adrp x21, .LANCHOR2
+ add x21, x21, :lo12:.LANCHOR2
+ stp x19, x20, [sp,16]
stp x23, x24, [sp,48]
stp x25, x26, [sp,64]
stp x27, x28, [sp,80]
- mov x19, x0
- adrp x20, :got:g_num_free_superblocks
- adrp x24, :got:c_ftl_nand_type
- adrp x21, :got:g_inkDie_check_enable
- adrp x22, :got:g_min_erase_count
-.L1731:
- adrp x0, :got:g_gc_temp_superblock
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- cmp x19, x0
- bne .L1732
- ldr x0, [x20, #:got_lo12:g_num_free_superblocks]
- ldrh w2, [x0]
- adrp x0, :got:g_in_swl_replace
- lsr w3, w2, 1
- ldr x0, [x0, #:got_lo12:g_in_swl_replace]
- add w1, w3, 1
- ldr w4, [x0]
- mul w0, w2, w4
- add w1, w1, w0, lsr 2
- ldr x0, [x21, #:got_lo12:g_inkDie_check_enable]
+ mov x20, x0
+ add x23, x21, 96
+ mov x19, x21
+ sub x24, x21, #16
+.L1880:
+ cmp x20, x23
+ bne .L1881
+ ldrh w0, [x21,-8]
+ ldr w3, [x21,876]
+ lsr w2, w0, 1
+ add w4, w2, 1
+ mul w1, w0, w3
+ add w1, w4, w1, lsr 2
+ ldr w4, [x21,160]
uxth w1, w1
- ldr w0, [x0]
- cbz w0, .L1733
- ldr x0, [x22, #:got_lo12:g_min_erase_count]
- ldr w0, [x0]
- cmp w0, 29
- bhi .L1733
- cmp w0, 2
+ cbz w4, .L1882
+ ldr w4, [x21,220]
+ cmp w4, 29
+ bhi .L1882
+ cmp w4, 2
mov w1, 0
- bls .L1734
- tbz x2, 0, .L1758
- cbz w4, .L1734
-.L1758:
- mov w1, w3
- b .L1733
-.L1732:
- ldrb w0, [x19,8]
+ bls .L1883
+ tbz x0, 0, .L1908
+ cbz w3, .L1883
+.L1908:
+ mov w1, w2
+ b .L1882
+.L1881:
+ ldrb w0, [x20,8]
mov w1, 0
cmp w0, 1
- bne .L1734
- ldr x0, [x24, #:got_lo12:c_ftl_nand_type]
- ldrh w0, [x0]
- cmp w0, 1
- beq .L1734
- ldr x2, [x21, #:got_lo12:g_inkDie_check_enable]
- ldr x0, [x20, #:got_lo12:g_num_free_superblocks]
- ldr w2, [x2]
- ldrh w0, [x0]
+ bne .L1883
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrh w2, [x0,1972]
+ cmp w2, 1
+ beq .L1883
+ ldrb w0, [x0,120]
+ cbnz w0, .L1883
+ ldr w2, [x21,160]
+ ldrh w0, [x21,-8]
lsr w1, w0, 3
- cbz w2, .L1733
- ldr x2, [x22, #:got_lo12:g_min_erase_count]
- ldr w2, [x2]
+ cbz w2, .L1882
+ ldr w2, [x21,220]
cmp w2, 1
- bhi .L1733
+ bhi .L1882
mov w1, 7
mul w1, w0, w1
lsr w1, w1, 3
-.L1733:
- cbz w1, .L1734
+.L1882:
+ cbz w1, .L1883
sub w1, w1, #1
uxth w1, w1
-.L1734:
- adrp x0, :got:p_free_data_block_list_head
- ldr x0, [x0, #:got_lo12:p_free_data_block_list_head]
+.L1883:
+ mov x0, x24
bl List_pop_index_node
- uxth w26, w0
- ldr x1, [x20, #:got_lo12:g_num_free_superblocks]
- ldrh w0, [x1]
+ uxth w22, w0
+ ldrh w0, [x19,-8]
sub w0, w0, #1
- strh w0, [x1]
- strh w26, [x19]
- mov x0, x19
+ strh w0, [x19,-8]
+ strh w22, [x20]
+ mov x0, x20
bl make_superblock
- ldrb w0, [x19,7]
- cbz w0, .L1736
- adrp x0, :got:c_ftl_nand_planes_num
- adrp x6, :got:req_erase
+ ldrb w0, [x20,7]
+ cbz w0, .L1885
+ adrp x25, .LANCHOR0
mov x3, 56
- mov w7, 65535
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w5, [x0]
+ add x0, x25, :lo12:.LANCHOR0
+ mov w6, 65535
+ ldrh w5, [x0,1952]
mov x0, 0
- mov w25, w0
- b .L1737
-.L1736:
- adrp x0, :got:p_valid_page_count_table
- ubfiz x1, x26, 1, 16
+ mov w26, w0
+ b .L1886
+.L1885:
+ ubfiz x0, x22, 1, 16
+ ldr x1, [x19,-40]
mov w2, -1
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x0]
- strh w2, [x0,x1]
- b .L1780
-.L1740:
- ldr x1, [x6, #:got_lo12:req_erase]
- ldr x4, [x1]
+ strh w2, [x1,x0]
+ b .L1930
+.L1889:
+ ldr x4, [x19,-88]
madd x1, x0, x3, x4
str xzr, [x1,16]
str xzr, [x1,8]
- add x1, x19, x0, lsl 1
+ add x1, x20, x0, lsl 1
ldrh w1, [x1,16]
- cmp w1, w7
- beq .L1739
- umull x2, w25, w3
- add w25, w25, 1
+ cmp w1, w6
+ beq .L1888
+ umull x2, w26, w3
+ add w26, w26, 1
lsl w1, w1, 10
add x2, x4, x2
- uxth w25, w25
+ uxth w26, w26
str w1, [x2,4]
-.L1739:
+.L1888:
add x0, x0, 1
-.L1737:
+.L1886:
cmp w5, w0, uxth
- adrp x23, :got:req_erase
- bhi .L1740
- adrp x1, :got:g_active_superblock
- uxtw x27, w26
- adrp x0, :got:p_erase_count_table
- ldr x1, [x1, #:got_lo12:g_active_superblock]
- cmp x19, x1
- bne .L1741
- ldr x2, [x21, #:got_lo12:g_inkDie_check_enable]
- ldr w2, [x2]
- cbz w2, .L1741
- ldr x2, [x0, #:got_lo12:p_erase_count_table]
- ldr x2, [x2]
- ldrh w2, [x2,x27,lsl 1]
- cmp w2, 30
- bls .L1741
- strb wzr, [x1,8]
-.L1741:
- ldrb w5, [x19,8]
- adrp x1, :got:c_mlc_erase_count_value
- adrp x3, :got:g_totle_mlc_erase_count
- adrp x2, :got:g_totle_slc_erase_count
- ldr x6, [x0, #:got_lo12:p_erase_count_table]
- cbnz w5, .L1742
- lsl x5, x27, 1
- ldr x6, [x6]
- mov w7, 2
- ldrh w8, [x6,x5]
- cbz w8, .L1781
- ldr x7, [x1, #:got_lo12:c_mlc_erase_count_value]
- ldrh w7, [x7]
- add w7, w8, w7
-.L1781:
- strh w7, [x6,x5]
- ldr x6, [x3, #:got_lo12:g_totle_mlc_erase_count]
- b .L1782
-.L1742:
- lsl x5, x27, 1
- ldr x7, [x6]
- ldrh w6, [x7,x5]
- add w6, w6, 1
- strh w6, [x7,x5]
- ldr x6, [x2, #:got_lo12:g_totle_slc_erase_count]
-.L1782:
- ldr w5, [x6]
+ bhi .L1889
+ cmp x20, x19
+ uxtw x27, w22
+ bne .L1890
+ ldr w0, [x19,160]
+ cbz w0, .L1890
+ ldr x0, [x19,-80]
+ ldrh w0, [x0,x27,lsl 1]
+ cmp w0, 30
+ bls .L1890
+ strb wzr, [x19,8]
+.L1890:
+ ldrb w0, [x20,8]
+ cbnz w0, .L1891
+ lsl x0, x27, 1
+ ldr x1, [x19,-80]
+ mov w2, 2
+ ldrh w3, [x1,x0]
+ cbz w3, .L1931
+ add x2, x25, :lo12:.LANCHOR0
+ ldrh w2, [x2,2016]
+ add w2, w3, w2
+.L1931:
+ strh w2, [x1,x0]
+ mov w1, 0
+ ldr w0, [x19,204]
+ add w0, w0, 1
+ str w0, [x19,204]
+ mov w0, w22
+ bl ftl_set_blk_mode
+ b .L1894
+.L1891:
+ lsl x0, x27, 1
+ ldr x2, [x19,-80]
+ ldrh w1, [x2,x0]
+ add w1, w1, 1
+ strh w1, [x2,x0]
+ ldr w0, [x19,208]
+ add w0, w0, 1
+ str w0, [x19,208]
+ mov w0, w22
+ bl ftl_set_blk_mode.part.8
+.L1894:
lsl x27, x27, 1
- add w5, w5, 1
- str w5, [x6]
- ldr x0, [x0, #:got_lo12:p_erase_count_table]
- ldr x0, [x0]
- ldrh w5, [x0,x27]
- adrp x0, :got:g_max_erase_count
- ldr x0, [x0, #:got_lo12:g_max_erase_count]
- ldr w6, [x0]
- cmp w5, w6
- bls .L1746
- str w5, [x0]
-.L1746:
- ldr x1, [x1, #:got_lo12:c_mlc_erase_count_value]
- adrp x5, :got:g_totle_avg_erase_count
- ldr x3, [x3, #:got_lo12:g_totle_mlc_erase_count]
- ldr x2, [x2, #:got_lo12:g_totle_slc_erase_count]
- ldrh w1, [x1]
- ldr w3, [x3]
- ldr w0, [x2]
- ldr x5, [x5, #:got_lo12:g_totle_avg_erase_count]
+ ldr x0, [x19,-80]
+ ldr w1, [x19,216]
+ ldrh w0, [x0,x27]
+ cmp w0, w1
+ bls .L1895
+ str w0, [x19,216]
+.L1895:
+ add x2, x25, :lo12:.LANCHOR0
+ ldr w3, [x19,204]
+ ldr w0, [x19,208]
+ ldrh w1, [x2,2016]
madd w0, w1, w3, w0
- adrp x1, :got:c_ftl_nand_data_blks_per_plane
+ ldrh w1, [x2,1960]
mov x3, 56
- ldr x1, [x1, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w1, [x1]
udiv w0, w0, w1
- str w0, [x5]
- adrp x0, :got:gp_ect_tbl_info
- ldr x0, [x0, #:got_lo12:gp_ect_tbl_info]
- ldr x1, [x0]
+ ldr x1, [x19,2152]
+ str w0, [x19,212]
ldr w0, [x1,16]
add w0, w0, 1
str w0, [x1,16]
mov x0, 0
-.L1747:
- cmp w25, w0, uxth
- bls .L1783
- ldr x1, [x23, #:got_lo12:req_erase]
- ldr x1, [x1]
+.L1896:
+ cmp w26, w0, uxth
+ bls .L1932
+ ldr x1, [x19,-88]
madd x1, x0, x3, x1
add x0, x0, 1
ldr w2, [x1,4]
and w2, w2, -1024
str w2, [x1,4]
- b .L1747
-.L1783:
- ldr x0, [x23, #:got_lo12:req_erase]
- mov w1, w25
+ b .L1896
+.L1932:
+ ldrb w1, [x20,8]
+ mov w2, w26
+ ldr x0, [x19,-88]
mov x28, 0
- ldr x0, [x0]
bl FlashEraseBlocks
mov w1, w28
mov x3, 56
-.L1749:
- cmp w25, w28, uxth
- bls .L1784
- ldr x2, [x23, #:got_lo12:req_erase]
+.L1898:
+ cmp w26, w28, uxth
+ bls .L1933
mul x0, x28, x3
- ldr x2, [x2]
- add x5, x2, x0
+ ldr x2, [x19,-88]
+ add x4, x2, x0
ldr w2, [x2,x0]
cmn w2, #1
- bne .L1750
- ldr w0, [x5,4]
+ bne .L1899
+ ldr w0, [x4,4]
add w1, w1, 1
str x3, [x29,96]
lsr w0, w0, 10
str x1, [x29,112]
str x1, [x29,120]
bl FtlBbmMapBadBlock
- add x0, x19, x28, lsl 1
+ add x0, x20, x28, lsl 1
ldr x2, [x29,104]
ldr x3, [x29,96]
ldr x1, [x29,120]
strh w2, [x0,16]
- ldrb w0, [x19,7]
+ ldrb w0, [x20,7]
sub w0, w0, #1
- strb w0, [x19,7]
-.L1750:
+ strb w0, [x20,7]
+.L1899:
add x28, x28, 1
- b .L1749
-.L1784:
- cbz w1, .L1752
- mov w0, w26
+ b .L1898
+.L1933:
+ cbz w1, .L1901
+ mov w0, w22
bl update_multiplier_value
bl FtlBbmTblFlush
-.L1752:
- ldrb w1, [x19,7]
- adrp x0, :got:p_valid_page_count_table
- cbnz w1, .L1753
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
+.L1901:
+ ldrb w0, [x20,7]
+ cbnz w0, .L1902
+ ldr x0, [x19,-40]
mov w1, -1
- ldr x0, [x0]
strh w1, [x0,x27]
-.L1780:
- mov w0, w26
+.L1930:
+ mov w0, w22
bl INSERT_DATA_LIST
- b .L1731
-.L1753:
- adrp x2, :got:c_ftl_nand_page_pre_blk
- ldr x2, [x2, #:got_lo12:c_ftl_nand_page_pre_blk]
- strh wzr, [x19,2]
- strb wzr, [x19,6]
- ldrh w2, [x2]
- strh w26, [x19]
- mul w1, w1, w2
- adrp x2, :got:g_GlobalSysVersion
- uxth w1, w1
- strh w1, [x19,4]
- ldr x2, [x2, #:got_lo12:g_GlobalSysVersion]
- ldr w3, [x2]
- str w3, [x19,12]
- add w3, w3, 1
- str w3, [x2]
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldrh w2, [x19]
- ldr x0, [x0]
- strh w1, [x0,x2,lsl 1]
- mov w0, 0
- ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
+ b .L1880
+.L1902:
+ add x25, x25, :lo12:.LANCHOR0
+ strh wzr, [x20,2]
+ strb wzr, [x20,6]
+ ldrh w1, [x25,2026]
+ strh w22, [x20]
+ mul w0, w0, w1
+ adrp x1, .LANCHOR2
+ add x1, x1, :lo12:.LANCHOR2
+ uxth w0, w0
+ strh w0, [x20,4]
+ ldr w2, [x1,196]
+ str w2, [x20,12]
+ add w2, w2, 1
+ str w2, [x1,196]
+ ldr x1, [x1,-40]
+ ldrh w2, [x20]
+ strh w0, [x1,x2,lsl 1]
+ mov w0, 0
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
ldp x29, x30, [sp], 128
.global FtlGcFreeBadSuperBlk
.type FtlGcFreeBadSuperBlk, %function
FtlGcFreeBadSuperBlk:
- stp x29, x30, [sp, -112]!
+ stp x29, x30, [sp, -80]!
add x29, sp, 0
- stp x21, x22, [sp,32]
- adrp x21, :got:g_gc_bad_block_temp_num
- stp x23, x24, [sp,48]
- uxth w24, w0
- ldr x0, [x21, #:got_lo12:g_gc_bad_block_temp_num]
stp x19, x20, [sp,16]
- stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
+ adrp x19, .LANCHOR2
+ str x25, [sp,64]
+ add x19, x19, :lo12:.LANCHOR2
+ stp x23, x24, [sp,48]
+ uxth w23, w0
+ ldrh w0, [x19,956]
+ stp x21, x22, [sp,32]
+ mov w21, 0
+ cbz w0, .L1936
+ adrp x22, .LANCHOR0
+ adrp x24, .LC111
+ add x22, x22, :lo12:.LANCHOR0
+ add x24, x24, :lo12:.LC111
+.L1944:
+ ldrh w0, [x22,1952]
+ cmp w0, w21
+ bls .L1945
+ add x0, x22, 1984
+ mov w1, w23
mov w20, 0
- ldrh w0, [x0]
- cbz w0, .L1787
- adrp x22, .LC109
- adrp x23, :got:c_ftl_nand_planes_num
- adrp x25, :got:p_plane_order_table
- adrp x26, :got:g_gc_bad_block_temp_tbl
- add x22, x22, :lo12:.LC109
-.L1795:
- ldr x0, [x23, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- cmp w0, w20
- bls .L1796
- ldr x0, [x25, #:got_lo12:p_plane_order_table]
- mov w1, w24
- mov w19, 0
- ldrb w0, [x0,w20,sxtw]
+ ldrb w0, [x0,w21,sxtw]
bl V2P_block
- uxth w27, w0
-.L1788:
- ldr x28, [x21, #:got_lo12:g_gc_bad_block_temp_num]
- ldrh w0, [x28]
- cmp w0, w19
- bls .L1797
- ldr x0, [x26, #:got_lo12:g_gc_bad_block_temp_tbl]
- adrp x4, :got:g_gc_bad_block_temp_tbl
- ldrh w0, [x0,w19,sxtw 1]
- cmp w0, w27
- bne .L1789
- mov w1, w27
- mov x0, x22
- str x4, [x29,104]
+ uxth w25, w0
+.L1937:
+ ldrh w0, [x19,956]
+ cmp w0, w20
+ bls .L1946
+ add x0, x19, 960
+ ldrh w0, [x0,w20,sxtw 1]
+ cmp w0, w25
+ bne .L1938
+ mov w1, w25
+ mov x0, x24
bl printk
- mov w0, w27
+ mov w0, w25
bl FtlBbmMapBadBlock
bl FtlBbmTblFlush
- ldrh w2, [x28]
- mov w3, w19
- ldr x4, [x29,104]
-.L1790:
+ ldrh w2, [x19,956]
+ mov w3, w20
+.L1939:
cmp w3, w2
- bcs .L1798
- ldr x1, [x4, #:got_lo12:g_gc_bad_block_temp_tbl]
+ bcs .L1947
+ add x4, x19, 960
add w0, w3, 1
- ldrh w5, [x1,w0,sxtw 1]
- strh w5, [x1,w3,sxtw 1]
+ ldrh w1, [x4,w0,sxtw 1]
+ strh w1, [x4,w3,sxtw 1]
uxth w3, w0
- b .L1790
-.L1798:
- ldr x0, [x21, #:got_lo12:g_gc_bad_block_temp_num]
+ b .L1939
+.L1947:
sub w2, w2, #1
- strh w2, [x0]
-.L1789:
- add w19, w19, 1
- uxth w19, w19
- b .L1788
-.L1797:
+ strh w2, [x19,956]
+.L1938:
add w20, w20, 1
uxth w20, w20
- b .L1795
-.L1796:
+ b .L1937
+.L1946:
+ add w21, w21, 1
+ uxth w21, w21
+ b .L1944
+.L1945:
bl FtlGcReFreshBadBlk
-.L1787:
+.L1936:
mov w0, 0
+ ldr x25, [sp,64]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 112
+ ldp x29, x30, [sp], 80
ret
.size FtlGcFreeBadSuperBlk, .-FtlGcFreeBadSuperBlk
.align 2
update_vpc_list:
stp x29, x30, [sp, -32]!
add x29, sp, 0
- str x19, [sp,16]
+ stp x19, x20, [sp,16]
uxth w19, w0
- adrp x0, :got:p_valid_page_count_table
- ubfiz x1, x19, 1, 16
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x0]
- ldrh w1, [x0,x1]
- cbnz w1, .L1800
- adrp x0, :got:g_gc_superblock
- ldr x0, [x0, #:got_lo12:g_gc_superblock]
- ldrh w2, [x0]
- cmp w2, w19
- bne .L1801
- mov w1, -1
- strh w1, [x0]
- b .L1802
-.L1801:
- adrp x0, :got:g_active_superblock
- ldr x0, [x0, #:got_lo12:g_active_superblock]
- ldrh w2, [x0]
- mov w0, w1
- cmp w2, w19
- beq .L1803
- adrp x0, :got:g_buffer_superblock
- ldr x0, [x0, #:got_lo12:g_buffer_superblock]
- ldrh w2, [x0]
- mov w0, w1
- cmp w2, w19
- beq .L1803
- adrp x0, :got:g_gc_temp_superblock
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- ldrh w2, [x0]
- mov w0, w1
- cmp w2, w19
- beq .L1803
-.L1802:
- adrp x0, :got:p_data_block_list_head
+ adrp x0, .LANCHOR2
+ add x1, x0, :lo12:.LANCHOR2
+ ubfiz x2, x19, 1, 16
+ mov x20, x0
+ ldr x3, [x1,-40]
+ ldrh w2, [x3,x2]
+ cbnz w2, .L1949
+ ldrh w3, [x1,296]
+ cmp w3, w19
+ bne .L1950
+ mov w0, -1
+ strh w0, [x1,296]
+ b .L1951
+.L1950:
+ ldrh w3, [x0,#:lo12:.LANCHOR2]
+ mov w0, w2
+ cmp w3, w19
+ beq .L1952
+ ldrh w3, [x1,48]
+ cmp w3, w19
+ beq .L1952
+ ldrh w1, [x1,96]
+ cmp w1, w19
+ beq .L1952
+.L1951:
+ add x20, x20, :lo12:.LANCHOR2
mov w1, w19
- ldr x0, [x0, #:got_lo12:p_data_block_list_head]
+ sub x0, x20, #48
bl List_remove_node
- adrp x0, :got:g_num_data_superblocks
- ldr x0, [x0, #:got_lo12:g_num_data_superblocks]
- ldrh w1, [x0]
- sub w1, w1, #1
- strh w1, [x0]
+ ldrh w0, [x20,-24]
+ sub w0, w0, #1
+ strh w0, [x20,-24]
mov w0, w19
bl free_data_superblock
mov w0, w19
bl FtlGcFreeBadSuperBlk
mov w0, 1
- b .L1803
-.L1800:
+ b .L1952
+.L1949:
mov w0, w19
bl List_update_data_list
mov w0, 0
-.L1803:
- ldr x19, [sp,16]
+.L1952:
+ ldp x19, x20, [sp,16]
ldp x29, x30, [sp], 32
ret
.size update_vpc_list, .-update_vpc_list
add x29, sp, 0
str x19, [sp,16]
cmp w1, w0
- beq .L1808
- adrp x0, :got:p_valid_page_count_table
- ubfiz x2, x1, 1, 16
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x0]
- ldrh w19, [x0,x2]
- cbnz w19, .L1809
- adrp x0, .LC110
+ adrp x2, .LANCHOR2
+ beq .L1957
+ add x0, x2, :lo12:.LANCHOR2
+ ubfiz x3, x1, 1, 16
+ ldr x0, [x0,-40]
+ ldrh w19, [x0,x3]
+ cbnz w19, .L1958
+ adrp x0, .LC112
mov w2, w19
- add x0, x0, :lo12:.LC110
+ add x0, x0, :lo12:.LC112
bl printk
- b .L1813
-.L1809:
+ b .L1962
+.L1958:
sub w19, w19, #1
- strh w19, [x0,x2]
-.L1808:
- adrp x19, :got:g_tmp_data_superblock_id
+ strh w19, [x0,x3]
+.L1957:
+ add x19, x2, :lo12:.LANCHOR2
mov w0, 65535
- ldr x19, [x19, #:got_lo12:g_tmp_data_superblock_id]
- ldrh w2, [x19]
+ ldrh w2, [x19,2320]
cmp w2, w0
- bne .L1811
- strh w1, [x19]
-.L1813:
+ bne .L1960
+ strh w1, [x19,2320]
+.L1962:
mov w0, 0
- b .L1810
-.L1811:
+ b .L1959
+.L1960:
cmp w2, w1
str x1, [x29,40]
mov w0, 0
- beq .L1810
+ beq .L1959
mov w0, w2
bl update_vpc_list
cmp w0, wzr
ldr x1, [x29,40]
cset w0, ne
- strh w1, [x19]
-.L1810:
+ strh w1, [x19,2320]
+.L1959:
ldr x19, [sp,16]
ldp x29, x30, [sp], 48
ret
stp x19, x20, [sp,16]
stp x21, x22, [sp,32]
ldrh w1, [x0,4]
- cbz w1, .L1814
+ cbz w1, .L1963
mov x19, x0
ldrb w0, [x0,6]
- mov w20, 65535
- adrp x21, :got:mlcPageToSlcPageTbl
+ adrp x20, .LANCHOR2
+ mov w21, 65535
add x0, x0, 8
- adrp x22, :got:c_ftl_nand_planes_num
+ add x20, x20, :lo12:.LANCHOR2
+ adrp x22, .LANCHOR0
+ add x20, x20, 996
ldrh w0, [x19,x0,lsl 1]
-.L1817:
- cmp w0, w20
- bne .L1821
-.L1819:
+.L1966:
+ cmp w0, w21
+ bne .L1974
+.L1968:
ldrb w0, [x19,6]
+ add x1, x22, :lo12:.LANCHOR0
add w0, w0, 1
+ ldrh w1, [x1,1952]
uxtb w0, w0
strb w0, [x19,6]
- ldr x1, [x22, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w1, [x1]
cmp w1, w0
- bne .L1818
+ bne .L1967
ldrh w0, [x19,2]
strb wzr, [x19,6]
add w0, w0, 1
strh w0, [x19,2]
-.L1818:
+.L1967:
ldrb w0, [x19,6]
add x0, x0, 8
ldrh w0, [x19,x0,lsl 1]
- b .L1817
-.L1821:
- ldrb w0, [x19,8]
- cmp w0, 1
- bne .L1814
- ldr x0, [x21, #:got_lo12:mlcPageToSlcPageTbl]
- ldrh w1, [x19,2]
- ldrh w0, [x0,w1,sxtw 1]
- cmp w0, w20
- bne .L1814
+ b .L1966
+.L1974:
+ ldrb w1, [x19,8]
+ cmp w1, 1
+ bne .L1969
+ add x0, x22, :lo12:.LANCHOR0
+ ldrb w0, [x0,120]
+ cbnz w0, .L1969
+ ldrh w0, [x19,2]
+ ldrh w0, [x20,w0,sxtw 1]
+ cmp w0, w21
+ bne .L1969
ldrh w0, [x19,4]
sub w0, w0, #1
strh w0, [x19,4]
ldrh w0, [x19]
bl decrement_vpc_count
ldrh w1, [x19,4]
- cbnz w1, .L1819
+ cbnz w1, .L1968
ldrh w0, [x19,2]
strb w1, [x19,6]
add w0, w0, 1
strh w0, [x19,2]
-.L1814:
+ b .L1963
+.L1969:
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrb w2, [x0,120]
+ cbz w2, .L1963
+ cmp w1, 1
+ bne .L1963
+ ldrh w2, [x19,2]
+ ldrh w1, [x0,2028]
+ cmp w2, w1
+ bcc .L1963
+ adrp x2, .LANCHOR2-40
+ ldrh w1, [x19]
+ ldrh w4, [x19,4]
+ lsl x1, x1, 1
+ ldr x3, [x2,#:lo12:.LANCHOR2-40]
+ ldrh w2, [x3,x1]
+ sub w2, w2, w4
+ strh w2, [x3,x1]
+ strh wzr, [x19,4]
+ ldrh w0, [x0,2026]
+ strh w0, [x19,2]
+ strb wzr, [x19,6]
+.L1963:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x29, x30, [sp], 48
get_new_active_ppa:
stp x29, x30, [sp, -64]!
add x29, sp, 0
- stp x19, x20, [sp,16]
stp x21, x22, [sp,32]
+ stp x19, x20, [sp,16]
stp x23, x24, [sp,48]
mov x19, x0
strb wzr, [x0,10]
ldrb w0, [x0,6]
- mov w20, 65535
- adrp x21, :got:c_ftl_nand_planes_num
- adrp x23, :got:mlcPageToSlcPageTbl
+ adrp x21, .LANCHOR2
+ add x21, x21, :lo12:.LANCHOR2
+ mov w22, 65535
add x0, x0, 8
+ adrp x23, .LANCHOR0
+ add x21, x21, 996
ldrh w0, [x19,x0,lsl 1]
-.L1823:
- cmp w0, w20
- adrp x22, :got:c_ftl_nand_planes_num
- bne .L1835
-.L1824:
+.L1976:
+ cmp w0, w22
+ adrp x20, .LANCHOR0
+ bne .L1991
+.L1977:
ldrb w0, [x19,6]
+ add x1, x23, :lo12:.LANCHOR0
add w0, w0, 1
+ ldrh w1, [x1,1952]
uxtb w0, w0
strb w0, [x19,6]
- ldr x1, [x21, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w1, [x1]
cmp w1, w0
- bne .L1825
+ bne .L1978
ldrh w0, [x19,2]
strb wzr, [x19,6]
add w0, w0, 1
strh w0, [x19,2]
-.L1825:
+.L1978:
ldrb w0, [x19,6]
add x0, x0, 8
ldrh w0, [x19,x0,lsl 1]
- b .L1823
-.L1835:
+ b .L1976
+.L1991:
ldrb w1, [x19,8]
cmp w1, 1
- bne .L1826
- ldr x1, [x23, #:got_lo12:mlcPageToSlcPageTbl]
- ldrh w2, [x19,2]
- ldrh w1, [x1,w2,sxtw 1]
- cmp w1, w20
- bne .L1826
+ bne .L1979
+ add x1, x23, :lo12:.LANCHOR0
+ ldrb w1, [x1,120]
+ cbnz w1, .L1979
+ ldrh w1, [x19,2]
+ ldrh w1, [x21,w1,sxtw 1]
+ cmp w1, w22
+ bne .L1979
ldrh w0, [x19,4]
sub w0, w0, #1
strh w0, [x19,4]
ldrh w0, [x19]
bl decrement_vpc_count
- b .L1824
-.L1826:
- ldrh w20, [x19,2]
- mov w21, 65535
- mov w23, w21
- adrp x24, :got:mlcPageToSlcPageTbl
- orr w20, w20, w0, lsl 10
- ldrh w0, [x19,4]
- sub w0, w0, #1
- strh w0, [x19,4]
-.L1827:
- ldr x0, [x22, #:got_lo12:c_ftl_nand_planes_num]
+ b .L1977
+.L1979:
+ ldrh w1, [x19,4]
+ adrp x21, .LANCHOR2
+ ldrh w22, [x19,2]
+ mov w23, 65535
+ add x21, x21, :lo12:.LANCHOR2
+ sub w1, w1, #1
+ orr w22, w22, w0, lsl 10
+ strh w1, [x19,4]
+ mov w24, w23
+ add x21, x21, 996
+.L1980:
+ add x0, x20, :lo12:.LANCHOR0
ldrb w1, [x19,6]
- ldrh w2, [x0]
-.L1829:
+ ldrh w2, [x0,1952]
+.L1982:
add w1, w1, 1
uxtb w1, w1
cmp w1, w2
- bne .L1828
- ldrh w0, [x19,2]
+ bne .L1981
+ ldrh w1, [x19,2]
+ add w1, w1, 1
+ strh w1, [x19,2]
mov w1, 0
- add w0, w0, 1
- strh w0, [x19,2]
-.L1828:
+.L1981:
add x0, x19, x1, sxtw 1
ldrh w0, [x0,16]
- cmp w0, w21
- beq .L1829
+ cmp w0, w23
+ beq .L1982
ldrb w0, [x19,8]
strb w1, [x19,6]
cmp w0, 1
- bne .L1830
- ldr x0, [x24, #:got_lo12:mlcPageToSlcPageTbl]
- ldrh w1, [x19,2]
- ldrh w0, [x0,w1,sxtw 1]
- cmp w0, w23
- bne .L1830
- ldrh w0, [x19,4]
- cbz w0, .L1830
- sub w0, w0, #1
- strh w0, [x19,4]
+ bne .L1987
+ add x0, x20, :lo12:.LANCHOR0
+ ldrb w0, [x0,120]
+ cbnz w0, .L1984
+ ldrh w0, [x19,2]
+ ldrh w0, [x21,w0,sxtw 1]
+ cmp w0, w24
+ bne .L1984
+ ldrh w1, [x19,4]
+ cbz w1, .L1984
ldrh w0, [x19]
+ sub w1, w1, #1
+ strh w1, [x19,4]
bl decrement_vpc_count
- b .L1827
-.L1830:
- mov w0, w20
+ b .L1980
+.L1984:
+ add x20, x20, :lo12:.LANCHOR0
+ ldrb w0, [x20,120]
+ cbz w0, .L1987
+ ldrh w1, [x19,2]
+ ldrh w0, [x20,2028]
+ cmp w1, w0
+ bcc .L1987
+ adrp x0, .LANCHOR2-40
+ ldrh w1, [x19]
+ ldrh w3, [x19,4]
+ lsl x1, x1, 1
+ ldr x0, [x0,#:lo12:.LANCHOR2-40]
+ ldrh w2, [x0,x1]
+ sub w2, w2, w3
+ strh w2, [x0,x1]
+ strh wzr, [x19,4]
+ ldrh w0, [x20,2026]
+ strh w0, [x19,2]
+ strb wzr, [x19,6]
+.L1987:
+ mov w0, w22
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
.global FtlVpcTblFlush
.type FtlVpcTblFlush, %function
FtlVpcTblFlush:
- stp x29, x30, [sp, -96]!
+ stp x29, x30, [sp, -80]!
+ adrp x0, .LANCHOR2
add x29, sp, 0
- stp x23, x24, [sp,48]
- adrp x23, :got:p_sys_data_buf
- adrp x24, :got:p_sys_spare_buf
- stp x21, x22, [sp,32]
- adrp x21, :got:req_sys
- adrp x22, :got:gSysInfo
- ldr x0, [x23, #:got_lo12:p_sys_data_buf]
- stp x25, x26, [sp,64]
stp x19, x20, [sp,16]
- stp x27, x28, [sp,80]
- ldr x26, [x21, #:got_lo12:req_sys]
- adrp x19, :got:g_sys_save_data
- ldr x0, [x0]
- adrp x25, :got:g_GlobalSysVersion
- mov w28, 65535
- str x0, [x26,8]
- ldr x0, [x24, #:got_lo12:p_sys_spare_buf]
- ldr x20, [x0]
- str x20, [x26,16]
- ldr x0, [x22, #:got_lo12:gSysInfo]
- str wzr, [x20,12]
- ldrh w1, [x0]
- strh w1, [x20,2]
- mov w1, -3932
- strh w1, [x20]
- ldr w1, [x0,8]
- str w1, [x20,4]
- mov w1, 19539
- str wzr, [x20,8]
- movk w1, 0x4654, lsl 16
- ldrh w0, [x0,6]
- ldr x19, [x19, #:got_lo12:g_sys_save_data]
- str w1, [x19]
- mov w1, 39
- strh w0, [x19,8]
- adrp x0, :got:c_ftl_nand_die_num
- movk w1, 0x5000, lsl 16
- str w1, [x19,4]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_die_num]
- ldrh w0, [x0]
- strb w0, [x19,10]
- adrp x0, :got:g_active_superblock
- ldr x0, [x0, #:got_lo12:g_active_superblock]
- ldrh w1, [x0]
- strh w1, [x19,14]
- ldrh w1, [x0,2]
- ldrb w2, [x0,6]
- ldrb w0, [x0,8]
- strb w0, [x19,11]
- adrp x0, :got:g_buffer_superblock
- orr w1, w2, w1, lsl 6
- strh w1, [x19,16]
- ldr x0, [x0, #:got_lo12:g_buffer_superblock]
- ldrh w1, [x0]
- strh w1, [x19,18]
- ldrh w1, [x0,2]
- ldrb w2, [x0,6]
- ldrb w0, [x0,8]
- strb w0, [x19,12]
- adrp x0, :got:g_gc_temp_superblock
+ add x19, x0, :lo12:.LANCHOR2
+ adrp x20, .LANCHOR4
+ add x20, x20, :lo12:.LANCHOR4
+ str x25, [sp,64]
+ add x20, x20, 136
+ mov w25, 65535
+ stp x21, x22, [sp,32]
+ ldr x22, [x19,2112]
+ add x21, x19, 224
+ stp x23, x24, [sp,48]
+ ldr x1, [x19,-64]
+ adrp x24, .LANCHOR0
+ str x1, [x20,8]
+ add x23, x24, :lo12:.LANCHOR0
+ str x22, [x20,16]
+ ldrh w2, [x19,280]
+ strh w2, [x22,2]
+ mov w2, -3932
+ strh w2, [x22]
+ str wzr, [x22,12]
+ ldr w2, [x19,288]
+ str w2, [x22,4]
+ mov w2, 19539
+ str wzr, [x22,8]
+ movk w2, 0x4654, lsl 16
+ ldrh w1, [x19,286]
+ ldrh w0, [x0,#:lo12:.LANCHOR2]
+ strh w1, [x19,232]
+ strh w0, [x19,238]
+ ldrh w1, [x23,1974]
+ ldrh w0, [x19,2]
+ strb w1, [x19,234]
+ ldrb w1, [x19,6]
+ str w2, [x19,224]
+ mov w2, 54
+ orr w0, w1, w0, lsl 6
+ movk w2, 0x5000, lsl 16
+ strh w0, [x19,240]
+ str w2, [x19,228]
+ ldrb w0, [x19,8]
+ strb w0, [x19,235]
+ ldrh w1, [x19,48]
+ strh w1, [x19,242]
+ ldrh w1, [x19,50]
+ ldrb w2, [x19,54]
+ ldrb w0, [x19,56]
orr w1, w2, w1, lsl 6
- strh w1, [x19,20]
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- ldrh w1, [x0]
- strh w1, [x19,22]
- ldrh w1, [x0,2]
- ldrb w2, [x0,6]
- ldrb w0, [x0,8]
- strb w0, [x19,13]
- adrp x0, :got:g_totle_mlc_erase_count
+ strb w0, [x19,236]
+ strh w1, [x19,244]
+ ldrb w0, [x19,104]
+ ldrh w1, [x19,96]
+ strh w1, [x19,246]
+ strb w0, [x19,237]
+ ldrh w1, [x19,98]
+ ldr w0, [x19,204]
+ ldrb w2, [x19,102]
+ str w0, [x19,256]
+ ldr w0, [x19,196]
orr w1, w2, w1, lsl 6
- strh w1, [x19,24]
- adrp x2, :got:c_ftl_nand_byte_pre_page
+ str w0, [x19,264]
+ ldr w0, [x19,200]
+ str w0, [x19,260]
+ ldrh w2, [x23,2036]
+ ldr x0, [x20,8]
+ strh w1, [x19,248]
mov w1, 255
- ldr x0, [x0, #:got_lo12:g_totle_mlc_erase_count]
- ldr w0, [x0]
- str w0, [x19,32]
- ldr x0, [x25, #:got_lo12:g_GlobalSysVersion]
- ldr w0, [x0]
- str w0, [x19,40]
- adrp x0, :got:g_GlobalDataVersion
- ldr x0, [x0, #:got_lo12:g_GlobalDataVersion]
- ldr w0, [x0]
- str w0, [x19,36]
- ldr x0, [x26,8]
- ldr x2, [x2, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldrh w2, [x2]
bl ftl_memset
- ldr x0, [x26,8]
- mov x1, x19
+ ldr x0, [x20,8]
+ mov x1, x21
mov w2, 48
+ mov x21, x24
bl ftl_memcpy
- adrp x2, :got:c_ftl_nand_data_blks_per_plane
- adrp x1, :got:p_valid_page_count_table
- ldr x0, [x26,8]
- adrp x26, :got:c_ftl_nand_page_pre_slc_blk
- ldr x2, [x2, #:got_lo12:c_ftl_nand_data_blks_per_plane]
+ ldr x0, [x20,8]
+ ldrh w2, [x23,1960]
+ ldr x1, [x19,-40]
add x0, x0, 48
- ldr x1, [x1, #:got_lo12:p_valid_page_count_table]
- ldrh w2, [x2]
- ldr x1, [x1]
lsl w2, w2, 1
bl ftl_memcpy
+ ldrh w2, [x23,1960]
+ ldr x1, [x20,8]
+ uxth x0, w2
+ lsr w2, w2, 3
+ add x0, x0, 24
+ add w2, w2, 4
+ lsr x0, x0, 1
+ add x0, x1, x0, lsl 2
+ ldr x1, [x24,#:lo12:.LANCHOR0]
+ bl ftl_memcpy
mov w0, 0
bl FtlUpdateVaildLpn
-.L1837:
- ldr x0, [x23, #:got_lo12:p_sys_data_buf]
- ldr x27, [x21, #:got_lo12:req_sys]
- ldr x0, [x0]
- str x0, [x27,8]
- ldr x0, [x24, #:got_lo12:p_sys_spare_buf]
- ldr x0, [x0]
- str x0, [x27,16]
- ldr x19, [x22, #:got_lo12:gSysInfo]
- ldrh w0, [x19]
- ldrh w1, [x19,2]
- orr w0, w1, w0, lsl 10
+.L1993:
+ ldr x0, [x19,-64]
+ str x0, [x20,8]
+ ldrh w1, [x19,280]
+ ldr x0, [x19,2112]
+ str x0, [x20,16]
+ ldrh w0, [x19,282]
+ orr w1, w0, w1, lsl 10
+ str w1, [x20,4]
mov w1, 1
- str w0, [x27,4]
+ mov x0, x20
mov w2, w1
mov w3, w1
- mov x0, x27
bl FlashProgPages
- ldr x0, [x26, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w1, [x19,2]
- ldrh w0, [x0]
- sub w0, w0, #1
- cmp w1, w0
- blt .L1838
- ldrh w0, [x19]
- ldrh w28, [x19,4]
- strh wzr, [x19,2]
- strh w0, [x19,4]
+ add x1, x21, :lo12:.LANCHOR0
+ ldrh w0, [x19,282]
+ ldrh w1, [x1,2028]
+ sub w1, w1, #1
+ cmp w0, w1
+ blt .L1994
+ ldrh w0, [x19,280]
+ ldrh w25, [x19,284]
+ strh wzr, [x19,282]
+ strh w0, [x19,284]
bl FtlFreeSysBlkQueueOut
- strh w0, [x19]
- ldr x2, [x25, #:got_lo12:g_GlobalSysVersion]
- ldr w1, [x2]
- str w1, [x19,8]
- add w3, w1, 1
- str w3, [x2]
+ ldr w1, [x19,196]
+ str w1, [x19,288]
+ add w2, w1, 1
+ str w2, [x19,196]
ubfiz w2, w0, 10, 16
- str w2, [x27,4]
- str w1, [x20,4]
+ str w2, [x20,4]
+ str w1, [x22,4]
mov w1, 1
- strh w0, [x20,2]
+ strh w0, [x19,280]
mov w2, w1
- mov x0, x27
+ strh w0, [x22,2]
mov w3, w1
+ mov x0, x20
bl FlashProgPages
-.L1838:
- ldr x0, [x22, #:got_lo12:gSysInfo]
- ldrh w1, [x0,2]
+.L1994:
+ ldrh w1, [x19,282]
+ ldr w0, [x20]
add w1, w1, 1
+ cmn w0, #1
uxth w1, w1
- strh w1, [x0,2]
- ldr x2, [x21, #:got_lo12:req_sys]
- ldr w2, [x2]
- cmn w2, #1
- bne .L1839
+ strh w1, [x19,282]
+ bne .L1995
cmp w1, 1
- bne .L1837
- adrp x1, :got:c_ftl_nand_page_pre_slc_blk
- ldr x1, [x1, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w1, [x1]
+ bne .L1993
+ add x0, x21, :lo12:.LANCHOR0
+ ldrh w1, [x0,2028]
sub w1, w1, #1
- strh w1, [x0,2]
- b .L1837
-.L1839:
+ strh w1, [x19,282]
+ b .L1993
+.L1995:
cmp w1, 1
- beq .L1837
+ beq .L1993
mov w0, 65535
- cmp w28, w0
- beq .L1841
- mov w0, w28
+ cmp w25, w0
+ beq .L1997
+ mov w0, w25
mov w1, 1
bl FtlFreeSysBlkQueueIn
-.L1841:
+.L1997:
mov w0, 0
+ ldr x25, [sp,64]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 96
+ ldp x29, x30, [sp], 80
ret
.size FtlVpcTblFlush, .-FtlVpcTblFlush
.align 2
+ .global FtlSuperblockPowerLostFix
+ .type FtlSuperblockPowerLostFix, %function
+FtlSuperblockPowerLostFix:
+ stp x29, x30, [sp, -144]!
+ adrp x1, __stack_chk_guard
+ add x29, sp, 0
+ stp x19, x20, [sp,16]
+ mov x19, x0
+ adrp x20, .LANCHOR2
+ ldr x0, [x1,#:lo12:__stack_chk_guard]
+ str x0, [x29,136]
+ add x0, x20, :lo12:.LANCHOR2
+ stp x21, x22, [sp,32]
+ stp x23, x24, [sp,48]
+ stp x25, x26, [sp,64]
+ mov w23, 0
+ mov x26, x1
+ ldr x22, [x0,904]
+ adrp x0, .LANCHOR0
+ add x2, x0, :lo12:.LANCHOR0
+ mov x21, x0
+ ldrb w2, [x2,120]
+ cbz w2, .L2002
+ ldrb w0, [x19,8]
+ cmp w0, 1
+ cset w23, eq
+.L2002:
+ mov w24, 7
+ mov w25, -1
+.L2003:
+ subs w24, w24, #1
+ beq .L2004
+ ldrh w0, [x19,4]
+ cbz w0, .L2004
+ mov x0, x19
+ bl get_new_active_ppa
+ str w0, [x29,84]
+ add x1, x20, :lo12:.LANCHOR2
+ str w25, [x29,104]
+ mov w2, w23
+ mov w3, 0
+ ldr x0, [x1,-64]
+ str x0, [x29,88]
+ ldr x0, [x1,2112]
+ str x0, [x29,96]
+ str w25, [x22,8]
+ str w25, [x22,12]
+ ldrh w0, [x19]
+ strh w0, [x22,2]
+ strh wzr, [x22]
+ ldr x22, [x1,2112]
+ ldr w0, [x1,200]
+ str w0, [x22,4]
+ add w0, w0, 1
+ cmn w0, #1
+ csel w0, w0, wzr, ne
+ str w0, [x1,200]
+ add x0, x29, 80
+ mov w1, 1
+ bl FlashProgPages
+ ldrh w0, [x19]
+ bl decrement_vpc_count
+ b .L2003
+.L2004:
+ add x20, x20, :lo12:.LANCHOR2
+ ldrh w0, [x19]
+ ldrh w3, [x19,4]
+ lsl x0, x0, 1
+ ldr x2, [x20,-40]
+ ldrh w1, [x2,x0]
+ sub w1, w1, w3
+ strh w1, [x2,x0]
+ add x0, x21, :lo12:.LANCHOR0
+ strb wzr, [x19,6]
+ strh wzr, [x19,4]
+ ldr x1, [x29,136]
+ ldrh w0, [x0,2026]
+ strh w0, [x19,2]
+ ldr x0, [x26,#:lo12:__stack_chk_guard]
+ cmp x1, x0
+ beq .L2008
+ bl __stack_chk_fail
+.L2008:
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
+ ldp x29, x30, [sp], 144
+ ret
+ .size FtlSuperblockPowerLostFix, .-FtlSuperblockPowerLostFix
+ .align 2
.global ftl_map_blk_gc
.type ftl_map_blk_gc, %function
ftl_map_blk_gc:
- stp x29, x30, [sp, -96]!
+ stp x29, x30, [sp, -80]!
add x29, sp, 0
stp x19, x20, [sp,16]
stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
mov x19, x0
- adrp x22, :got:c_ftl_nand_page_pre_slc_blk
+ adrp x22, .LANCHOR0
ldr x20, [x0,16]
- ldr x24, [x0,40]
+ ldr x23, [x0,40]
bl ftl_free_no_use_map_blk
ldrh w1, [x19,10]
ldrh w2, [x19,8]
sub w1, w1, #1
cmp w2, w1
- blt .L1846
+ blt .L2015
ubfiz x1, x0, 1, 16
- ldrh w23, [x20,x1]
- cbz w23, .L1846
+ ldrh w24, [x20,x1]
+ cbz w24, .L2015
ldr w0, [x19,52]
- cbnz w0, .L1846
+ cbnz w0, .L2015
mov w2, 1
str w2, [x19,52]
strh w0, [x20,x1]
ldrh w1, [x19,2]
sub w0, w0, #1
strh w0, [x19,8]
- ldr x0, [x22, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w0, [x0]
+ add x0, x22, :lo12:.LANCHOR0
+ ldrh w0, [x0,2028]
cmp w1, w0
- bcc .L1847
+ bcc .L2016
mov x0, x19
bl ftl_map_blk_alloc_new_blk
-.L1847:
- mov w20, 0
- adrp x25, :got:req_sys
- adrp x26, :got:p_sys_data_buf_1
- adrp x27, :got:p_sys_spare_buf
-.L1848:
+.L2016:
+ adrp x20, .LANCHOR4
+ mov w21, 0
+ add x20, x20, :lo12:.LANCHOR4
+ adrp x26, .LANCHOR2
+ add x20, x20, 136
+.L2017:
ldrh w0, [x19,6]
- cmp w0, w20
- bls .L1856
- ubfiz x28, x20, 2, 16
- ldr w0, [x24,x28]
- cmp w23, w0, lsr 10
- bne .L1849
- ldr x0, [x26, #:got_lo12:p_sys_data_buf_1]
+ cmp w0, w21
+ bls .L2025
+ ubfiz x25, x21, 2, 16
+ ldr w0, [x23,x25]
+ cmp w24, w0, lsr 10
+ bne .L2018
+ add x0, x26, :lo12:.LANCHOR2
+ ldr x1, [x0,2072]
+ ldr x0, [x0,2112]
+ str x1, [x20,8]
mov w1, 1
- ldr x21, [x25, #:got_lo12:req_sys]
+ str x0, [x20,16]
mov w2, w1
- ldr x0, [x0]
- str x0, [x21,8]
- ldr x0, [x27, #:got_lo12:p_sys_spare_buf]
- ldr x0, [x0]
- str x0, [x21,16]
- ldr w0, [x24,x28]
- str w0, [x21,4]
- mov x0, x21
+ ldr w0, [x23,x25]
+ str w0, [x20,4]
+ mov x0, x20
bl FlashReadPages
- ldr w0, [x21]
+ ldr w0, [x20]
cmn w0, #1
- bne .L1850
- str wzr, [x24,x28]
- b .L1849
-.L1850:
- ldr x2, [x21,8]
+ bne .L2019
+ str wzr, [x23,x25]
+ b .L2018
+.L2019:
+ ldr x2, [x20,8]
mov x0, x19
- mov w1, w20
+ mov w1, w21
bl FtlMapWritePage
-.L1849:
- add w20, w20, 1
- uxth w20, w20
- b .L1848
-.L1856:
- mov w0, w23
+.L2018:
+ add w21, w21, 1
+ uxth w21, w21
+ b .L2017
+.L2025:
+ mov w0, w24
mov w1, 1
bl FtlFreeSysBlkQueueIn
str wzr, [x19,52]
-.L1846:
- ldr x22, [x22, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
+.L2015:
+ add x22, x22, :lo12:.LANCHOR0
ldrh w1, [x19,2]
- ldrh w0, [x22]
+ ldrh w0, [x22,2028]
cmp w1, w0
- bcc .L1852
+ bcc .L2021
mov x0, x19
bl ftl_map_blk_alloc_new_blk
-.L1852:
+.L2021:
mov w0, 0
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 96
+ ldp x29, x30, [sp], 80
ret
.size ftl_map_blk_gc, .-ftl_map_blk_gc
.align 2
ldr x23, [x0,40]
ldrh w0, [x0]
cmp w0, w1
- bne .L1858
+ bne .L2027
ldrh w0, [x19,8]
add w0, w0, 1
strh w0, [x19,8]
strh wzr, [x19]
add w0, w0, 1
str w0, [x19,48]
- b .L1859
-.L1858:
+ b .L2028
+.L2027:
ubfiz x0, x0, 1, 16
- ldrh w1, [x19,2]
- adrp x21, :got:p_sys_data_buf
+ adrp x21, .LANCHOR2
+ add x3, x21, :lo12:.LANCHOR2
ldrh w22, [x20,x0]
- adrp x20, :got:req_sys
- ldr x0, [x20, #:got_lo12:req_sys]
- orr w1, w1, w22, lsl 10
+ adrp x20, .LANCHOR4
+ ldrh w0, [x19,2]
+ add x1, x20, :lo12:.LANCHOR4
+ orr w0, w0, w22, lsl 10
+ str w0, [x1,140]
+ ldr x0, [x3,-64]
+ str x0, [x1,144]
+ ldr x0, [x3,2112]
+ str x0, [x1,152]
+ ldr w1, [x19,48]
str w1, [x0,4]
- ldr x3, [x21, #:got_lo12:p_sys_data_buf]
- ldr x1, [x3]
- str x1, [x0,8]
- adrp x1, :got:p_sys_spare_buf
- ldr x1, [x1, #:got_lo12:p_sys_spare_buf]
- ldr x1, [x1]
- str x1, [x0,16]
- ldr w0, [x19,48]
- str w0, [x1,4]
- mov w0, -1291
- strh w0, [x1,8]
- ldrh w0, [x19,4]
- strh w0, [x1]
- adrp x0, :got:c_ftl_nand_page_pre_slc_blk
- strh w22, [x1,2]
+ mov w1, -1291
+ strh w1, [x0,8]
+ ldrh w1, [x19,4]
+ strh w1, [x0]
mov w1, 255
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w2, [x0]
- ldr x0, [x3]
+ strh w22, [x0,2]
+ adrp x0, .LANCHOR0+2028
+ ldrh w2, [x0,#:lo12:.LANCHOR0+2028]
+ ldr x0, [x3,-64]
lsl w2, w2, 3
bl ftl_memset
- mov w2, 0
- mov w1, w2
-.L1860:
- ldrh w0, [x19,6]
- cmp w0, w1
- bls .L1863
+ mov w0, 0
+ mov w1, w0
+.L2029:
+ ldrh w2, [x19,6]
+ cmp w2, w1
+ bls .L2032
ubfiz x4, x1, 2, 16
- ldr w0, [x23,x4]
- cmp w22, w0, lsr 10
- bne .L1861
- ldr x3, [x21, #:got_lo12:p_sys_data_buf]
- add w2, w2, 1
- uxth w2, w2
- ldr x5, [x3]
- ubfiz x0, x2, 3, 16
- str w1, [x5,x0]
- ldr x3, [x3]
+ ldr w2, [x23,x4]
+ cmp w22, w2, lsr 10
+ bne .L2030
+ add x3, x21, :lo12:.LANCHOR2
+ add w0, w0, 1
+ uxth w0, w0
+ ldr x5, [x3,-64]
+ ubfiz x2, x0, 3, 16
+ str w1, [x5,x2]
+ ldr x3, [x3,-64]
ldr w4, [x23,x4]
- add x0, x3, x0
- str w4, [x0,4]
-.L1861:
+ add x2, x3, x2
+ str w4, [x2,4]
+.L2030:
add w1, w1, 1
uxth w1, w1
- b .L1860
-.L1863:
+ b .L2029
+.L2032:
mov w1, 1
- ldr x0, [x20, #:got_lo12:req_sys]
+ add x0, x20, :lo12:.LANCHOR4
+ add x0, x0, 136
mov w2, w1
mov w3, 0
bl FlashProgPages
strh w0, [x19,2]
mov x0, x19
bl ftl_map_blk_gc
-.L1859:
+.L2028:
mov w0, 0
ldr x23, [sp,48]
ldp x19, x20, [sp,16]
FtlMapWritePage:
stp x29, x30, [sp, -96]!
add x29, sp, 0
+ stp x19, x20, [sp,16]
+ adrp x20, .LANCHOR4
+ str x27, [sp,80]
stp x21, x22, [sp,32]
+ add x20, x20, :lo12:.LANCHOR4
+ adrp x22, .LANCHOR2
stp x23, x24, [sp,48]
stp x25, x26, [sp,64]
- stp x19, x20, [sp,16]
- stp x27, x28, [sp,80]
mov x19, x0
mov w21, w1
- mov x22, x2
- adrp x23, :got:g_totle_l2p_write_count
- adrp x24, :got:c_ftl_nand_page_pre_slc_blk
- mov w25, 65535
- adrp x26, :got:req_sys
- adrp x27, :got:p_sys_spare_buf
-.L1870:
- ldr x1, [x23, #:got_lo12:g_totle_l2p_write_count]
- ldr w0, [x1]
+ mov x23, x2
+ adrp x24, .LANCHOR0
+ mov x25, x22
+ mov w26, 65535
+ add x20, x20, 136
+.L2039:
+ add x1, x22, :lo12:.LANCHOR2
+ ldr w0, [x1,180]
add w0, w0, 1
- str w0, [x1]
- ldr x0, [x24, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
+ str w0, [x1,180]
+ add x0, x24, :lo12:.LANCHOR0
ldrh w1, [x19,2]
- ldrh w0, [x0]
+ ldrh w0, [x0,2028]
sub w0, w0, #1
cmp w1, w0
- bge .L1865
+ bge .L2034
ldrh w0, [x19]
- cmp w0, w25
- bne .L1866
-.L1865:
+ cmp w0, w26
+ bne .L2035
+.L2034:
mov x0, x19
bl Ftl_write_map_blk_to_last_page
-.L1866:
+.L2035:
ldrh w1, [x19]
mov w2, 16
ldr x0, [x19,16]
- ldr x20, [x26, #:got_lo12:req_sys]
- ldrh w28, [x0,x1,lsl 1]
+ ldrh w27, [x0,x1,lsl 1]
mov w1, 0
ldrh w0, [x19,2]
- str x22, [x20,8]
- orr w0, w0, w28, lsl 10
+ str x23, [x20,8]
+ orr w0, w0, w27, lsl 10
str w0, [x20,4]
- ldr x0, [x27, #:got_lo12:p_sys_spare_buf]
- ldr x0, [x0]
+ add x0, x25, :lo12:.LANCHOR2
+ ldr x0, [x0,2112]
str x0, [x20,16]
bl ftl_memset
ldr x0, [x20,16]
ldrh w1, [x19,4]
strh w1, [x0]
mov w1, 1
- strh w28, [x0,2]
+ strh w27, [x0,2]
mov w2, w1
mov x0, x20
mov w3, w1
uxth w0, w0
strh w0, [x19,2]
cmp w0, 1
- beq .L1870
+ beq .L2039
ldr w0, [x20]
cmn w0, #1
- beq .L1870
+ beq .L2039
ldr x0, [x19,40]
ldr w1, [x20,4]
str w1, [x0,w21,uxtw 2]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
+ ldr x27, [sp,80]
ldp x29, x30, [sp], 96
ret
.size FtlMapWritePage, .-FtlMapWritePage
stp x29, x30, [sp, -32]!
add x29, sp, 0
stp x19, x20, [sp,16]
- adrp x20, :got:p_l2p_ram_map
+ adrp x20, .LANCHOR2
ubfiz x19, x0, 4, 16
- adrp x0, :got:gL2pMapInfo
- ldr x20, [x20, #:got_lo12:p_l2p_ram_map]
- ldr x0, [x0, #:got_lo12:gL2pMapInfo]
- ldr x1, [x20]
+ add x20, x20, :lo12:.LANCHOR2
+ add x0, x20, 2240
+ ldr x1, [x20,144]
add x2, x1, x19
ldrh w1, [x1,x19]
ldr x2, [x2,8]
bl FtlMapWritePage
- ldr x0, [x20]
+ ldr x0, [x20,144]
add x19, x0, x19
ldr w0, [x19,4]
and w0, w0, 2147483647
.global log2phys
.type log2phys, %function
log2phys:
- stp x29, x30, [sp, -80]!
+ stp x29, x30, [sp, -96]!
+ adrp x5, .LANCHOR0
mov x4, 1
+ add x5, x5, :lo12:.LANCHOR0
add x29, sp, 0
stp x21, x22, [sp,32]
- mov x21, x1
- adrp x1, :got:c_ftl_nand_sec_pre_page_shift
stp x23, x24, [sp,48]
stp x19, x20, [sp,16]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_sec_pre_page_shift]
- adrp x23, :got:p_l2p_ram_map
+ str x25, [sp,64]
+ adrp x23, .LANCHOR2
+ mov x21, x1
+ add x1, x23, :lo12:.LANCHOR2
+ ldrh w3, [x5,2034]
mov w22, w2
- ldrh w3, [x1]
- ldr x1, [x23, #:got_lo12:p_l2p_ram_map]
add w3, w3, 7
+ ldr x25, [x1,144]
lsr w20, w0, w3
lsl x3, x4, x3
sub w3, w3, #1
- ldr x1, [x1]
+ mov x4, 0
and w0, w3, w0
uxth w20, w20
- mov x4, 0
uxth x24, w0
- adrp x0, :got:c_ftl_nand_l2pmap_ram_region_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_l2pmap_ram_region_num]
- ldrh w0, [x0]
-.L1875:
+ ldrh w0, [x5,2066]
+.L2044:
uxth x19, w4
cmp w19, w0
- bcs .L1887
+ bcs .L2056
add x4, x4, 1
- add x2, x1, x4, lsl 4
- ldrh w2, [x2,-16]
- cmp w2, w20
- bne .L1875
-.L1876:
- cbnz w22, .L1877
- ldr x0, [x23, #:got_lo12:p_l2p_ram_map]
- ldr x1, [x0]
+ add x1, x25, x4, lsl 4
+ ldrh w1, [x1,-16]
+ cmp w1, w20
+ bne .L2044
+.L2045:
+ cbnz w22, .L2046
+ add x0, x23, :lo12:.LANCHOR2
+ ldr x1, [x0,144]
add x1, x1, x19, lsl 4
ldr x0, [x1,8]
ldr w0, [x0,x24,lsl 2]
str w0, [x21]
- b .L1878
-.L1877:
- ldr x2, [x23, #:got_lo12:p_l2p_ram_map]
+ b .L2047
+.L2046:
+ add x1, x23, :lo12:.LANCHOR2
lsl x0, x19, 4
ldr w3, [x21]
- ldr x1, [x2]
- add x1, x1, x0
- ldr x1, [x1,8]
- str w3, [x1,x24,lsl 2]
- ldr x1, [x2]
- add x0, x1, x0
- ldr w1, [x0,4]
- orr w1, w1, -2147483648
- str w1, [x0,4]
- adrp x0, :got:g_l2p_last_update_region_id
- ldr x0, [x0, #:got_lo12:g_l2p_last_update_region_id]
- strh w20, [x0]
-.L1878:
- ldr x23, [x23, #:got_lo12:p_l2p_ram_map]
- ldr x0, [x23]
+ ldr x2, [x1,144]
+ add x2, x2, x0
+ ldr x2, [x2,8]
+ str w3, [x2,x24,lsl 2]
+ strh w20, [x1,152]
+ ldr x2, [x1,144]
+ add x0, x2, x0
+ ldr w2, [x0,4]
+ orr w2, w2, -2147483648
+ str w2, [x0,4]
+.L2047:
+ add x23, x23, :lo12:.LANCHOR2
+ ldr x0, [x23,144]
add x19, x0, x19, lsl 4
ldr w0, [x19,4]
cmn w0, #1
- beq .L1884
+ beq .L2053
add w0, w0, 1
str w0, [x19,4]
- b .L1884
-.L1887:
+ b .L2053
+.L2056:
bl select_l2p_ram_region
uxth x19, w0
- ldr x3, [x23, #:got_lo12:p_l2p_ram_map]
ubfiz x2, x19, 4, 16
mov w1, w0
- ldr x3, [x3]
- add x4, x3, x2
- ldrh w3, [x3,x2]
+ add x3, x25, x2
+ ldrh w4, [x25,x2]
mov w2, 65535
- cmp w3, w2
- beq .L1881
- ldr w2, [x4,4]
- tbz w2, #31, .L1881
- str x1, [x29,72]
+ cmp w4, w2
+ beq .L2050
+ ldr w2, [x3,4]
+ tbz w2, #31, .L2050
+ str x1, [x29,88]
bl flush_l2p_region
- ldr x1, [x29,72]
-.L1881:
+ ldr x1, [x29,88]
+.L2050:
mov w0, w20
bl load_l2p_region
- b .L1876
-.L1884:
+ b .L2045
+.L2053:
mov w0, 0
+ ldr x25, [sp,64]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
- ldp x29, x30, [sp], 80
+ ldp x29, x30, [sp], 96
ret
.size log2phys, .-log2phys
.align 2
.global FtlReUsePrevPpa
.type FtlReUsePrevPpa, %function
FtlReUsePrevPpa:
- stp x29, x30, [sp, -80]!
+ stp x29, x30, [sp, -64]!
add x29, sp, 0
stp x19, x20, [sp,16]
mov w20, w0
- lsr w0, w1, 10
+ lsr x0, x1, 10
stp x21, x22, [sp,32]
- str x23, [sp,48]
- str w1, [x29,76]
+ str w1, [x29,60]
+ adrp x21, .LANCHOR2
bl P2V_block_in_plane
- uxth w4, w0
- adrp x0, :got:p_valid_page_count_table
- ubfiz x22, x4, 1, 16
- mov x23, x0
- ldr x1, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x2, [x1]
- ldrh w1, [x2,x22]
- cbnz w1, .L1889
- adrp x0, :got:p_free_data_block_list_head
- ldr x2, [x0, #:got_lo12:p_free_data_block_list_head]
- ldr x19, [x2]
- cbz x19, .L1890
- adrp x2, :got:g_num_free_superblocks
- mov x6, -6148914691236517206
- mov x21, x2
- ldr x3, [x2, #:got_lo12:g_num_free_superblocks]
- mov w2, 6
- ldrh w5, [x3]
- adrp x3, :got:p_data_block_list_table
- ldr x3, [x3, #:got_lo12:p_data_block_list_table]
- ldr x3, [x3]
- sub x19, x19, x3
+ uxth w0, w0
+ add x2, x21, :lo12:.LANCHOR2
+ ubfiz x22, x0, 1, 16
+ ldr x3, [x2,-40]
+ ldrh w1, [x3,x22]
+ cbnz w1, .L2058
+ ldr x19, [x2,-16]
+ cbz x19, .L2059
+ ldrh w3, [x2,-8]
+ mov x4, -6148914691236517206
+ ldr x2, [x2,-56]
+ mov w5, 65535
+ sub x19, x19, x2
asr x19, x19, 1
- madd x19, x6, x19, x19
- mov w6, 65535
+ madd x19, x4, x19, x19
+ mov w4, 6
uxth w19, w19
-.L1891:
- cmp w1, w5
- beq .L1890
- cmp w19, w4
- bne .L1892
- ldr x0, [x0, #:got_lo12:p_free_data_block_list_head]
+.L2060:
+ cmp w1, w3
+ beq .L2059
+ cmp w19, w0
+ bne .L2061
+ add x21, x21, :lo12:.LANCHOR2
mov w1, w19
+ sub x0, x21, #16
bl List_remove_node
- ldr x0, [x21, #:got_lo12:g_num_free_superblocks]
- ldrh w1, [x0]
- sub w1, w1, #1
- strh w1, [x0]
+ ldrh w0, [x21,-8]
+ sub w0, w0, #1
+ strh w0, [x21,-8]
mov w0, w19
bl INSERT_DATA_LIST
- ldr x0, [x23, #:got_lo12:p_valid_page_count_table]
- ldr x1, [x0]
+ ldr x1, [x21,-40]
ldrh w0, [x1,x22]
add w0, w0, 1
strh w0, [x1,x22]
- b .L1890
-.L1892:
- umull x19, w19, w2
- ldrh w19, [x3,x19]
- cmp w19, w6
- beq .L1890
+ b .L2059
+.L2061:
+ umull x19, w19, w4
+ ldrh w19, [x2,x19]
+ cmp w19, w5
+ beq .L2059
add w1, w1, 1
uxth w1, w1
- b .L1891
-.L1889:
+ b .L2060
+.L2058:
add w1, w1, 1
- strh w1, [x2,x22]
-.L1890:
- add x1, x29, 76
+ strh w1, [x3,x22]
+.L2059:
+ add x1, x29, 60
mov w0, w20
mov w2, 1
bl log2phys
- ldr x23, [sp,48]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
- ldp x29, x30, [sp], 80
+ ldp x29, x30, [sp], 64
ret
.size FtlReUsePrevPpa, .-FtlReUsePrevPpa
.align 2
stp x29, x30, [sp, -144]!
mov w1, 0
add x29, sp, 0
+ stp x27, x28, [sp,80]
+ mov x27, x0
+ stp x23, x24, [sp,48]
stp x25, x26, [sp,64]
- mov x26, x0
stp x19, x20, [sp,16]
stp x21, x22, [sp,32]
- stp x23, x24, [sp,48]
- stp x27, x28, [sp,80]
- ldrh w23, [x26,6]
- adrp x20, :got:p_sys_data_buf
- ldr x0, [x0,40]
- adrp x19, :got:req_sys
- lsl w2, w23, 2
- ldrh w24, [x26,8]
- str x0, [x29,136]
- mov w27, 0
- ldr x22, [x26,16]
- ldr x25, [x26,24]
+ ldrh w22, [x27,6]
+ adrp x19, .LANCHOR2
+ ldr x20, [x0,40]
+ mov w25, 0
+ ldr x21, [x0,16]
+ lsl w2, w22, 2
+ ldr x0, [x0,24]
+ adrp x24, .LANCHOR0
+ str x0, [x29,128]
+ mov x0, x20
+ ldrh w23, [x27,8]
bl ftl_memset
- ldr x0, [x20, #:got_lo12:p_sys_data_buf]
- ldr x1, [x19, #:got_lo12:req_sys]
- ldr x0, [x0]
- str x0, [x1,8]
- adrp x0, :got:p_sys_spare_buf
- ldr x0, [x0, #:got_lo12:p_sys_spare_buf]
- str wzr, [x26,52]
- str wzr, [x26,48]
- ldr x21, [x0]
- mov w0, -1
- str x21, [x1,16]
- strh w0, [x26]
- strh w0, [x26,2]
- mov w0, 1
- str w0, [x26,56]
- sub w0, w24, #1
- str w0, [x29,132]
-.L1898:
- cmp w27, w24
- bge .L1915
- ldr w0, [x29,132]
- sxtw x28, w27
- cmp w27, w0
- bne .L1899
+ str x19, [x29,136]
+ add x1, x19, :lo12:.LANCHOR2
+ adrp x0, .LANCHOR4
+ add x4, x0, :lo12:.LANCHOR4
+ str x0, [x29,120]
+ add x4, x4, 136
+ sub w0, w23, #1
+ ldr x2, [x1,-64]
+ ldr x26, [x1,2112]
+ mov w1, -1
+ str x2, [x4,8]
+ str x26, [x4,16]
+ mov x19, x4
+ strh w1, [x27]
+ strh w1, [x27,2]
+ mov w1, 1
+ str wzr, [x27,52]
+ str wzr, [x27,48]
+ str w1, [x27,56]
+ str w0, [x29,116]
+.L2067:
+ cmp w25, w23
+ bge .L2084
+ ldr w0, [x29,116]
+ sxtw x28, w25
+ cmp w25, w0
+ bne .L2068
lsl x0, x28, 1
mov w1, 1
- add x20, x22, x0
- ldrh w0, [x22,x0]
- mov w22, 0
+ add x23, x21, x0
+ ldrh w0, [x21,x0]
+ mov w21, 0
bl FtlGetLastWrittenPage
- strh w27, [x26]
- sxth w1, w0
+ sxth w24, w0
add w0, w0, 1
- strh w0, [x26,2]
- ldr w0, [x25,x28,lsl 2]
- add w25, w1, 1
- str w0, [x26,48]
- ldr x0, [x19, #:got_lo12:req_sys]
- str xzr, [x0,8]
-.L1900:
- cmp w22, w25
- bge .L1915
- ldrh w0, [x20]
+ strh w0, [x27,2]
+ ldr x0, [x29,128]
+ add w24, w24, 1
+ strh w25, [x27]
+ ldr w0, [x0,x28,lsl 2]
+ str w0, [x27,48]
+ ldr x0, [x29,120]
+ add x19, x0, :lo12:.LANCHOR4
+ add x19, x19, 136
+ str xzr, [x19,8]
+.L2069:
+ cmp w21, w24
+ bge .L2084
+ ldrh w0, [x23]
mov w1, 1
- ldr x24, [x19, #:got_lo12:req_sys]
mov w2, w1
- orr w0, w22, w0, lsl 10
- str w0, [x24,4]
- mov x0, x24
+ orr w0, w21, w0, lsl 10
+ str w0, [x19,4]
+ mov x0, x19
bl FlashReadPages
- ldr w0, [x24]
+ ldr w0, [x19]
cmn w0, #1
- beq .L1901
- ldrh w1, [x21,8]
- cmp w1, w23
- bcs .L1901
- ldrh w2, [x21]
- ldrh w0, [x26,4]
- cmp w2, w0
- bne .L1901
- ubfiz x1, x1, 2, 16
- ldr x2, [x29,136]
- ldr w0, [x24,4]
- str w0, [x2,x1]
-.L1901:
- add w22, w22, 1
- sxth w22, w22
- b .L1900
-.L1915:
- mov x0, x26
+ beq .L2070
+ ldrh w0, [x26,8]
+ cmp w0, w22
+ bcs .L2070
+ ldrh w2, [x26]
+ ldrh w1, [x27,4]
+ cmp w2, w1
+ bne .L2070
+ ubfiz x0, x0, 2, 16
+ ldr w1, [x19,4]
+ str w1, [x20,x0]
+.L2070:
+ add w21, w21, 1
+ sxth w21, w21
+ b .L2069
+.L2084:
+ mov x0, x27
bl ftl_free_no_use_map_blk
- adrp x0, :got:c_ftl_nand_page_pre_slc_blk
- ldrh w1, [x26,2]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w0, [x0]
+ adrp x0, .LANCHOR0+2028
+ ldrh w1, [x27,2]
+ ldrh w0, [x0,#:lo12:.LANCHOR0+2028]
cmp w1, w0
- bne .L1904
- mov x0, x26
+ bne .L2073
+ mov x0, x27
bl ftl_map_blk_alloc_new_blk
- b .L1904
-.L1899:
- ldr x0, [x20, #:got_lo12:p_sys_data_buf]
- lsl x1, x28, 1
- ldr x6, [x19, #:got_lo12:req_sys]
- add x28, x22, x1
- str x6, [x29,120]
- ldr x0, [x0]
- str x0, [x6,8]
- adrp x0, :got:c_ftl_nand_page_pre_slc_blk
- ldrh w1, [x22,x1]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w0, [x0]
+ b .L2073
+.L2068:
+ ldr x0, [x29,136]
+ add x0, x0, :lo12:.LANCHOR2
+ ldr x0, [x0,-64]
+ str x0, [x19,8]
+ lsl x0, x28, 1
+ add x28, x21, x0
+ ldrh w1, [x21,x0]
+ add x0, x24, :lo12:.LANCHOR0
+ ldrh w0, [x0,2028]
sub w0, w0, #1
orr w0, w0, w1, lsl 10
mov w1, 1
- str w0, [x6,4]
+ str w0, [x19,4]
mov w2, w1
- mov x0, x6
+ mov x0, x19
bl FlashReadPages
- ldr x6, [x29,120]
- adrp x8, :got:c_ftl_nand_page_pre_slc_blk
- ldr w0, [x6]
+ ldr w0, [x19]
cmn w0, #1
- beq .L1905
- ldrh w1, [x21]
- ldrh w0, [x26,4]
+ beq .L2074
+ ldrh w1, [x26]
+ ldrh w0, [x27,4]
cmp w1, w0
- bne .L1905
- ldrh w0, [x21,8]
- mov w1, 64245
- cmp w0, w1
- bne .L1905
+ bne .L2074
+ ldrh w1, [x26,8]
+ mov w0, 64245
+ cmp w1, w0
+ bne .L2074
mov w0, 0
-.L1906:
- ldr x1, [x8, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w1, [x1]
+.L2075:
+ adrp x1, .LANCHOR0
+ add x1, x1, :lo12:.LANCHOR0
+ ldrh w1, [x1,2028]
sub w1, w1, #1
cmp w0, w1
- bge .L1909
- ldr x1, [x20, #:got_lo12:p_sys_data_buf]
+ bge .L2078
+ ldr x1, [x29,136]
sbfiz x2, x0, 3, 32
- ldr x6, [x1]
- ldrh w1, [x6,x2]
- cmp w1, w23
- bcs .L1907
- add x2, x6, x2
+ add x1, x1, :lo12:.LANCHOR2
+ ldr x5, [x1,-64]
+ ldrh w1, [x5,x2]
+ cmp w1, w22
+ bcs .L2076
+ add x2, x5, x2
ubfiz x1, x1, 2, 16
- ldr x3, [x29,136]
ldr w2, [x2,4]
- str w2, [x3,x1]
-.L1907:
+ str w2, [x20,x1]
+.L2076:
add w0, w0, 1
sxth w0, w0
- b .L1906
-.L1905:
- ldr x0, [x19, #:got_lo12:req_sys]
- mov w6, 0
- str xzr, [x0,8]
-.L1910:
- ldr x0, [x8, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w0, [x0]
- cmp w6, w0
- bge .L1909
+ b .L2075
+.L2074:
+ str xzr, [x19,8]
+ mov w5, 0
+.L2079:
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrh w0, [x0,2028]
+ cmp w5, w0
+ bge .L2078
ldrh w0, [x28]
mov w1, 1
- ldr x7, [x19, #:got_lo12:req_sys]
mov w2, w1
- str x8, [x29,104]
- orr w0, w6, w0, lsl 10
- str x6, [x29,112]
- str w0, [x7,4]
- mov x0, x7
- str x7, [x29,120]
+ str x5, [x29,104]
+ orr w0, w5, w0, lsl 10
+ str w0, [x19,4]
+ mov x0, x19
bl FlashReadPages
- ldr x7, [x29,120]
- ldr x6, [x29,112]
- ldr x8, [x29,104]
- ldr w0, [x7]
+ ldr w0, [x19]
+ ldr x5, [x29,104]
cmn w0, #1
- beq .L1911
- ldrh w1, [x21,8]
- cmp w1, w23
- bcs .L1911
- ldrh w2, [x21]
- ldrh w0, [x26,4]
- cmp w2, w0
- bne .L1911
- ubfiz x1, x1, 2, 16
- ldr x2, [x29,136]
- ldr w0, [x7,4]
- str w0, [x2,x1]
-.L1911:
- add w6, w6, 1
- sxth w6, w6
- b .L1910
-.L1909:
- add w4, w27, 1
- sxth w27, w4
- b .L1898
-.L1904:
- ldrh w1, [x26,8]
- ldrh w0, [x26,10]
+ beq .L2080
+ ldrh w0, [x26,8]
+ cmp w0, w22
+ bcs .L2080
+ ldrh w2, [x26]
+ ldrh w1, [x27,4]
+ cmp w2, w1
+ bne .L2080
+ ubfiz x0, x0, 2, 16
+ ldr w1, [x19,4]
+ str w1, [x20,x0]
+.L2080:
+ add w5, w5, 1
+ sxth w5, w5
+ b .L2079
+.L2078:
+ add w6, w25, 1
+ sxth w25, w6
+ b .L2067
+.L2073:
+ ldrh w1, [x27,8]
+ ldrh w0, [x27,10]
cmp w1, w0
- bcc .L1916
- mov x0, x26
+ bcc .L2085
+ mov x0, x27
bl ftl_map_blk_gc
-.L1916:
+.L2085:
mov w0, 0
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
.global FtlLoadVonderInfo
.type FtlLoadVonderInfo, %function
FtlLoadVonderInfo:
- adrp x1, :got:c_ftl_nand_max_vendor_blks
- adrp x0, :got:gVendorBlkInfo
+ adrp x0, .LANCHOR4
+ adrp x1, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR4
+ add x1, x1, :lo12:.LANCHOR0
stp x29, x30, [sp, -16]!
+ add x0, x0, 200
add x29, sp, 0
- ldr x1, [x1, #:got_lo12:c_ftl_nand_max_vendor_blks]
- ldr x0, [x0, #:got_lo12:gVendorBlkInfo]
- ldrh w1, [x1]
- strh w1, [x0,10]
- mov w1, -3962
- strh w1, [x0,4]
- adrp x1, :got:g_totle_vendor_block
- ldr x1, [x1, #:got_lo12:g_totle_vendor_block]
- ldrh w1, [x1]
- strh w1, [x0,8]
- adrp x1, :got:c_ftl_nand_vendor_region_num
- ldr x1, [x1, #:got_lo12:c_ftl_nand_vendor_region_num]
- ldrh w1, [x1]
- strh w1, [x0,6]
- adrp x1, :got:p_vendor_block_table
- ldr x1, [x1, #:got_lo12:p_vendor_block_table]
- ldr x1, [x1]
+ ldrh w2, [x1,2048]
+ strh w2, [x0,10]
+ mov w2, -3962
+ strh w2, [x0,4]
+ ldrh w2, [x1,2072]
+ strh w2, [x0,8]
+ ldrh w2, [x1,2050]
+ ldr x1, [x1,2080]
str x1, [x0,16]
- adrp x1, :got:p_vendor_block_ver_table
- ldr x1, [x1, #:got_lo12:p_vendor_block_ver_table]
- ldr x1, [x1]
- str x1, [x0,24]
- adrp x1, :got:p_vendor_block_valid_page_count
- ldr x1, [x1, #:got_lo12:p_vendor_block_valid_page_count]
- ldr x1, [x1]
- str x1, [x0,32]
- adrp x1, :got:p_vendor_region_ppn_table
- ldr x1, [x1, #:got_lo12:p_vendor_region_ppn_table]
- ldr x1, [x1]
+ adrp x1, .LANCHOR2
+ add x1, x1, :lo12:.LANCHOR2
+ strh w2, [x0,6]
+ ldr x2, [x1,2192]
+ str x2, [x0,24]
+ ldr x2, [x1,2184]
+ ldr x1, [x1,2200]
+ str x2, [x0,32]
str x1, [x0,40]
bl FtlMapTblRecovery
mov w0, 0
stp x29, x30, [sp, -16]!
add x29, sp, 0
bl FtlL2PDataInit
- adrp x0, :got:gL2pMapInfo
- ldr x0, [x0, #:got_lo12:gL2pMapInfo]
+ adrp x0, .LANCHOR2
+ add x0, x0, :lo12:.LANCHOR2
+ add x0, x0, 2240
bl FtlMapTblRecovery
mov w0, 0
ldp x29, x30, [sp], 16
.global FtlReadRefresh
.type FtlReadRefresh, %function
FtlReadRefresh:
- stp x29, x30, [sp, -128]!
+ stp x29, x30, [sp, -144]!
+ adrp x1, .LANCHOR2
add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x19, :got:g_sys_ext_data
- str x23, [sp,48]
stp x21, x22, [sp,32]
- ldr x1, [x19, #:got_lo12:g_sys_ext_data]
- ldr w0, [x1,80]
- cbz w0, .L1930
- adrp x0, :got:g_MaxLpn
- ldr w3, [x1,84]
- mov x20, x0
- ldr x2, [x0, #:got_lo12:g_MaxLpn]
- ldr w2, [x2]
- cmp w3, w2
- bcs .L1931
- mov w21, 2048
- add x23, x29, 68
-.L1936:
- ldr x22, [x19, #:got_lo12:g_sys_ext_data]
- ldr x1, [x20, #:got_lo12:g_MaxLpn]
- ldr w0, [x22,84]
- ldr w1, [x1]
+ adrp x21, __stack_chk_guard
+ str x23, [sp,48]
+ stp x19, x20, [sp,16]
+ adrp x20, .LANCHOR0
+ ldr x0, [x21,#:lo12:__stack_chk_guard]
+ str x0, [x29,136]
+ add x0, x1, :lo12:.LANCHOR2
+ add x2, x0, 352
+ ldr w3, [x2,80]
+ cbz w3, .L2099
+ add x1, x20, :lo12:.LANCHOR0
+ ldr w3, [x2,84]
+ ldr w1, [x1,2104]
+ cmp w3, w1
+ bcs .L2100
+ mov w22, 2048
+ mov x19, x0
+.L2105:
+ add x1, x20, :lo12:.LANCHOR0
+ ldr w0, [x19,436]
+ ldr w1, [x1,2104]
cmp w0, w1
- bcs .L1933
+ bcs .L2102
+ add x1, x29, 76
mov w2, 0
- mov x1, x23
bl log2phys
- ldr w0, [x22,84]
- ldr w2, [x29,68]
+ ldr w0, [x19,436]
+ ldr w1, [x29,76]
add w0, w0, 1
- str w0, [x22,84]
- cmn w2, #1
- beq .L1934
- str w2, [x29,76]
- mov w1, 1
- str w0, [x29,96]
+ str w0, [x19,436]
+ cmn w1, #1
+ beq .L2103
+ str w1, [x29,84]
mov w2, 0
- add x0, x29, 72
- str xzr, [x29,80]
+ str w0, [x29,104]
+ mov w1, 1
+ add x0, x29, 80
str xzr, [x29,88]
- str wzr, [x29,72]
+ str xzr, [x29,96]
+ str wzr, [x29,80]
bl FlashReadPages
- ldr w0, [x29,72]
+ ldr w0, [x29,80]
cmp w0, 256
- bne .L1933
- ldr w0, [x29,68]
- lsr w0, w0, 10
+ bne .L2102
+ ldr w0, [x29,76]
+ lsr x0, x0, 10
bl P2V_block_in_plane
bl FtlGcRefreshBlock
- b .L1933
-.L1934:
- subs w21, w21, #1
- bne .L1936
-.L1933:
+ b .L2102
+.L2103:
+ subs w22, w22, #1
+ bne .L2105
+.L2102:
mov w0, -1
- b .L1938
-.L1931:
- adrp x0, :got:g_totle_read_page_count
- str wzr, [x1,80]
- str wzr, [x1,84]
- ldr x0, [x0, #:got_lo12:g_totle_read_page_count]
- ldr w0, [x0]
- str w0, [x1,76]
- b .L1942
-.L1930:
- adrp x2, :got:g_max_erase_count
- ldr w1, [x1,76]
- ldr x2, [x2, #:got_lo12:g_max_erase_count]
- ldr w3, [x2]
- adrp x2, :got:g_inkDie_check_enable
- ldr x2, [x2, #:got_lo12:g_inkDie_check_enable]
- ldr w4, [x2]
- adrp x2, :got:g_totle_read_page_count
- ldr x2, [x2, #:got_lo12:g_totle_read_page_count]
- ldr w2, [x2]
- add w5, w2, 1048576
- cmp w1, w5
- bhi .L1939
- add w3, w4, w3, lsr 10
- mov w4, 33554432
- asr w3, w4, w3
- add w1, w3, w1
- cmp w1, w2
- bcs .L1938
-.L1939:
- ldr x0, [x19, #:got_lo12:g_sys_ext_data]
+ b .L2107
+.L2100:
+ ldr w0, [x0,164]
+ str wzr, [x2,80]
+ str wzr, [x2,84]
+ str w0, [x2,76]
+ b .L2114
+.L2099:
+ add x20, x20, :lo12:.LANCHOR0
+ ldr w3, [x0,216]
+ mov w2, 1048576
+ ldr w0, [x0,160]
+ ldrb w4, [x20,120]
+ cbnz w4, .L2108
+ add w2, w0, w3, lsr 10
+ mov w0, 33554432
+ asr w2, w0, w2
+.L2108:
+ add x3, x1, :lo12:.LANCHOR2
+ ldr w0, [x3,428]
+ ldr w3, [x3,164]
+ add w4, w3, 1048576
+ cmp w0, w4
+ bhi .L2109
+ add w2, w2, w0
+ mov w0, 0
+ cmp w2, w3
+ bcs .L2107
+.L2109:
+ add x0, x1, :lo12:.LANCHOR2
mov w1, 1
- str wzr, [x0,84]
- str w1, [x0,80]
- str w2, [x0,76]
-.L1942:
+ str wzr, [x0,436]
+ str w1, [x0,432]
+ str w3, [x0,428]
+.L2114:
mov w0, 0
-.L1938:
+.L2107:
+ ldr x2, [x29,136]
+ ldr x1, [x21,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2110
+ bl __stack_chk_fail
+.L2110:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldr x23, [sp,48]
- ldp x29, x30, [sp], 128
+ ldp x29, x30, [sp], 144
ret
.size FtlReadRefresh, .-FtlReadRefresh
.align 2
.global FtlVendorPartWrite
.type FtlVendorPartWrite, %function
FtlVendorPartWrite:
- stp x29, x30, [sp, -176]!
+ stp x29, x30, [sp, -192]!
add x29, sp, 0
stp x25, x26, [sp,64]
- mov w26, w0
- adrp x0, :got:c_ftl_nand_sec_pre_page_shift
- stp x19, x20, [sp,16]
+ adrp x25, __stack_chk_guard
+ mov x26, x2
+ stp x27, x28, [sp,80]
stp x23, x24, [sp,48]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sec_pre_page_shift]
- mov w25, w1
+ mov w28, w0
+ adrp x23, .LANCHOR0
+ ldr x0, [x25,#:lo12:__stack_chk_guard]
+ mov w27, w1
+ str x0, [x29,184]
+ add x0, x23, :lo12:.LANCHOR0
+ stp x19, x20, [sp,16]
stp x21, x22, [sp,32]
- stp x27, x28, [sp,80]
- add w1, w26, w1
- mov x23, x2
- ldrh w20, [x0]
- adrp x0, :got:c_ftl_vendor_part_size
- mov w19, -1
- ldr x0, [x0, #:got_lo12:c_ftl_vendor_part_size]
- ldrh w0, [x0]
+ add w1, w28, w1
+ str x25, [x29,120]
+ ldrh w21, [x0,2034]
+ mov w20, -1
+ ldrh w0, [x0,2020]
cmp w1, w0
- bhi .L1944
- lsr w20, w26, w20
- mov w19, 0
- adrp x24, :got:p_vendor_data_buf
- add x22, x29, 120
- adrp x28, :got:gVendorBlkInfo
-.L1945:
- cbz w25, .L1944
- adrp x0, :got:p_vendor_region_ppn_table
- ldr x0, [x0, #:got_lo12:p_vendor_region_ppn_table]
- ldr x0, [x0]
- ldr w2, [x0,w20,uxtw 2]
- adrp x0, :got:c_ftl_nand_sec_pre_page
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w1, [x0]
- uxth w0, w25
- udiv w21, w26, w1
- msub w21, w21, w1, w26
- sub w3, w1, w21
- uxth w27, w3
- cmp w27, w25
- csel w27, w0, w27, hi
- cmp w27, w1
- beq .L1947
- cbz w2, .L1947
- ldr x0, [x24, #:got_lo12:p_vendor_data_buf]
+ bhi .L2116
+ adrp x24, .LANCHOR4
+ lsr w21, w28, w21
+ add x24, x24, :lo12:.LANCHOR4
+ mov w20, 0
+ adrp x25, .LANCHOR2
+ add x24, x24, 200
+.L2117:
+ cbz w27, .L2116
+ add x2, x25, :lo12:.LANCHOR2
+ ldr x0, [x2,2200]
+ ldr w5, [x0,w21,uxtw 2]
+ add x0, x23, :lo12:.LANCHOR0
+ ldrh w1, [x0,2032]
+ uxth w0, w27
+ udiv w22, w28, w1
+ msub w22, w22, w1, w28
+ sub w19, w1, w22
+ uxth w19, w19
+ cmp w19, w27
+ csel w19, w0, w19, hi
+ cmp w19, w1
+ beq .L2119
+ cbz w5, .L2119
+ ldr x0, [x2,2080]
mov w1, 1
- str w2, [x22,4]
+ str x0, [x29,136]
mov w2, w1
- str xzr, [x22,16]
- ldr x0, [x0]
- str x0, [x22,8]
- mov x0, x22
+ add x0, x29, 128
+ str w5, [x29,132]
+ str xzr, [x29,144]
bl FlashReadPages
- b .L1948
-.L1947:
- adrp x1, :got:c_ftl_nand_byte_pre_page
- ldr x0, [x24, #:got_lo12:p_vendor_data_buf]
- ldr x2, [x1, #:got_lo12:c_ftl_nand_byte_pre_page]
+ b .L2120
+.L2119:
+ adrp x0, .LANCHOR2
+ add x2, x23, :lo12:.LANCHOR0
+ add x0, x0, :lo12:.LANCHOR2
mov w1, 0
- ldr x0, [x0]
- ldrh w2, [x2]
+ ldrh w2, [x2,2036]
+ ldr x0, [x0,2080]
bl ftl_memset
-.L1948:
- ldr x7, [x24, #:got_lo12:p_vendor_data_buf]
- lsl w6, w27, 9
- ubfiz x21, x21, 9, 16
- mov w2, w6
- mov x1, x23
+.L2120:
+ adrp x0, .LANCHOR2
+ lsl w5, w19, 9
+ add x6, x0, :lo12:.LANCHOR2
+ ubfiz x22, x22, 9, 16
+ mov w2, w5
+ mov x1, x26
+ str x5, [x29,112]
+ sub w27, w27, w19
+ ldr x0, [x6,2080]
+ add w28, w28, w19
str x6, [x29,104]
- ldr x0, [x7]
- sub w25, w25, w27
- str x7, [x29,96]
- add w26, w26, w27
- add x0, x0, x21
+ add x0, x0, x22
bl ftl_memcpy
- ldr x7, [x29,96]
- mov w1, w20
- ldr x0, [x28, #:got_lo12:gVendorBlkInfo]
- add w20, w20, 1
- ldr x2, [x7]
+ ldr x6, [x29,104]
+ mov w1, w21
+ mov x0, x24
+ add w21, w21, 1
+ ldr x2, [x6,2080]
bl FtlMapWritePage
cmn w0, #1
- ldr x6, [x29,104]
- csinv w19, w19, wzr, ne
- add x23, x23, x6, sxtw
- b .L1945
-.L1944:
- mov w0, w19
+ ldr x5, [x29,112]
+ csinv w20, w20, wzr, ne
+ add x26, x26, x5, sxtw
+ b .L2117
+.L2116:
+ ldr x1, [x29,120]
+ mov w0, w20
+ ldr x2, [x29,184]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2123
+ bl __stack_chk_fail
+.L2123:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 176
+ ldp x29, x30, [sp], 192
ret
.size FtlVendorPartWrite, .-FtlVendorPartWrite
.align 2
.global Ftl_save_ext_data
.type Ftl_save_ext_data, %function
Ftl_save_ext_data:
- adrp x2, :got:g_sys_ext_data
- mov w0, 19539
+ adrp x0, .LANCHOR2
+ mov w1, 19539
+ add x0, x0, :lo12:.LANCHOR2
+ movk w1, 0x4654, lsl 16
stp x29, x30, [sp, -16]!
- movk w0, 0x4654, lsl 16
+ add x2, x0, 352
add x29, sp, 0
- ldr x2, [x2, #:got_lo12:g_sys_ext_data]
- ldr w1, [x2]
- cmp w1, w0
- bne .L1958
- mov w0, 39
+ ldr w3, [x0,352]
+ cmp w3, w1
+ bne .L2131
+ mov w1, 54
+ movk w1, 0x5000, lsl 16
+ str w1, [x2,4]
+ ldr w1, [x0,188]
+ str w1, [x2,88]
+ ldr w1, [x0,192]
+ str w1, [x2,92]
+ ldr w1, [x0,184]
+ str w1, [x2,8]
+ ldr w1, [x0,172]
+ str w1, [x2,12]
+ ldr w1, [x0,164]
+ str w1, [x2,16]
+ ldr w1, [x0,180]
+ str w1, [x2,20]
+ ldr w1, [x0,208]
+ str w1, [x2,28]
+ ldr w1, [x0,-72]
+ str w1, [x2,32]
+ ldr w1, [x0,168]
+ str w1, [x2,36]
+ ldr w1, [x0,176]
+ str w1, [x2,40]
+ ldr w1, [x0,216]
+ str w1, [x2,44]
+ ldr w1, [x0,220]
+ str w1, [x2,48]
+ ldr w1, [x0,344]
+ ldr w0, [x0,2024]
+ str w1, [x2,60]
mov w1, 1
- movk w0, 0x5000, lsl 16
- str w0, [x2,4]
- adrp x0, :got:g_totle_write_sector
- ldr x0, [x0, #:got_lo12:g_totle_write_sector]
- ldr w0, [x0]
- str w0, [x2,88]
- adrp x0, :got:g_totle_read_sector
- ldr x0, [x0, #:got_lo12:g_totle_read_sector]
- ldr w0, [x0]
- str w0, [x2,92]
- adrp x0, :got:g_totle_gc_page_count
- ldr x0, [x0, #:got_lo12:g_totle_gc_page_count]
- ldr w0, [x0]
- str w0, [x2,8]
- adrp x0, :got:g_totle_write_page_count
- ldr x0, [x0, #:got_lo12:g_totle_write_page_count]
- ldr w0, [x0]
- str w0, [x2,12]
- adrp x0, :got:g_totle_read_page_count
- ldr x0, [x0, #:got_lo12:g_totle_read_page_count]
- ldr w0, [x0]
- str w0, [x2,16]
- adrp x0, :got:g_totle_l2p_write_count
- ldr x0, [x0, #:got_lo12:g_totle_l2p_write_count]
- ldr w0, [x0]
- str w0, [x2,20]
- adrp x0, :got:g_totle_slc_erase_count
- ldr x0, [x0, #:got_lo12:g_totle_slc_erase_count]
- ldr w0, [x0]
- str w0, [x2,28]
- adrp x0, :got:g_totle_sys_slc_erase_count
- ldr x0, [x0, #:got_lo12:g_totle_sys_slc_erase_count]
- ldr w0, [x0]
- str w0, [x2,32]
- adrp x0, :got:g_totle_discard_page_count
- ldr x0, [x0, #:got_lo12:g_totle_discard_page_count]
- ldr w0, [x0]
- str w0, [x2,36]
- adrp x0, :got:g_totle_cache_write_count
- ldr x0, [x0, #:got_lo12:g_totle_cache_write_count]
- ldr w0, [x0]
- str w0, [x2,40]
- adrp x0, :got:g_max_erase_count
- ldr x0, [x0, #:got_lo12:g_max_erase_count]
- ldr w0, [x0]
- str w0, [x2,44]
- adrp x0, :got:g_min_erase_count
- ldr x0, [x0, #:got_lo12:g_min_erase_count]
- ldr w0, [x0]
- str w0, [x2,48]
- adrp x0, :got:g_all_blk_used_slc_mode
- ldr x0, [x0, #:got_lo12:g_all_blk_used_slc_mode]
- ldr w0, [x0]
- str w0, [x2,60]
- adrp x0, :got:g_SlcPartLbaEndSector
- ldr x0, [x0, #:got_lo12:g_SlcPartLbaEndSector]
- ldr w0, [x0]
str w0, [x2,64]
mov w0, 0
bl FtlVendorPartWrite
-.L1958:
+.L2131:
ldp x29, x30, [sp], 16
ret
.size Ftl_save_ext_data, .-Ftl_save_ext_data
.global FtlEctTblFlush
.type FtlEctTblFlush, %function
FtlEctTblFlush:
- adrp x1, :got:g_inkDie_check_enable
+ adrp x2, .LANCHOR2
+ mov w1, 32
+ add x3, x2, :lo12:.LANCHOR2
stp x29, x30, [sp, -16]!
add x29, sp, 0
- ldr x1, [x1, #:got_lo12:g_inkDie_check_enable]
- ldr w2, [x1]
- mov w1, 32
- cbz w2, .L1961
- adrp x2, :got:g_min_erase_count
- ldr x2, [x2, #:got_lo12:g_min_erase_count]
- ldr w2, [x2]
- cmp w2, 29
- mov w2, 4
- csel w1, w1, w2, hi
-.L1961:
- adrp x2, :got:g_ect_tbl_power_up_flush
- ldr x2, [x2, #:got_lo12:g_ect_tbl_power_up_flush]
- ldrh w3, [x2]
- cmp w3, 31
- bhi .L1962
- add w3, w3, 1
+ ldr w4, [x3,160]
+ cbz w4, .L2134
+ ldr w3, [x3,220]
+ cmp w3, 29
+ mov w3, 4
+ csel w1, w1, w3, hi
+.L2134:
+ adrp x3, .LANCHOR4
+ add x3, x3, :lo12:.LANCHOR4
+ ldrh w4, [x3,264]
+ cmp w4, 31
+ bhi .L2135
+ add w4, w4, 1
mov w1, 1
- strh w3, [x2]
-.L1962:
- adrp x2, :got:gp_ect_tbl_info
- cbnz w0, .L1963
- ldr x0, [x2, #:got_lo12:gp_ect_tbl_info]
- ldr x3, [x0]
+ strh w4, [x3,264]
+.L2135:
+ cbnz w0, .L2136
+ add x0, x2, :lo12:.LANCHOR2
+ ldr x3, [x0,2152]
ldr w0, [x3,20]
add w1, w1, w0
ldr w0, [x3,16]
cmp w0, w1
- bcc .L1964
-.L1963:
- ldr x2, [x2, #:got_lo12:gp_ect_tbl_info]
- ldr x0, [x2]
+ bcc .L2137
+.L2136:
+ add x2, x2, :lo12:.LANCHOR2
+ ldr x0, [x2,2152]
ldr w1, [x0,16]
str w1, [x0,20]
mov w1, 17221
movk w1, 0x4254, lsl 16
str w1, [x0]
- adrp x1, :got:g_ect_tbl_info_size
- ldr x0, [x2]
- ldr x1, [x1, #:got_lo12:g_ect_tbl_info_size]
+ ldr x0, [x2,2152]
+ ldrh w1, [x2,2136]
str wzr, [x0,4]
- ldrh w1, [x1]
- ldr x2, [x2]
lsl w3, w1, 9
str w3, [x0,12]
ldr w3, [x0,8]
+ ldr x2, [x2,2152]
add w3, w3, 1
str w3, [x0,8]
mov w0, 64
bl FtlVendorPartWrite
bl Ftl_save_ext_data
-.L1964:
+.L2137:
mov w0, 0
ldp x29, x30, [sp], 16
ret
.size FtlEctTblFlush, .-FtlEctTblFlush
.align 2
+ .global StorageSysDataStore
+ .type StorageSysDataStore, %function
+StorageSysDataStore:
+ stp x29, x30, [sp, -32]!
+ add x29, sp, 0
+ str x0, [x29,16]
+ str x1, [x29,24]
+ bl rknand_device_lock
+ ldr x0, [x29,16]
+ mov w1, 1
+ ldr x2, [x29,24]
+ add w0, w0, 512
+ bl FtlVendorPartWrite
+ str x0, [x29,24]
+ bl rknand_device_unlock
+ ldr x0, [x29,24]
+ ldp x29, x30, [sp], 32
+ ret
+ .size StorageSysDataStore, .-StorageSysDataStore
+ .align 2
.global FtlMapBlkWriteDumpData
.type FtlMapBlkWriteDumpData, %function
FtlMapBlkWriteDumpData:
ldr w1, [x0,56]
ldrh w20, [x0,6]
ldr x4, [x0,40]
- cbz w1, .L1968
+ cbz w1, .L2142
+ adrp x3, .LANCHOR2
+ adrp x2, .LANCHOR4
+ add x3, x3, :lo12:.LANCHOR2
+ add x1, x2, :lo12:.LANCHOR4
+ sub w20, w20, #1
str wzr, [x0,56]
mov x21, x0
- adrp x0, :got:p_sys_data_buf_1
- adrp x2, :got:req_sys
- adrp x3, :got:p_sys_spare_buf
- sub w20, w20, #1
- mov x19, x2
- ldr x0, [x0, #:got_lo12:p_sys_data_buf_1]
+ add x1, x1, 136
+ ldr x0, [x3,2072]
uxth w20, w20
- ldr x1, [x2, #:got_lo12:req_sys]
- ldr x0, [x0]
- str x0, [x1,8]
- ldr x3, [x3, #:got_lo12:p_sys_spare_buf]
- ldr x3, [x3]
+ ldr x3, [x3,2112]
+ mov x19, x2
str x3, [x1,16]
ubfiz x3, x20, 2, 16
+ str x0, [x1,8]
ldr w3, [x4,x3]
str w3, [x1,4]
- cbz w3, .L1970
+ cbz w3, .L2144
mov x0, x1
mov w1, 1
mov w2, w1
bl FlashReadPages
- b .L1971
-.L1970:
- adrp x2, :got:c_ftl_nand_byte_pre_page
+ b .L2145
+.L2144:
+ adrp x2, .LANCHOR0+2036
mov w1, 255
- ldr x2, [x2, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldrh w2, [x2]
+ ldrh w2, [x2,#:lo12:.LANCHOR0+2036]
bl ftl_memset
-.L1971:
- ldr x2, [x19, #:got_lo12:req_sys]
+.L2145:
+ add x2, x19, :lo12:.LANCHOR4
mov x0, x21
mov w1, w20
- ldr x2, [x2,8]
+ ldr x2, [x2,144]
bl FtlMapWritePage
-.L1968:
+.L2142:
ldp x19, x20, [sp,16]
ldr x21, [sp,32]
ldp x29, x30, [sp], 48
.global FtlRecoverySuperblock
.type FtlRecoverySuperblock, %function
FtlRecoverySuperblock:
- stp x29, x30, [sp, -240]!
+ stp x29, x30, [sp, -224]!
add x29, sp, 0
stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
+ mov x19, x0
+ adrp x0, __stack_chk_guard
stp x23, x24, [sp,48]
- stp x25, x26, [sp,64]
+ adrp x23, .LANCHOR0
+ str x0, [x29,136]
+ ldr x1, [x0,#:lo12:__stack_chk_guard]
+ str x1, [x29,216]
+ ldrh w1, [x19,2]
+ str w1, [x29,188]
+ add x1, x23, :lo12:.LANCHOR0
stp x27, x28, [sp,80]
- mov x19, x0
- ldrh w25, [x0,2]
- ldrb w22, [x0,6]
- adrp x0, :got:c_ftl_nand_page_pre_blk
- str x0, [x29,160]
- ldr x1, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w1, [x1]
- cmp w1, w25
- bne .L1976
+ stp x21, x22, [sp,32]
+ stp x25, x26, [sp,64]
+ ldr w2, [x29,188]
+ ldrh w1, [x1,2026]
+ ldrb w27, [x19,6]
+ cmp w1, w2
+ bne .L2150
strh wzr, [x19,4]
- b .L2119
-.L1976:
+ b .L2302
+.L2150:
ldrh w0, [x19,16]
mov w1, 0
mov w2, 65535
-.L1978:
+.L2152:
cmp w0, w2
- bne .L2122
+ bne .L2305
add w1, w1, 1
uxth w1, w1
add x0, x19, x1, sxtw 1
ldrh w0, [x0,16]
- b .L1978
-.L2122:
+ b .L2152
+.L2305:
ldrb w1, [x19,8]
cmp w1, 1
- bne .L1980
+ bne .L2154
bl FtlGetLastWrittenPage
cmn w0, #1
- mov w20, w0
- beq .L1981
- adrp x0, :got:slcPageToMlcPageTbl
- ldr x0, [x0, #:got_lo12:slcPageToMlcPageTbl]
- ldrh w23, [x0,w20,sxtw 1]
- b .L1982
-.L1980:
+ mov w21, w0
+ beq .L2155
+ add x0, x23, :lo12:.LANCHOR0
+ mov w24, w21
+ ldrb w1, [x0,120]
+ cbnz w1, .L2224
+ add x0, x0, 196
+ ldrh w24, [x0,w21,sxtw 1]
+ b .L2224
+.L2154:
mov w1, 0
bl FtlGetLastWrittenPage
cmn w0, #1
- mov w20, w0
- beq .L1981
- mov w23, w0
-.L1982:
- adrp x1, :got:c_ftl_nand_planes_num
- adrp x0, :got:c_ftl_nand_byte_pre_oob
- mov w26, 0
- str x1, [x29,192]
+ mov w21, w0
+ beq .L2155
+ mov w24, w0
+.L2224:
+ add x0, x23, :lo12:.LANCHOR0
+ mov x2, x19
+ mov w28, 0
mov w7, 65535
mov w8, 56
- ldr x2, [x1, #:got_lo12:c_ftl_nand_planes_num]
- adrp x9, :got:req_read
- ldr x0, [x0, #:got_lo12:c_ftl_nand_byte_pre_oob]
+ adrp x9, .LANCHOR2
+ ldrh w3, [x0,1952]
mov w10, 4
- adrp x11, :got:p_gc_spare_buf
- ldrh w3, [x2]
- mov x2, x19
- ldrh w6, [x0]
+ ldrh w6, [x0,2038]
add x3, x19, x3, lsl 1
- b .L1983
-.L1981:
+ b .L2157
+.L2155:
strh wzr, [x19,2]
-.L2119:
+.L2302:
strb wzr, [x19,6]
- b .L1977
-.L1985:
+ b .L2151
+.L2159:
ldrh w1, [x2,16]
cmp w1, w7
- beq .L1984
- ldr x5, [x9, #:got_lo12:req_read]
- orr w1, w23, w1, lsl 10
- umull x0, w26, w8
- ldr x4, [x5]
- add x4, x4, x0
- str w1, [x4,4]
- ldr x1, [x5]
+ beq .L2158
+ add x4, x9, :lo12:.LANCHOR2
+ orr w1, w24, w1, lsl 10
+ umull x0, w28, w8
+ ldr x5, [x4,2048]
+ add x5, x5, x0
+ str w1, [x5,4]
+ ldr x1, [x4,2048]
+ ldr x4, [x4,904]
add x0, x1, x0
- mul w1, w26, w6
- add w26, w26, 1
+ mul w1, w28, w6
+ add w28, w28, 1
str xzr, [x0,8]
sdiv w1, w1, w10
- uxth w26, w26
- ldr x4, [x11, #:got_lo12:p_gc_spare_buf]
- ldr x4, [x4]
+ uxth w28, w28
add x1, x4, x1, sxtw 2
str x1, [x0,16]
-.L1984:
+.L2158:
add x2, x2, 2
-.L1983:
+.L2157:
cmp x2, x3
- bne .L1985
- adrp x21, :got:req_read
- mov w1, w26
- mov w2, 0
- mov w24, 65535
- ldr x0, [x21, #:got_lo12:req_read]
- ldr x0, [x0]
+ bne .L2159
+ ldrb w0, [x19,8]
+ str wzr, [x29,184]
+ cmp w0, 1
+ bne .L2160
+ add x0, x23, :lo12:.LANCHOR0
+ ldrb w0, [x0,120]
+ cmp w0, wzr
+ cset w0, ne
+ str w0, [x29,184]
+.L2160:
+ adrp x20, .LANCHOR2
+ ldr w2, [x29,184]
+ add x25, x20, :lo12:.LANCHOR2
+ mov w1, w28
+ mov w26, 0
+ ldr x0, [x25,2048]
bl FlashReadPages
- adrp x0, :got:g_GlobalDataVersion
- mov x3, 0
- str x0, [x29,152]
- mov x6, 56
- uxth w7, w23
- ldr x1, [x0, #:got_lo12:g_GlobalDataVersion]
- ldr w27, [x1]
-.L1986:
- uxth w28, w3
- cmp w28, w26
- bcs .L1995
- ldr x0, [x21, #:got_lo12:req_read]
- mul x2, x3, x6
- ldr x0, [x0]
- add x1, x0, x2
- ldr w0, [x0,x2]
- cbnz w0, .L1987
- ldr x5, [x1,16]
- str x5, [x29,168]
- ldr w0, [x5,4]
- cmn w0, #1
- beq .L1989
- ldr x1, [x29,152]
- str x7, [x29,176]
- str x6, [x29,184]
- ldr x4, [x1, #:got_lo12:g_GlobalDataVersion]
- str x2, [x29,200]
- str x3, [x29,208]
- ldr w1, [x4]
- str x4, [x29,216]
+ ldr w22, [x25,200]
+ ldr x3, [x25,2048]
+ uxth w6, w24
+ mov w25, 65535
+.L2161:
+ cmp w26, w28
+ beq .L2306
+ ldr w0, [x3]
+ cbnz w0, .L2162
+ ldr x4, [x3,16]
+ ldr w2, [x4,4]
+ cmn w2, #1
+ beq .L2163
+ add x5, x20, :lo12:.LANCHOR2
+ mov w0, w2
+ str x6, [x29,144]
+ str x4, [x29,152]
+ ldr w1, [x5,200]
+ str x3, [x29,160]
+ str x2, [x29,168]
+ str x5, [x29,176]
bl ftl_cmp_data_ver
- ldr x4, [x29,216]
- ldr x3, [x29,208]
- ldr x2, [x29,200]
- ldr x6, [x29,184]
- ldr x7, [x29,176]
- ldr x5, [x29,168]
- cbz w0, .L1989
- ldr w0, [x5,4]
- add w0, w0, 1
- str w0, [x4]
-.L1989:
- ldr x0, [x21, #:got_lo12:req_read]
- ldr x0, [x0]
- add x2, x0, x2
- ldr x0, [x2,16]
- ldr w0, [x0]
+ ldr x5, [x29,176]
+ ldr x2, [x29,168]
+ ldr x3, [x29,160]
+ ldr x4, [x29,152]
+ ldr x6, [x29,144]
+ cbz w0, .L2163
+ add w2, w2, 1
+ str w2, [x5,200]
+.L2163:
+ ldr w0, [x4]
cmn w0, #1
- bne .L1991
-.L1995:
- cmp w28, w26
- bne .L2114
- ldr x0, [x21, #:got_lo12:req_read]
- add w20, w20, 1
- uxth w20, w20
- ldr x0, [x0]
+ bne .L2164
+ add x0, x20, :lo12:.LANCHOR2
+ mov w1, 56
+ uxth w21, w21
+ umull x26, w26, w1
+ ldr x0, [x0,2048]
+ add x26, x0, x26
+ ldr w0, [x26,4]
+ b .L2298
+.L2162:
+ mov w25, w6
+.L2164:
+ add w26, w26, 1
+ add x3, x3, 56
+ uxth w26, w26
+ b .L2161
+.L2306:
+ add x0, x20, :lo12:.LANCHOR2
+ add w21, w21, 1
+ uxth w21, w21
+ ldr x0, [x0,2048]
ldr w0, [x0,4]
- b .L2115
-.L1987:
- mov w24, w7
-.L1991:
- add x3, x3, 1
- b .L1986
-.L2114:
- mov w0, 56
- uxth w20, w20
- umull x28, w28, w0
- ldr x0, [x21, #:got_lo12:req_read]
- ldr x0, [x0]
- add x28, x0, x28
- ldr w0, [x28,4]
-.L2115:
- lsr w0, w0, 10
+.L2298:
+ lsr x0, x0, 10
bl P2V_plane
uxth w26, w0
ldrb w1, [x19,8]
cmp w1, 1
- bne .L1997
- adrp x0, :got:slcPageToMlcPageTbl
- ldr x0, [x0, #:got_lo12:slcPageToMlcPageTbl]
- ldrh w20, [x0,w20,sxtw 1]
-.L1997:
- ldr x0, [x29,160]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w0, [x0]
- cmp w0, w20
- bne .L1998
- strh w20, [x19,2]
+ bne .L2168
+ add x0, x23, :lo12:.LANCHOR0
+ ldrb w2, [x0,120]
+ cbnz w2, .L2168
+ add x0, x0, 196
+ ldrh w21, [x0,w21,sxtw 1]
+.L2168:
+ add x0, x23, :lo12:.LANCHOR0
+ ldrh w0, [x0,2026]
+ cmp w0, w21
+ bne .L2169
+ strh w21, [x19,2]
strb wzr, [x19,6]
strh wzr, [x19,4]
-.L1998:
- uxth w0, w22
- cmp w20, w25
- str w0, [x29,184]
- bne .L1999
- cmp w26, w0
- beq .L2120
-.L1999:
+.L2169:
+ uxth w0, w27
+ str w0, [x29,152]
+ ldr w0, [x29,188]
+ cmp w21, w0
+ beq .L2307
+.L2170:
mov w0, 65535
- sub w22, w27, #1
- cmp w24, w0
- bne .L2000
- cbnz w1, .L2001
-.L2000:
- adrp x24, :got:g_recovery_page_min_ver
- uxth w5, w23
- ldr x0, [x24, #:got_lo12:g_recovery_page_min_ver]
- ldr w1, [x0]
+ sub w22, w22, #1
+ cmp w25, w0
+ bne .L2171
+ cbz w1, .L2171
+.L2172:
+ adrp x25, .LANCHOR4
+ mov w1, 1
+ add x0, x25, :lo12:.LANCHOR4
+ strh w1, [x0,266]
+ add x0, x20, :lo12:.LANCHOR2
+ add x0, x0, 2240
+ bl FtlMapBlkWriteDumpData
+ ldr w24, [x29,188]
+ adrp x0, .LC113
+ str x25, [x29,128]
+ add x0, x0, :lo12:.LC113
+ str x0, [x29,120]
+.L2190:
+ add x0, x23, :lo12:.LANCHOR0
+ mov x1, x19
+ str wzr, [x29,176]
+ mov w7, 65535
+ mov w8, 56
+ ldrh w3, [x0,1952]
+ ldrb w6, [x0,120]
+ add x3, x19, x3, lsl 1
+.L2191:
+ cmp x1, x3
+ bne .L2194
+ add x0, x20, :lo12:.LANCHOR2
+ ldr w1, [x29,176]
+ ldr w2, [x29,184]
+ ldr x0, [x0,2048]
+ bl FlashReadPages
+ str xzr, [x29,160]
+.L2195:
+ ldrh w0, [x29,160]
+ ldr w1, [x29,176]
+ cmp w1, w0, uxth
+ bhi .L2221
+ add x0, x23, :lo12:.LANCHOR0
+ add w24, w24, 1
+ uxth w24, w24
+ ldrh w1, [x0,2026]
+ cmp w24, w1
+ bne .L2190
+ ldrh w2, [x0,1952]
+ mov w3, 65535
+ strh w24, [x19,2]
+ mov x0, 0
+ strh wzr, [x19,4]
+.L2222:
+ uxth w1, w0
+ cmp w1, w2
+ bcs .L2151
+ add x0, x0, 1
+ add x4, x19, x0, lsl 1
+ ldrh w4, [x4,14]
+ cmp w4, w3
+ beq .L2222
+ strb w1, [x19,6]
+.L2151:
+ ldr x1, [x29,136]
+ mov w0, 0
+ ldr x2, [x29,216]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2225
+ bl __stack_chk_fail
+.L2307:
+ ldr w0, [x29,152]
+ cmp w26, w0
+ bne .L2170
+ b .L2303
+.L2171:
+ add x0, x20, :lo12:.LANCHOR2
+ uxth w5, w24
+ ldr w1, [x0,2332]
cmn w1, #1
- bne .L2002
- str w22, [x0]
-.L2002:
- ldr x0, [x24, #:got_lo12:g_recovery_page_min_ver]
- mov w27, w25
- ldr w6, [x0]
- add w0, w25, 7
- cmp w0, w23, uxth
- bge .L2003
- sub w27, w5, #7
- uxth w27, w27
-.L2003:
+ bne .L2173
+ str w22, [x0,2332]
+.L2173:
+ add x0, x20, :lo12:.LANCHOR2
+ ldr w25, [x29,188]
+ ldr w6, [x0,2332]
+ ldr w0, [x29,188]
+ add w0, w0, 7
+ cmp w0, w24, uxth
+ bge .L2174
+ sub w25, w5, #7
+ uxth w25, w25
+.L2174:
mov w3, -1
+ add x28, x20, :lo12:.LANCHOR2
+ mov w27, w3
mov w4, 65535
- mov w28, w3
mov w7, 56
- adrp x8, :got:mlcPageToSlcPageTbl
-.L2004:
- cmp w27, w5
- bhi .L2017
- ldr x0, [x29,192]
- mov w23, 0
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w2, [x0]
+ add x8, x28, 996
+.L2175:
+ cmp w25, w5
+ bhi .L2188
+ add x0, x23, :lo12:.LANCHOR0
+ mov w24, 0
+ ldrh w2, [x0,1952]
mov x0, x19
add x2, x19, x2, lsl 1
-.L2018:
+.L2189:
cmp x0, x2
- beq .L2123
+ beq .L2308
ldrh w1, [x0,16]
cmp w1, w4
- beq .L2005
- ldr x10, [x21, #:got_lo12:req_read]
- orr w1, w27, w1, lsl 10
- umull x9, w23, w7
- add w23, w23, 1
- ldr x10, [x10]
- uxth w23, w23
+ beq .L2176
+ umull x9, w24, w7
+ ldr x10, [x28,2048]
+ add w24, w24, 1
+ orr w1, w25, w1, lsl 10
add x9, x10, x9
+ uxth w24, w24
str w1, [x9,4]
-.L2005:
+.L2176:
add x0, x0, 2
- b .L2018
-.L2123:
- ldr x9, [x21, #:got_lo12:req_read]
- mov w1, w23
- mov w2, 0
- str x8, [x29,136]
- str x7, [x29,144]
- ldr x0, [x9]
- str x4, [x29,168]
- str x6, [x29,176]
- str x5, [x29,200]
- str x3, [x29,208]
- str x9, [x29,216]
+ b .L2189
+.L2308:
+ ldr x0, [x28,2048]
+ mov w1, w24
+ ldr w2, [x29,184]
+ str x8, [x29,120]
+ str x7, [x29,128]
+ str x4, [x29,144]
+ str x6, [x29,160]
+ str x5, [x29,168]
+ str x3, [x29,176]
bl FlashReadPages
- ldr x9, [x29,216]
+ add x0, x23, :lo12:.LANCHOR0
+ ldr x3, [x29,176]
+ ldr x5, [x29,168]
mov w1, 0
- ldr x3, [x29,208]
- sxtw x10, w27
- ldr x5, [x29,200]
- ldr x0, [x9]
- ldr x6, [x29,176]
- ldr x4, [x29,168]
+ ldr x6, [x29,160]
+ sxtw x10, w25
+ ldrb w9, [x0,120]
+ ldr x0, [x28,2048]
+ ldr x4, [x29,144]
+ ldr x7, [x29,128]
add x0, x0, 16
- ldr x7, [x29,144]
- ldr x8, [x29,136]
-.L2007:
- cmp w1, w23
- beq .L2124
+ ldr x8, [x29,120]
+.L2178:
+ cmp w1, w24
+ beq .L2309
ldr w2, [x0,-16]
- cbnz w2, .L2008
+ cbnz w2, .L2179
ldr x2, [x0]
- ldrh w9, [x2]
- cmp w9, w4
- beq .L2009
- ldr w9, [x2,4]
- cmn w9, #1
- beq .L2009
- ldr x2, [x24, #:got_lo12:g_recovery_page_min_ver]
+ ldrh w11, [x2]
+ cmp w11, w4
+ beq .L2180
+ ldr w2, [x2,4]
+ cmn w2, #1
+ beq .L2180
+ ldr w27, [x28,2332]
cmn w3, #1
- ldr w28, [x2]
- str w9, [x2]
- bne .L2009
- ldr x2, [x8, #:got_lo12:mlcPageToSlcPageTbl]
- ldrh w2, [x2,x10,lsl 1]
+ str w2, [x28,2332]
+ bne .L2180
+ ldrh w2, [x8,x10,lsl 1]
cmp w2, w4
- beq .L2009
- cmp w28, w22
- csinv w3, w28, wzr, ne
- b .L2009
-.L2008:
+ bne .L2181
+ cbz w9, .L2180
+.L2181:
+ cmp w27, w22
+ csinv w3, w27, wzr, ne
+ b .L2180
+.L2179:
ldrb w0, [x19,8]
- cbnz w0, .L2001
- adrp x0, :got:mlcPageToSlcPageTbl
- ldr x0, [x0, #:got_lo12:mlcPageToSlcPageTbl]
- ldrh w1, [x0,w27,sxtw 1]
- mov w0, 65535
- cmp w1, w0
- bne .L2012
+ cbnz w0, .L2172
+ add x0, x20, :lo12:.LANCHOR2
+ add x1, x0, 996
+ ldrh w2, [x1,w25,sxtw 1]
+ mov w1, 65535
+ cmp w2, w1
+ bne .L2183
cmn w3, #1
- ldr x24, [x24, #:got_lo12:g_recovery_page_min_ver]
- beq .L2013
- str w3, [x24]
- b .L2001
-.L2013:
+ beq .L2184
+ str w3, [x0,2332]
+ b .L2172
+.L2184:
cmp w6, w22
- beq .L2014
- str w6, [x24]
- b .L2001
-.L2014:
- ldr w0, [x24]
- b .L2121
-.L2012:
- cmp w28, w22
- beq .L2015
- cmn w28, #1
- beq .L2001
- ldr x24, [x24, #:got_lo12:g_recovery_page_min_ver]
- str w28, [x24]
- b .L2001
-.L2015:
- ldr x24, [x24, #:got_lo12:g_recovery_page_min_ver]
- ldr w0, [x24]
- cmp w0, w22
- beq .L2001
-.L2121:
- sub w0, w0, #1
- b .L2116
-.L2009:
+ beq .L2185
+ str w6, [x0,2332]
+ b .L2172
+.L2185:
+ ldr w1, [x0,2332]
+ b .L2304
+.L2183:
+ cmp w27, w22
+ beq .L2186
+ cmn w27, #1
+ beq .L2172
+ str w27, [x0,2332]
+ b .L2172
+.L2186:
+ ldr w1, [x0,2332]
+ cmp w1, w22
+ beq .L2172
+.L2304:
+ sub w1, w1, #1
+ b .L2299
+.L2180:
add w1, w1, 1
add x0, x0, 56
uxth w1, w1
- b .L2007
-.L2124:
- add w27, w27, 1
- uxth w27, w27
- b .L2004
-.L2017:
- ldr x24, [x24, #:got_lo12:g_recovery_page_min_ver]
- mov w0, -1
-.L2116:
- str w0, [x24]
-.L2001:
- adrp x0, :got:g_power_lost_recovery_flag
- mov w1, 1
- mov w23, w25
- ldr x0, [x0, #:got_lo12:g_power_lost_recovery_flag]
- strh w1, [x0]
- adrp x0, :got:gL2pMapInfo
- ldr x0, [x0, #:got_lo12:gL2pMapInfo]
- bl FtlMapBlkWriteDumpData
- add x0, x29, 232
- str x0, [x29,144]
- adrp x0, .LC111
- add x0, x0, :lo12:.LC111
- str x0, [x29,128]
- add x0, x29, 236
- str x0, [x29,120]
- add x0, x29, 228
- str x0, [x29,112]
-.L2019:
- ldr x0, [x29,192]
- mov w4, 65535
- str wzr, [x29,216]
- mov w5, 56
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w2, [x0]
- mov x0, x19
- add x2, x19, x2, lsl 1
-.L2020:
- cmp x0, x2
- beq .L2125
- ldrh w1, [x0,16]
- cmp w1, w4
- beq .L2021
- ldr w3, [x29,216]
- orr w1, w23, w1, lsl 10
- ldr x6, [x21, #:got_lo12:req_read]
- umull x3, w3, w5
- ldr x6, [x6]
- add x3, x6, x3
- str w1, [x3,4]
- ldr w1, [x29,216]
- add w1, w1, 1
- uxth w1, w1
- str w1, [x29,216]
-.L2021:
- add x0, x0, 2
- b .L2020
-.L2125:
- ldr x0, [x21, #:got_lo12:req_read]
- mov w2, 0
- ldr w1, [x29,216]
- ldr x0, [x0]
- bl FlashReadPages
- str xzr, [x29,200]
-.L2023:
- ldrh w0, [x29,200]
- ldr w1, [x29,216]
- cmp w1, w0, uxth
- bls .L2126
- ldr x0, [x29,200]
+ b .L2178
+.L2309:
+ add w25, w25, 1
+ uxth w25, w25
+ b .L2175
+.L2188:
+ add x0, x20, :lo12:.LANCHOR2
+ mov w1, -1
+.L2299:
+ str w1, [x0,2332]
+ b .L2172
+.L2194:
+ ldrh w2, [x1,16]
+ cmp w2, w7
+ beq .L2192
+ ldr w0, [x29,176]
+ add x5, x20, :lo12:.LANCHOR2
+ orr w2, w24, w2, lsl 10
+ ldr x4, [x5,2048]
+ umull x0, w0, w8
+ add x4, x4, x0
+ str w2, [x4,4]
+ ldrb w2, [x19,8]
+ cmp w2, 1
+ bne .L2193
+ cbz w6, .L2193
+ ldr x2, [x5,2048]
+ add x0, x2, x0
+ ldr w2, [x0,4]
+ orr w2, w2, -2147483648
+ str w2, [x0,4]
+.L2193:
+ ldr w0, [x29,176]
+ add w0, w0, 1
+ uxth w0, w0
+ str w0, [x29,176]
+.L2192:
+ add x1, x1, 2
+ b .L2191
+.L2221:
+ ldr x0, [x29,160]
mov x1, 56
- mul x24, x0, x1
- ldr x0, [x21, #:got_lo12:req_read]
- ldr x0, [x0]
- add x0, x0, x24
- ldr w0, [x0,4]
- str w0, [x29,236]
- lsr w0, w0, 10
+ mul x25, x0, x1
+ add x0, x20, :lo12:.LANCHOR2
+ ldr x1, [x0,2048]
+ str x1, [x29,168]
+ add x28, x1, x25
+ ldr w27, [x28,4]
+ str w27, [x29,212]
+ lsr x0, x27, 10
bl P2V_plane
uxth w0, w0
- cmp w23, w25
- bcc .L2024
- ldr w1, [x29,184]
- cmp w0, w1
- bcs .L2056
- cmp w23, w25
- beq .L2024
-.L2056:
+ ldr w1, [x29,188]
+ cmp w24, w1
+ ldr x1, [x29,168]
+ bcc .L2196
+ ldr w2, [x29,152]
+ cmp w0, w2
+ bcs .L2229
+ ldr w2, [x29,188]
+ cmp w24, w2
+ beq .L2196
+.L2229:
cmp w0, w26
- bne .L2057
- cmp w23, w20
- beq .L2026
-.L2057:
- ldr x0, [x21, #:got_lo12:req_read]
- ldr x0, [x0]
- add x1, x0, x24
- ldr w0, [x0,x24]
+ bne .L2230
+ cmp w24, w21
+ beq .L2198
+.L2230:
+ ldr w0, [x1,x25]
cmn w0, #1
- beq .L2028
- ldr x28, [x1,16]
+ beq .L2200
+ ldr x28, [x28,16]
mov w0, 61589
ldrh w1, [x28]
cmp w1, w0
- bne .L2037
+ bne .L2207
ldr w22, [x28,4]
cmn w22, #1
- beq .L2031
- ldr x0, [x29,152]
- ldr x27, [x0, #:got_lo12:g_GlobalDataVersion]
+ beq .L2202
+ add x27, x20, :lo12:.LANCHOR2
mov w0, w22
- ldr w1, [x27]
+ ldr w1, [x27,200]
bl ftl_cmp_data_ver
- cbz w0, .L2031
- ldr w0, [x28,4]
- add w0, w0, 1
- str w0, [x27]
-.L2031:
+ cbz w0, .L2202
+ add w0, w22, 1
+ str w0, [x27,200]
+.L2202:
ldr w27, [x28,8]
- mov w2, 0
+ add x1, x29, 208
ldr w0, [x28,12]
- ldr x1, [x29,144]
- str w0, [x29,228]
+ mov w2, 0
+ str w0, [x29,204]
mov w0, w27
bl log2phys
- adrp x0, :got:g_recovery_page_min_ver
- str x0, [x29,136]
- ldr x1, [x0, #:got_lo12:g_recovery_page_min_ver]
- str x1, [x29,168]
- ldr w1, [x1]
+ add x3, x20, :lo12:.LANCHOR2
+ str x3, [x29,168]
+ ldr w1, [x3,2332]
cmn w1, #1
- beq .L2033
+ beq .L2203
mov w0, w22
bl ftl_cmp_data_ver
- cbz w0, .L2033
- ldr w1, [x29,228]
+ ldr x3, [x29,168]
+ cbz w0, .L2203
+ ldr w1, [x29,204]
cmn w1, #1
- beq .L2034
- ldr x3, [x21, #:got_lo12:req_read]
- str x3, [x29,104]
- ldr x0, [x3]
- add x0, x0, x24
+ beq .L2204
+ ldr x0, [x3,2048]
+ str x3, [x29,112]
+ add x0, x0, x25
str w1, [x0,4]
mov w1, 1
ldr x2, [x0,16]
- ldr x0, [x3]
- str x2, [x29,208]
+ ldr x0, [x3,2048]
+ str x2, [x29,168]
mov w2, 0
- add x0, x0, x24
+ add x0, x0, x25
bl FlashReadPages
- ldr x0, [x29,208]
- ldr x3, [x29,104]
+ ldr x3, [x29,112]
+ ldr x0, [x29,168]
+ ldr x2, [x3,2048]
ldr w0, [x0,4]
- str w0, [x29,176]
- ldr x0, [x3]
- ldr w0, [x0,x24]
+ str w0, [x29,144]
+ add x4, x2, x25
+ ldr w0, [x2,x25]
cmn w0, #1
- bne .L2035
- b .L2036
-.L2034:
- ldr w0, [x29,236]
- ldr w1, [x29,232]
+ bne .L2205
+ b .L2206
+.L2204:
+ ldr w0, [x29,212]
+ ldr w1, [x29,208]
cmp w1, w0
- bne .L2037
- ldr x1, [x29,112]
+ bne .L2207
mov w0, w27
+ add x1, x29, 204
mov w2, 1
bl log2phys
-.L2037:
+.L2207:
ldrh w0, [x19]
- b .L2118
-.L2035:
- ldr x0, [x29,208]
+ b .L2301
+.L2205:
+ ldr x0, [x29,168]
ldr w28, [x0,8]
cmp w28, w27
- bne .L2036
- ldr x0, [x29,168]
- ldr w1, [x29,176]
- str x3, [x29,104]
- ldr w0, [x0]
+ bne .L2206
+ ldr w0, [x3,2332]
+ ldr w1, [x29,144]
+ str x2, [x29,96]
+ str x4, [x29,104]
+ str x3, [x29,112]
bl ftl_cmp_data_ver
- ldr x3, [x29,104]
- cbz w0, .L2036
- ldr w0, [x29,232]
- ldr w1, [x29,236]
+ ldr x3, [x29,112]
+ ldr x4, [x29,104]
+ ldr x2, [x29,96]
+ cbz w0, .L2206
+ ldr w0, [x29,208]
+ ldr w1, [x29,212]
cmp w0, w1
- beq .L2042
- ldr w1, [x29,228]
+ beq .L2212
+ ldr w1, [x29,204]
cmp w0, w1
- beq .L2036
+ beq .L2206
cmn w0, #1
- ldr x1, [x3]
- beq .L2040
- add x1, x1, x24
- str w0, [x1,4]
- ldr x2, [x1,16]
- mov w1, 1
- ldr x0, [x3]
- str x2, [x29,208]
+ beq .L2210
+ str w0, [x4,4]
mov w2, 0
- add x0, x0, x24
+ ldr x1, [x4,16]
+ ldr x0, [x3,2048]
+ str x1, [x29,168]
+ mov w1, 1
+ add x0, x0, x25
bl FlashReadPages
- b .L2041
-.L2040:
- str w0, [x1,x24]
-.L2041:
- ldr x0, [x21, #:got_lo12:req_read]
- ldr x0, [x0]
- ldr w0, [x0,x24]
- cmn w0, #1
- beq .L2042
- ldr x0, [x29,208]
- ldr w24, [x0,4]
- ldr x0, [x29,136]
- mov w1, w24
- ldr x0, [x0, #:got_lo12:g_recovery_page_min_ver]
- ldr w0, [x0]
+ b .L2211
+.L2210:
+ str w0, [x2,x25]
+.L2211:
+ add x0, x20, :lo12:.LANCHOR2
+ ldr x1, [x0,2048]
+ ldr w1, [x1,x25]
+ cmn w1, #1
+ beq .L2212
+ ldr x1, [x29,168]
+ ldr w0, [x0,2332]
+ ldr w25, [x1,4]
+ mov w1, w25
bl ftl_cmp_data_ver
- cbz w0, .L2042
- ldr w0, [x29,176]
- mov w1, w24
+ cbz w0, .L2212
+ ldr w0, [x29,144]
+ mov w1, w25
bl ftl_cmp_data_ver
- cbz w0, .L2036
-.L2042:
- ldr w1, [x29,228]
+ cbz w0, .L2206
+.L2212:
+ ldr w1, [x29,204]
mov w0, w28
bl FtlReUsePrevPpa
-.L2036:
+.L2206:
mov w0, -1
- str w0, [x29,228]
+ str w0, [x29,204]
ldrh w0, [x19]
bl decrement_vpc_count
- b .L2044
-.L2033:
- ldr w0, [x29,236]
- ldr w1, [x29,232]
+ b .L2214
+.L2203:
+ ldr w0, [x29,212]
+ ldr w1, [x29,208]
cmp w1, w0
- beq .L2044
- ldr x1, [x29,120]
+ beq .L2214
mov w0, w27
+ add x1, x29, 212
mov w2, 1
bl log2phys
- ldr w0, [x29,232]
- cmn w0, #1
- beq .L2044
- ldr w1, [x29,228]
- cmp w0, w1
- beq .L2044
- lsr w0, w0, 10
+ ldr w25, [x29,208]
+ cmn w25, #1
+ beq .L2214
+ ldr w0, [x29,204]
+ cmp w25, w0
+ beq .L2214
+ lsr x0, x25, 10
bl P2V_block_in_plane
uxth w0, w0
- adrp x1, :got:g_active_superblock
- ldr x1, [x1, #:got_lo12:g_active_superblock]
- ldrh w1, [x1]
- cmp w1, w0
- beq .L2047
- adrp x1, :got:g_buffer_superblock
- ldr x1, [x1, #:got_lo12:g_buffer_superblock]
- ldrh w1, [x1]
- cmp w1, w0
- beq .L2047
- adrp x1, :got:g_gc_temp_superblock
- ldr x1, [x1, #:got_lo12:g_gc_temp_superblock]
- ldrh w1, [x1]
+ ldrh w2, [x20,#:lo12:.LANCHOR2]
+ add x1, x20, :lo12:.LANCHOR2
+ cmp w2, w0
+ beq .L2217
+ ldrh w2, [x1,48]
+ cmp w2, w0
+ beq .L2217
+ ldrh w1, [x1,96]
cmp w1, w0
- bne .L2044
-.L2047:
- ldr x24, [x21, #:got_lo12:req_read]
- mov w2, 0
- ldr w1, [x29,232]
- ldr x0, [x24]
- str w1, [x0,4]
+ bne .L2214
+.L2217:
+ add x28, x20, :lo12:.LANCHOR2
mov w1, 1
- ldr x28, [x0,16]
- ldr x0, [x24]
+ mov w2, 0
+ ldr x0, [x28,2048]
+ str w25, [x0,4]
+ ldr x3, [x0,16]
+ ldr x0, [x28,2048]
+ str x3, [x29,168]
bl FlashReadPages
- ldr x0, [x24]
- ldr w1, [x28,4]
+ ldr x0, [x28,2048]
+ ldr x3, [x29,168]
ldr w0, [x0]
+ ldr w1, [x3,4]
cmn w0, #1
- beq .L2044
+ beq .L2214
mov w0, w22
bl ftl_cmp_data_ver
- cbnz w0, .L2044
- ldr x1, [x29,144]
+ cbnz w0, .L2214
mov w0, w27
+ add x1, x29, 208
mov w2, 1
bl log2phys
-.L2044:
- ldr w0, [x29,228]
+.L2214:
+ ldr w0, [x29,204]
cmn w0, #1
- beq .L2024
- lsr w0, w0, 10
+ beq .L2196
+ lsr x0, x0, 10
bl P2V_block_in_plane
uxth w1, w0
- adrp x2, :got:p_valid_page_count_table
+ add x2, x20, :lo12:.LANCHOR2
ubfiz x3, x1, 1, 16
- ldr x2, [x2, #:got_lo12:p_valid_page_count_table]
- ldr x2, [x2]
+ ldr x2, [x2,-40]
ldrh w2, [x2,x3]
- cbz w2, .L2048
-.L2118:
+ cbz w2, .L2218
+.L2301:
bl decrement_vpc_count
- b .L2024
-.L2048:
- ldr x0, [x29,128]
+ b .L2196
+.L2218:
+ ldr x0, [x29,120]
bl printk
- b .L2024
-.L2028:
- adrp x1, :got:g_recovery_page_num
- ldr x1, [x1, #:got_lo12:g_recovery_page_num]
- ldr w0, [x1]
+ b .L2196
+.L2200:
+ ldr x0, [x29,128]
+ add x1, x0, :lo12:.LANCHOR4
+ ldr w0, [x1,268]
cmp w0, 31
- bhi .L2049
- adrp x2, :got:g_recovery_ppa_tbl
- ldr w3, [x29,236]
- ldr x2, [x2, #:got_lo12:g_recovery_ppa_tbl]
- str w3, [x2,w0,uxtw 2]
+ bhi .L2219
+ add x2, x1, 272
+ str w27, [x2,w0,uxtw 2]
add w0, w0, 1
- str w0, [x1]
-.L2049:
+ str w0, [x1,268]
+.L2219:
ldrh w0, [x19]
bl decrement_vpc_count
- adrp x0, :got:g_recovery_page_min_ver
- ldr x0, [x0, #:got_lo12:g_recovery_page_min_ver]
- ldr w1, [x0]
+ add x0, x20, :lo12:.LANCHOR2
+ ldr w1, [x0,2332]
cmn w1, #1
- beq .L2117
+ beq .L2300
cmp w1, w22
- bls .L2024
-.L2117:
- str w22, [x0]
-.L2024:
- ldr x0, [x29,200]
- add x0, x0, 1
- str x0, [x29,200]
- b .L2023
-.L2126:
+ bls .L2196
+.L2300:
+ str w22, [x0,2332]
+.L2196:
ldr x0, [x29,160]
- add w23, w23, 1
- uxth w23, w23
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w0, [x0]
- cmp w23, w0
- bne .L2019
- ldr x0, [x29,192]
- mov w3, 65535
- strh w23, [x19,2]
- strh wzr, [x19,4]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w2, [x0]
- mov x0, 0
-.L2052:
- uxth w1, w0
- cmp w1, w2
- bcs .L1977
add x0, x0, 1
- add x4, x19, x0, lsl 1
- ldrh w4, [x4,14]
- cmp w4, w3
- beq .L2052
- strb w1, [x19,6]
- b .L1977
-.L2026:
+ str x0, [x29,160]
+ b .L2195
+.L2198:
strb w26, [x19,6]
- strh w20, [x19,2]
-.L2120:
+ strh w21, [x19,2]
+.L2303:
mov x0, x19
- mov w1, w20
+ mov w1, w21
mov w2, w26
bl ftl_sb_update_avl_pages
-.L1977:
- mov w0, 0
+ b .L2151
+.L2225:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 240
+ ldp x29, x30, [sp], 224
ret
.size FtlRecoverySuperblock, .-FtlRecoverySuperblock
.align 2
.global FtlWriteDumpData
.type FtlWriteDumpData, %function
FtlWriteDumpData:
- stp x29, x30, [sp, -144]!
+ stp x29, x30, [sp, -160]!
add x29, sp, 0
stp x19, x20, [sp,16]
- adrp x19, :got:g_active_superblock
+ adrp x19, .LANCHOR2
stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
- ldr x0, [x19, #:got_lo12:g_active_superblock]
+ add x21, x19, :lo12:.LANCHOR2
+ adrp x23, __stack_chk_guard
stp x25, x26, [sp,64]
- ldrh w3, [x0,4]
- cbz w3, .L2128
- ldrb w1, [x0,8]
- cbnz w1, .L2128
- adrp x2, :got:c_ftl_nand_page_pre_blk
- ldrb w1, [x0,7]
- ldr x2, [x2, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w2, [x2]
- mul w1, w1, w2
- cmp w3, w1
- beq .L2128
- adrp x1, :got:g_MaxLpn
- ldrb w23, [x0,10]
- ldr x1, [x1, #:got_lo12:g_MaxLpn]
- ldr w21, [x1]
- adrp x1, :got:c_ftl_nand_planes_num
- ldr x1, [x1, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w24, [x1]
- cbnz w23, .L2127
- sub w21, w21, #1
- add x1, x29, 84
- mov w2, w23
- mov w0, w21
- add x22, x29, 88
+ ldr x0, [x23,#:lo12:__stack_chk_guard]
+ ldrh w1, [x21,4]
+ str x0, [x29,152]
+ cbz w1, .L2311
+ ldrb w0, [x21,8]
+ cbnz w0, .L2311
+ adrp x22, .LANCHOR0
+ ldrb w0, [x21,7]
+ add x22, x22, :lo12:.LANCHOR0
+ ldrh w2, [x22,2026]
+ mul w0, w0, w2
+ cmp w1, w0
+ beq .L2311
+ ldrb w25, [x21,10]
+ ldr w24, [x22,2104]
+ ldrh w26, [x22,1952]
+ cbnz w25, .L2310
+ sub w24, w24, #1
+ add x1, x29, 92
+ mov w0, w24
+ mov w2, w25
bl log2phys
- str w21, [x29,112]
- adrp x0, :got:p_sys_data_buf
- ldr w2, [x29,84]
- str w2, [x29,92]
- cmn w2, #1
- ldr x0, [x0, #:got_lo12:p_sys_data_buf]
- ldr x1, [x0]
- str x1, [x29,96]
- adrp x1, :got:p_sys_spare_buf
- ldr x1, [x1, #:got_lo12:p_sys_spare_buf]
- ldr x20, [x1]
- str x20, [x29,104]
- str w23, [x20,4]
- beq .L2130
- mov x0, x22
+ ldr x20, [x21,2112]
+ ldr w0, [x29,92]
+ ldr x1, [x21,-64]
+ str w0, [x29,100]
+ cmn w0, #1
+ str w24, [x29,120]
+ str x1, [x29,104]
+ str x20, [x29,112]
+ str w25, [x20,4]
+ beq .L2313
+ add x0, x29, 96
mov w1, 1
- mov w2, w23
+ mov w2, w25
bl FlashReadPages
- b .L2131
-.L2130:
- adrp x2, :got:c_ftl_nand_byte_pre_page
- ldr x0, [x0]
+ b .L2314
+.L2313:
+ ldr x0, [x21,-64]
mov w1, 255
- ldr x2, [x2, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldrh w2, [x2]
+ ldrh w2, [x22,2036]
bl ftl_memset
-.L2131:
- mov w0, 6
- mov w26, 0
- adrp x25, :got:g_GlobalDataVersion
- mul w24, w24, w0
+.L2314:
mov w0, -3947
+ lsl w26, w26, 2
strh w0, [x20]
-.L2132:
- cmp w26, w24
- beq .L2133
- ldr x23, [x19, #:got_lo12:g_active_superblock]
- ldrh w0, [x23,4]
- cbz w0, .L2133
- ldr w0, [x22,4]
- add w26, w26, 1
+ mov w22, 0
+ add x21, x19, :lo12:.LANCHOR2
+.L2315:
+ cmp w22, w26
+ beq .L2316
+ ldrh w0, [x21,4]
+ cbz w0, .L2316
+ ldr w0, [x29,100]
+ add w22, w22, 1
str w0, [x20,12]
- ldrh w0, [x23]
+ ldrh w0, [x21]
strh w0, [x20,2]
- mov x0, x23
- str w21, [x20,8]
+ mov x0, x21
+ str w24, [x20,8]
bl get_new_active_ppa
- str w0, [x22,4]
- ldr x0, [x25, #:got_lo12:g_GlobalDataVersion]
+ str w0, [x29,100]
+ ldr w1, [x21,200]
mov w2, 0
- mov w3, w2
- ldr w1, [x0]
str w1, [x20,4]
+ mov w3, w2
add w1, w1, 1
+ add x0, x29, 96
cmn w1, #1
csel w1, w1, wzr, ne
- str w1, [x0]
+ str w1, [x21,200]
mov w1, 1
- mov x0, x22
bl FlashProgPages
- ldrh w0, [x23]
+ ldrh w0, [x21]
bl decrement_vpc_count
- b .L2132
-.L2133:
- ldr x19, [x19, #:got_lo12:g_active_superblock]
+ b .L2315
+.L2316:
+ add x19, x19, :lo12:.LANCHOR2
mov w0, 1
strb w0, [x19,10]
- b .L2127
-.L2128:
- ldr x19, [x19, #:got_lo12:g_active_superblock]
+ b .L2310
+.L2311:
+ add x19, x19, :lo12:.LANCHOR2
strb wzr, [x19,10]
-.L2127:
+.L2310:
+ ldr x1, [x29,152]
+ ldr x0, [x23,#:lo12:__stack_chk_guard]
+ cmp x1, x0
+ beq .L2321
+ bl __stack_chk_fail
+.L2321:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x29, x30, [sp], 144
+ ldp x29, x30, [sp], 160
ret
.size FtlWriteDumpData, .-FtlWriteDumpData
.align 2
stp x19, x20, [sp,16]
str x21, [sp,32]
mov w19, 0
- adrp x20, :got:c_ftl_nand_l2pmap_ram_region_num
- adrp x21, :got:p_l2p_ram_map
+ adrp x20, .LANCHOR0
+ adrp x21, .LANCHOR2
bl FtlWriteDumpData
-.L2145:
- ldr x0, [x20, #:got_lo12:c_ftl_nand_l2pmap_ram_region_num]
- ldrh w0, [x0]
+.L2329:
+ add x0, x20, :lo12:.LANCHOR0
+ ldrh w0, [x0,2066]
cmp w0, w19
- bls .L2148
- ldr x1, [x21, #:got_lo12:p_l2p_ram_map]
+ bls .L2332
+ add x1, x21, :lo12:.LANCHOR2
ubfiz x0, x19, 4, 16
- ldr x1, [x1]
+ ldr x1, [x1,144]
add x0, x1, x0
ldr w0, [x0,4]
- tbz w0, #31, .L2146
+ tbz w0, #31, .L2330
mov w0, w19
bl flush_l2p_region
-.L2146:
+.L2330:
add w19, w19, 1
uxth w19, w19
- b .L2145
-.L2148:
+ b .L2329
+.L2332:
mov w0, 0
ldr x21, [sp,32]
ldp x19, x20, [sp,16]
.global FtlVpcCheckAndModify
.type FtlVpcCheckAndModify, %function
FtlVpcCheckAndModify:
- stp x29, x30, [sp, -112]!
- adrp x1, .LANCHOR1
- adrp x0, .LC112
- add x1, x1, :lo12:.LANCHOR1
+ stp x29, x30, [sp, -96]!
+ adrp x1, .LANCHOR3
add x29, sp, 0
+ stp x21, x22, [sp,32]
+ adrp x22, __stack_chk_guard
+ add x1, x1, :lo12:.LANCHOR3
add x1, x1, 16
- add x0, x0, :lo12:.LC112
+ str x25, [sp,64]
stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
+ ldr x0, [x22,#:lo12:__stack_chk_guard]
+ adrp x21, .LANCHOR0
+ str x0, [x29,88]
+ adrp x0, .LC114
+ add x0, x0, :lo12:.LC114
+ adrp x20, .LANCHOR2
stp x23, x24, [sp,48]
- stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
bl printk
- adrp x20, :got:p_valid_page_count_check_table
- adrp x0, :got:c_ftl_nand_blk_pre_plane
mov w19, 0
- adrp x21, :got:g_MaxLpn
- add x22, x29, 108
- ldr x1, [x20, #:got_lo12:p_valid_page_count_check_table]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_blk_pre_plane]
- ldrh w2, [x0]
- ldr x0, [x1]
+ add x1, x21, :lo12:.LANCHOR0
+ add x0, x20, :lo12:.LANCHOR2
+ ldrh w2, [x1,1962]
mov w1, 0
+ ldr x0, [x0,2160]
lsl w2, w2, 1
bl ftl_memset
-.L2150:
- ldr x0, [x21, #:got_lo12:g_MaxLpn]
- ldr w0, [x0]
+.L2334:
+ add x0, x21, :lo12:.LANCHOR0
+ ldr w0, [x0,2104]
cmp w19, w0
- bcs .L2165
+ bcs .L2350
mov w0, w19
- mov x1, x22
+ add x1, x29, 84
mov w2, 0
bl log2phys
- ldr w0, [x29,108]
+ ldr w0, [x29,84]
cmn w0, #1
- beq .L2151
- lsr w0, w0, 10
+ beq .L2335
+ lsr x0, x0, 10
bl P2V_block_in_plane
ubfiz x0, x0, 1, 16
- ldr x1, [x20, #:got_lo12:p_valid_page_count_check_table]
- ldr x3, [x1]
- ldrh w2, [x3,x0]
- add w2, w2, 1
- strh w2, [x3,x0]
-.L2151:
+ add x1, x20, :lo12:.LANCHOR2
+ ldr x2, [x1,2160]
+ ldrh w1, [x2,x0]
+ add w1, w1, 1
+ strh w1, [x2,x0]
+.L2335:
add w19, w19, 1
- b .L2150
-.L2165:
- adrp x22, .LC113
+ b .L2334
+.L2350:
+ adrp x24, .LC115
mov w19, 0
- adrp x23, :got:c_ftl_nand_data_blks_per_plane
- adrp x24, :got:p_valid_page_count_table
+ add x20, x20, :lo12:.LANCHOR2
mov w25, 65535
- add x22, x22, :lo12:.LC113
- adrp x26, :got:g_active_superblock
-.L2153:
- ldr x0, [x23, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w0, [x0]
+ add x24, x24, :lo12:.LC115
+.L2337:
+ add x0, x21, :lo12:.LANCHOR0
+ ldrh w0, [x0,1960]
cmp w0, w19
- bls .L2166
- ldr x27, [x24, #:got_lo12:p_valid_page_count_table]
- ubfiz x21, x19, 1, 16
- ldr x28, [x20, #:got_lo12:p_valid_page_count_check_table]
- ldr x0, [x27]
- ldrh w2, [x0,x21]
- ldr x0, [x28]
- ldrh w3, [x0,x21]
+ bls .L2351
+ ubfiz x23, x19, 1, 16
+ ldr x0, [x20,-40]
+ ldrh w2, [x0,x23]
+ ldr x0, [x20,2160]
+ ldrh w3, [x0,x23]
cmp w2, w3
- beq .L2156
+ beq .L2340
cmp w2, w25
- beq .L2156
- mov x0, x22
+ beq .L2340
+ mov x0, x24
mov w1, w19
bl printk
- ldr x0, [x26, #:got_lo12:g_active_superblock]
- ldrh w0, [x0]
+ ldrh w0, [x20]
cmp w0, w19
- beq .L2156
- adrp x0, :got:g_gc_temp_superblock
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- ldrh w0, [x0]
+ beq .L2340
+ ldrh w0, [x20,96]
cmp w0, w19
- beq .L2156
- adrp x0, :got:g_buffer_superblock
- ldr x0, [x0, #:got_lo12:g_buffer_superblock]
- ldrh w0, [x0]
+ beq .L2340
+ ldrh w0, [x20,48]
cmp w0, w19
- beq .L2156
- ldr x0, [x28]
- ldrh w1, [x0,x21]
- ldr x0, [x27]
- strh w1, [x0,x21]
+ beq .L2340
+ ldr x0, [x20,2160]
+ ldrh w1, [x0,x23]
+ ldr x0, [x20,-40]
+ strh w1, [x0,x23]
mov w0, w19
bl update_vpc_list
bl l2p_flush
bl FtlVpcTblFlush
-.L2156:
+.L2340:
add w19, w19, 1
uxth w19, w19
- b .L2153
-.L2166:
+ b .L2337
+.L2351:
+ ldr x1, [x29,88]
+ ldr x0, [x22,#:lo12:__stack_chk_guard]
+ cmp x1, x0
+ beq .L2343
+ bl __stack_chk_fail
+.L2343:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 112
+ ldr x25, [sp,64]
+ ldp x29, x30, [sp], 96
ret
.size FtlVpcCheckAndModify, .-FtlVpcCheckAndModify
.align 2
add x29, sp, 0
stp x19, x20, [sp,16]
str x21, [sp,32]
- mov x19, x0
+ mov x20, x0
+ adrp x19, .LANCHOR2
ldrh w21, [x0]
mov w0, 65535
cmp w21, w0
- beq .L2168
- adrp x1, :got:p_valid_page_count_table
+ beq .L2353
+ add x1, x19, :lo12:.LANCHOR2
ubfiz x0, x21, 1, 16
- ldr x1, [x1, #:got_lo12:p_valid_page_count_table]
- ldr x1, [x1]
+ ldr x1, [x1,-40]
ldrh w0, [x1,x0]
- cbz w0, .L2169
+ cbz w0, .L2354
mov w0, w21
bl INSERT_DATA_LIST
- b .L2168
-.L2169:
+ b .L2353
+.L2354:
mov w0, w21
bl INSERT_FREE_LIST
-.L2168:
- adrp x0, :got:g_buffer_superblock
- strb wzr, [x19,8]
- ldr x0, [x0, #:got_lo12:g_buffer_superblock]
- cmp x19, x0
- beq .L2170
- adrp x0, :got:c_ftl_nand_type
- ldr x0, [x0, #:got_lo12:c_ftl_nand_type]
- ldrh w0, [x0]
- cmp w0, 1
- bne .L2171
-.L2170:
+.L2353:
+ add x2, x19, :lo12:.LANCHOR2
+ strb wzr, [x20,8]
+ add x0, x2, 48
+ cmp x20, x0
+ beq .L2355
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrh w1, [x0,1972]
+ cmp w1, 1
+ beq .L2355
+ ldrb w0, [x0,120]
+ cbz w0, .L2356
+.L2355:
mov w0, 1
- strb w0, [x19,8]
- b .L2172
-.L2171:
- adrp x1, :got:g_active_superblock
- ldr x2, [x1, #:got_lo12:g_active_superblock]
- cmp x19, x2
- bne .L2172
- cmp w0, 3
- beq .L2174
- adrp x0, :got:g_all_blk_used_slc_mode
- ldr x0, [x0, #:got_lo12:g_all_blk_used_slc_mode]
- ldr w0, [x0]
+ strb w0, [x20,8]
+ b .L2357
+.L2356:
+ cmp x20, x2
+ bne .L2357
+ cmp w1, 3
+ beq .L2359
+ ldr w0, [x20,344]
cmp w0, 1
- bne .L2175
-.L2174:
- ldr x0, [x1, #:got_lo12:g_active_superblock]
- mov w2, 1
- strb w2, [x0,8]
-.L2175:
- adrp x0, :got:g_inkDie_check_enable
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w0, [x0]
- cbz w0, .L2172
- adrp x0, :got:g_min_erase_count
- ldr x0, [x0, #:got_lo12:g_min_erase_count]
- ldr w0, [x0]
- cmp w0, 29
- bhi .L2172
- ldr x1, [x1, #:got_lo12:g_active_superblock]
- mov w0, 1
- strb w0, [x1,8]
-.L2172:
- adrp x1, :got:g_tmp_data_superblock_id
- mov w2, 65535
- mov x20, x1
- ldr x0, [x1, #:got_lo12:g_tmp_data_superblock_id]
- ldrh w0, [x0]
- cmp w0, w2
- beq .L2177
- cmp w21, w0
- bne .L2178
- adrp x2, :got:p_valid_page_count_table
- ubfiz x1, x0, 1, 16
- ldr x2, [x2, #:got_lo12:p_valid_page_count_table]
- ldr x2, [x2]
- ldrh w1, [x2,x1]
- cbz w1, .L2179
-.L2178:
+ bne .L2360
+.L2359:
+ add x0, x19, :lo12:.LANCHOR2
+ mov w1, 1
+ strb w1, [x0,8]
+.L2360:
+ add x0, x19, :lo12:.LANCHOR2
+ ldr w1, [x0,160]
+ cbz w1, .L2357
+ ldr w1, [x0,220]
+ cmp w1, 29
+ bhi .L2357
+ mov w1, 1
+ strb w1, [x0,8]
+.L2357:
+ add x2, x19, :lo12:.LANCHOR2
+ mov w1, 65535
+ ldrh w0, [x2,2320]
+ cmp w0, w1
+ beq .L2362
+ cmp w21, w0
+ bne .L2363
+ ubfiz x1, x0, 1, 16
+ ldr x2, [x2,-40]
+ ldrh w1, [x2,x1]
+ cbz w1, .L2364
+.L2363:
bl update_vpc_list
-.L2179:
- ldr x1, [x20, #:got_lo12:g_tmp_data_superblock_id]
+.L2364:
+ add x19, x19, :lo12:.LANCHOR2
mov w0, -1
- strh w0, [x1]
-.L2177:
- mov x0, x19
+ strh w0, [x19,2320]
+.L2362:
+ mov x0, x20
bl allocate_data_superblock
bl l2p_flush
bl FtlVpcTblFlush
ret
.size allocate_new_data_superblock, .-allocate_new_data_superblock
.align 2
- .global FtlCacheWriteBack
- .type FtlCacheWriteBack, %function
-FtlCacheWriteBack:
- adrp x0, :got:gp_last_act_superblock
+ .global rk_ftl_garbage_collect
+ .type rk_ftl_garbage_collect, %function
+rk_ftl_garbage_collect:
stp x29, x30, [sp, -144]!
+ mov w2, 0
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:gp_last_act_superblock]
- stp x19, x20, [sp,16]
stp x21, x22, [sp,32]
+ mov w22, w1
+ adrp x1, __stack_chk_guard
+ stp x19, x20, [sp,16]
stp x23, x24, [sp,48]
+ adrp x19, .LANCHOR2
+ mov w24, w0
+ ldr x0, [x1,#:lo12:__stack_chk_guard]
+ str x0, [x29,136]
+ add x0, x19, :lo12:.LANCHOR2
stp x25, x26, [sp,64]
stp x27, x28, [sp,80]
- ldr x19, [x0]
- adrp x0, :got:g_wr_page_num
- str x0, [x29,120]
- ldr x1, [x0, #:got_lo12:g_wr_page_num]
- ldr w1, [x1]
- cbz w1, .L2190
- adrp x21, :got:req_wr_io
- ldrb w3, [x19,9]
- mov w2, 0
- mov w23, 0
- adrp x24, .LC114
- mov w22, w23
- ldr x0, [x21, #:got_lo12:req_wr_io]
- mov w25, 56
- adrp x26, :got:p_valid_page_count_table
- add x24, x24, :lo12:.LC114
- ldr x0, [x0]
- bl FlashProgPages
- add x0, x29, 140
- str x0, [x29,112]
-.L2191:
- ldr x0, [x29,120]
- ldr x0, [x0, #:got_lo12:g_wr_page_num]
- ldr w1, [x0]
- cmp w22, w1
- bcs .L2209
- cbz w23, .L2192
- ldr x1, [x21, #:got_lo12:req_wr_io]
- mov w2, -1
- umull x0, w22, w25
- ldr x1, [x1]
- str w2, [x1,x0]
-.L2192:
- umull x20, w22, w25
- adrp x27, :got:c_ftl_nand_page_pre_blk
- adrp x28, :got:g_sys_ext_data
-.L2193:
- ldr x3, [x21, #:got_lo12:req_wr_io]
- ldr x1, [x3]
- add x0, x1, x20
- ldr w1, [x1,x20]
- cmn w1, #1
- bne .L2210
- ldr w0, [x0,4]
- lsr w0, w0, 10
- bl P2V_block_in_plane
- ldrh w1, [x19]
- cmp w1, w0, uxth
- bne .L2194
- ldr x0, [x26, #:got_lo12:p_valid_page_count_table]
- ubfiz x1, x1, 1, 16
- ldrh w3, [x19,4]
- ldr x2, [x0]
- ldrh w0, [x2,x1]
- sub w0, w0, w3
- strh w0, [x2,x1]
- ldr x0, [x27, #:got_lo12:c_ftl_nand_page_pre_blk]
- strb wzr, [x19,6]
- strh wzr, [x19,4]
- ldrh w0, [x0]
- strh w0, [x19,2]
-.L2194:
- ldrh w0, [x19,4]
- cbnz w0, .L2195
- mov x0, x19
- bl allocate_new_data_superblock
-.L2195:
- ldr x1, [x28, #:got_lo12:g_sys_ext_data]
- ldr w0, [x1,96]
- add w0, w0, 1
- str w0, [x1,96]
- ldr x23, [x21, #:got_lo12:req_wr_io]
- ldr x0, [x23]
- add x0, x0, x20
- ldr w0, [x0,4]
- lsr w0, w0, 10
- bl FtlGcMarkBadPhyBlk
- mov x0, x19
- bl get_new_active_ppa
- str w0, [x29,140]
- ldr x1, [x23]
- mov w2, 0
- add x1, x1, x20
- str w0, [x1,4]
- mov w1, 1
- ldr x0, [x23]
- mov w23, 1
- ldrb w3, [x19,9]
- add x0, x0, x20
- bl FlashProgPages
- b .L2193
-.L2210:
- ldr w1, [x0,4]
+ str x1, [x29,120]
+ ldr w3, [x0,2028]
+ cbnz w3, .L2378
+ ldrh w1, [x0,-24]
+ cmp w1, 47
+ bls .L2378
+ adrp x1, .LANCHOR1+3004
+ ldrh w2, [x1,#:lo12:.LANCHOR1+3004]
+ mov w1, 65535
+ cmp w2, w1
+ bne .L2379
+.L2382:
+ add x0, x19, :lo12:.LANCHOR2
+ mov w2, 65535
+ ldrh w1, [x0,954]
+ cmp w1, w2
+ bne .L2380
+ b .L2381
+.L2379:
+ ldrh w0, [x0,96]
+ cmp w0, w1
+ beq .L2382
+ mov w0, 1
+ bl FtlGcFreeTempBlock
mov w2, 1
- str w1, [x29,140]
- ldr w0, [x0,24]
+ cbz w0, .L2382
+ b .L2378
+.L2380:
+ ldrh w3, [x0,952]
+ cmp w3, w2
+ bne .L2381
+ strh w1, [x0,952]
+ mov w1, -1
+ strh w1, [x0,954]
+.L2381:
+ add x20, x19, :lo12:.LANCHOR2
+ cmp w24, 1
+ ldr w0, [x20,868]
+ add w0, w0, 1
+ add w0, w0, w24, lsl 7
+ str w0, [x20,868]
+ beq .L2383
+.L2385:
+ mov w21, 65535
+ b .L2384
+.L2383:
+ ldr w1, [x20,160]
+ cbz w1, .L2385
+ ldr w1, [x20,220]
+ cmp w1, 29
+ bhi .L2385
+ adrp x23, .LANCHOR4
+ add x21, x23, :lo12:.LANCHOR4
+ ldrh w1, [x21,400]
+ add w0, w0, w1
+ str w0, [x20,868]
+ bl FtlGcReFreshBadBlk
+ ldrh w0, [x20,296]
+ mov w1, 65535
+ cmp w0, w1
+ bne .L2385
+ ldrh w1, [x20,952]
+ cmp w1, w0
+ bne .L2385
+ ldr w0, [x20,868]
+ cmp w0, 1024
+ bls .L2385
+ ldr w0, [x20,220]
+ str wzr, [x20,868]
+ strh wzr, [x21,400]
+ cbnz w0, .L2386
+ mov w0, 6
+ b .L2537
+.L2386:
+ cmp w0, 5
+ bhi .L2387
+ mov w0, 18
+.L2537:
+ strh w0, [x21,400]
+.L2387:
+ mov w0, 32
+ mov w27, 65535
+ bl List_get_gc_head_node
+ uxth w25, w0
+ cmp w25, w27
+ beq .L2391
+ add x20, x19, :lo12:.LANCHOR2
+ ldrh w0, [x20,872]
+ cbz w0, .L2389
+ adrp x2, .LANCHOR0
+ ldr x26, [x20,-40]
+ add x2, x2, :lo12:.LANCHOR0
+ ubfiz x25, x25, 1, 16
+ ldrh w1, [x2,2028]
+ ldrh w2, [x2,1952]
+ ldrh w3, [x26,x25]
+ mul w1, w1, w2
+ add w1, w1, 1
+ cmp w3, w1
+ bgt .L2391
+ add w1, w0, 1
+ str wzr, [x20,876]
+ uxth w1, w1
+ strh w1, [x20,872]
+ str x1, [x29,112]
+ bl List_get_gc_head_node
+ uxth w21, w0
+ cmp w21, w27
ldr x1, [x29,112]
- str x3, [x29,104]
- bl log2phys
- ldr x3, [x29,104]
- ldr x0, [x3]
- add x20, x0, x20
- ldr x0, [x20,16]
- ldr w0, [x0,12]
- cmn w0, #1
- beq .L2197
- lsr w0, w0, 10
- bl P2V_block_in_plane
- uxth w1, w0
- ldr x2, [x26, #:got_lo12:p_valid_page_count_table]
- ubfiz x0, x1, 1, 16
- mov w20, w1
- ldr x2, [x2]
- ldrh w2, [x2,x0]
- cbnz w2, .L2198
- mov x0, x24
+ beq .L2391
+ ubfiz x27, x21, 1, 16
+ adrp x0, .LC116
+ ldrh w4, [x26,x25]
+ add x0, x0, :lo12:.LC116
+ mov w2, w21
+ ldrh w3, [x26,x27]
bl printk
-.L2198:
- mov w0, w20
- bl decrement_vpc_count
-.L2197:
- add w22, w22, 1
- b .L2191
-.L2209:
- str wzr, [x0]
-.L2190:
- mov w0, 0
- ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 144
- ret
- .size FtlCacheWriteBack, .-FtlCacheWriteBack
- .align 2
- .global rk_ftl_cache_write_back
- .type rk_ftl_cache_write_back, %function
-rk_ftl_cache_write_back:
- stp x29, x30, [sp, -16]!
- add x29, sp, 0
- bl FtlCacheWriteBack
- ldp x29, x30, [sp], 16
- ret
- .size rk_ftl_cache_write_back, .-rk_ftl_cache_write_back
- .align 2
- .global FtlSysFlush
- .type FtlSysFlush, %function
-FtlSysFlush:
- stp x29, x30, [sp, -16]!
- add x29, sp, 0
- bl FtlCacheWriteBack
- bl l2p_flush
- bl FtlVpcTblFlush
+ ldrh w0, [x20,872]
+ cmp w0, 40
+ bls .L2390
+ ldr x0, [x20,-40]
+ ldrh w0, [x0,x27]
+ cmp w0, 32
+ bls .L2390
+ strh wzr, [x20,872]
+.L2390:
+ add x23, x23, :lo12:.LANCHOR4
+ mov w0, 6
+ strh w0, [x23,400]
+ b .L2384
+.L2389:
mov w0, 1
- bl FtlEctTblFlush
+ strh w0, [x20,872]
+.L2391:
+ bl GetSwlReplaceBlock
+ uxth w21, w0
+ mov w0, 65535
+ cmp w21, w0
+ bne .L2384
+ add x23, x23, :lo12:.LANCHOR4
+ strh wzr, [x23,400]
+.L2384:
+ add x20, x19, :lo12:.LANCHOR2
+ mov w0, 65535
+ ldrh w1, [x20,296]
+ cmp w1, w0
+ bne .L2392
+ ldrh w0, [x20,96]
+ cmp w0, w1
+ bne .L2392
+ ldrh w25, [x20,952]
+ cmp w25, w0
+ bne .L2392
+ ldrh w0, [x20,-8]
+ mov w2, 1024
+ ldr w1, [x20,868]
+ cmp w0, 24
+ mov w0, 5120
+ csel w0, w0, w2, cc
+ cmp w1, w0
+ bls .L2392
+ adrp x0, .LANCHOR4+400
+ str wzr, [x20,868]
+ mov x23, x20
+ strh wzr, [x0,#:lo12:.LANCHOR4+400]
+ bl GetSwlReplaceBlock
+ uxth w21, w0
+ cmp w21, w25
+ bne .L2394
+ ldrh w1, [x20,-8]
+ ldrh w0, [x20,866]
+ cmp w1, w0
+ bcs .L2395
+ mov w0, 64
+ bl List_get_gc_head_node
+ uxth w0, w0
+ cmp w0, w21
+ beq .L2404
+ ldr w2, [x20,2024]
+ uxtw x1, w0
+ adrp x20, .LANCHOR0
+ cbnz w2, .L2397
+ add x0, x20, :lo12:.LANCHOR0
+ ldrh w2, [x0,1972]
+ cmp w2, 3
+ beq .L2397
+ ldr w2, [x23,344]
+ cbnz w2, .L2397
+ ldr w2, [x23,160]
+ cbnz w2, .L2397
+ ldrb w0, [x0,120]
+ cbz w0, .L2398
+.L2397:
+ add x0, x19, :lo12:.LANCHOR2
+ add x3, x20, :lo12:.LANCHOR0
+ ldr x0, [x0,-40]
+ ldrh w4, [x0,x1,lsl 1]
+ ldrh w1, [x3,2028]
+ ldrh w0, [x3,1952]
+ ldrh w3, [x3,1972]
+ mul w2, w1, w0
+ cmp w3, 3
mov w0, 0
- ldp x29, x30, [sp], 16
- ret
- .size FtlSysFlush, .-FtlSysFlush
- .align 2
- .global FtlDeInit
- .type FtlDeInit, %function
-FtlDeInit:
- adrp x0, :got:gFtlInitStatus
- stp x29, x30, [sp, -16]!
- add x29, sp, 0
- ldr x0, [x0, #:got_lo12:gFtlInitStatus]
- ldr w0, [x0]
- cmp w0, 1
- bne .L2214
- bl FtlSysFlush
-.L2214:
+ lsr w1, w1, 1
+ csel w0, w1, w0, eq
+ add w0, w2, w0
+ cmp w4, w0
+ bgt .L2400
mov w0, 0
- ldp x29, x30, [sp], 16
- ret
- .size FtlDeInit, .-FtlDeInit
- .align 2
- .global rk_ftl_de_init
- .type rk_ftl_de_init, %function
-rk_ftl_de_init:
- stp x29, x30, [sp, -16]!
- add x29, sp, 0
- bl rk_nand_de_init
- bl FtlDeInit
- bl rk_nand_de_init
- ldp x29, x30, [sp], 16
- ret
- .size rk_ftl_de_init, .-rk_ftl_de_init
- .align 2
- .global FtlDiscard
- .type FtlDiscard, %function
-FtlDiscard:
- stp x29, x30, [sp, -96]!
- add w2, w0, w1
- add x29, sp, 0
- stp x19, x20, [sp,16]
- mov w20, w0
- adrp x0, :got:g_MaxLbaSector
- stp x21, x22, [sp,32]
- stp x23, x24, [sp,48]
- ldr x0, [x0, #:got_lo12:g_MaxLbaSector]
- mov w19, w1
- str x25, [sp,64]
- ldr w1, [x0]
- mov w0, -1
- cmp w2, w1
- bhi .L2217
- cmp w19, 31
- bls .L2231
- adrp x22, :got:c_ftl_nand_sec_pre_page
- bl FtlCacheWriteBack
- ldr x0, [x22, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w1, [x0]
- udiv w21, w20, w1
- msub w20, w1, w21, w20
- uxth w20, w20
- cbz w20, .L2219
- sub w1, w1, w20
- add w21, w21, 1
- cmp w1, w19
- csel w1, w1, w19, ls
- sub w19, w19, w1, uxth
-.L2219:
- adrp x20, .LANCHOR0
- mov w0, -1
- add x23, x29, 88
- str w0, [x29,92]
add x20, x20, :lo12:.LANCHOR0
- adrp x24, :got:g_totle_discard_page_count
- add x25, x29, 92
-.L2220:
- ldr x0, [x22, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w0, [x0]
- cmp w19, w0
- bcc .L2232
- mov w0, w21
- mov x1, x23
- mov w2, 0
- bl log2phys
- ldr w0, [x29,88]
- cmn w0, #1
- beq .L2221
- ldr w0, [x20,32]
- mov w2, 1
- add w0, w0, 1
- str w0, [x20,32]
- ldr x1, [x24, #:got_lo12:g_totle_discard_page_count]
- ldr w0, [x1]
- add w0, w0, 1
- str w0, [x1]
- mov x1, x25
- mov w0, w21
- bl log2phys
- ldr w0, [x29,88]
- lsr w0, w0, 10
- bl P2V_block_in_plane
- bl decrement_vpc_count
-.L2221:
- ldr x0, [x22, #:got_lo12:c_ftl_nand_sec_pre_page]
- add w21, w21, 1
- ldrh w0, [x0]
- sub w19, w19, w0
- b .L2220
-.L2232:
+ bl List_get_gc_head_node
+ uxth w21, w0
+ add x1, x19, :lo12:.LANCHOR2
+ ldr w0, [x20,2104]
+ ldr w2, [x1,156]
+ add w0, w0, w0, lsl 1
+ cmp w2, w0, lsr 2
+ bls .L2401
+ mov w0, 128
+ b .L2538
+.L2401:
+ mov w0, 160
+.L2538:
+ strh w0, [x1,866]
+ b .L2402
+.L2400:
+ add x0, x19, :lo12:.LANCHOR2
+ mov w1, 128
+ b .L2539
+.L2398:
+ ldr x2, [x23,-40]
+ ldrh w1, [x2,x1,lsl 1]
+ cmp w1, 7
+ bhi .L2403
+ bl List_get_gc_head_node
+ uxth w21, w0
+ add x0, x19, :lo12:.LANCHOR2
+ mov w1, 128
+ strh w1, [x0,866]
+ b .L2402
+.L2403:
+ add x0, x19, :lo12:.LANCHOR2
+ mov w1, 64
+.L2539:
+ strh w1, [x0,866]
+ b .L2404
+.L2395:
+ mov w0, 80
+ strh w0, [x20,866]
+ b .L2404
+.L2402:
+ mov w0, 65535
+ cmp w21, w0
+ beq .L2404
+.L2394:
+ add x5, x19, :lo12:.LANCHOR2
+ ubfiz x4, x21, 1, 16
+ adrp x0, .LC117
+ mov w1, w21
+ add x0, x0, :lo12:.LC117
+ ldr x3, [x5,-40]
+ ldr x6, [x5,-80]
+ ldrh w2, [x5,-8]
+ ldrh w3, [x3,x4]
+ ldrh w5, [x5,864]
+ ldrh w4, [x6,x4]
+ bl printk
+.L2404:
+ bl FtlGcReFreshBadBlk
+.L2392:
+ mov w0, 65535
+ cmp w21, w0
+ cset w1, eq
+ cbz w1, .L2405
+ cbnz w24, .L2405
+ add x0, x19, :lo12:.LANCHOR2
+ mov w20, 1
+ ldrh w1, [x0,-8]
+ cmp w1, 24
+ bhi .L2406
adrp x0, .LANCHOR0
+ cmp w1, 16
add x0, x0, :lo12:.LANCHOR0
- ldr w1, [x0,32]
- cmp w1, 32
- bls .L2231
- str wzr, [x0,32]
- bl l2p_flush
- bl FtlVpcTblFlush
-.L2231:
- mov w0, 0
-.L2217:
- ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
- ldr x25, [sp,64]
- ldp x29, x30, [sp], 96
- ret
- .size FtlDiscard, .-FtlDiscard
- .align 2
- .global FtlGcFreeTempBlock
- .type FtlGcFreeTempBlock, %function
-FtlGcFreeTempBlock:
- stp x29, x30, [sp, -112]!
- add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x19, :got:g_gc_temp_superblock
- adrp x20, :got:c_ftl_nand_page_pre_blk
- stp x21, x22, [sp,32]
- stp x23, x24, [sp,48]
- ldr x2, [x19, #:got_lo12:g_gc_temp_superblock]
- stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- ldr x1, [x20, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w21, [x2]
+ ldrh w20, [x0,2026]
+ bls .L2407
+ lsr w20, w20, 5
+ b .L2406
+.L2407:
+ cmp w1, 12
+ bls .L2408
+ lsr w20, w20, 4
+ b .L2406
+.L2408:
+ cmp w1, 8
+ bls .L2406
+ lsr w20, w20, 2
+.L2406:
+ add x0, x19, :lo12:.LANCHOR2
+ ldrh w2, [x0,864]
+ cmp w2, w1
+ bcs .L2410
+ ldrh w1, [x0,96]
mov w2, 65535
- cmp w21, w2
- ldrh w1, [x1]
- bne .L2234
-.L2244:
- adrp x0, :got:ftl_gc_temp_power_lost_recovery_flag
- ldr x0, [x0, #:got_lo12:ftl_gc_temp_power_lost_recovery_flag]
- str wzr, [x0]
- mov w0, 65535
- ldr x22, [x19, #:got_lo12:g_gc_temp_superblock]
- ldrh w1, [x22]
+ cmp w1, w2
+ bne .L2411
+ ldrh w2, [x0,952]
+ cmp w2, w1
+ bne .L2411
+ adrp x1, .LANCHOR4+400
+ ldrh w2, [x1,#:lo12:.LANCHOR4+400]
+ cbnz w2, .L2412
+ adrp x1, .LANCHOR0+2104
+ ldr w3, [x0,156]
+ ldr w1, [x1,#:lo12:.LANCHOR0+2104]
+ add w1, w1, w1, lsl 1
+ cmp w3, w1, lsr 2
+ bcs .L2413
+.L2412:
+ add x1, x19, :lo12:.LANCHOR2
+ ldrh w0, [x1,272]
+ add w0, w0, w0, lsl 1
+ asr w0, w0, 2
+ strh w0, [x1,864]
+ b .L2414
+.L2413:
+ mov w1, 18
+ strh w1, [x0,864]
+.L2414:
+ add x19, x19, :lo12:.LANCHOR2
+ str wzr, [x19,876]
+ b .L2378
+.L2411:
+ add x1, x19, :lo12:.LANCHOR2
+ ldrh w0, [x1,272]
+ add w0, w0, w0, lsl 1
+ asr w0, w0, 2
+ strh w0, [x1,864]
+.L2410:
+ cmp w22, 2
+ bhi .L2470
+ add x0, x19, :lo12:.LANCHOR2
+ ldr w0, [x0,160]
+ cbz w0, .L2470
+ add w20, w20, 1
+ uxth w20, w20
+ b .L2470
+.L2405:
+ add x20, x19, :lo12:.LANCHOR2
+ mov w2, 65535
+ ldrh w0, [x20,96]
+ cmp w0, w2
+ bne .L2417
+ cbz w1, .L2417
+ ldrh w1, [x20,952]
cmp w1, w0
- beq .L2262
- adrp x21, :got:p_valid_page_count_table
- bl FtlCacheWriteBack
- ldr x20, [x20, #:got_lo12:c_ftl_nand_page_pre_blk]
- adrp x25, :got:p_gc_page_info
- ldrh w2, [x22]
- mov w26, 12
- ldr x0, [x21, #:got_lo12:p_valid_page_count_table]
- add x27, x29, 108
- ldrh w3, [x20]
- adrp x20, :got:g_gc_page_offset
- ldr x1, [x0]
- ldrb w0, [x22,7]
- mov w22, 0
- mul w0, w0, w3
- strh w0, [x1,x2,lsl 1]
- adrp x0, :got:g_totle_gc_page_count
- ldr x1, [x20, #:got_lo12:g_gc_page_offset]
- ldr x0, [x0, #:got_lo12:g_totle_gc_page_count]
- ldrh w2, [x1]
- ldr w1, [x0]
- add w1, w2, w1
- str w1, [x0]
- b .L2245
-.L2234:
- cbz w0, .L2237
- adrp x0, .LANCHOR2
- add x0, x0, :lo12:.LANCHOR2
- ldrh w3, [x0,128]
- cmp w3, w2
- beq .L2238
-.L2239:
+ bne .L2417
+ ldrh w1, [x20,296]
+ cmp w1, w0
+ beq .L2418
+.L2423:
+ mov w21, 65535
+ b .L2417
+.L2418:
+ ldrh w23, [x20,-8]
+ adrp x21, .LANCHOR4
+ ldrh w0, [x20,864]
+ str wzr, [x20,876]
+ cmp w0, w23
+ bcs .L2419
+ add x0, x21, :lo12:.LANCHOR4
+ ldrh w0, [x0,400]
+ cbnz w0, .L2420
+ adrp x0, .LANCHOR0+2104
+ ldr w1, [x20,156]
+ ldr w0, [x0,#:lo12:.LANCHOR0+2104]
+ add w0, w0, w0, lsl 1
+ cmp w1, w0, lsr 2
+ bcs .L2421
+.L2420:
+ add x19, x19, :lo12:.LANCHOR2
+ ldrh w0, [x19,272]
+ add w0, w0, w0, lsl 1
+ asr w0, w0, 2
+ strh w0, [x19,864]
+ b .L2422
+.L2421:
+ mov w0, 18
+ strh w0, [x20,864]
+.L2422:
+ add x21, x21, :lo12:.LANCHOR4
+ bl FtlReadRefresh
+ ldrh w2, [x21,400]
+ b .L2378
+.L2419:
+ add x22, x21, :lo12:.LANCHOR4
+ ldrh w0, [x22,400]
+ cbnz w0, .L2423
+ ldrh w21, [x20,272]
+ add w1, w21, w21, lsl 1
+ asr w1, w1, 2
+ strh w1, [x20,864]
+ bl List_get_gc_head_node
+ ubfiz x0, x0, 1, 16
+ ldr x1, [x20,-40]
+ ldrh w2, [x1,x0]
+ adrp x1, .LANCHOR0
+ add x1, x1, :lo12:.LANCHOR0
+ ldrh w0, [x1,2028]
+ ldrh w1, [x1,1952]
+ mul w0, w0, w1
mov w1, 2
- b .L2237
-.L2238:
- strh wzr, [x0,128]
- adrp x0, :got:g_num_free_superblocks
- ldr x0, [x0, #:got_lo12:g_num_free_superblocks]
- ldrh w0, [x0]
- cmp w0, 17
- bhi .L2239
-.L2237:
- ldr x0, [x19, #:got_lo12:g_gc_temp_superblock]
- bl FtlGcScanTempBlk
- str w0, [x29,108]
- cmn w0, #1
- beq .L2240
- adrp x0, :got:g_sys_ext_data
- ubfiz x21, x21, 1, 16
- ldr x0, [x0, #:got_lo12:g_sys_ext_data]
- ldr w1, [x0,96]
- add w1, w1, 1
- str w1, [x0,96]
- adrp x0, :got:p_erase_count_table
- ldr x0, [x0, #:got_lo12:p_erase_count_table]
- ldr x1, [x0]
- ldrh w0, [x1,x21]
- cmp w0, 4
- bls .L2241
- sub w0, w0, #5
- strh w0, [x1,x21]
- mov w0, 1
- bl FtlEctTblFlush
-.L2241:
- adrp x0, :got:ftl_gc_temp_power_lost_recovery_flag
- mov x19, x0
- ldr x1, [x0, #:got_lo12:ftl_gc_temp_power_lost_recovery_flag]
- ldr w1, [x1]
- cbnz w1, .L2242
- ldr w0, [x29,108]
- lsr w0, w0, 10
- bl FtlBbmMapBadBlock
- bl FtlBbmTblFlush
-.L2242:
- ldr x0, [x19, #:got_lo12:ftl_gc_temp_power_lost_recovery_flag]
- str wzr, [x0]
- mov w0, 1
- b .L2243
-.L2240:
- adrp x0, .LANCHOR2+128
- mov w1, 65535
- ldrh w2, [x0,#:lo12:.LANCHOR2+128]
- mov w0, 1
- cmp w2, w1
- bne .L2243
- b .L2244
-.L2248:
- ldr x0, [x25, #:got_lo12:p_gc_page_info]
- mov x1, x27
- umull x24, w22, w26
- mov w2, 0
- ldr x28, [x0]
- add x23, x28, x24
- ldr w0, [x23,8]
- bl log2phys
- ldr w0, [x29,108]
- ldr w1, [x28,x24]
- cmp w0, w1
- bne .L2246
- lsr w0, w0, 10
- bl P2V_block_in_plane
- mov w24, w0
- ldr w0, [x23,8]
- add x1, x23, 4
- mov w2, 1
- bl log2phys
- mov w0, w24
-.L2261:
- bl decrement_vpc_count
-.L2247:
- add w22, w22, 1
- uxth w22, w22
-.L2245:
- ldr x0, [x20, #:got_lo12:g_gc_page_offset]
- ldrh w0, [x0]
- cmp w0, w22
- bhi .L2248
- b .L2264
-.L2246:
- ldr w1, [x23,4]
- cmp w0, w1
- beq .L2247
- ldr x0, [x19, #:got_lo12:g_gc_temp_superblock]
- ldrh w0, [x0]
- b .L2261
-.L2264:
+ sdiv w0, w0, w1
+ cmp w2, w0
+ ble .L2424
+ sub w21, w21, #1
+ cmp w23, w21
+ blt .L2424
+ bl FtlReadRefresh
+ ldrh w2, [x22,400]
+ b .L2378
+.L2424:
+ cbnz w2, .L2423
mov w0, -1
+ add x19, x19, :lo12:.LANCHOR2
bl decrement_vpc_count
- ldr x21, [x21, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x19, #:got_lo12:g_gc_temp_superblock]
- ldr x2, [x21]
- ldrh w0, [x0]
- ubfiz x1, x0, 1, 16
- ldrh w1, [x2,x1]
- cbz w1, .L2249
- bl INSERT_DATA_LIST
- b .L2250
-.L2249:
- bl INSERT_FREE_LIST
-.L2250:
- ldr x19, [x19, #:got_lo12:g_gc_temp_superblock]
+ ldrh w2, [x19,-8]
+ add w2, w2, 1
+ b .L2378
+.L2417:
+ add x0, x19, :lo12:.LANCHOR2
+ mov w20, 2
+ ldr w0, [x0,160]
+ cmp w0, wzr
+ csinc w20, w20, wzr, ne
+ b .L2416
+.L2470:
+ mov w21, 65535
+.L2416:
+ add x0, x19, :lo12:.LANCHOR2
+ mov w2, 65535
+ ldrh w1, [x0,296]
+ cmp w1, w2
+ bne .L2426
+ cmp w21, w1
+ beq .L2427
+ strh w21, [x0,296]
+ b .L2428
+.L2427:
+ ldrh w1, [x0,952]
+ cmp w1, w21
+ beq .L2428
+ strh w1, [x0,296]
+ mov w1, -1
+ strh w1, [x0,952]
+.L2428:
+ adrp x1, .LANCHOR0+120
+ add x0, x19, :lo12:.LANCHOR2
+ add x22, x0, 296
+ ldrb w1, [x1,#:lo12:.LANCHOR0+120]
+ strb wzr, [x0,304]
+ cbz w1, .L2429
+ ldrh w0, [x0,296]
+ bl ftl_get_blk_mode
+ strb w0, [x22,8]
+.L2429:
+ add x22, x19, :lo12:.LANCHOR2
+ ldrh w0, [x22,296]
+ bl IsBlkInGcList
+ cbz w0, .L2430
mov w0, -1
- strh w0, [x19]
- adrp x0, :got:g_gc_blk_num
- ldr x20, [x20, #:got_lo12:g_gc_page_offset]
- strh wzr, [x20]
- ldr x0, [x0, #:got_lo12:g_gc_blk_num]
- strh wzr, [x0]
- bl l2p_flush
- bl FtlVpcTblFlush
- adrp x0, :got:g_inkDie_check_enable
- adrp x1, :got:g_num_free_superblocks
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w2, [x0]
- adrp x0, :got:c_ftl_nand_data_op_blks_per_plane
- cbz w2, .L2251
- adrp x2, :got:g_min_erase_count
- ldr x2, [x2, #:got_lo12:g_min_erase_count]
- ldr w2, [x2]
- cmp w2, 29
- bhi .L2251
- ldr x0, [x0, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- ldr x1, [x1, #:got_lo12:g_num_free_superblocks]
- ldrh w0, [x0]
- ldrh w1, [x1]
+ strh w0, [x22,296]
+.L2430:
+ add x22, x19, :lo12:.LANCHOR2
+ mov w0, 65535
+ add x23, x22, 296
+ ldrh w1, [x22,296]
cmp w1, w0
- bcs .L2252
- adrp x1, :got:g_gc_free_blk_threshold
- lsl w0, w0, 1
- ldr x1, [x1, #:got_lo12:g_gc_free_blk_threshold]
- strh w0, [x1]
-.L2252:
- adrp x0, :got:g_gc_superblock
- mov w1, -1
- ldr x0, [x0, #:got_lo12:g_gc_superblock]
- b .L2263
-.L2251:
- ldr x0, [x0, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- ldr x1, [x1, #:got_lo12:g_num_free_superblocks]
- ldrh w0, [x0]
- ldrh w1, [x1]
- add w0, w0, w0, lsl 1
- cmp w1, w0, lsr 2
- ble .L2262
- adrp x0, :got:g_gc_superblock
- mov w1, -1
- ldr x0, [x0, #:got_lo12:g_gc_superblock]
- strh w1, [x0]
- adrp x0, :got:g_gc_free_blk_threshold
- mov w1, 20
- ldr x0, [x0, #:got_lo12:g_gc_free_blk_threshold]
-.L2263:
- strh w1, [x0]
-.L2262:
- mov w0, 0
-.L2243:
- ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 112
- ret
- .size FtlGcFreeTempBlock, .-FtlGcFreeTempBlock
- .align 2
- .global FtlGcPageRecovery
- .type FtlGcPageRecovery, %function
-FtlGcPageRecovery:
- stp x29, x30, [sp, -32]!
- add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x19, :got:c_ftl_nand_page_pre_blk
- adrp x20, :got:g_gc_temp_superblock
- ldr x19, [x19, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldr x20, [x20, #:got_lo12:g_gc_temp_superblock]
- ldrh w1, [x19]
- mov x0, x20
- bl FtlGcScanTempBlk
- ldrh w1, [x20,2]
- ldrh w0, [x19]
+ beq .L2426
+ mov x0, x23
+ bl make_superblock
+ strh wzr, [x22,298]
+ adrp x0, .LANCHOR4
+ ldrh w2, [x22,296]
+ add x0, x0, :lo12:.LANCHOR4
+ ldr x1, [x22,-40]
+ strb wzr, [x22,302]
+ strh wzr, [x0,402]
+ ldrh w1, [x1,x2,lsl 1]
+ strh w1, [x0,404]
+.L2426:
+ add x3, x19, :lo12:.LANCHOR2
+ ldrh w1, [x19,#:lo12:.LANCHOR2]
+ ldrh w0, [x3,296]
cmp w1, w0
- bcc .L2265
- adrp x0, :got:gL2pMapInfo
- ldr x0, [x0, #:got_lo12:gL2pMapInfo]
- bl FtlMapBlkWriteDumpData
- mov w0, 0
- bl FtlGcFreeTempBlock
- adrp x0, :got:ftl_gc_temp_power_lost_recovery_flag
- ldr x0, [x0, #:got_lo12:ftl_gc_temp_power_lost_recovery_flag]
- str wzr, [x0]
-.L2265:
- ldp x19, x20, [sp,16]
- ldp x29, x30, [sp], 32
- ret
- .size FtlGcPageRecovery, .-FtlGcPageRecovery
- .align 2
- .global FtlPowerLostRecovery
- .type FtlPowerLostRecovery, %function
-FtlPowerLostRecovery:
- adrp x0, :got:g_power_lost_recovery_flag
- stp x29, x30, [sp, -32]!
- add x29, sp, 0
- ldr x0, [x0, #:got_lo12:g_power_lost_recovery_flag]
- str x19, [sp,16]
- adrp x19, :got:g_active_superblock
- strh wzr, [x0]
- adrp x0, :got:g_recovery_page_num
- ldr x0, [x0, #:got_lo12:g_recovery_page_num]
- str wzr, [x0]
- ldr x19, [x19, #:got_lo12:g_active_superblock]
- mov x0, x19
- bl FtlRecoverySuperblock
- mov x0, x19
- adrp x19, :got:g_buffer_superblock
- bl FtlSlcSuperblockCheck
- ldr x19, [x19, #:got_lo12:g_buffer_superblock]
- mov x0, x19
- bl FtlRecoverySuperblock
- mov x0, x19
- bl FtlSlcSuperblockCheck
- bl FtlGcPageRecovery
+ beq .L2432
+ ldrh w1, [x3,48]
+ cmp w1, w0
+ beq .L2432
+.L2433:
+ mov x28, x3
+ mov w24, 65535
+ b .L2434
+.L2432:
+ add x19, x19, :lo12:.LANCHOR2
mov w0, -1
- bl decrement_vpc_count
- ldr x19, [sp,16]
- mov w0, 0
- ldp x29, x30, [sp], 32
- ret
- .size FtlPowerLostRecovery, .-FtlPowerLostRecovery
- .align 2
- .global Ftl_gc_temp_data_write_back
- .type Ftl_gc_temp_data_write_back, %function
-Ftl_gc_temp_data_write_back:
- stp x29, x30, [sp, -64]!
- mov w2, 0
- add x29, sp, 0
- stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
- adrp x19, :got:req_gc_dst
- adrp x21, :got:g_gc_num_req
- str x23, [sp,48]
- mov w3, w2
- mov w20, 0
- mov w23, 56
- ldr x0, [x19, #:got_lo12:req_gc_dst]
- ldr x1, [x21, #:got_lo12:g_gc_num_req]
- ldr x0, [x0]
- ldr w1, [x1]
- bl FlashProgPages
-.L2269:
- ldr x22, [x21, #:got_lo12:g_gc_num_req]
- ldr w1, [x22]
- cmp w20, w1
- bcs .L2275
- ldr x3, [x19, #:got_lo12:req_gc_dst]
- umull x0, w20, w23
- ldr x2, [x3]
- add x1, x2, x0
- ldr w4, [x2,x0]
- cmn w4, #1
- bne .L2270
- adrp x1, :got:g_gc_temp_superblock
- adrp x2, :got:p_valid_page_count_table
- ldr x1, [x1, #:got_lo12:g_gc_temp_superblock]
- ldr x2, [x2, #:got_lo12:p_valid_page_count_table]
- ldrh w5, [x1]
- ldr x2, [x2]
- strh wzr, [x2,x5,lsl 1]
- strh w4, [x1]
- adrp x1, :got:g_sys_ext_data
- ldr x1, [x1, #:got_lo12:g_sys_ext_data]
- ldr w2, [x1,96]
- add w2, w2, 1
- str w2, [x1,96]
- ldr x1, [x3]
- add x0, x1, x0
- ldr w0, [x0,4]
- lsr w0, w0, 10
- bl FtlBbmMapBadBlock
- bl FtlBbmTblFlush
- bl FtlGcPageVarInit
- b .L2274
-.L2270:
- ldr x2, [x1,16]
- add w20, w20, 1
- ldr w1, [x1,4]
+ strh w0, [x19,296]
+ b .L2540
+.L2454:
+ ldrh w0, [x28,298]
+ add w20, w20, w0
uxth w20, w20
- ldr w0, [x2,12]
- ldr w2, [x2,8]
- bl FtlGcUpdatePage
- b .L2269
-.L2275:
- ldr x19, [x19, #:got_lo12:req_gc_dst]
- ldr x0, [x19]
- bl FtlGcBufFree
- str wzr, [x22]
- adrp x0, :got:g_gc_temp_superblock
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- ldrh w1, [x0,4]
- mov w0, 0
- cbnz w1, .L2271
- mov w0, 1
- bl FtlGcFreeTempBlock
-.L2274:
- mov w0, 1
-.L2271:
- ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
- ldr x23, [sp,48]
- ldp x29, x30, [sp], 64
- ret
- .size Ftl_gc_temp_data_write_back, .-Ftl_gc_temp_data_write_back
- .align 2
- .global FtlSysBlkInit
- .type FtlSysBlkInit, %function
-FtlSysBlkInit:
- adrp x0, :got:c_ftl_nand_max_sys_blks
- stp x29, x30, [sp, -48]!
- add x29, sp, 0
- ldr x0, [x0, #:got_lo12:c_ftl_nand_max_sys_blks]
- stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
- ldrh w0, [x0]
- bl FtlFreeSysBlkQueueInit
- bl FtlScanSysBlk
- adrp x0, :got:gSysInfo
- ldr x0, [x0, #:got_lo12:gSysInfo]
- ldrh w1, [x0]
- mov w0, 65535
+ strh w20, [x28,298]
+ cmp w20, w25
+ adrp x20, .LANCHOR4
+ bcs .L2456
+ add x0, x20, :lo12:.LANCHOR4
+ ldrh w1, [x0,402]
+ ldrh w0, [x0,404]
cmp w1, w0
- bne .L2277
-.L2279:
- mov w22, -1
- b .L2278
-.L2277:
- bl FtlLoadSysInfo
+ beq .L2456
+.L2457:
+ ldrh w0, [x28,-8]
+ cmp w0, 2
+ bhi .L2460
+ add x23, x23, :lo12:.LANCHOR0
+ ldrh w20, [x23,2026]
+.L2434:
+ ldrh w0, [x28,296]
+ cmp w0, w24
+ bne .L2435
+ str wzr, [x28,876]
+.L2436:
+ ldrh w22, [x28,872]
+ mov w0, w22
+ bl List_get_gc_head_node
+ uxth w23, w0
+ cmp w23, w24
+ strh w23, [x28,296]
+ bne .L2437
+ strh wzr, [x28,872]
+ mov w2, 8
+ b .L2378
+.L2437:
+ mov w0, w23
+ add w22, w22, 1
+ bl IsBlkInGcList
+ cbz w0, .L2438
+ strh w22, [x28,872]
+ b .L2436
+.L2438:
+ adrp x0, .LANCHOR0
+ ubfiz x1, x23, 1, 16
+ add x5, x0, :lo12:.LANCHOR0
+ ldr x2, [x28,-40]
+ uxth w22, w22
+ mov w3, 2
+ strh w22, [x28,872]
+ ldrh w0, [x5,2026]
+ ldrh w5, [x5,1952]
+ ldrh w4, [x2,x1]
+ mul w0, w0, w5
+ sdiv w5, w0, w3
+ cmp w4, w5
+ bgt .L2440
+ cmp w4, 8
+ bls .L2441
+ cmp w22, 48
+ bls .L2441
+ ldrh w4, [x28,924]
+ cmp w4, 35
+ bhi .L2441
+.L2440:
+ strh wzr, [x28,872]
+.L2441:
+ ldrh w1, [x2,x1]
+ cmp w1, w0
+ blt .L2442
+ cmp w21, w24
+ bne .L2442
+ add x19, x19, :lo12:.LANCHOR2
+ mov w0, -1
+ strh wzr, [x19,872]
+ strh w0, [x19,296]
+.L2540:
+ adrp x0, .LANCHOR4+400
+ ldrh w2, [x0,#:lo12:.LANCHOR4+400]
+ b .L2378
+.L2442:
+ cbnz w1, .L2443
+ mov w0, -1
+ bl decrement_vpc_count
+ ldrh w0, [x28,872]
+ add w0, w0, 1
+ strh w0, [x28,872]
+ b .L2436
+.L2443:
+ adrp x0, .LANCHOR0
+ strb wzr, [x28,304]
+ add x0, x0, :lo12:.LANCHOR0
+ ldrb w0, [x0,120]
+ cbz w0, .L2444
+ mov w0, w23
+ bl ftl_get_blk_mode
+ strb w0, [x28,304]
+.L2444:
+ add x22, x28, 296
+ mov x0, x22
+ bl make_superblock
+ adrp x1, .LANCHOR4
+ ldrh w2, [x28,296]
+ add x1, x1, :lo12:.LANCHOR4
+ ldr x0, [x28,-40]
+ strh wzr, [x1,402]
+ ldrh w0, [x0,x2,lsl 1]
+ strh w0, [x1,404]
+ strh wzr, [x28,298]
+ strb wzr, [x28,302]
+.L2435:
+ bl FtlReadRefresh
+ adrp x23, .LANCHOR0
+ mov w0, 1
+ str w0, [x28,2028]
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrb w1, [x0,120]
+ ldrh w25, [x0,2026]
+ cbz w1, .L2445
+ ldrb w1, [x28,304]
+ cmp w1, 1
+ bne .L2445
+ ldrh w25, [x0,2028]
+.L2445:
+ ldrh w0, [x28,298]
+ add w1, w0, w20
+ cmp w1, w25
+ ble .L2446
+ sub w20, w25, w0
+ uxth w20, w20
+.L2446:
+ mov w26, 0
+.L2447:
+ cmp w20, w26, uxth
+ bls .L2454
+ add x1, x28, 296
+ add x0, x23, :lo12:.LANCHOR0
+ ldrh w4, [x1,2]
+ ldrh w6, [x0,1952]
+ mov x0, 0
+ add w4, w4, w26
mov w22, w0
- cbnz w0, .L2279
- bl FtlLoadMapInfo
- bl FtlLoadVonderInfo
- bl Ftl_load_ext_data
- bl FtlLoadEctTbl
- bl FtlFreeSysBLkSort
- bl SupperBlkListInit
- bl FtlPowerLostRecovery
- adrp x0, :got:c_ftl_nand_l2pmap_ram_region_num
- mov x1, 0
- ldr x0, [x0, #:got_lo12:c_ftl_nand_l2pmap_ram_region_num]
- ldrh w2, [x0]
- adrp x0, :got:p_l2p_ram_map
- ldr x0, [x0, #:got_lo12:p_l2p_ram_map]
- ldr x0, [x0]
-.L2280:
- cmp w1, w2
- mov w3, w1
- bge .L2284
- add x4, x0, x1, lsl 4
- add x1, x1, 1
- ldr w4, [x4,4]
- tbz w4, #31, .L2280
-.L2284:
- adrp x19, :got:g_sys_save_data
- cmp w3, w2
- adrp x20, :got:g_active_superblock
- ldr x1, [x19, #:got_lo12:g_sys_save_data]
- ldrh w0, [x1,28]
+.L2455:
+ cmp w6, w0, uxth
+ bls .L2541
+ add x2, x1, x0, lsl 1
+ ldrh w2, [x2,16]
+ cmp w2, w24
+ beq .L2448
+ mov w3, 56
+ ldr x7, [x28,912]
+ orr w2, w4, w2, lsl 10
+ umull x5, w22, w3
+ add w22, w22, 1
+ add x5, x7, x5
+ uxth w22, w22
+ str w2, [x5,4]
+.L2448:
+ add x0, x0, 1
+ b .L2455
+.L2541:
+ ldr x0, [x28,912]
+ mov w1, w22
+ ldrb w2, [x28,304]
+ mov x27, 0
+ bl FlashReadPages
+.L2450:
+ cmp w22, w27, uxth
+ bls .L2542
+ mov x0, 56
+ mul x4, x27, x0
+ ldr x0, [x28,912]
+ add x1, x0, x4
+ ldr w0, [x0,x4]
+ cmn w0, #1
+ ldr x5, [x1,16]
+ beq .L2472
+ ldrh w0, [x5]
+ mov w1, 61589
+ cmp w0, w1
+ bne .L2472
+ ldr w0, [x5,8]
+ add x1, x29, 132
+ mov w2, 0
+ str x4, [x29,104]
+ str x5, [x29,112]
+ bl log2phys
+ ldr x2, [x28,912]
+ ldr x4, [x29,104]
+ ldr w0, [x29,132]
+ add x2, x2, x4
+ ldr x5, [x29,112]
+ and w0, w0, 2147483647
+ ldr w1, [x2,4]
+ cmp w0, w1
+ bne .L2472
+ adrp x0, .LANCHOR4
+ mov x3, 56
+ add x1, x0, :lo12:.LANCHOR4
+ str x4, [x29,96]
+ str x5, [x29,104]
+ ldrh w0, [x1,402]
add w0, w0, 1
- strh w0, [x1,28]
- blt .L2281
- adrp x0, :got:g_power_lost_recovery_flag
- ldr x0, [x0, #:got_lo12:g_power_lost_recovery_flag]
- ldrh w0, [x0]
- cbz w0, .L2285
-.L2281:
- adrp x3, :got:p_valid_page_count_table
- ldr x1, [x20, #:got_lo12:g_active_superblock]
- ldr x3, [x3, #:got_lo12:p_valid_page_count_table]
- ldrh w0, [x1]
- ldrh w5, [x1,4]
- ldr x4, [x3]
- lsl x0, x0, 1
- ldrh w2, [x4,x0]
- sub w2, w2, w5
- strh w2, [x4,x0]
- adrp x0, :got:c_ftl_nand_page_pre_blk
- ldr x4, [x3]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- strh wzr, [x1,4]
- strb wzr, [x1,6]
- ldrh w2, [x0]
- strh w2, [x1,2]
- adrp x1, :got:g_buffer_superblock
- ldr x1, [x1, #:got_lo12:g_buffer_superblock]
- ldrh w2, [x1]
- ldrh w5, [x1,4]
- lsl x2, x2, 1
- ldrh w3, [x4,x2]
- sub w3, w3, w5
- strh w3, [x4,x2]
- strb wzr, [x1,6]
- ldrh w0, [x0]
- strh w0, [x1,2]
- adrp x0, :got:gL2pMapInfo
- strh wzr, [x1,4]
- ldr x0, [x0, #:got_lo12:gL2pMapInfo]
- bl FtlMapBlkWriteDumpData
- adrp x0, :got:gVendorBlkInfo
- ldr x0, [x0, #:got_lo12:gVendorBlkInfo]
- bl FtlMapBlkWriteDumpData
- ldr x1, [x19, #:got_lo12:g_sys_save_data]
- ldrh w0, [x1,30]
+ strh w0, [x1,402]
+ ldr w0, [x28,880]
+ ldr x1, [x28,2056]
+ madd x1, x0, x3, x1
+ ldr w0, [x2,24]
+ str x1, [x29,112]
+ str w0, [x1,24]
+ bl Ftl_get_new_temp_ppa
+ ldr x1, [x29,112]
+ mov x2, 56
+ ldr x4, [x29,96]
+ ldr x5, [x29,104]
+ str w0, [x1,4]
+ ldr w0, [x28,880]
+ ldr x1, [x28,2056]
+ madd x0, x0, x2, x1
+ ldr x1, [x28,912]
+ add x1, x1, x4
+ ldr x2, [x1,8]
+ str x2, [x0,8]
+ add x2, x28, 96
+ str x2, [x29,112]
+ ldr x1, [x1,16]
+ str x1, [x0,16]
+ mov w1, 1
+ ldr w0, [x29,132]
+ str w0, [x5,12]
+ ldrh w0, [x28,96]
+ strh w0, [x5,2]
+ ldr w0, [x28,200]
+ str w0, [x5,4]
+ ldr w0, [x28,880]
add w0, w0, 1
- strh w0, [x1,30]
+ str w0, [x28,880]
+ ldr x0, [x28,912]
+ add x0, x0, x4
+ bl FtlGcBufAlloc
+ add x0, x23, :lo12:.LANCHOR0
+ ldrb w0, [x0,120]
+ cbnz w0, .L2452
+ ldr x2, [x29,112]
+ ldr w1, [x28,880]
+ ldrb w0, [x2,7]
+ cmp w1, w0
+ beq .L2452
+ ldrh w0, [x2,4]
+ cbnz w0, .L2472
+.L2452:
+ bl Ftl_gc_temp_data_write_back
+ cbz w0, .L2472
+ adrp x0, .LANCHOR4
+ add x19, x19, :lo12:.LANCHOR2
+ add x0, x0, :lo12:.LANCHOR4
+ str wzr, [x19,2028]
+ ldrh w2, [x0,400]
+ b .L2378
+.L2472:
+ add x27, x27, 1
+ b .L2450
+.L2542:
+ add w26, w26, 1
+ b .L2447
+.L2456:
+ ldr w0, [x28,880]
+ cbz w0, .L2458
+ bl Ftl_gc_temp_data_write_back
+ cbz w0, .L2458
+ add x20, x20, :lo12:.LANCHOR4
+ str wzr, [x28,2028]
+ ldrh w2, [x20,400]
+ b .L2378
+.L2458:
+ add x0, x20, :lo12:.LANCHOR4
+ ldrh w2, [x0,402]
+ cbnz w2, .L2459
+ ldrh w0, [x28,296]
+ ldr x1, [x28,-40]
+ lsl x0, x0, 1
+ ldrh w4, [x1,x0]
+ cbz w4, .L2459
+ strh w2, [x1,x0]
+ ldrh w0, [x28,296]
+ bl update_vpc_list
+ bl FtlCacheWriteBack
bl l2p_flush
bl FtlVpcTblFlush
-.L2285:
- mov w0, 1
- bl FtlUpdateVaildLpn
- ldr x20, [x20, #:got_lo12:g_active_superblock]
- mov w1, 65535
- ldrh w0, [x20]
- cmp w0, w1
- beq .L2286
- ldrh w1, [x20,4]
- cbnz w1, .L2286
- adrp x21, :got:g_buffer_superblock
- ldr x21, [x21, #:got_lo12:g_buffer_superblock]
- ldrh w1, [x21,4]
- cbnz w1, .L2286
- bl FtlGcRefreshBlock
- ldrh w0, [x21]
- bl FtlGcRefreshBlock
- mov x0, x20
- bl allocate_new_data_superblock
- mov x0, x21
- bl allocate_new_data_superblock
- adrp x0, :got:gVendorBlkInfo
- ldr x0, [x0, #:got_lo12:gVendorBlkInfo]
- bl FtlMapBlkWriteDumpData
-.L2286:
- ldr x19, [x19, #:got_lo12:g_sys_save_data]
- ldrh w0, [x19,28]
- and w0, w0, 31
- cbnz w0, .L2278
- bl FtlVpcCheckAndModify
-.L2278:
- mov w0, w22
+.L2459:
+ mov w0, -1
+ strh w0, [x28,296]
+ b .L2457
+.L2460:
+ add x20, x20, :lo12:.LANCHOR4
+ str wzr, [x28,2028]
+ ldrh w2, [x20,400]
+ cmp w2, wzr
+ csinc w2, w2, w0, ne
+.L2378:
+ ldr x1, [x29,120]
+ mov w0, w2
+ ldr x2, [x29,136]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2463
+ bl __stack_chk_fail
+.L2463:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
- ldp x29, x30, [sp], 48
+ ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
+ ldp x27, x28, [sp,80]
+ ldp x29, x30, [sp], 144
ret
- .size FtlSysBlkInit, .-FtlSysBlkInit
+ .size rk_ftl_garbage_collect, .-rk_ftl_garbage_collect
.align 2
- .global FtlInit
- .type FtlInit, %function
-FtlInit:
- stp x29, x30, [sp, -32]!
- adrp x1, :got:g_LowFormat
- add x29, sp, 0
+ .global FtlCacheWriteBack
+ .type FtlCacheWriteBack, %function
+FtlCacheWriteBack:
+ stp x29, x30, [sp, -112]!
+ add x29, sp, 0
+ stp x23, x24, [sp,48]
+ adrp x24, __stack_chk_guard
stp x19, x20, [sp,16]
- adrp x19, :got:gFtlInitStatus
- mov x20, x0
- mov w0, -1
- ldr x19, [x19, #:got_lo12:gFtlInitStatus]
- str w0, [x19]
- adrp x0, .LC72
- add x0, x0, :lo12:.LC72
- ldr x1, [x1, #:got_lo12:g_LowFormat]
- str wzr, [x1]
- adrp x1, .LC73
- add x1, x1, :lo12:.LC73
+ adrp x19, .LANCHOR0
+ ldr x0, [x24,#:lo12:__stack_chk_guard]
+ str x0, [x29,104]
+ adrp x0, .LANCHOR4+408
+ stp x21, x22, [sp,32]
+ stp x25, x26, [sp,64]
+ ldr x20, [x0,#:lo12:.LANCHOR4+408]
+ add x0, x19, :lo12:.LANCHOR0
+ stp x27, x28, [sp,80]
+ ldr w1, [x0,2088]
+ cbz w1, .L2544
+ ldrb w0, [x0,120]
+ mov w22, 0
+ cbz w0, .L2545
+ ldrb w0, [x20,8]
+ cmp w0, 1
+ cset w22, eq
+.L2545:
+ add x0, x19, :lo12:.LANCHOR0
+ ldrb w3, [x20,9]
+ adrp x25, .LC118
+ mov w2, w22
+ mov w23, 0
+ mov w26, 56
+ ldr x0, [x0,2096]
+ adrp x27, .LANCHOR2
+ add x25, x25, :lo12:.LC118
+ bl FlashProgPages
+.L2546:
+ add x0, x19, :lo12:.LANCHOR0
+ ldr w1, [x0,2088]
+ cmp w23, w1
+ bcs .L2563
+ umull x21, w23, w26
+ ldr x0, [x0,2096]
+ add x1, x0, x21
+ ldr w0, [x0,x21]
+ cmn w0, #1
+ beq .L2567
+ ldr w0, [x1,4]
+ cbz w22, .L2581
+ orr w0, w0, -2147483648
+.L2581:
+ str w0, [x29,100]
+ mov w2, 1
+ ldr w0, [x1,24]
+ add x1, x29, 100
+ bl log2phys
+ add x0, x19, :lo12:.LANCHOR0
+ ldr x0, [x0,2096]
+ add x21, x0, x21
+ ldr x0, [x21,16]
+ ldr w0, [x0,12]
+ cmn w0, #1
+ beq .L2550
+ lsr x0, x0, 10
+ bl P2V_block_in_plane
+ uxth w1, w0
+ add x2, x27, :lo12:.LANCHOR2
+ ubfiz x0, x1, 1, 16
+ mov w21, w1
+ ldr x2, [x2,-40]
+ ldrh w2, [x2,x0]
+ cbnz w2, .L2551
+ mov x0, x25
bl printk
- mov x0, x20
- bl FtlConstantsInit
- bl FtlMemInit
- bl FtlVariablesInit
- adrp x0, :got:c_ftl_nand_max_sys_blks
- ldr x0, [x0, #:got_lo12:c_ftl_nand_max_sys_blks]
- ldrh w0, [x0]
- bl FtlFreeSysBlkQueueInit
- bl FtlLoadBbt
- cbnz w0, .L2294
- bl FtlSysBlkInit
- cbnz w0, .L2294
+.L2551:
+ mov w0, w21
+ bl decrement_vpc_count
+.L2550:
+ add w23, w23, 1
+ b .L2546
+.L2583:
+ mov w20, 16386
+ adrp x21, .LANCHOR2
+.L2562:
+ add x0, x21, :lo12:.LANCHOR2
+ ldrh w0, [x0,956]
+ cbz w0, .L2563
mov w0, 1
- str w0, [x19]
-.L2294:
+ mov w1, w0
+ bl rk_ftl_garbage_collect
+ subs w20, w20, #1
+ bne .L2562
+.L2563:
+ add x19, x19, :lo12:.LANCHOR0
+ str wzr, [x19,2088]
+ b .L2544
+.L2567:
+ adrp x23, .LANCHOR2
+ adrp x26, .LC118
+ mov w25, 0
+ mov w27, 56
+ add x23, x23, :lo12:.LANCHOR2
+ add x26, x26, :lo12:.LC118
+.L2547:
+ add x0, x19, :lo12:.LANCHOR0
+ ldr w1, [x0,2088]
+ cmp w25, w1
+ bcs .L2583
+ umull x21, w25, w27
+ ldr x0, [x0,2096]
+ mov w1, -1
+ str w1, [x0,x21]
+.L2553:
+ add x28, x19, :lo12:.LANCHOR0
+ ldr x0, [x28,2096]
+ add x1, x0, x21
+ ldr w0, [x0,x21]
+ cmn w0, #1
+ ldr w0, [x1,4]
+ bne .L2584
+ lsr x0, x0, 10
+ bl P2V_block_in_plane
+ ldrh w1, [x20]
+ cmp w1, w0, uxth
+ bne .L2554
+ ldr x2, [x23,-40]
+ ubfiz x1, x1, 1, 16
+ ldrh w3, [x20,4]
+ ldrh w0, [x2,x1]
+ sub w0, w0, w3
+ strh w0, [x2,x1]
+ strb wzr, [x20,6]
+ ldrh w0, [x28,2026]
+ strh w0, [x20,2]
+ strh wzr, [x20,4]
+.L2554:
+ ldrh w0, [x20,4]
+ cbnz w0, .L2555
+ mov x0, x20
+ bl allocate_new_data_superblock
+.L2555:
+ ldr w0, [x23,448]
+ add x28, x19, :lo12:.LANCHOR0
+ add w0, w0, 1
+ str w0, [x23,448]
+ ldr x0, [x28,2096]
+ add x0, x0, x21
+ ldr w0, [x0,4]
+ lsr x0, x0, 10
+ bl FtlGcMarkBadPhyBlk
+ mov x0, x20
+ bl get_new_active_ppa
+ str w0, [x29,100]
+ ldr x1, [x28,2096]
+ mov w2, w22
+ add x1, x1, x21
+ str w0, [x1,4]
+ mov w1, 1
+ ldr x0, [x28,2096]
+ ldrb w3, [x20,9]
+ add x0, x0, x21
+ bl FlashProgPages
+ b .L2553
+.L2584:
+ cbz w22, .L2582
+ orr w0, w0, -2147483648
+.L2582:
+ str w0, [x29,100]
+ mov w2, 1
+ ldr w0, [x1,24]
+ add x1, x29, 100
+ bl log2phys
+ add x0, x19, :lo12:.LANCHOR0
+ ldr x0, [x0,2096]
+ add x21, x0, x21
+ ldr x0, [x21,16]
+ ldr w0, [x0,12]
+ cmn w0, #1
+ beq .L2559
+ lsr x0, x0, 10
+ bl P2V_block_in_plane
+ uxth w1, w0
+ ubfiz x0, x1, 1, 16
+ ldr x2, [x23,-40]
+ mov w21, w1
+ ldrh w2, [x2,x0]
+ cbnz w2, .L2560
+ mov x0, x26
+ bl printk
+.L2560:
+ mov w0, w21
+ bl decrement_vpc_count
+.L2559:
+ add w25, w25, 1
+ b .L2547
+.L2544:
+ ldr x2, [x29,104]
mov w0, 0
+ ldr x1, [x24,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2565
+ bl __stack_chk_fail
+.L2565:
ldp x19, x20, [sp,16]
- ldp x29, x30, [sp], 32
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
+ ldp x27, x28, [sp,80]
+ ldp x29, x30, [sp], 112
ret
- .size FtlInit, .-FtlInit
+ .size FtlCacheWriteBack, .-FtlCacheWriteBack
.align 2
- .global rk_ftl_init
- .type rk_ftl_init, %function
-rk_ftl_init:
- stp x29, x30, [sp, -32]!
- mov w0, 2048
+ .global FtlSysFlush
+ .type FtlSysFlush, %function
+FtlSysFlush:
+ stp x29, x30, [sp, -16]!
add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x20, :got:gLoaderBootInfo
- bl ftl_malloc
- adrp x19, :got:RK29_NANDC_REG_BASE
- adrp x1, :got:RK29_NANDC1_REG_BASE
- ldr x20, [x20, #:got_lo12:gLoaderBootInfo]
- str x0, [x20]
- ldr x19, [x19, #:got_lo12:RK29_NANDC_REG_BASE]
- mov x0, x19
- str xzr, [x19]
- ldr x1, [x1, #:got_lo12:RK29_NANDC1_REG_BASE]
- str xzr, [x1]
- bl rknand_get_reg_addr
- ldr x1, [x19]
- mov w0, -1
- cbz x1, .L2297
- bl rk_nandc_irq_init
- mov w1, 0
- ldr x0, [x20]
- mov w2, w1
- mov w3, 2048
- bl FlashSramLoadStore
- bl rknand_flash_cs_init
- ldr x0, [x19]
- bl FlashInit
- mov w19, w0
- cbnz w0, .L2298
- adrp x0, :got:gNandPhyInfo
- ldr x0, [x0, #:got_lo12:gNandPhyInfo]
- bl FtlInit
-.L2298:
- adrp x0, .LC115
- mov w1, w19
- add x0, x0, :lo12:.LC115
- bl printk
- mov w0, w19
-.L2297:
- ldp x19, x20, [sp,16]
- ldp x29, x30, [sp], 32
+ bl FtlCacheWriteBack
+ bl l2p_flush
+ bl FtlVpcTblFlush
+ mov w0, 1
+ bl FtlEctTblFlush
+ mov w0, 0
+ ldp x29, x30, [sp], 16
ret
- .size rk_ftl_init, .-rk_ftl_init
+ .size FtlSysFlush, .-FtlSysFlush
.align 2
- .global Ftl_get_new_temp_ppa
- .type Ftl_get_new_temp_ppa, %function
-Ftl_get_new_temp_ppa:
- stp x29, x30, [sp, -32]!
- mov w1, 65535
+ .global FtlDeInit
+ .type FtlDeInit, %function
+FtlDeInit:
+ adrp x0, .LANCHOR1+532
+ stp x29, x30, [sp, -16]!
add x29, sp, 0
- str x19, [sp,16]
- adrp x19, :got:g_gc_temp_superblock
- ldr x0, [x19, #:got_lo12:g_gc_temp_superblock]
- ldrh w2, [x0]
+ ldr w0, [x0,#:lo12:.LANCHOR1+532]
+ cmp w0, 1
+ bne .L2587
+ bl FtlSysFlush
+.L2587:
+ mov w0, 0
+ ldp x29, x30, [sp], 16
+ ret
+ .size FtlDeInit, .-FtlDeInit
+ .align 2
+ .global rk_ftl_de_init
+ .type rk_ftl_de_init, %function
+rk_ftl_de_init:
+ stp x29, x30, [sp, -16]!
+ add x29, sp, 0
+ bl FlashDeInit
+ bl FtlDeInit
+ bl FlashDeInit
+ ldp x29, x30, [sp], 16
+ ret
+ .size rk_ftl_de_init, .-rk_ftl_de_init
+ .align 2
+ .global FtlDiscard
+ .type FtlDiscard, %function
+FtlDiscard:
+ stp x29, x30, [sp, -80]!
+ add x29, sp, 0
+ stp x21, x22, [sp,32]
+ adrp x22, .LANCHOR0
+ add x21, x22, :lo12:.LANCHOR0
+ stp x19, x20, [sp,16]
+ stp x23, x24, [sp,48]
+ adrp x23, __stack_chk_guard
+ mov w20, w0
+ add w2, w20, w1
+ mov w19, w1
+ ldr w1, [x21,2068]
+ ldr x0, [x23,#:lo12:__stack_chk_guard]
+ str x0, [x29,72]
cmp w2, w1
- beq .L2302
- ldrh w0, [x0,4]
- cbnz w0, .L2303
-.L2302:
+ mov w0, -1
+ bhi .L2590
+ cmp w19, 31
+ bls .L2605
bl FtlCacheWriteBack
- mov w0, 0
- bl FtlGcFreeTempBlock
- ldr x0, [x19, #:got_lo12:g_gc_temp_superblock]
- strb wzr, [x0,8]
- bl allocate_data_superblock
- adrp x0, :got:g_gc_blk_num
- ldr x0, [x0, #:got_lo12:g_gc_blk_num]
- strh wzr, [x0]
- adrp x0, :got:g_gc_page_offset
- ldr x0, [x0, #:got_lo12:g_gc_page_offset]
- strh wzr, [x0]
+ ldrh w1, [x21,2032]
+ udiv w21, w20, w1
+ msub w20, w1, w21, w20
+ uxth w20, w20
+ cbz w20, .L2592
+ sub w1, w1, w20
+ add w21, w21, 1
+ cmp w1, w19
+ csel w1, w1, w19, ls
+ sub w19, w19, w1, uxth
+.L2592:
+ mov w0, -1
+ adrp x20, .LANCHOR4
+ str w0, [x29,68]
+ adrp x24, .LANCHOR2
+.L2593:
+ add x0, x22, :lo12:.LANCHOR0
+ ldrh w0, [x0,2032]
+ cmp w19, w0
+ bcc .L2606
+ mov w0, w21
+ add x1, x29, 64
+ mov w2, 0
+ bl log2phys
+ ldr w0, [x29,64]
+ cmn w0, #1
+ beq .L2594
+ add x1, x20, :lo12:.LANCHOR4
+ mov w2, 1
+ ldr w0, [x1,416]
+ add w0, w0, 1
+ str w0, [x1,416]
+ add x1, x24, :lo12:.LANCHOR2
+ ldr w0, [x1,168]
+ add w0, w0, 1
+ str w0, [x1,168]
+ add x1, x29, 68
+ mov w0, w21
+ bl log2phys
+ ldr w0, [x29,64]
+ lsr x0, x0, 10
+ bl P2V_block_in_plane
+ bl decrement_vpc_count
+.L2594:
+ add x0, x22, :lo12:.LANCHOR0
+ add w21, w21, 1
+ ldrh w0, [x0,2032]
+ sub w19, w19, w0
+ b .L2593
+.L2606:
+ adrp x0, .LANCHOR4
+ add x0, x0, :lo12:.LANCHOR4
+ ldr w1, [x0,416]
+ cmp w1, 32
+ bls .L2605
+ str wzr, [x0,416]
bl l2p_flush
bl FtlVpcTblFlush
+.L2605:
mov w0, 0
- bl FtlEctTblFlush
-.L2303:
- ldr x0, [x19, #:got_lo12:g_gc_temp_superblock]
- bl get_new_active_ppa
- ldr x19, [sp,16]
- ldp x29, x30, [sp], 32
+.L2590:
+ ldr x2, [x29,72]
+ ldr x1, [x23,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2597
+ bl __stack_chk_fail
+.L2597:
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
+ ldp x29, x30, [sp], 80
ret
- .size Ftl_get_new_temp_ppa, .-Ftl_get_new_temp_ppa
+ .size FtlDiscard, .-FtlDiscard
.align 2
- .global rk_ftl_garbage_collect
- .type rk_ftl_garbage_collect, %function
-rk_ftl_garbage_collect:
- stp x29, x30, [sp, -160]!
+ .global FtlGcFreeTempBlock
+ .type FtlGcFreeTempBlock, %function
+FtlGcFreeTempBlock:
+ stp x29, x30, [sp, -96]!
+ mov w3, 65535
add x29, sp, 0
- stp x21, x22, [sp,32]
- adrp x22, :got:g_in_gc_progress
stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR2
+ stp x21, x22, [sp,32]
+ add x2, x19, :lo12:.LANCHOR2
+ adrp x22, __stack_chk_guard
stp x23, x24, [sp,48]
- ldr x2, [x22, #:got_lo12:g_in_gc_progress]
stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- ldr w3, [x2]
- mov w2, 0
- cbnz w3, .L2431
- mov w24, w0
- adrp x0, .LANCHOR2+128
- mov w23, w1
- mov w1, 65535
- ldrh w0, [x0,#:lo12:.LANCHOR2+128]
- cmp w0, w1
- bne .L2306
-.L2309:
- adrp x0, :got:g_gc_next_blk_1
- mov w3, 65535
- ldr x0, [x0, #:got_lo12:g_gc_next_blk_1]
- ldrh w2, [x0]
- cmp w2, w3
- bne .L2307
- b .L2308
-.L2306:
- adrp x0, :got:g_gc_temp_superblock
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- ldrh w0, [x0]
- cmp w0, w1
- beq .L2309
- mov w0, 1
- bl FtlGcFreeTempBlock
- mov w2, 1
- cbz w0, .L2309
- b .L2431
-.L2307:
- adrp x1, :got:g_gc_next_blk
- ldr x1, [x1, #:got_lo12:g_gc_next_blk]
- ldrh w4, [x1]
- cmp w4, w3
- bne .L2308
- strh w2, [x1]
- mov w1, -1
- strh w1, [x0]
-.L2308:
- adrp x26, :got:g_gc_skip_write_count
- cmp w24, 1
- adrp x19, :got:g_gc_superblock
- ldr x20, [x26, #:got_lo12:g_gc_skip_write_count]
- ldr w0, [x20]
- add w0, w0, 1
- add w0, w0, w24, lsl 7
- str w0, [x20]
- beq .L2310
-.L2312:
- mov w21, 65535
- b .L2311
-.L2310:
- adrp x1, :got:g_inkDie_check_enable
- ldr x1, [x1, #:got_lo12:g_inkDie_check_enable]
- ldr w1, [x1]
- cbz w1, .L2312
- adrp x27, :got:g_min_erase_count
- ldr x27, [x27, #:got_lo12:g_min_erase_count]
- ldr w1, [x27]
- cmp w1, 29
- bhi .L2312
- adrp x25, :got:gc_ink_free_return_value
- ldr x21, [x25, #:got_lo12:gc_ink_free_return_value]
- ldrh w1, [x21]
- add w0, w0, w1
- str w0, [x20]
- bl FtlGcReFreshBadBlk
- ldr x0, [x19, #:got_lo12:g_gc_superblock]
- ldrh w1, [x0]
+ ldr x1, [x22,#:lo12:__stack_chk_guard]
+ adrp x21, .LANCHOR0
+ ldrh w20, [x2,96]
+ str x1, [x29,88]
+ add x1, x21, :lo12:.LANCHOR0
+ cmp w20, w3
+ ldrh w1, [x1,2026]
+ bne .L2608
+.L2618:
+ add x20, x19, :lo12:.LANCHOR2
mov w0, 65535
+ add x23, x20, 96
+ ldrh w1, [x20,96]
+ str wzr, [x20,2328]
cmp w1, w0
- bne .L2312
- adrp x0, :got:g_gc_next_blk
- ldr x0, [x0, #:got_lo12:g_gc_next_blk]
- ldrh w0, [x0]
- cmp w0, w1
- bne .L2312
- ldr w0, [x20]
- cmp w0, 1024
- bls .L2312
- ldr w0, [x27]
- str wzr, [x20]
- strh wzr, [x21]
- cbnz w0, .L2313
- mov w0, 6
- b .L2450
-.L2313:
- cmp w0, 5
- bhi .L2314
- mov w0, 18
-.L2450:
- strh w0, [x21]
-.L2314:
- mov w0, 32
- bl List_get_gc_head_node
- uxth w28, w0
- mov w3, 65535
- cmp w28, w3
- beq .L2318
- adrp x20, :got:g_gc_blk_index
- ldr x20, [x20, #:got_lo12:g_gc_blk_index]
- ldrh w0, [x20]
- cbz w0, .L2316
- adrp x27, :got:p_valid_page_count_table
- ubfiz x28, x28, 1, 16
- adrp x2, :got:c_ftl_nand_planes_num
- ldr x27, [x27, #:got_lo12:p_valid_page_count_table]
- ldr x2, [x2, #:got_lo12:c_ftl_nand_planes_num]
- ldr x1, [x27]
- ldrh w2, [x2]
- ldrh w4, [x1,x28]
- adrp x1, :got:c_ftl_nand_page_pre_slc_blk
- ldr x1, [x1, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w1, [x1]
- mul w1, w1, w2
+ beq .L2637
+ add x21, x21, :lo12:.LANCHOR0
+ bl FtlCacheWriteBack
+ ldrb w0, [x23,7]
+ mov w26, 12
+ ldr x1, [x20,-40]
+ ldrh w3, [x21,2026]
+ mov w21, 0
+ ldrh w2, [x20,96]
+ mul w0, w0, w3
+ strh w0, [x1,x2,lsl 1]
+ ldr w0, [x20,184]
+ ldrh w1, [x20,936]
+ add w0, w1, w0
+ str w0, [x20,184]
+ b .L2619
+.L2608:
+ cbz w0, .L2611
+ adrp x0, .LANCHOR1
+ add x0, x0, :lo12:.LANCHOR1
+ ldrh w4, [x0,3004]
+ cmp w4, w3
+ beq .L2612
+.L2613:
+ mov w1, 2
+ b .L2611
+.L2612:
+ strh wzr, [x0,3004]
+ ldrh w0, [x2,-8]
+ cmp w0, 17
+ bhi .L2613
+.L2611:
+ add x23, x19, :lo12:.LANCHOR2
+ add x0, x23, 96
+ bl FtlGcScanTempBlk
+ str w0, [x29,84]
+ cmn w0, #1
+ beq .L2614
+ ubfiz x20, x20, 1, 16
+ ldr x1, [x23,-80]
+ ldrh w0, [x1,x20]
+ cmp w0, 4
+ bls .L2615
+ sub w0, w0, #5
+ strh w0, [x1,x20]
+ mov w0, 1
+ bl FtlEctTblFlush
+.L2615:
+ add x0, x19, :lo12:.LANCHOR2
+ ldr w1, [x0,2328]
+ cbnz w1, .L2616
+ ldr w1, [x0,448]
add w1, w1, 1
- cmp w4, w1
- bgt .L2318
- adrp x1, :got:g_in_swl_replace
- str x3, [x29,136]
- ldr x1, [x1, #:got_lo12:g_in_swl_replace]
- str wzr, [x1]
- add w1, w0, 1
- strh w1, [x20]
- bl List_get_gc_head_node
- uxth w21, w0
- ldr x3, [x29,136]
- cmp w21, w3
- beq .L2318
- ubfiz x5, x21, 1, 16
- ldr x4, [x27]
- adrp x0, .LC116
- ldrh w1, [x20]
- add x0, x0, :lo12:.LC116
- mov w2, w21
- ldrh w3, [x4,x5]
- ldrh w4, [x4,x28]
- str x5, [x29,136]
- bl printk
- ldrh w0, [x20]
- ldr x5, [x29,136]
- cmp w0, 40
- bls .L2317
- ldr x0, [x27]
- ldrh w0, [x0,x5]
- cmp w0, 32
- bls .L2317
- strh wzr, [x20]
-.L2317:
- ldr x25, [x25, #:got_lo12:gc_ink_free_return_value]
- mov w0, 6
- strh w0, [x25]
- b .L2311
-.L2316:
+ str w1, [x0,448]
+ ldr w0, [x29,84]
+ lsr w0, w0, 10
+ bl FtlBbmMapBadBlock
+ bl FtlBbmTblFlush
+.L2616:
+ add x19, x19, :lo12:.LANCHOR2
mov w0, 1
- strh w0, [x20]
-.L2318:
- bl GetSwlReplaceBlock
- uxth w21, w0
- mov w0, 65535
- cmp w21, w0
- bne .L2311
- ldr x25, [x25, #:got_lo12:gc_ink_free_return_value]
- strh wzr, [x25]
-.L2311:
- ldr x0, [x19, #:got_lo12:g_gc_superblock]
- ldrh w2, [x0]
- mov w0, 65535
- cmp w2, w0
- bne .L2319
- adrp x0, :got:g_gc_temp_superblock
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- ldrh w1, [x0]
- cmp w1, w2
- bne .L2319
- adrp x0, :got:g_gc_next_blk
- ldr x0, [x0, #:got_lo12:g_gc_next_blk]
- ldrh w20, [x0]
- cmp w20, w1
- bne .L2319
- adrp x25, :got:g_num_free_superblocks
- ldr x26, [x26, #:got_lo12:g_gc_skip_write_count]
- mov w2, 1024
- ldr x27, [x25, #:got_lo12:g_num_free_superblocks]
- ldr w1, [x26]
- ldrh w0, [x27]
- cmp w0, 24
- mov w0, 5120
- csel w0, w0, w2, cc
- cmp w1, w0
- bls .L2319
- adrp x0, :got:gc_ink_free_return_value
- str wzr, [x26]
- ldr x0, [x0, #:got_lo12:gc_ink_free_return_value]
- strh wzr, [x0]
- bl GetSwlReplaceBlock
- uxth w21, w0
- cmp w21, w20
- bne .L2321
- adrp x20, :got:g_gc_merge_free_blk_threshold
- ldrh w1, [x27]
- ldr x26, [x20, #:got_lo12:g_gc_merge_free_blk_threshold]
- ldrh w0, [x26]
- cmp w1, w0
- bcs .L2322
- mov w0, 64
- bl List_get_gc_head_node
- uxth w0, w0
- cmp w0, w21
- beq .L2331
- adrp x1, :got:g_SlcPartLbaEndSector
- adrp x4, :got:c_ftl_nand_type
- uxtw x2, w0
- ldr x1, [x1, #:got_lo12:g_SlcPartLbaEndSector]
- ldr w3, [x1]
- adrp x1, :got:p_valid_page_count_table
- cbnz w3, .L2324
- ldr x0, [x4, #:got_lo12:c_ftl_nand_type]
- ldrh w0, [x0]
- cmp w0, 3
- beq .L2324
- adrp x0, :got:g_all_blk_used_slc_mode
- ldr x0, [x0, #:got_lo12:g_all_blk_used_slc_mode]
- ldr w0, [x0]
- cbnz w0, .L2324
- adrp x0, :got:g_inkDie_check_enable
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w0, [x0]
- cbz w0, .L2325
-.L2324:
- ldr x1, [x1, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x1]
- ldrh w5, [x0,x2,lsl 1]
- adrp x0, :got:c_ftl_nand_page_pre_slc_blk
- ldr x2, [x4, #:got_lo12:c_ftl_nand_type]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldrh w2, [x2]
- ldrh w1, [x0]
- adrp x0, :got:c_ftl_nand_planes_num
- cmp w2, 3
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- mul w3, w1, w0
- mov w0, 0
- lsr w1, w1, 1
- csel w0, w1, w0, eq
- add w0, w3, w0
- cmp w5, w0
- bgt .L2327
- mov w0, 0
- bl List_get_gc_head_node
- uxth w21, w0
- adrp x0, :got:g_MaxLpn
- adrp x1, :got:g_VaildLpn
- ldr x20, [x20, #:got_lo12:g_gc_merge_free_blk_threshold]
- ldr x0, [x0, #:got_lo12:g_MaxLpn]
- ldr x1, [x1, #:got_lo12:g_VaildLpn]
- ldr w0, [x0]
- ldr w1, [x1]
- add w0, w0, w0, lsl 1
- cmp w1, w0, lsr 2
- bls .L2328
- mov w0, 128
- b .L2451
-.L2328:
- mov w0, 160
-.L2451:
- strh w0, [x20]
- b .L2329
-.L2327:
- ldr x20, [x20, #:got_lo12:g_gc_merge_free_blk_threshold]
- mov w0, 128
- strh w0, [x20]
- b .L2331
-.L2325:
- ldr x1, [x1, #:got_lo12:p_valid_page_count_table]
- ldr x1, [x1]
- ldrh w1, [x1,x2,lsl 1]
- cmp w1, 7
- bhi .L2330
- bl List_get_gc_head_node
- uxth w21, w0
- mov w0, 128
- strh w0, [x26]
- b .L2329
-.L2330:
- mov w0, 64
- b .L2452
-.L2322:
- mov w0, 80
-.L2452:
- strh w0, [x26]
- b .L2331
-.L2329:
- mov w0, 65535
- cmp w21, w0
- beq .L2331
-.L2321:
- adrp x0, :got:p_valid_page_count_table
- adrp x5, :got:g_gc_free_blk_threshold
- ubfiz x4, x21, 1, 16
- ldr x25, [x25, #:got_lo12:g_num_free_superblocks]
- mov w1, w21
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x5, [x5, #:got_lo12:g_gc_free_blk_threshold]
- ldrh w2, [x25]
- ldr x3, [x0]
- adrp x0, :got:p_erase_count_table
- ldrh w5, [x5]
- ldr x0, [x0, #:got_lo12:p_erase_count_table]
- ldrh w3, [x3,x4]
- ldr x6, [x0]
- adrp x0, .LC117
- add x0, x0, :lo12:.LC117
- ldrh w4, [x6,x4]
- bl printk
-.L2331:
- bl FtlGcReFreshBadBlk
-.L2319:
- mov w0, 65535
- cmp w21, w0
- cset w1, eq
- cbz w1, .L2332
- cbnz w24, .L2332
- adrp x0, :got:g_num_free_superblocks
- mov w20, 1
- ldr x0, [x0, #:got_lo12:g_num_free_superblocks]
- ldrh w1, [x0]
- cmp w1, 24
- bhi .L2333
- adrp x0, :got:c_ftl_nand_page_pre_blk
- cmp w1, 16
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w20, [x0]
- bls .L2334
- lsr w20, w20, 5
- b .L2333
-.L2334:
- cmp w1, 12
- bls .L2335
- lsr w20, w20, 4
- b .L2333
-.L2335:
- cmp w1, 8
- bls .L2333
- lsr w20, w20, 2
-.L2333:
- adrp x0, :got:g_gc_free_blk_threshold
- ldr x4, [x0, #:got_lo12:g_gc_free_blk_threshold]
- ldrh w2, [x4]
- cmp w2, w1
- bcs .L2337
- adrp x1, :got:g_gc_temp_superblock
- ldr x1, [x1, #:got_lo12:g_gc_temp_superblock]
- ldrh w2, [x1]
+ str wzr, [x19,2328]
+ b .L2617
+.L2614:
+ adrp x0, .LANCHOR1+3004
mov w1, 65535
+ ldrh w2, [x0,#:lo12:.LANCHOR1+3004]
+ mov w0, 1
cmp w2, w1
- bne .L2338
- adrp x1, :got:g_gc_next_blk
- ldr x1, [x1, #:got_lo12:g_gc_next_blk]
- ldrh w1, [x1]
- cmp w1, w2
- bne .L2338
- adrp x1, :got:gc_ink_free_return_value
- ldr x1, [x1, #:got_lo12:gc_ink_free_return_value]
- ldrh w2, [x1]
- cbnz w2, .L2339
- adrp x1, :got:g_MaxLpn
- adrp x3, :got:g_VaildLpn
- ldr x1, [x1, #:got_lo12:g_MaxLpn]
- ldr x3, [x3, #:got_lo12:g_VaildLpn]
- ldr w1, [x1]
- ldr w3, [x3]
- add w1, w1, w1, lsl 1
- cmp w3, w1, lsr 2
- bcs .L2340
-.L2339:
- adrp x1, :got:c_ftl_nand_data_op_blks_per_plane
- ldr x0, [x0, #:got_lo12:g_gc_free_blk_threshold]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- ldrh w1, [x1]
- add w1, w1, w1, lsl 1
- asr w1, w1, 2
- strh w1, [x0]
- b .L2341
-.L2340:
- mov w0, 18
- strh w0, [x4]
-.L2341:
- adrp x0, :got:g_in_swl_replace
- ldr x0, [x0, #:got_lo12:g_in_swl_replace]
- str wzr, [x0]
- b .L2431
-.L2338:
- adrp x1, :got:c_ftl_nand_data_op_blks_per_plane
- ldr x0, [x0, #:got_lo12:g_gc_free_blk_threshold]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- ldrh w1, [x1]
- add w1, w1, w1, lsl 1
- asr w1, w1, 2
- strh w1, [x0]
-.L2337:
- cmp w23, 2
- bhi .L2392
- adrp x0, :got:g_inkDie_check_enable
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w0, [x0]
- cbz w0, .L2392
- add w20, w20, 1
- uxth w20, w20
- b .L2392
-.L2332:
- adrp x0, :got:g_gc_temp_superblock
- mov w2, 65535
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- ldrh w0, [x0]
- cmp w0, w2
- bne .L2344
- cbz w1, .L2344
- adrp x1, :got:g_gc_next_blk
- ldr x1, [x1, #:got_lo12:g_gc_next_blk]
- ldrh w1, [x1]
- cmp w1, w0
- bne .L2344
- ldr x1, [x19, #:got_lo12:g_gc_superblock]
- ldrh w1, [x1]
- cmp w1, w0
- beq .L2345
-.L2350:
- mov w21, 65535
- b .L2344
-.L2345:
- adrp x0, :got:g_in_swl_replace
- adrp x20, :got:g_num_free_superblocks
- adrp x21, :got:gc_ink_free_return_value
- ldr x0, [x0, #:got_lo12:g_in_swl_replace]
- str wzr, [x0]
- adrp x0, :got:g_gc_free_blk_threshold
- ldr x24, [x20, #:got_lo12:g_num_free_superblocks]
- ldr x2, [x0, #:got_lo12:g_gc_free_blk_threshold]
- ldrh w3, [x24]
- ldrh w1, [x2]
- cmp w3, w1
- bls .L2346
- ldr x1, [x21, #:got_lo12:gc_ink_free_return_value]
- ldrh w1, [x1]
- cbnz w1, .L2347
- adrp x1, :got:g_MaxLpn
- adrp x3, :got:g_VaildLpn
- ldr x1, [x1, #:got_lo12:g_MaxLpn]
- ldr x3, [x3, #:got_lo12:g_VaildLpn]
- ldr w1, [x1]
- ldr w3, [x3]
- add w1, w1, w1, lsl 1
- cmp w3, w1, lsr 2
- bcs .L2348
-.L2347:
- adrp x1, :got:c_ftl_nand_data_op_blks_per_plane
- ldr x0, [x0, #:got_lo12:g_gc_free_blk_threshold]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- ldrh w1, [x1]
- add w1, w1, w1, lsl 1
- asr w1, w1, 2
- strh w1, [x0]
- b .L2349
-.L2348:
- mov w0, 18
- strh w0, [x2]
-.L2349:
- bl FtlReadRefresh
- ldr x21, [x21, #:got_lo12:gc_ink_free_return_value]
- b .L2453
-.L2346:
- ldr x21, [x21, #:got_lo12:gc_ink_free_return_value]
- ldrh w0, [x21]
- cbnz w0, .L2350
- adrp x23, :got:c_ftl_nand_data_op_blks_per_plane
- ldr x23, [x23, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- ldrh w1, [x23]
- add w1, w1, w1, lsl 1
- asr w1, w1, 2
- strh w1, [x2]
- bl List_get_gc_head_node
- ubfiz x0, x0, 1, 16
- adrp x1, :got:p_valid_page_count_table
- ldr x1, [x1, #:got_lo12:p_valid_page_count_table]
- ldr x1, [x1]
- ldrh w2, [x1,x0]
- adrp x0, :got:c_ftl_nand_page_pre_slc_blk
- adrp x1, :got:c_ftl_nand_planes_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_slc_blk]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- ldrh w1, [x1]
- mul w0, w0, w1
- mov w1, 2
- sdiv w0, w0, w1
- cmp w2, w0
- ble .L2351
- ldrh w0, [x23]
- ldrh w1, [x24]
- sub w0, w0, #1
- cmp w1, w0
- blt .L2351
- bl FtlReadRefresh
-.L2453:
- ldrh w2, [x21]
- b .L2431
-.L2351:
- cbnz w2, .L2350
+ bne .L2617
+ b .L2618
+.L2622:
+ ldr x25, [x20,944]
+ add x1, x29, 84
+ umull x24, w21, w26
+ mov w2, 0
+ add x23, x25, x24
+ ldr w0, [x23,8]
+ bl log2phys
+ ldr w0, [x29,84]
+ ldr w1, [x25,x24]
+ cmp w0, w1
+ bne .L2620
+ lsr x0, x0, 10
+ bl P2V_block_in_plane
+ mov w24, w0
+ ldr w0, [x23,8]
+ add x1, x23, 4
+ mov w2, 1
+ bl log2phys
+ mov w0, w24
+.L2636:
+ bl decrement_vpc_count
+.L2621:
+ add w21, w21, 1
+ uxth w21, w21
+.L2619:
+ ldrh w0, [x20,936]
+ cmp w0, w21
+ bhi .L2622
+ b .L2638
+.L2620:
+ ldr w1, [x23,4]
+ cmp w0, w1
+ beq .L2621
+ ldrh w0, [x20,96]
+ b .L2636
+.L2638:
mov w0, -1
bl decrement_vpc_count
- ldr x20, [x20, #:got_lo12:g_num_free_superblocks]
- ldrh w2, [x20]
- add w2, w2, 1
- b .L2431
-.L2344:
- adrp x0, :got:g_inkDie_check_enable
- mov w20, 2
- ldr x0, [x0, #:got_lo12:g_inkDie_check_enable]
- ldr w0, [x0]
- cmp w0, wzr
- csinc w20, w20, wzr, ne
- b .L2343
-.L2392:
- mov w21, 65535
-.L2343:
- ldr x1, [x19, #:got_lo12:g_gc_superblock]
- mov w2, 65535
- ldrh w0, [x1]
- cmp w0, w2
- bne .L2353
- cmp w21, w0
- beq .L2354
- strh w21, [x1]
- b .L2355
-.L2354:
- adrp x0, :got:g_gc_next_blk
- ldr x0, [x0, #:got_lo12:g_gc_next_blk]
- ldrh w2, [x0]
- cmp w2, w21
- beq .L2355
- strh w2, [x1]
- mov w1, -1
- strh w1, [x0]
-.L2355:
- ldr x23, [x19, #:got_lo12:g_gc_superblock]
- ldrh w0, [x23]
- bl IsBlkInGcList
- cbz w0, .L2356
- mov w0, -1
- strh w0, [x23]
-.L2356:
- ldr x23, [x19, #:got_lo12:g_gc_superblock]
- mov w0, 65535
- ldrh w1, [x23]
- cmp w1, w0
- beq .L2353
- mov x0, x23
- bl make_superblock
- strh wzr, [x23,2]
- adrp x0, :got:g_gc_cur_blk_valid_pages
- strb wzr, [x23,6]
- ldrh w1, [x23]
- ldr x0, [x0, #:got_lo12:g_gc_cur_blk_valid_pages]
- strh wzr, [x0]
- adrp x0, :got:p_valid_page_count_table
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x0]
- ldrh w1, [x0,x1,lsl 1]
- adrp x0, :got:g_gc_cur_blk_max_valid_pages
- ldr x0, [x0, #:got_lo12:g_gc_cur_blk_max_valid_pages]
- strh w1, [x0]
-.L2353:
- ldr x0, [x19, #:got_lo12:g_gc_superblock]
- ldrh w1, [x0]
- adrp x0, :got:g_active_superblock
- ldr x0, [x0, #:got_lo12:g_active_superblock]
- ldrh w0, [x0]
- cmp w0, w1
- beq .L2358
- adrp x0, :got:g_buffer_superblock
- ldr x0, [x0, #:got_lo12:g_buffer_superblock]
- ldrh w0, [x0]
- cmp w0, w1
- beq .L2358
-.L2359:
- add x0, x29, 156
- mov w24, 65535
- str x0, [x29,136]
- b .L2360
-.L2358:
- ldr x19, [x19, #:got_lo12:g_gc_superblock]
+ ldrh w0, [x20,96]
+ ldr x2, [x20,-40]
+ ubfiz x1, x0, 1, 16
+ ldrh w1, [x2,x1]
+ cbz w1, .L2623
+ bl INSERT_DATA_LIST
+ b .L2624
+.L2623:
+ bl INSERT_FREE_LIST
+.L2624:
+ add x20, x19, :lo12:.LANCHOR2
mov w0, -1
- strh w0, [x19]
- b .L2454
-.L2378:
- ldr x1, [x19, #:got_lo12:g_gc_superblock]
- ldrh w0, [x1,2]
- add w20, w20, w0
- adrp x0, :got:c_ftl_nand_page_pre_blk
- uxth w20, w20
- strh w20, [x1,2]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w0, [x0]
- cmp w0, w20
- bls .L2380
- adrp x1, :got:g_gc_cur_blk_valid_pages
- adrp x0, :got:g_gc_cur_blk_max_valid_pages
- ldr x1, [x1, #:got_lo12:g_gc_cur_blk_valid_pages]
- ldr x0, [x0, #:got_lo12:g_gc_cur_blk_max_valid_pages]
- ldrh w1, [x1]
- ldrh w0, [x0]
+ strh wzr, [x20,936]
+ strh w0, [x20,96]
+ strh wzr, [x20,924]
+ bl l2p_flush
+ bl FtlVpcTblFlush
+ ldr w0, [x20,160]
+ cbz w0, .L2625
+ ldr w0, [x20,220]
+ cmp w0, 29
+ bhi .L2625
+ ldrh w0, [x20,272]
+ ldrh w1, [x20,-8]
cmp w1, w0
- beq .L2380
-.L2381:
- adrp x0, :got:g_num_free_superblocks
- ldr x0, [x0, #:got_lo12:g_num_free_superblocks]
- ldrh w0, [x0]
- cmp w0, 2
- bhi .L2384
- adrp x0, :got:c_ftl_nand_page_pre_blk
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w20, [x0]
-.L2360:
- ldr x0, [x19, #:got_lo12:g_gc_superblock]
- ldrh w0, [x0]
- cmp w0, w24
- bne .L2361
- adrp x0, :got:g_in_swl_replace
- adrp x23, :got:c_ftl_nand_planes_num
- mov w25, 2
- ldr x0, [x0, #:got_lo12:g_in_swl_replace]
- str wzr, [x0]
-.L2362:
- adrp x0, :got:g_gc_blk_index
- adrp x26, :got:g_gc_blk_index
- ldr x27, [x0, #:got_lo12:g_gc_blk_index]
- ldrh w0, [x27]
- bl List_get_gc_head_node
- ldr x28, [x19, #:got_lo12:g_gc_superblock]
- uxth w0, w0
- cmp w0, w24
- strh w0, [x28]
- bne .L2363
- strh wzr, [x27]
- mov w2, 8
- b .L2431
-.L2363:
- bl IsBlkInGcList
- cbz w0, .L2364
- ldrh w0, [x27]
- add w0, w0, 1
- strh w0, [x27]
- b .L2362
-.L2364:
- ldrh w0, [x27]
- adrp x1, :got:p_valid_page_count_table
- ldrh w2, [x28]
- add w0, w0, 1
- lsl x2, x2, 1
- uxth w0, w0
- strh w0, [x27]
- ldr x1, [x1, #:got_lo12:p_valid_page_count_table]
- ldr x5, [x23, #:got_lo12:c_ftl_nand_planes_num]
- ldr x3, [x1]
- adrp x1, :got:c_ftl_nand_page_pre_blk
- ldrh w5, [x5]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w4, [x3,x2]
- ldrh w1, [x1]
- mul w1, w1, w5
- sdiv w5, w1, w25
- cmp w4, w5
- bgt .L2366
- cmp w4, 8
- bls .L2367
- cmp w0, 48
- bls .L2367
- adrp x0, :got:g_gc_blk_num
- ldr x0, [x0, #:got_lo12:g_gc_blk_num]
- ldrh w0, [x0]
- cmp w0, 35
- bhi .L2367
-.L2366:
- ldr x0, [x26, #:got_lo12:g_gc_blk_index]
- strh wzr, [x0]
-.L2367:
- cmp w21, w24
- ldrh w0, [x3,x2]
- bne .L2368
- cmp w0, w1
- blt .L2368
- ldr x19, [x19, #:got_lo12:g_gc_superblock]
+ bcs .L2626
+ lsl w0, w0, 1
+ strh w0, [x20,864]
+.L2626:
+ add x19, x19, :lo12:.LANCHOR2
mov w0, -1
- strh w0, [x19]
- ldr x26, [x26, #:got_lo12:g_gc_blk_index]
- strh wzr, [x26]
- b .L2454
-.L2368:
- cbnz w0, .L2369
+ strh w0, [x19,296]
+ b .L2637
+.L2625:
+ add x19, x19, :lo12:.LANCHOR2
+ ldrh w0, [x19,272]
+ ldrh w1, [x19,-8]
+ add w0, w0, w0, lsl 1
+ cmp w1, w0, lsr 2
+ ble .L2637
mov w0, -1
- bl decrement_vpc_count
- ldr x26, [x26, #:got_lo12:g_gc_blk_index]
- ldrh w0, [x26]
- add w0, w0, 1
- strh w0, [x26]
- b .L2362
-.L2369:
- ldr x23, [x19, #:got_lo12:g_gc_superblock]
- mov x0, x23
- strb wzr, [x23,8]
- bl make_superblock
- adrp x0, :got:g_gc_cur_blk_valid_pages
- ldrh w1, [x23]
- ldr x0, [x0, #:got_lo12:g_gc_cur_blk_valid_pages]
- strh wzr, [x0]
- adrp x0, :got:p_valid_page_count_table
- ldr x0, [x0, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x0]
- ldrh w1, [x0,x1,lsl 1]
- adrp x0, :got:g_gc_cur_blk_max_valid_pages
- ldr x0, [x0, #:got_lo12:g_gc_cur_blk_max_valid_pages]
- strh wzr, [x23,2]
- strb wzr, [x23,6]
- strh w1, [x0]
-.L2361:
- bl FtlReadRefresh
- ldr x0, [x22, #:got_lo12:g_in_gc_progress]
- mov w1, 1
- str w1, [x0]
- ldr x0, [x19, #:got_lo12:g_gc_superblock]
- ldrh w1, [x0,2]
- adrp x0, :got:c_ftl_nand_page_pre_blk
- add w2, w1, w20
- ldr x0, [x0, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w0, [x0]
- cmp w2, w0
- ble .L2370
- sub w20, w0, w1
- uxth w20, w20
-.L2370:
- mov w25, 0
-.L2371:
- cmp w20, w25, uxth
- bls .L2378
- adrp x0, :got:c_ftl_nand_planes_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w4, [x0]
- ldr x0, [x19, #:got_lo12:g_gc_superblock]
- ldrh w2, [x0,2]
- mov x0, 0
- mov w23, w0
- add w2, w2, w25
-.L2379:
- cmp w4, w0, uxth
- bls .L2456
- ldr x1, [x19, #:got_lo12:g_gc_superblock]
- add x1, x1, x0, lsl 1
- ldrh w1, [x1,16]
- cmp w1, w24
- beq .L2372
- adrp x5, :got:req_gc
- mov w3, 56
- orr w1, w2, w1, lsl 10
- umull x3, w23, w3
- ldr x5, [x5, #:got_lo12:req_gc]
- add w23, w23, 1
- uxth w23, w23
- ldr x5, [x5]
- add x3, x5, x3
- str w1, [x3,4]
-.L2372:
- add x0, x0, 1
- b .L2379
-.L2456:
- adrp x0, :got:req_gc
- mov w1, w23
- mov w2, 0
- mov x26, 0
- mov x27, 56
- ldr x0, [x0, #:got_lo12:req_gc]
- ldr x0, [x0]
- bl FlashReadPages
-.L2374:
- cmp w23, w26, uxth
- bls .L2457
- adrp x0, :got:req_gc
- mul x4, x26, x27
- ldr x6, [x0, #:got_lo12:req_gc]
- ldr x0, [x6]
- add x1, x0, x4
- ldr w0, [x0,x4]
- cmn w0, #1
- ldr x5, [x1,16]
- beq .L2394
- ldrh w0, [x5]
- mov w1, 61589
- cmp w0, w1
- bne .L2394
- ldr w0, [x5,8]
- mov w2, 0
- ldr x1, [x29,136]
- str x6, [x29,112]
- str x4, [x29,120]
- str x5, [x29,128]
- bl log2phys
- ldr x6, [x29,112]
- ldr x4, [x29,120]
- ldr w1, [x29,156]
- ldr x2, [x6]
- ldr x5, [x29,128]
- add x2, x2, x4
- ldr w0, [x2,4]
- cmp w1, w0
- bne .L2394
- adrp x0, :got:g_gc_cur_blk_valid_pages
- str x6, [x29,96]
- str x4, [x29,104]
- str x5, [x29,112]
- ldr x1, [x0, #:got_lo12:g_gc_cur_blk_valid_pages]
- ldrh w0, [x1]
- add w0, w0, 1
- strh w0, [x1]
- adrp x0, :got:g_gc_num_req
- ldr x28, [x0, #:got_lo12:g_gc_num_req]
- adrp x0, :got:req_gc_dst
- ldr x7, [x0, #:got_lo12:req_gc_dst]
- ldr w0, [x28]
- str x7, [x29,120]
- ldr x1, [x7]
- madd x1, x0, x27, x1
- ldr w0, [x2,24]
- str x1, [x29,128]
- str w0, [x1,24]
- bl Ftl_get_new_temp_ppa
- ldr x1, [x29,128]
- ldr x7, [x29,120]
- ldr x6, [x29,96]
- str w0, [x1,4]
- ldr w0, [x28]
- ldr x1, [x7]
- ldr x4, [x29,104]
- ldr x5, [x29,112]
- madd x0, x0, x27, x1
- ldr x1, [x6]
- add x1, x1, x4
- ldr x2, [x1,8]
- str x2, [x0,8]
- adrp x2, :got:g_gc_temp_superblock
- ldr x1, [x1,16]
- str x1, [x0,16]
- mov w1, 1
- ldr w0, [x29,156]
- str w0, [x5,12]
- ldr x2, [x2, #:got_lo12:g_gc_temp_superblock]
- str x2, [x29,128]
- ldrh w0, [x2]
- strh w0, [x5,2]
- adrp x0, :got:g_GlobalDataVersion
- ldr x0, [x0, #:got_lo12:g_GlobalDataVersion]
- ldr w0, [x0]
- str w0, [x5,4]
- ldr w0, [x28]
- add w0, w0, 1
- str w0, [x28]
- ldr x0, [x6]
- add x0, x0, x4
- bl FtlGcBufAlloc
- ldr x2, [x29,128]
- ldr w1, [x28]
- ldrb w0, [x2,7]
- cmp w1, w0
- beq .L2376
- ldrh w0, [x2,4]
- cbnz w0, .L2394
-.L2376:
- bl Ftl_gc_temp_data_write_back
- cbnz w0, .L2455
-.L2394:
- add x26, x26, 1
- b .L2374
-.L2457:
- add w25, w25, 1
- b .L2371
-.L2380:
- adrp x0, :got:g_gc_num_req
- ldr x0, [x0, #:got_lo12:g_gc_num_req]
- ldr w0, [x0]
- cbz w0, .L2382
- bl Ftl_gc_temp_data_write_back
- cbz w0, .L2382
-.L2455:
- ldr x22, [x22, #:got_lo12:g_in_gc_progress]
- str wzr, [x22]
-.L2454:
- adrp x0, :got:gc_ink_free_return_value
- ldr x0, [x0, #:got_lo12:gc_ink_free_return_value]
- ldrh w2, [x0]
- b .L2431
-.L2382:
- adrp x0, :got:g_gc_cur_blk_valid_pages
- ldr x0, [x0, #:got_lo12:g_gc_cur_blk_valid_pages]
- ldrh w3, [x0]
- cbnz w3, .L2383
- adrp x0, :got:p_valid_page_count_table
- ldr x1, [x19, #:got_lo12:g_gc_superblock]
- ldr x2, [x0, #:got_lo12:p_valid_page_count_table]
- ldrh w0, [x1]
- ldr x2, [x2]
- lsl x0, x0, 1
- ldrh w4, [x2,x0]
- cbz w4, .L2383
- strh w3, [x2,x0]
- ldrh w0, [x1]
- bl update_vpc_list
- bl FtlCacheWriteBack
- bl l2p_flush
- bl FtlVpcTblFlush
-.L2383:
- ldr x0, [x19, #:got_lo12:g_gc_superblock]
- mov w1, -1
- strh w1, [x0]
- b .L2381
-.L2384:
- ldr x22, [x22, #:got_lo12:g_in_gc_progress]
- adrp x1, :got:gc_ink_free_return_value
- str wzr, [x22]
- ldr x1, [x1, #:got_lo12:gc_ink_free_return_value]
- ldrh w2, [x1]
- cmp w2, wzr
- csinc w2, w2, w0, ne
-.L2431:
- mov w0, w2
+ strh w0, [x19,296]
+ mov w0, 20
+ strh w0, [x19,864]
+.L2637:
+ mov w0, 0
+.L2617:
+ ldr x2, [x29,88]
+ ldr x1, [x22,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2627
+ bl __stack_chk_fail
+.L2627:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 160
+ ldp x29, x30, [sp], 96
ret
- .size rk_ftl_garbage_collect, .-rk_ftl_garbage_collect
+ .size FtlGcFreeTempBlock, .-FtlGcFreeTempBlock
.align 2
- .global FtlRead
- .type FtlRead, %function
-FtlRead:
- stp x29, x30, [sp, -192]!
- uxtb w0, w0
+ .global Ftl_gc_temp_data_write_back
+ .type Ftl_gc_temp_data_write_back, %function
+Ftl_gc_temp_data_write_back:
+ adrp x0, .LANCHOR0+120
+ stp x29, x30, [sp, -48]!
add x29, sp, 0
- stp x19, x20, [sp,16]
- stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
+ ldrb w0, [x0,#:lo12:.LANCHOR0+120]
stp x21, x22, [sp,32]
- stp x23, x24, [sp,48]
- cmp w0, 16
- mov w19, w1
- mov w28, w2
- mov x25, x3
- bne .L2459
- add w0, w1, 256
- mov w1, w2
- mov x2, x3
- bl FtlVendorPartRead
- b .L2460
-.L2459:
- add w0, w1, w2
- str w0, [x29,172]
- adrp x0, :got:g_MaxLbaSector
- ldr w2, [x29,172]
- ldr x0, [x0, #:got_lo12:g_MaxLbaSector]
- ldr w1, [x0]
- mov w0, -1
- cmp w2, w1
- bhi .L2460
- adrp x23, :got:c_ftl_nand_sec_pre_page
- sub w24, w2, #1
- ldr x0, [x23, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w0, [x0]
- udiv w27, w19, w0
- udiv w24, w24, w0
- adrp x0, :got:g_totle_read_sector
- sub w22, w24, w27
- ldr x0, [x0, #:got_lo12:g_totle_read_sector]
- add w22, w22, 1
- ldr w1, [x0]
- add w1, w28, w1
- str w1, [x0]
- adrp x0, :got:g_totle_read_page_count
- ldr x0, [x0, #:got_lo12:g_totle_read_page_count]
- ldr w1, [x0]
- add w1, w22, w1
- str w1, [x0]
- mov w0, w27
- mov w1, w24
- bl FtlCacheMetchLpa
- cbz w0, .L2461
- bl FtlCacheWriteBack
-.L2461:
- mov w26, 0
- add x0, x29, 188
- mov w20, w27
- str w26, [x29,168]
- mov w21, w26
- str w26, [x29,156]
- str x0, [x29,112]
-.L2462:
- cbz w22, .L2504
- ldr x1, [x29,112]
- mov w0, w20
+ stp x19, x20, [sp,16]
+ adrp x21, .LANCHOR2
+ cbz w0, .L2640
+ add x0, x21, :lo12:.LANCHOR2
+ ldr w1, [x0,880]
+ tbz x1, 0, .L2640
+ ldrh w0, [x0,100]
+ cbz w0, .L2640
+.L2645:
+ mov w0, 0
+ b .L2641
+.L2640:
+ add x1, x21, :lo12:.LANCHOR2
mov w2, 0
- bl log2phys
- ldr w3, [x29,188]
- cmn w3, #1
- bne .L2501
- mov w3, 0
-.L2463:
- ldr x0, [x23, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w0, [x0]
- cmp w3, w0
- bcs .L2467
- madd w0, w20, w0, w3
- cmp w0, w19
- bcc .L2465
- ldr w1, [x29,172]
- cmp w0, w1
- bcs .L2465
- sub w0, w0, w19
- mov w1, 0
- ubfiz x0, x0, 9, 23
- mov w2, 512
- add x0, x25, x0
- str x3, [x29,160]
- bl ftl_memset
- ldr x3, [x29,160]
-.L2465:
- add w3, w3, 1
- b .L2463
-.L2501:
- mov w0, 56
- cmp w20, w27
- umull x1, w21, w0
- adrp x0, :got:req_read
- ldr x0, [x0, #:got_lo12:req_read]
- ldr x2, [x0]
- add x2, x2, x1
- str w3, [x2,4]
- bne .L2468
- adrp x2, :got:p_io_data_buf_0
- ldr x0, [x0]
- add x0, x0, x1
- ldr x2, [x2, #:got_lo12:p_io_data_buf_0]
- ldr x2, [x2]
- str x2, [x0,8]
- ldr x2, [x23, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w2, [x2]
- udiv w3, w19, w2
- msub w3, w3, w2, w19
- str w3, [x29,128]
- sub w3, w2, w3
- cmp w3, w28
- csel w3, w3, w28, ls
- str w3, [x29,168]
- cmp w3, w2
- bne .L2469
- str x25, [x0,8]
- b .L2469
-.L2468:
- ldr x2, [x0]
- cmp w20, w24
- add x2, x2, x1
- bne .L2470
- adrp x0, :got:p_io_data_buf_1
- ldr w4, [x29,172]
- ldr x0, [x0, #:got_lo12:p_io_data_buf_1]
- ldr x0, [x0]
- str x0, [x2,8]
- ldr x0, [x23, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w3, [x0]
- mul w0, w20, w3
- sub w26, w4, w0
- cmp w26, w3
- bne .L2469
- b .L2502
-.L2470:
- ldr x0, [x23, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w0, [x0]
- mul w0, w20, w0
-.L2502:
- sub w0, w0, w19
- ubfiz x0, x0, 9, 23
- add x0, x25, x0
- str x0, [x2,8]
-.L2469:
- adrp x0, :got:req_read
- adrp x2, :got:p_io_spare_buf
- ldr x0, [x0, #:got_lo12:req_read]
- ldr x2, [x2, #:got_lo12:p_io_spare_buf]
- ldr x0, [x0]
- ldr x2, [x2]
- add x1, x0, x1
- adrp x0, :got:c_ftl_nand_byte_pre_oob
- ldr x0, [x0, #:got_lo12:c_ftl_nand_byte_pre_oob]
- str w20, [x1,24]
- ldrh w0, [x0]
- mul w0, w21, w0
- add w21, w21, 1
- and x0, x0, 4294967292
- add x0, x2, x0
- str x0, [x1,16]
-.L2467:
- subs w22, w22, #1
- add w20, w20, 1
- beq .L2471
- adrp x0, :got:c_ftl_nand_planes_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- cmp w21, w0, lsl 3
- bne .L2462
-.L2471:
- cbz w21, .L2462
- adrp x0, :got:req_read
- mov w1, w21
- mov w2, 0
- ldr x0, [x0, #:got_lo12:req_read]
- ldr x0, [x0]
- bl FlashReadPages
- str xzr, [x29,160]
- ldr x0, [x29,128]
- ubfiz x0, x0, 9, 23
- str x0, [x29,144]
- ldr w0, [x29,168]
- lsl w0, w0, 9
- str w0, [x29,152]
- lsl w0, w26, 9
- str w0, [x29,124]
-.L2473:
- ldr w0, [x29,160]
- cmp w21, w0
- bls .L2505
- ldr x0, [x29,160]
- mov x1, 56
- mul x3, x0, x1
- adrp x0, :got:req_read
- ldr x0, [x0, #:got_lo12:req_read]
- ldr x0, [x0]
- add x0, x0, x3
- ldr w1, [x0,24]
- cmp w1, w27
- bne .L2474
- ldr x1, [x0,8]
- adrp x0, :got:p_io_data_buf_0
- ldr x0, [x0, #:got_lo12:p_io_data_buf_0]
- ldr x0, [x0]
- cmp x1, x0
- bne .L2475
- ldr x2, [x29,144]
- mov x0, x25
- str x3, [x29,104]
- add x1, x1, x2
- ldr w2, [x29,152]
- b .L2503
-.L2474:
- cmp w1, w24
- bne .L2475
- ldr x1, [x0,8]
- adrp x0, :got:p_io_data_buf_1
- ldr x0, [x0, #:got_lo12:p_io_data_buf_1]
- ldr x0, [x0]
- cmp x1, x0
- bne .L2475
- ldr x0, [x23, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldr w2, [x29,124]
- str x3, [x29,104]
- ldrh w0, [x0]
- mul w0, w24, w0
- sub w0, w0, w19
- ubfiz x0, x0, 9, 23
- add x0, x25, x0
-.L2503:
- bl ftl_memcpy
- ldr x3, [x29,104]
-.L2475:
- adrp x0, :got:req_read
- ldr x0, [x0, #:got_lo12:req_read]
- ldr x0, [x0]
- add x5, x0, x3
- ldr w2, [x0,x3]
+ mov w3, w2
+ mov w20, 0
+ mov w22, 56
+ ldr x0, [x1,2056]
+ ldr w1, [x1,880]
+ bl FlashProgPages
+.L2642:
+ add x19, x21, :lo12:.LANCHOR2
+ ldr w1, [x19,880]
+ cmp w20, w1
+ bcs .L2656
+ umull x0, w20, w22
+ ldr x2, [x19,2056]
+ add x1, x2, x0
+ ldr w2, [x2,x0]
cmn w2, #1
- bne .L2476
- adrp x1, :got:g_sys_ext_data
- str w2, [x29,156]
- ldr x4, [x1, #:got_lo12:g_sys_ext_data]
- ldr w1, [x4,72]
+ bne .L2643
+ ldrh w3, [x19,96]
+ ldr x1, [x19,-40]
+ strh wzr, [x1,x3,lsl 1]
+ strh w2, [x19,96]
+ ldr w1, [x19,448]
add w1, w1, 1
- str w1, [x4,72]
-.L2476:
- ldr w0, [x0,x3]
- cmp w0, 256
- bne .L2477
- ldr w0, [x5,4]
+ str w1, [x19,448]
+ ldr x1, [x19,2056]
+ add x0, x1, x0
+ ldr w0, [x0,4]
lsr w0, w0, 10
- bl P2V_block_in_plane
- bl FtlGcRefreshBlock
-.L2477:
- ldr x0, [x29,160]
- add x0, x0, 1
- str x0, [x29,160]
- b .L2473
-.L2505:
- mov w21, 0
- b .L2462
-.L2504:
- adrp x0, :got:g_gc_bad_block_temp_num
- ldr x0, [x0, #:got_lo12:g_gc_bad_block_temp_num]
- ldrh w0, [x0]
- cbz w0, .L2480
- mov w0, w22
- mov w1, 1
- bl rk_ftl_garbage_collect
-.L2480:
- ldr w0, [x29,156]
-.L2460:
+ bl FtlBbmMapBadBlock
+ bl FtlBbmTblFlush
+ bl FtlGcPageVarInit
+ b .L2655
+.L2643:
+ ldr x2, [x1,16]
+ add w20, w20, 1
+ ldr w1, [x1,4]
+ uxth w20, w20
+ ldr w0, [x2,12]
+ ldr w2, [x2,8]
+ bl FtlGcUpdatePage
+ b .L2642
+.L2656:
+ ldr x0, [x19,2056]
+ bl FtlGcBufFree
+ str wzr, [x19,880]
+ ldrh w0, [x19,100]
+ cbnz w0, .L2645
+ mov w0, 1
+ bl FtlGcFreeTempBlock
+.L2655:
+ mov w0, 1
+.L2641:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 192
+ ldp x29, x30, [sp], 48
ret
- .size FtlRead, .-FtlRead
+ .size Ftl_gc_temp_data_write_back, .-Ftl_gc_temp_data_write_back
.align 2
- .global StorageSysDataLoad
- .type StorageSysDataLoad, %function
-StorageSysDataLoad:
+ .global FtlGcPageRecovery
+ .type FtlGcPageRecovery, %function
+FtlGcPageRecovery:
stp x29, x30, [sp, -48]!
- mov x2, 512
add x29, sp, 0
+ stp x19, x20, [sp,16]
+ adrp x20, .LANCHOR0
+ adrp x19, .LANCHOR2
+ add x20, x20, :lo12:.LANCHOR0
+ add x19, x19, :lo12:.LANCHOR2
+ str x21, [sp,32]
+ add x21, x19, 96
+ mov x0, x21
+ ldrh w1, [x20,2026]
+ bl FtlGcScanTempBlk
+ ldrh w1, [x19,98]
+ ldrh w0, [x20,2026]
+ cmp w1, w0
+ bcc .L2657
+ add x0, x19, 2240
+ bl FtlMapBlkWriteDumpData
+ mov w0, 0
+ bl FtlGcFreeTempBlock
+ str wzr, [x19,2328]
+.L2657:
+ ldp x19, x20, [sp,16]
+ ldr x21, [sp,32]
+ ldp x29, x30, [sp], 48
+ ret
+ .size FtlGcPageRecovery, .-FtlGcPageRecovery
+ .align 2
+ .global FtlPowerLostRecovery
+ .type FtlPowerLostRecovery, %function
+FtlPowerLostRecovery:
+ stp x29, x30, [sp, -32]!
+ adrp x0, .LANCHOR4
+ add x29, sp, 0
+ add x0, x0, :lo12:.LANCHOR4
str x19, [sp,16]
- mov w19, w0
- mov x0, x1
- str x1, [x29,40]
- mov w1, 0
- bl memset
- bl rknand_device_lock
- ldr x3, [x29,40]
- add w1, w19, 256
- mov w2, 1
- mov w0, 16
- bl FtlRead
- str x0, [x29,40]
- bl rknand_device_unlock
+ adrp x19, .LANCHOR2
+ add x19, x19, :lo12:.LANCHOR2
+ strh wzr, [x0,266]
+ str wzr, [x0,268]
+ mov x0, x19
+ bl FtlRecoverySuperblock
+ mov x0, x19
+ add x19, x19, 48
+ bl FtlSlcSuperblockCheck
+ mov x0, x19
+ bl FtlRecoverySuperblock
+ mov x0, x19
+ bl FtlSlcSuperblockCheck
+ bl FtlGcPageRecovery
+ mov w0, -1
+ bl decrement_vpc_count
ldr x19, [sp,16]
- ldr x0, [x29,40]
- ldp x29, x30, [sp], 48
+ mov w0, 0
+ ldp x29, x30, [sp], 32
ret
- .size StorageSysDataLoad, .-StorageSysDataLoad
+ .size FtlPowerLostRecovery, .-FtlPowerLostRecovery
.align 2
- .global FtlWrite
- .type FtlWrite, %function
-FtlWrite:
- stp x29, x30, [sp, -320]!
- uxtb w0, w0
+ .global FtlSysBlkInit
+ .type FtlSysBlkInit, %function
+FtlSysBlkInit:
+ stp x29, x30, [sp, -64]!
add x29, sp, 0
- stp x23, x24, [sp,48]
- stp x25, x26, [sp,64]
stp x19, x20, [sp,16]
+ adrp x20, .LANCHOR0
+ str x23, [sp,48]
+ add x20, x20, :lo12:.LANCHOR0
+ adrp x19, .LANCHOR2
stp x21, x22, [sp,32]
- stp x27, x28, [sp,80]
- cmp w0, 16
- mov w23, w1
- mov w24, w2
- mov x25, x3
- bne .L2508
- add w0, w1, 256
- mov w1, w2
- mov x2, x3
- bl FtlVendorPartWrite
- b .L2509
-.L2508:
- adrp x0, :got:g_MaxLbaSector
- add w2, w1, w2
- ldr x0, [x0, #:got_lo12:g_MaxLbaSector]
- ldr w1, [x0]
- mov w0, -1
- cmp w2, w1
- bhi .L2509
- adrp x0, :got:g_ftl_nand_free_count
- adrp x3, :got:c_ftl_nand_sec_pre_page
- mov w1, 2048
- sub w2, w2, #1
- str x3, [x29,248]
- ldr x0, [x0, #:got_lo12:g_ftl_nand_free_count]
- str w1, [x0]
- ldr x0, [x3, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w1, [x0]
- udiv w0, w2, w1
- cmp w24, w1, lsl 1
- str w0, [x29,220]
- udiv w26, w23, w1
- sub w27, w0, w26
- adrp x0, :got:g_totle_write_page_count
- add w21, w27, 1
- ldr x0, [x0, #:got_lo12:g_totle_write_page_count]
- ldr w2, [x0]
- add w2, w21, w2
- str w2, [x0]
- adrp x0, :got:g_totle_write_sector
- ldr x0, [x0, #:got_lo12:g_totle_write_sector]
- ldr w2, [x0]
- add w2, w24, w2
- str w2, [x0]
- cset w0, cs
- cmp w24, 8
- str w0, [x29,236]
- bhi .L2547
- adrp x19, :got:g_buffer_superblock
- ldr x19, [x19, #:got_lo12:g_buffer_superblock]
- b .L2510
-.L2547:
- adrp x19, :got:g_active_superblock
- ldr x19, [x19, #:got_lo12:g_active_superblock]
-.L2510:
- adrp x22, :got:g_wr_page_num
- ldr x0, [x22, #:got_lo12:g_wr_page_num]
- ldr w3, [x0]
- cbz w3, .L2511
- adrp x0, :got:req_wr_io
- sub w3, w3, #1
- mov w2, 56
- adrp x20, :got:last_cache_match_count
- ldr x0, [x0, #:got_lo12:req_wr_io]
- umull x3, w3, w2
- ldr x0, [x0]
- add x3, x0, x3
- ldr w0, [x3,24]
- cmp w26, w0
- bne .L2512
- adrp x0, :got:g_totle_cache_write_count
- ldr x0, [x0, #:got_lo12:g_totle_cache_write_count]
- ldr w2, [x0]
- add w2, w2, 1
- str w2, [x0]
- ldr x28, [x20, #:got_lo12:last_cache_match_count]
- ldr w0, [x28]
- add w0, w0, 1
- str w0, [x28]
- msub w0, w26, w1, w23
- sub w1, w1, w0
- ubfiz x0, x0, 9, 23
- cmp w1, w24
- csel w19, w1, w24, ls
- ldr x1, [x3,8]
- lsl w21, w19, 9
- add x0, x1, x0
- mov w2, w21
- mov x1, x25
- bl ftl_memcpy
- cbnz w27, .L2513
- ldr w1, [x28]
- mov w0, w27
- cmp w1, 2
- ble .L2509
-.L2513:
- add x25, x25, x21
- sub w24, w24, w19
- add w23, w23, w19
- add w26, w26, 1
- mov w21, w27
-.L2512:
- ldr x20, [x20, #:got_lo12:last_cache_match_count]
- adrp x0, :got:gp_last_act_superblock
- str wzr, [x20]
- ldr x0, [x0, #:got_lo12:gp_last_act_superblock]
- ldr x19, [x0]
-.L2511:
- ldr w1, [x29,220]
- mov w0, w26
- bl FtlCacheMetchLpa
- cbz w0, .L2514
- bl FtlCacheWriteBack
-.L2514:
- adrp x0, :got:gp_last_act_superblock
- str x0, [x29,168]
- str w26, [x29,232]
- ldr x1, [x0, #:got_lo12:gp_last_act_superblock]
- add x0, x29, 260
- str x0, [x29,144]
- add x0, x29, 264
- str x0, [x29,240]
- adrp x0, .LC118
- add x0, x0, :lo12:.LC118
- str x19, [x1]
- str x0, [x29,136]
-.L2515:
- cbz w21, .L2572
- ldrh w1, [x19,4]
- cbnz w1, .L2516
- adrp x0, :got:g_active_superblock
- adrp x20, :got:g_active_superblock
- ldr x0, [x0, #:got_lo12:g_active_superblock]
- cmp x19, x0
- bne .L2517
- adrp x19, :got:g_buffer_superblock
- ldr x0, [x19, #:got_lo12:g_buffer_superblock]
- ldrh w27, [x0,4]
- cbnz w27, .L2518
- bl allocate_new_data_superblock
- adrp x0, :got:power_up_flag
- ldr x0, [x0, #:got_lo12:power_up_flag]
- str w27, [x0]
-.L2518:
- ldr x0, [x20, #:got_lo12:g_active_superblock]
- bl allocate_new_data_superblock
- adrp x0, :got:power_up_flag
- ldr x0, [x0, #:got_lo12:power_up_flag]
- ldr w0, [x0]
- cbnz w0, .L2549
-.L2520:
- ldr x19, [x20, #:got_lo12:g_active_superblock]
- b .L2519
-.L2517:
- adrp x2, :got:power_up_flag
- ldrh w0, [x0,4]
- ldr x2, [x2, #:got_lo12:power_up_flag]
- str w1, [x2]
- cbnz w0, .L2520
- mov x0, x19
- bl allocate_new_data_superblock
- b .L2519
-.L2549:
- ldr x19, [x19, #:got_lo12:g_buffer_superblock]
-.L2519:
- ldrh w0, [x19,4]
- cbnz w0, .L2521
- mov x0, x19
- bl allocate_new_data_superblock
-.L2521:
- ldr x0, [x29,168]
- ldr x0, [x0, #:got_lo12:gp_last_act_superblock]
- str x19, [x0]
-.L2516:
- adrp x2, :got:c_wr_page_buf_num
- ldr x3, [x22, #:got_lo12:g_wr_page_num]
- ldrh w1, [x19,4]
- str xzr, [x29,224]
- ldr x0, [x2, #:got_lo12:c_wr_page_buf_num]
- ldr w3, [x3]
- str x2, [x29,160]
- ldr w0, [x0]
- sub w0, w0, w3
+ add x21, x19, :lo12:.LANCHOR2
+ ldrh w0, [x20,1956]
+ bl FtlFreeSysBlkQueueInit
+ bl FtlScanSysBlk
+ ldrh w1, [x21,280]
+ mov w0, 65535
cmp w1, w0
- csel w0, w1, w0, ls
- cmp w0, w21
- csel w0, w0, w21, ls
- str w0, [x29,212]
- ldr w0, [x29,236]
- and w0, w0, 1
- str w0, [x29,156]
- add w0, w24, w23
- str w0, [x29,208]
-.L2522:
- ldr w0, [x29,224]
- ldr w2, [x29,212]
- ldr w1, [x29,232]
- cmp w0, w2
- add w28, w1, w0
- bcs .L2573
- ldrh w1, [x19,4]
- cbz w1, .L2551
- ldr w1, [x29,220]
- cmp w28, w1
- cset w10, eq
- cbz w0, .L2524
- ldr w1, [x29,156]
- tst w10, w1
- beq .L2524
- ldr x1, [x29,248]
- ldr w2, [x29,208]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w1, [x1]
- msub w2, w28, w1, w2
- cmp w2, w1
- bne .L2551
-.L2524:
- ldr x1, [x29,144]
- mov w2, 0
- mov w0, w28
- str x10, [x29,96]
- bl log2phys
- mov x0, x19
- bl get_new_active_ppa
- ldr x8, [x22, #:got_lo12:g_wr_page_num]
- adrp x4, :got:req_wr_io
- mov w7, 56
- str x4, [x29,120]
- str x8, [x29,104]
- ldr x6, [x4, #:got_lo12:req_wr_io]
- ldr w9, [x8]
- str x7, [x29,112]
- ldr x2, [x6]
- umull x1, w9, w7
- str x6, [x29,128]
- add x2, x2, x1
- str w0, [x2,4]
- ldr x0, [x6]
- add x1, x0, x1
- adrp x0, :got:c_ftl_nand_byte_pre_oob
- ldr x0, [x0, #:got_lo12:c_ftl_nand_byte_pre_oob]
- ldrh w2, [x0]
- adrp x0, :got:p_wr_io_spare_buf
- ldr x0, [x0, #:got_lo12:p_wr_io_spare_buf]
- mul w5, w2, w9
- ldr x0, [x0]
- and x3, x5, 4294967292
- adrp x5, :got:c_ftl_nand_byte_pre_page
- str x0, [x29,176]
- add x27, x0, x3
- str x27, [x1,16]
- str x5, [x29,192]
- ldr x20, [x5, #:got_lo12:c_ftl_nand_byte_pre_page]
- str x3, [x29,184]
- ldrh w0, [x20]
- mul w0, w0, w9
- adrp x9, :got:p_wr_io_data_buf
- and x0, x0, 4294967292
- ldr x9, [x9, #:got_lo12:p_wr_io_data_buf]
- str w28, [x1,24]
- ldr x9, [x9]
- add x0, x9, x0
- str x0, [x1,8]
- mov x0, x27
- mov w1, 0
- bl ftl_memset
- cmp w28, w26
- ldr x4, [x29,120]
- cset w0, eq
- str w0, [x29,216]
- ldr x5, [x29,192]
- cbnz w0, .L2554
- ldr x10, [x29,96]
- ldr x6, [x29,128]
- ldr x7, [x29,112]
- ldr x8, [x29,104]
- cbz w10, .L2525
- ldr x0, [x29,248]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w20, [x0]
- ldr w0, [x29,208]
- msub w20, w28, w20, w0
- ldr w0, [x29,216]
- str w0, [x29,192]
- uxth w20, w20
- b .L2528
-.L2554:
- ldr x0, [x29,248]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w20, [x0]
- udiv w0, w23, w20
- msub w0, w0, w20, w23
- str w0, [x29,192]
- sub w20, w20, w0
- cmp w20, w24
- csel w20, w20, w24, ls
-.L2528:
- ldr x0, [x29,248]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w0, [x0]
- cmp w20, w0
- bne .L2529
- ldr w0, [x29,216]
- mov x1, x25
- cbnz w0, .L2530
- mul w1, w20, w28
- sub w1, w1, w23
- ubfiz x1, x1, 9, 23
- add x1, x25, x1
-.L2530:
- ldr w2, [x29,236]
- mov w0, 56
- cbz w2, .L2531
- ldr x2, [x22, #:got_lo12:g_wr_page_num]
- ldr x4, [x4, #:got_lo12:req_wr_io]
- ldr w2, [x2]
- umull x0, w2, w0
- ldr x2, [x4]
- add x0, x2, x0
- str x1, [x0,8]
- b .L2532
-.L2531:
- ldr x2, [x22, #:got_lo12:g_wr_page_num]
- ldr x4, [x4, #:got_lo12:req_wr_io]
- ldr x5, [x5, #:got_lo12:c_ftl_nand_byte_pre_page]
- ldr w2, [x2]
- umull x0, w2, w0
- ldr x2, [x4]
- add x0, x2, x0
- ldrh w2, [x5]
- ldr x0, [x0,8]
- b .L2571
-.L2529:
- ldr w0, [x29,260]
- cmn w0, #1
- beq .L2533
- ldr x1, [x29,240]
- mov w2, 56
- str x4, [x29,128]
- str w28, [x1,24]
- str w0, [x1,4]
- ldr x0, [x22, #:got_lo12:g_wr_page_num]
- ldr x1, [x4, #:got_lo12:req_wr_io]
- ldr w0, [x0]
- ldr x1, [x1]
- umull x0, w0, w2
- ldr x2, [x29,240]
- add x0, x1, x0
- ldr x1, [x0,8]
- ldr x0, [x0,16]
- str x1, [x2,8]
- mov w1, 1
- str x0, [x2,16]
- mov x0, x2
- mov w2, 0
- bl FlashReadPages
- ldr x0, [x29,240]
- ldr x4, [x29,128]
- ldr w0, [x0]
- cmn w0, #1
- bne .L2534
- adrp x0, :got:g_sys_ext_data
- ldr x0, [x0, #:got_lo12:g_sys_ext_data]
- ldr w1, [x0,72]
- add w1, w1, 1
- str w1, [x0,72]
- b .L2536
-.L2534:
- ldr w0, [x27,8]
- cmp w0, w28
- beq .L2536
- adrp x0, :got:g_sys_ext_data
- mov w2, w28
- str x4, [x29,128]
- ldr x0, [x0, #:got_lo12:g_sys_ext_data]
- ldr w1, [x0,72]
- add w1, w1, 1
- str w1, [x0,72]
- ldr x0, [x29,136]
- ldr w1, [x27,8]
- bl printk
- b .L2570
-.L2533:
- ldr x0, [x22, #:got_lo12:g_wr_page_num]
- mov w1, 56
- ldr x5, [x5, #:got_lo12:c_ftl_nand_byte_pre_page]
- str x4, [x29,128]
- ldr w0, [x0]
- ldrh w2, [x5]
- umull x0, w0, w1
- ldr x1, [x4, #:got_lo12:req_wr_io]
- ldr x1, [x1]
- add x0, x1, x0
- mov w1, 0
- ldr x0, [x0,8]
- bl ftl_memset
-.L2570:
- ldr x4, [x29,128]
-.L2536:
- ldr w1, [x29,216]
- mov w0, 56
- lsl w2, w20, 9
- cbz w1, .L2537
- ldr x1, [x22, #:got_lo12:g_wr_page_num]
- ldr x4, [x4, #:got_lo12:req_wr_io]
- ldr w5, [x1]
- ldr x4, [x4]
- umull x0, w5, w0
- add x4, x4, x0
- ldr x0, [x29,192]
- ubfiz x0, x0, 9, 23
- ldr x1, [x4,8]
- add x0, x1, x0
- mov x1, x25
- b .L2571
-.L2537:
- ldr x1, [x22, #:got_lo12:g_wr_page_num]
- ldr x4, [x4, #:got_lo12:req_wr_io]
- ldr w5, [x1]
- ldr x1, [x4]
- umull x0, w5, w0
- add x0, x1, x0
- ldr x1, [x29,248]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldr x0, [x0,8]
- ldrh w1, [x1]
- mul w1, w28, w1
- sub w1, w1, w23
- ubfiz x1, x1, 9, 23
- add x1, x25, x1
- b .L2571
-.L2525:
- ldr w0, [x29,236]
- ldr w1, [x8]
- cbz w0, .L2538
- umull x0, w1, w7
- ldr x1, [x6]
- add x1, x1, x0
- ldr x0, [x29,248]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w0, [x0]
- mul w0, w28, w0
- sub w0, w0, w23
- ubfiz x0, x0, 9, 23
- add x0, x25, x0
- str x0, [x1,8]
- b .L2532
-.L2538:
- umull x0, w1, w7
- ldr x1, [x6]
- ldrh w2, [x20]
- add x0, x1, x0
- ldr x1, [x29,248]
- ldr x1, [x1, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldr x0, [x0,8]
- ldrh w1, [x1]
- mul w1, w28, w1
- sub w1, w1, w23
- ubfiz x1, x1, 9, 23
- add x1, x25, x1
-.L2571:
- bl ftl_memcpy
-.L2532:
- ldr x1, [x29,176]
- mov w0, -3947
- ldr x2, [x29,184]
- strh w0, [x1,x2]
- adrp x1, :got:g_GlobalDataVersion
- ldr x1, [x1, #:got_lo12:g_GlobalDataVersion]
- str w28, [x27,8]
- ldr w0, [x1]
- str w0, [x27,4]
+ bne .L2661
+.L2663:
+ mov w22, -1
+ b .L2662
+.L2661:
+ bl FtlLoadSysInfo
+ mov w22, w0
+ cbnz w0, .L2663
+ bl FtlLoadMapInfo
+ bl FtlLoadVonderInfo
+ bl Ftl_load_ext_data
+ bl FtlLoadEctTbl
+ bl FtlFreeSysBLkSort
+ bl SupperBlkListInit
+ bl FtlPowerLostRecovery
+ ldrh w2, [x20,2066]
+ mov x1, 0
+ ldr x0, [x21,144]
+.L2664:
+ cmp w1, w2
+ mov w3, w1
+ bge .L2668
+ add x4, x0, x1, lsl 4
+ add x1, x1, 1
+ ldr w4, [x4,4]
+ tbz w4, #31, .L2664
+.L2668:
+ add x1, x19, :lo12:.LANCHOR2
+ cmp w3, w2
+ adrp x21, .LANCHOR4
+ ldrh w0, [x1,252]
add w0, w0, 1
- cmn w0, #1
- csel w0, w0, wzr, ne
- str w0, [x1]
- ldr w0, [x29,260]
- str w0, [x27,12]
- ldrh w0, [x19]
- strh w0, [x27,2]
- ldr x1, [x22, #:got_lo12:g_wr_page_num]
- ldr w0, [x1]
+ strh w0, [x1,252]
+ blt .L2665
+ add x0, x21, :lo12:.LANCHOR4
+ ldrh w0, [x0,266]
+ cbz w0, .L2669
+.L2665:
+ add x20, x19, :lo12:.LANCHOR2
+ mov x0, x20
+ bl FtlSuperblockPowerLostFix
+ add x0, x20, 48
+ bl FtlSuperblockPowerLostFix
+ add x0, x20, 2240
+ bl FtlMapBlkWriteDumpData
+ add x0, x21, :lo12:.LANCHOR4
+ add x0, x0, 200
+ bl FtlMapBlkWriteDumpData
+ ldrh w0, [x20,254]
add w0, w0, 1
- str w0, [x1]
- ldr x0, [x29,224]
- add x0, x0, 1
- str x0, [x29,224]
- b .L2522
-.L2573:
- str w28, [x29,232]
- mov x0, x2
- b .L2523
-.L2551:
- str w28, [x29,232]
-.L2523:
- sub w21, w21, w0
- ldr w0, [x29,236]
- cbnz w0, .L2542
- ldr x0, [x29,160]
- ldr x1, [x22, #:got_lo12:g_wr_page_num]
- ldr x0, [x0, #:got_lo12:c_wr_page_buf_num]
- ldr w1, [x1]
- ldr w0, [x0]
- cmp w1, w0
- bcs .L2542
- ldrh w0, [x19,4]
- cbz w0, .L2542
-.L2544:
- str wzr, [x29,236]
- b .L2543
-.L2542:
- bl FtlCacheWriteBack
- ldr x0, [x22, #:got_lo12:g_wr_page_num]
- cmp w21, 3
- str wzr, [x0]
- bls .L2544
-.L2543:
- bl rknand_queue_cond_resched
- b .L2515
-.L2572:
- ldr w1, [x29,220]
- mov w0, w21
- sub w1, w1, w26
- bl rk_ftl_garbage_collect
- mov w0, w21
-.L2509:
+ strh w0, [x20,254]
+ bl l2p_flush
+ bl FtlVpcTblFlush
+ bl FtlVpcTblFlush
+.L2669:
+ mov w0, 1
+ add x20, x19, :lo12:.LANCHOR2
+ bl FtlUpdateVaildLpn
+ ldrh w0, [x19,#:lo12:.LANCHOR2]
+ mov w1, 65535
+ cmp w0, w1
+ beq .L2670
+ ldrh w1, [x20,4]
+ cbnz w1, .L2670
+ ldrh w1, [x20,52]
+ add x23, x20, 48
+ cbnz w1, .L2670
+ bl FtlGcRefreshBlock
+ ldrh w0, [x20,48]
+ bl FtlGcRefreshBlock
+ mov x0, x20
+ bl allocate_new_data_superblock
+ mov x0, x23
+ bl allocate_new_data_superblock
+ add x0, x21, :lo12:.LANCHOR4
+ add x0, x0, 200
+ bl FtlMapBlkWriteDumpData
+.L2670:
+ add x19, x19, :lo12:.LANCHOR2
+ ldrh w0, [x19,252]
+ and w0, w0, 31
+ cbnz w0, .L2662
+ bl FtlVpcCheckAndModify
+.L2662:
+ mov w0, w22
+ ldr x23, [sp,48]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 320
+ ldp x29, x30, [sp], 64
ret
- .size FtlWrite, .-FtlWrite
+ .size FtlSysBlkInit, .-FtlSysBlkInit
.align 2
- .global StorageSysDataStore
- .type StorageSysDataStore, %function
-StorageSysDataStore:
- stp x29, x30, [sp, -48]!
+ .global FtlInit
+ .type FtlInit, %function
+FtlInit:
+ stp x29, x30, [sp, -32]!
+ adrp x1, .LC74
add x29, sp, 0
- str x19, [sp,16]
- mov w19, w0
- str x1, [x29,40]
- bl rknand_device_lock
- ldr x3, [x29,40]
- add w1, w19, 256
- mov w2, 1
- mov w0, 16
- bl FtlWrite
- str x0, [x29,40]
- bl rknand_device_unlock
- ldr x19, [sp,16]
- ldr x0, [x29,40]
- ldp x29, x30, [sp], 48
+ stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR1
+ mov x20, x0
+ add x19, x19, :lo12:.LANCHOR1
+ mov w0, -1
+ add x1, x1, :lo12:.LC74
+ str w0, [x19,532]
+ adrp x0, .LANCHOR4+420
+ str wzr, [x0,#:lo12:.LANCHOR4+420]
+ adrp x0, .LC73
+ add x0, x0, :lo12:.LC73
+ bl printk
+ mov x0, x20
+ bl FtlConstantsInit
+ bl FtlMemInit
+ bl FtlVariablesInit
+ adrp x0, .LANCHOR0+1956
+ ldrh w0, [x0,#:lo12:.LANCHOR0+1956]
+ bl FtlFreeSysBlkQueueInit
+ bl FtlLoadBbt
+ cbnz w0, .L2678
+ bl FtlSysBlkInit
+ cbnz w0, .L2678
+ mov w0, 1
+ str w0, [x19,532]
+.L2678:
+ mov w0, 0
+ ldp x19, x20, [sp,16]
+ ldp x29, x30, [sp], 32
ret
- .size StorageSysDataStore, .-StorageSysDataStore
+ .size FtlInit, .-FtlInit
.align 2
- .type FlashReadFacBbtData.part.16, %function
-FlashReadFacBbtData.part.16:
+ .global rk_ftl_init
+ .type rk_ftl_init, %function
+rk_ftl_init:
stp x29, x30, [sp, -32]!
- mov w3, 0
- adrp x4, :got:gFlashPageBuffer0
+ mov w0, 2048
add x29, sp, 0
str x19, [sp,16]
- mov x19, x0
- cbnz w1, .L2578
- adrp x1, :got:gNandFlashIdbBlockAddr
- mov w7, 1
-.L2581:
- ldr x0, [x1, #:got_lo12:gNandFlashIdbBlockAddr]
- ldr w0, [x0]
- cmp w3, w0
- bcs .L2578
- ldr x0, [x4, #:got_lo12:gFlashPageBuffer0]
- ubfx x5, x3, 5, 11
- lsl x5, x5, 2
- lsl w6, w7, w3
- add w3, w3, 1
- ldr x0, [x0]
- uxth w3, w3
- ldr w8, [x0,x5]
- orr w6, w8, w6
- str w6, [x0,x5]
- b .L2581
-.L2578:
- ldr x4, [x4, #:got_lo12:gFlashPageBuffer0]
- mov x0, x19
- ldr x1, [x4]
- bl ftl_memcpy
- mov w2, 4
+ adrp x19, .LANCHOR4
+ add x19, x19, :lo12:.LANCHOR4
+ bl ftl_malloc
+ add x1, x19, 432
+ str x0, [x19,424]
+ add x0, x19, 32
+ str xzr, [x19,32]
+ str xzr, [x19,432]
+ bl rknand_get_reg_addr
+ ldr x1, [x19,32]
+ mov w0, -1
+ cbz x1, .L2681
+ bl rk_nandc_irq_init
+ mov w1, 0
+ ldr x0, [x19,424]
+ mov w2, w1
+ mov w3, 2048
+ bl FlashSramLoadStore
+ bl rknand_flash_cs_init
+ ldr x0, [x19,32]
+ bl FlashInit
+ mov w19, w0
+ cbnz w0, .L2682
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ add x0, x0, 168
+ bl FtlInit
+.L2682:
adrp x0, .LC119
- mov x1, x19
+ mov w1, w19
add x0, x0, :lo12:.LC119
- mov w3, w2
- bl rknand_print_hex
+ bl printk
+ mov w0, w19
+.L2681:
ldr x19, [sp,16]
- mov w0, 0
ldp x29, x30, [sp], 32
ret
- .size FlashReadFacBbtData.part.16, .-FlashReadFacBbtData.part.16
+ .size rk_ftl_init, .-rk_ftl_init
.align 2
- .global FlashReadFacBbtData
- .type FlashReadFacBbtData, %function
-FlashReadFacBbtData:
- adrp x4, :got:gNandPhyInfo
- stp x29, x30, [sp, -160]!
+ .global Ftl_get_new_temp_ppa
+ .type Ftl_get_new_temp_ppa, %function
+Ftl_get_new_temp_ppa:
+ stp x29, x30, [sp, -32]!
add x29, sp, 0
- ldr x4, [x4, #:got_lo12:gNandPhyInfo]
stp x19, x20, [sp,16]
- stp x21, x22, [sp,32]
- stp x23, x24, [sp,48]
- stp x25, x26, [sp,64]
- str x27, [sp,80]
- mov x22, x0
- mov w24, w1
- mov w26, w2
- ldrh w0, [x4,14]
- add x23, x29, 104
- ldrh w3, [x4,12]
- adrp x4, :got:gFlashSpareBuffer
- mov x21, x4
- mov w27, 61664
- mul w3, w3, w0
- adrp x0, :got:gFlashPageBuffer0
- uxth w3, w3
- ldr x0, [x0, #:got_lo12:gFlashPageBuffer0]
- sub w20, w3, #1
- mul w25, w1, w3
- uxth w20, w20
- sub w19, w3, #16
- ldr x0, [x0]
- str x0, [x29,112]
- ldr x0, [x4, #:got_lo12:gFlashSpareBuffer]
- ldr x0, [x0]
- str x0, [x29,120]
-.L2583:
- cmp w20, w19
- ble .L2591
- add w0, w20, w25
- mov w1, 1
- lsl w0, w0, 10
- mov w2, w1
- str w0, [x23,4]
- mov x0, x23
- bl FlashReadPages
- ldr w0, [x23]
- cmn w0, #1
- beq .L2584
- ldr x0, [x21, #:got_lo12:gFlashSpareBuffer]
- ldr x0, [x0]
- ldrh w0, [x0]
- cmp w0, w27
- bne .L2584
- mov w0, w22
- cbz x22, .L2585
- mov x0, x22
- mov w1, w24
- mov w2, w26
- bl FlashReadFacBbtData.part.16
- b .L2585
-.L2584:
- sub w20, w20, #1
- uxth w20, w20
- b .L2583
-.L2591:
- mov w0, -1
-.L2585:
+ adrp x19, .LANCHOR2
+ add x0, x19, :lo12:.LANCHOR2
+ add x1, x0, 96
+ ldrh w2, [x0,96]
+ mov w0, 65535
+ cmp w2, w0
+ beq .L2686
+ ldrh w0, [x1,4]
+ cbnz w0, .L2687
+.L2686:
+ bl FtlCacheWriteBack
+ add x20, x19, :lo12:.LANCHOR2
+ mov w0, 0
+ bl FtlGcFreeTempBlock
+ strb wzr, [x20,104]
+ add x0, x20, 96
+ bl allocate_data_superblock
+ strh wzr, [x20,924]
+ strh wzr, [x20,936]
+ bl l2p_flush
+ bl FtlVpcTblFlush
+ mov w0, 0
+ bl FtlEctTblFlush
+.L2687:
+ add x0, x19, :lo12:.LANCHOR2
+ add x0, x0, 96
+ bl get_new_active_ppa
ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldr x27, [sp,80]
- ldp x29, x30, [sp], 160
+ ldp x29, x30, [sp], 32
ret
- .size FlashReadFacBbtData, .-FlashReadFacBbtData
+ .size Ftl_get_new_temp_ppa, .-Ftl_get_new_temp_ppa
.align 2
- .global FlashGetBadBlockList
- .type FlashGetBadBlockList, %function
-FlashGetBadBlockList:
- adrp x2, :got:gpNandParaInfo
- stp x29, x30, [sp, -48]!
+ .global rk_ftl_cache_write_back
+ .type rk_ftl_cache_write_back, %function
+rk_ftl_cache_write_back:
+ stp x29, x30, [sp, -16]!
add x29, sp, 0
- ldr x2, [x2, #:got_lo12:gpNandParaInfo]
- stp x19, x20, [sp,16]
- str x21, [sp,32]
- mov x21, x0
- adrp x20, :got:gFlashPageBuffer1
- ldr x0, [x2]
- ldrb w2, [x0,13]
- ldrh w19, [x0,14]
- ldr x0, [x20, #:got_lo12:gFlashPageBuffer1]
- mul w19, w2, w19
- ldr x0, [x0]
- uxth w19, w19
- add w2, w19, 7
- lsr w2, w2, 3
- bl FlashReadFacBbtData
- cmn w0, #1
- bne .L2593
-.L2597:
- mov w1, 0
- b .L2594
-.L2593:
- mov w2, 0
- lsr w0, w19, 4
- mov w1, w2
- sub w19, w19, #1
- mov w5, 1
-.L2595:
- cmp w2, w19
- bge .L2594
- ldr x3, [x20, #:got_lo12:gFlashPageBuffer1]
- ubfx x4, x2, 5, 11
- ldr x6, [x3]
- lsl w3, w5, w2
- ldr w4, [x6,x4,lsl 2]
- tst w3, w4
- beq .L2596
- add w3, w1, 1
- ubfiz x1, x1, 1, 16
- strh w2, [x21,x1]
- uxth w1, w3
-.L2596:
- cmp w1, w0
- bcs .L2597
- add w2, w2, 1
- uxth w2, w2
- b .L2595
-.L2594:
- ubfiz x1, x1, 1, 16
- mov w0, -1
- ldp x19, x20, [sp,16]
- strh w0, [x21,x1]
- mov w0, 0
- ldr x21, [sp,32]
- ldp x29, x30, [sp], 48
+ bl FtlCacheWriteBack
+ ldp x29, x30, [sp], 16
ret
- .size FlashGetBadBlockList, .-FlashGetBadBlockList
+ .size rk_ftl_cache_write_back, .-rk_ftl_cache_write_back
.align 2
- .global FtlMakeBbt
- .type FtlMakeBbt, %function
-FtlMakeBbt:
- stp x29, x30, [sp, -96]!
+ .global FtlRead
+ .type FtlRead, %function
+FtlRead:
+ stp x29, x30, [sp, -192]!
+ uxtb w0, w0
add x29, sp, 0
stp x19, x20, [sp,16]
- adrp x19, :got:gBbtInfo
+ mov w20, w1
+ adrp x1, __stack_chk_guard
+ stp x27, x28, [sp,80]
+ mov w28, w2
+ cmp w0, 16
+ ldr x2, [x1,#:lo12:__stack_chk_guard]
+ stp x25, x26, [sp,64]
stp x21, x22, [sp,32]
stp x23, x24, [sp,48]
- stp x25, x26, [sp,64]
- stp x27, x28, [sp,80]
- bl FtlBbtMemInit
- mov w21, 0
- bl FtlLoadFactoryBbt
- ldr x22, [x19, #:got_lo12:gBbtInfo]
- adrp x25, :got:c_ftl_nand_blks_per_die
- mov x23, x22
-.L2603:
- adrp x0, :got:c_ftl_nand_die_num
- ldr x0, [x0, #:got_lo12:c_ftl_nand_die_num]
- ldrh w0, [x0]
- cmp w21, w0
- bcs .L2621
- adrp x0, :got:p_sys_data_buf
- adrp x1, :got:req_sys
- ldrh w26, [x23,12]
- ldr x0, [x0, #:got_lo12:p_sys_data_buf]
- ldr x20, [x1, #:got_lo12:req_sys]
- adrp x1, :got:p_sys_spare_buf
- ldr x0, [x0]
- str x0, [x20,8]
- ldr x1, [x1, #:got_lo12:p_sys_spare_buf]
- ldr x24, [x1]
- mov w1, 65535
- str x24, [x20,16]
- cmp w26, w1
- beq .L2604
- ldr x24, [x25, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w1, [x24]
- madd w26, w21, w1, w26
- mov w1, 1
- lsl w0, w26, 10
- mov w2, w1
- str w0, [x20,4]
- mov x0, x20
- bl FlashReadPages
- ldrh w2, [x24]
- ldr x0, [x22,32]
- add w2, w2, 7
- ldr x1, [x20,8]
- lsr w2, w2, 3
- bl ftl_memcpy
- b .L2605
-.L2604:
- mov w1, w21
- adrp x28, :got:c_ftl_nand_bbm_buf_size
- bl FlashGetBadBlockList
- ldr x0, [x20,8]
- ldr x1, [x22,32]
- bl FtlBbt2Bitmap
- ldr x0, [x25, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w20, [x0]
- sub w20, w20, #1
- uxth w20, w20
-.L2606:
- ldr x26, [x25, #:got_lo12:c_ftl_nand_blks_per_die]
- ldrh w0, [x26]
- madd w0, w21, w0, w20
- bl FtlBbmIsBadBlock
- cmp w0, 1
- bne .L2622
- sub w20, w20, #1
- uxth w20, w20
- b .L2606
-.L2622:
- adrp x0, :got:p_sys_spare_buf
- strh w20, [x23,12]
+ str x2, [x29,184]
+ mov x26, x3
+ str x1, [x29,112]
+ bne .L2690
+ add w0, w20, 256
+ mov w1, w28
+ mov x2, x3
+ bl FtlVendorPartRead
+ b .L2691
+.L2690:
+ adrp x21, .LANCHOR0
+ add w0, w20, w28
+ add x1, x21, :lo12:.LANCHOR0
+ str w0, [x29,168]
+ mov w0, -1
+ ldr w3, [x29,168]
+ ldr w2, [x1,2068]
+ cmp w3, w2
+ bhi .L2691
+ ldrh w0, [x1,2032]
+ sub w25, w3, #1
+ adrp x19, .LANCHOR2
+ udiv w1, w20, w0
+ str w1, [x29,172]
+ udiv w25, w25, w0
+ ldr w0, [x29,172]
+ sub w24, w25, w0
+ add x0, x19, :lo12:.LANCHOR2
+ add w24, w24, 1
+ ldr w1, [x0,192]
+ add w1, w28, w1
+ str w1, [x0,192]
+ ldr w1, [x0,164]
+ add w1, w24, w1
+ str w1, [x0,164]
+ ldr w0, [x29,172]
+ mov w1, w25
+ bl FtlCacheMetchLpa
+ cbz w0, .L2692
+ bl FtlCacheWriteBack
+.L2692:
+ mov w27, 0
+ ldr w22, [x29,172]
+ str w27, [x29,156]
+ mov w23, w27
+ str w27, [x29,152]
+.L2693:
+ cbz w24, .L2736
+ mov w0, w22
+ add x1, x29, 180
+ mov w2, 0
+ bl log2phys
+ ldr w3, [x29,180]
+ cmn w3, #1
+ bne .L2733
+ mov w3, 0
+.L2694:
+ add x0, x21, :lo12:.LANCHOR0
+ ldrh w0, [x0,2032]
+ cmp w3, w0
+ bcs .L2698
+ madd w0, w22, w0, w3
+ cmp w0, w20
+ bcc .L2696
+ ldr w1, [x29,168]
+ cmp w0, w1
+ bcs .L2696
+ sub w0, w0, w20
mov w1, 0
- mov w2, 16
- ldr x0, [x0, #:got_lo12:p_sys_spare_buf]
- ldr x0, [x0]
+ ubfiz x0, x0, 9, 23
+ mov w2, 512
+ add x0, x26, x0
+ str x3, [x29,160]
bl ftl_memset
- str wzr, [x24,4]
- mov w0, -3872
- strh w0, [x24]
- ldrh w0, [x23,12]
- strh w0, [x24,2]
- ldrh w0, [x26]
- ldrh w1, [x23,12]
- madd w26, w21, w0, w1
- adrp x0, :got:req_sys
- ldr x1, [x22,32]
- ldr x27, [x0, #:got_lo12:req_sys]
- lsl w0, w26, 10
- str w0, [x27,4]
- ldr x0, [x28, #:got_lo12:c_ftl_nand_bbm_buf_size]
- ldrh w2, [x0]
- ldr x0, [x27,8]
- lsl w2, w2, 2
- bl ftl_memcpy
- mov w1, 1
- mov x0, x27
- bl FlashEraseBlocks
- mov w1, 1
- mov x0, x27
- mov w2, w1
- mov w3, w1
- bl FlashProgPages
- ldr w0, [x27]
- cmn w0, #1
- bne .L2605
- mov w0, w26
- bl FtlBbmMapBadBlock
- b .L2606
-.L2605:
- mov w0, w26
- add w21, w21, 1
- add x22, x22, 8
- add x23, x23, 2
- bl FtlBbmMapBadBlock
- b .L2603
-.L2621:
- mov w20, 0
- adrp x21, :got:c_ftl_nand_reserved_blks
-.L2610:
- ldr x0, [x21, #:got_lo12:c_ftl_nand_reserved_blks]
- ldrh w0, [x0]
- cmp w0, w20
- bls .L2623
- mov w0, w20
- add w20, w20, 1
- bl FtlBbmMapBadBlock
- uxth w20, w20
- b .L2610
-.L2623:
- ldr x0, [x19, #:got_lo12:gBbtInfo]
- mov w22, 65535
- ldrh w20, [x0,12]
- sub w20, w20, #1
- uxth w20, w20
-.L2612:
- ldr x21, [x19, #:got_lo12:gBbtInfo]
- ldrh w0, [x21,12]
- sub w0, w0, #48
- cmp w20, w0
- ble .L2616
- mov w0, w20
- bl FtlBbmIsBadBlock
- cmp w0, 1
- beq .L2613
- mov w0, w20
- bl FlashTestBlk
- cbz w0, .L2614
- mov w0, w20
- bl FtlBbmMapBadBlock
- b .L2613
-.L2614:
- ldrh w0, [x21]
- cmp w0, w22
- bne .L2615
- strh w20, [x21]
- b .L2613
-.L2615:
- strh w20, [x21,4]
- b .L2616
-.L2613:
- sub w20, w20, #1
- uxth w20, w20
- b .L2612
-.L2616:
- ldr x19, [x19, #:got_lo12:gBbtInfo]
- adrp x0, :got:req_erase
- str wzr, [x19,8]
- strh wzr, [x19,2]
- ldrh w1, [x19]
- ldr x0, [x0, #:got_lo12:req_erase]
- lsl w1, w1, 10
- ldr x2, [x0]
- str w1, [x2,4]
- ldrh w1, [x19,4]
- ldr x0, [x0]
- lsl w1, w1, 10
- str w1, [x0,60]
- mov w1, 2
- bl FlashEraseBlocks
- ldrh w0, [x19]
- bl FtlBbmMapBadBlock
- ldrh w0, [x19,4]
- bl FtlBbmMapBadBlock
- bl FtlBbmTblFlush
- strh wzr, [x19,2]
- ldr w0, [x19,8]
- ldrh w1, [x19,4]
- add w0, w0, 1
- str w0, [x19,8]
- ldrh w0, [x19]
- strh w0, [x19,4]
- strh w1, [x19]
- bl FtlBbmTblFlush
- mov w0, 0
+ ldr x3, [x29,160]
+.L2696:
+ add w3, w3, 1
+ b .L2694
+.L2733:
+ mov w0, 56
+ umull x1, w23, w0
+ add x0, x19, :lo12:.LANCHOR2
+ ldr x2, [x0,2048]
+ add x2, x2, x1
+ str w3, [x2,4]
+ ldr w2, [x29,172]
+ cmp w22, w2
+ ldr x2, [x0,2048]
+ add x2, x2, x1
+ bne .L2699
+ ldr x0, [x0,2096]
+ str x0, [x2,8]
+ add x0, x21, :lo12:.LANCHOR0
+ ldrh w0, [x0,2032]
+ udiv w3, w20, w0
+ msub w3, w3, w0, w20
+ str w3, [x29,128]
+ sub w3, w0, w3
+ cmp w3, w28
+ csel w3, w3, w28, ls
+ str w3, [x29,156]
+ cmp w3, w0
+ bne .L2700
+ str x26, [x2,8]
+ b .L2700
+.L2699:
+ cmp w22, w25
+ bne .L2701
+ ldr x0, [x0,2104]
+ str x0, [x2,8]
+ add x0, x21, :lo12:.LANCHOR0
+ ldr w4, [x29,168]
+ ldrh w3, [x0,2032]
+ mul w0, w22, w3
+ sub w27, w4, w0
+ cmp w27, w3
+ bne .L2700
+ b .L2734
+.L2701:
+ add x0, x21, :lo12:.LANCHOR0
+ ldrh w0, [x0,2032]
+ mul w0, w22, w0
+.L2734:
+ sub w0, w0, w20
+ ubfiz x0, x0, 9, 23
+ add x0, x26, x0
+ str x0, [x2,8]
+.L2700:
+ add x2, x19, :lo12:.LANCHOR2
+ ldr x0, [x2,2048]
+ ldr x2, [x2,2120]
+ add x1, x0, x1
+ add x0, x21, :lo12:.LANCHOR0
+ ldrh w0, [x0,2038]
+ str w22, [x1,24]
+ mul w0, w23, w0
+ add w23, w23, 1
+ and x0, x0, 4294967292
+ add x0, x2, x0
+ str x0, [x1,16]
+.L2698:
+ subs w24, w24, #1
+ add w22, w22, 1
+ beq .L2702
+ add x0, x21, :lo12:.LANCHOR0
+ ldrh w0, [x0,1952]
+ cmp w23, w0, lsl 3
+ bne .L2693
+.L2702:
+ cbz w23, .L2693
+ add x0, x19, :lo12:.LANCHOR2
+ mov w1, w23
+ mov w2, 0
+ ldr x0, [x0,2048]
+ bl FlashReadPages
+ str xzr, [x29,160]
+ ldr x0, [x29,128]
+ ubfiz x0, x0, 9, 23
+ str x0, [x29,144]
+ ldr w0, [x29,156]
+ lsl w0, w0, 9
+ str w0, [x29,124]
+ lsl w0, w27, 9
+ str w0, [x29,120]
+.L2704:
+ ldr w0, [x29,160]
+ cmp w23, w0
+ bls .L2737
+ ldr x0, [x29,160]
+ add x2, x19, :lo12:.LANCHOR2
+ mov x1, 56
+ ldr w4, [x29,172]
+ mul x3, x0, x1
+ ldr x0, [x2,2048]
+ add x0, x0, x3
+ ldr w1, [x0,24]
+ cmp w1, w4
+ bne .L2705
+ ldr x1, [x0,8]
+ ldr x0, [x2,2096]
+ cmp x1, x0
+ bne .L2706
+ ldr x2, [x29,144]
+ mov x0, x26
+ str x3, [x29,104]
+ add x1, x1, x2
+ ldr w2, [x29,124]
+ b .L2735
+.L2705:
+ cmp w1, w25
+ bne .L2706
+ ldr x1, [x0,8]
+ ldr x0, [x2,2104]
+ cmp x1, x0
+ bne .L2706
+ add x0, x21, :lo12:.LANCHOR0
+ ldr w2, [x29,120]
+ str x3, [x29,104]
+ ldrh w0, [x0,2032]
+ mul w0, w25, w0
+ sub w0, w0, w20
+ ubfiz x0, x0, 9, 23
+ add x0, x26, x0
+.L2735:
+ bl ftl_memcpy
+ ldr x3, [x29,104]
+.L2706:
+ add x0, x19, :lo12:.LANCHOR2
+ ldr x1, [x0,2048]
+ add x5, x1, x3
+ ldr w4, [x1,x3]
+ cmn w4, #1
+ bne .L2707
+ ldr w2, [x0,424]
+ str w4, [x29,152]
+ add w2, w2, 1
+ str w2, [x0,424]
+.L2707:
+ ldr w0, [x1,x3]
+ cmp w0, 256
+ bne .L2708
+ ldr w0, [x5,4]
+ lsr x0, x0, 10
+ bl P2V_block_in_plane
+ bl FtlGcRefreshBlock
+.L2708:
+ ldr x0, [x29,160]
+ add x0, x0, 1
+ str x0, [x29,160]
+ b .L2704
+.L2737:
+ mov w23, 0
+ b .L2693
+.L2736:
+ add x19, x19, :lo12:.LANCHOR2
+ ldrh w0, [x19,956]
+ cbz w0, .L2711
+ mov w0, w24
+ mov w1, 1
+ bl rk_ftl_garbage_collect
+.L2711:
+ ldr w0, [x29,152]
+.L2691:
+ ldr x1, [x29,112]
+ ldr x2, [x29,184]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2712
+ bl __stack_chk_fail
+.L2712:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 96
+ ldp x29, x30, [sp], 192
ret
- .size FtlMakeBbt, .-FtlMakeBbt
+ .size FtlRead, .-FtlRead
.align 2
- .global FtlLowFormat
- .type FtlLowFormat, %function
-FtlLowFormat:
- stp x29, x30, [sp, -80]!
+ .global FtlWrite
+ .type FtlWrite, %function
+FtlWrite:
+ stp x29, x30, [sp, -288]!
+ uxtb w0, w0
add x29, sp, 0
- stp x19, x20, [sp,16]
- adrp x19, :got:g_GlobalSysVersion
- str x25, [sp,64]
stp x23, x24, [sp,48]
- stp x21, x22, [sp,32]
- ldr x0, [x19, #:got_lo12:g_GlobalSysVersion]
- adrp x23, :got:c_ftl_nand_max_sys_blks
- str wzr, [x0]
- adrp x0, :got:g_GlobalDataVersion
- ldr x0, [x0, #:got_lo12:g_GlobalDataVersion]
- str wzr, [x0]
- ldr x0, [x23, #:got_lo12:c_ftl_nand_max_sys_blks]
- ldrh w0, [x0]
- bl FtlFreeSysBlkQueueInit
- bl FtlLoadBbt
- cbz w0, .L2625
- bl FtlMakeBbt
-.L2625:
- mov w0, 0
- adrp x3, :got:c_ftl_nand_sec_pre_page
- adrp x4, :got:p_io_data_buf_0
- adrp x5, :got:p_io_data_buf_1
-.L2626:
- ldr x1, [x3, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldrh w1, [x1]
- cmp w0, w1, lsl 7
- bge .L2649
- ldr x1, [x4, #:got_lo12:p_io_data_buf_0]
- ubfiz x2, x0, 2, 16
- ldr x6, [x1]
- mvn w1, w0
- orr w1, w0, w1, lsl 16
- add w0, w0, 1
- str w1, [x6,x2]
- uxth w0, w0
- ldr x1, [x5, #:got_lo12:p_io_data_buf_1]
- ldr x6, [x1]
- mov w1, 23752
- movk w1, 0xa0f, lsl 16
- str w1, [x6,x2]
- b .L2626
-.L2649:
- adrp x24, :got:c_ftl_nand_data_blks_per_plane
- mov w21, 0
- adrp x25, :got:c_ftl_nand_blk_pre_plane
- ldr x0, [x24, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w22, [x0]
-.L2628:
- ldr x0, [x25, #:got_lo12:c_ftl_nand_blk_pre_plane]
- adrp x20, :got:c_ftl_nand_blk_pre_plane
- ldrh w0, [x0]
- cmp w0, w22
- bls .L2650
- mov w0, w22
- mov w1, 1
- add w22, w22, 1
- bl FtlLowFormatEraseBlock
- add w0, w21, w0
- uxth w22, w22
- uxth w21, w0
- b .L2628
-.L2650:
- adrp x22, :got:c_ftl_nand_planes_num
- sub w1, w21, #3
- ldr x0, [x22, #:got_lo12:c_ftl_nand_planes_num]
- ldrh w0, [x0]
- cmp w1, w0, lsl 1
- bge .L2630
-.L2634:
- mov w21, 0
- mov w23, w21
- b .L2631
-.L2630:
- udiv w21, w21, w0
- adrp x0, :got:c_ftl_nand_init_sys_blks_per_plane
- ldr x0, [x0, #:got_lo12:c_ftl_nand_init_sys_blks_per_plane]
- ldr w0, [x0]
- add w0, w21, w0
- bl FtlSysBlkNumInit
- ldr x23, [x23, #:got_lo12:c_ftl_nand_max_sys_blks]
- ldrh w0, [x23]
- bl FtlFreeSysBlkQueueInit
- ldr x0, [x24, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w21, [x0]
-.L2632:
- ldr x0, [x20, #:got_lo12:c_ftl_nand_blk_pre_plane]
- ldrh w0, [x0]
- cmp w0, w21
- bls .L2634
- mov w0, w21
- mov w1, 1
- add w21, w21, 1
- bl FtlLowFormatEraseBlock
- uxth w21, w21
- b .L2632
-.L2631:
- ldr x0, [x24, #:got_lo12:c_ftl_nand_data_blks_per_plane]
- ldrh w0, [x0]
- cmp w0, w23
- bls .L2651
- mov w0, w23
- mov w1, 0
- add w23, w23, 1
- bl FtlLowFormatEraseBlock
- add w0, w21, w0
- uxth w23, w23
- uxth w21, w0
- b .L2631
-.L2651:
- adrp x0, :got:g_cur_erase_blk
- ldr x1, [x20, #:got_lo12:c_ftl_nand_blk_pre_plane]
- adrp x2, :got:g_MaxLpn
- adrp x5, :got:c_ftl_nand_data_op_blks_per_plane
- ldr x0, [x0, #:got_lo12:g_cur_erase_blk]
- ldrh w1, [x1]
- str w1, [x0]
- adrp x0, :got:c_ftl_nand_max_data_blks
- ldr x22, [x22, #:got_lo12:c_ftl_nand_planes_num]
- ldr x0, [x0, #:got_lo12:c_ftl_nand_max_data_blks]
- ldr x8, [x2, #:got_lo12:g_MaxLpn]
- ldrh w6, [x22]
- ldr w1, [x0]
- udiv w0, w1, w6
- str w0, [x8]
- ubfx x7, x0, 5, 16
- ldr x4, [x5, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- add w3, w7, 36
- strh w3, [x4]
- mov w3, 24
- mul w3, w6, w3
- cmp w21, w3
- ble .L2636
- sub w1, w1, w21
- udiv w1, w1, w6
- str w1, [x8]
- lsr w1, w1, 5
- add w1, w1, 24
- strh w1, [x4]
-.L2636:
- adrp x3, :got:g_inkDie_check_enable
- ldr x3, [x3, #:got_lo12:g_inkDie_check_enable]
- ldr w1, [x3]
- cmp w1, 1
- bne .L2637
- ldr x1, [x5, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- udiv w3, w21, w6
- ldrh w4, [x1]
- add w3, w4, w3
- add w3, w4, w3, asr 2
- strh w3, [x1]
-.L2637:
- adrp x3, :got:c_ftl_nand_ext_blk_pre_plane
- ldr x3, [x3, #:got_lo12:c_ftl_nand_ext_blk_pre_plane]
- ldrh w1, [x3]
- cbz w1, .L2639
- ldr x3, [x5, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- ldrh w4, [x3]
- add w4, w4, w1, lsr 1
- strh w4, [x3]
- mul w4, w1, w6
- cmp w4, w21
- ble .L2639
- ldr x4, [x2, #:got_lo12:g_MaxLpn]
- add w1, w1, 32
- add w1, w7, w1
- strh w1, [x3]
- str w0, [x4]
-.L2639:
- ldr x1, [x5, #:got_lo12:c_ftl_nand_data_op_blks_per_plane]
- adrp x22, :got:g_MaxLbn
- ldr x2, [x2, #:got_lo12:g_MaxLpn]
- adrp x21, :got:p_valid_page_count_table
- ldrh w0, [x1]
- ldr w1, [x2]
- sub w0, w1, w0
- ldr x1, [x22, #:got_lo12:g_MaxLbn]
- mul w0, w0, w6
- str w0, [x1]
- adrp x1, :got:c_ftl_nand_page_pre_blk
- ldr x1, [x1, #:got_lo12:c_ftl_nand_page_pre_blk]
- ldrh w1, [x1]
- mul w0, w0, w1
- str w0, [x2]
- adrp x2, :got:c_ftl_nand_sec_pre_page
- adrp x1, :got:g_MaxLbaSector
- ldr x2, [x2, #:got_lo12:c_ftl_nand_sec_pre_page]
- ldr x1, [x1, #:got_lo12:g_MaxLbaSector]
- ldrh w2, [x2]
- mul w0, w0, w2
- str w0, [x1]
- bl FtlBbmTblFlush
- ldr x0, [x20, #:got_lo12:c_ftl_nand_blk_pre_plane]
- mov x20, x21
- ldr x1, [x21, #:got_lo12:p_valid_page_count_table]
- ldrh w2, [x0]
- ldr x0, [x1]
- mov w1, 0
- lsl w2, w2, 1
- bl ftl_memset
- adrp x0, :got:g_VaildLpn
- mov w1, -1
mov w23, w1
- ldr x0, [x0, #:got_lo12:g_VaildLpn]
- str wzr, [x0]
- adrp x0, :got:g_gc_superblock
- ldr x0, [x0, #:got_lo12:g_gc_superblock]
- strh w1, [x0]
- strh wzr, [x0,2]
- strb wzr, [x0,6]
- strb wzr, [x0,8]
- adrp x0, :got:g_active_superblock
- mov x24, x0
- ldr x2, [x0, #:got_lo12:g_active_superblock]
- strh wzr, [x2,2]
- strb wzr, [x2,6]
- strh wzr, [x2]
- strb wzr, [x2,8]
-.L2641:
- ldr x21, [x24, #:got_lo12:g_active_superblock]
- mov x0, x21
- bl make_superblock
- ldrb w0, [x21,7]
- cbnz w0, .L2642
- ldr x0, [x20, #:got_lo12:p_valid_page_count_table]
- ldrh w1, [x21]
- ldr x0, [x0]
- strh w23, [x0,x1,lsl 1]
- ldrh w0, [x21]
- add w0, w0, 1
- strh w0, [x21]
- b .L2641
-.L2642:
- ldr x1, [x19, #:got_lo12:g_GlobalSysVersion]
- mov w24, -1
- ldrh w2, [x21,4]
- ldr w0, [x1]
- str w0, [x21,12]
- add w0, w0, 1
- str w0, [x1]
- ldrh w1, [x21]
- ldr x0, [x20, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x0]
- strh w2, [x0,x1,lsl 1]
- adrp x0, :got:g_buffer_superblock
- mov x23, x0
- ldrh w2, [x21]
- ldr x1, [x0, #:got_lo12:g_buffer_superblock]
+ adrp x1, __stack_chk_guard
+ mov w24, w2
+ cmp w0, 16
+ stp x25, x26, [sp,64]
+ ldr x2, [x1,#:lo12:__stack_chk_guard]
+ mov x25, x3
+ stp x19, x20, [sp,16]
+ stp x21, x22, [sp,32]
+ stp x27, x28, [sp,80]
+ str x2, [x29,280]
+ str x1, [x29,120]
+ bne .L2739
+ add w0, w23, 256
+ mov w1, w24
+ mov x2, x3
+ bl FtlVendorPartWrite
+ b .L2740
+.L2739:
+ adrp x22, .LANCHOR0
+ add w27, w23, w24
+ add x2, x22, :lo12:.LANCHOR0
+ mov w0, -1
+ ldr w1, [x2,2068]
+ cmp w27, w1
+ bhi .L2740
+ adrp x5, .LANCHOR4
+ ldrh w1, [x2,2032]
+ add x4, x5, :lo12:.LANCHOR4
+ sub w27, w27, #1
+ mov w0, 2048
+ adrp x20, .LANCHOR2
+ udiv w26, w23, w1
+ cmp w24, w1, lsl 1
+ str w0, [x4,440]
+ str x5, [x29,152]
+ udiv w0, w27, w1
+ str w0, [x29,180]
+ sub w28, w0, w26
+ add w21, w28, 1
+ add x0, x20, :lo12:.LANCHOR2
+ add x19, x0, 48
+ ldr w3, [x0,172]
+ add w3, w21, w3
+ str w3, [x0,172]
+ ldr w3, [x0,188]
+ add w3, w24, w3
+ str w3, [x0,188]
+ cset w3, cs
+ str w3, [x29,204]
+ ldr w3, [x2,2088]
+ cmp w24, 8
+ csel x19, x0, x19, hi
+ cbz w3, .L2742
+ sub w3, w3, #1
+ mov w5, 56
+ ldr x2, [x2,2096]
+ umull x3, w3, w5
+ add x3, x2, x3
+ ldr w2, [x3,24]
+ cmp w26, w2
+ bne .L2743
+ ldr w2, [x0,176]
+ str x4, [x29,192]
add w2, w2, 1
- strh wzr, [x1,2]
- strh w2, [x1]
- mov w2, 1
- strb wzr, [x1,6]
- strb w2, [x1,8]
-.L2643:
- ldr x21, [x23, #:got_lo12:g_buffer_superblock]
- mov x0, x21
- bl make_superblock
- ldrb w0, [x21,7]
- cbnz w0, .L2644
- ldr x0, [x20, #:got_lo12:p_valid_page_count_table]
- ldrh w1, [x21]
- ldr x0, [x0]
- strh w24, [x0,x1,lsl 1]
- ldrh w0, [x21]
+ str w2, [x0,176]
+ ldr w0, [x4,444]
add w0, w0, 1
- strh w0, [x21]
- b .L2643
-.L2644:
- ldr x19, [x19, #:got_lo12:g_GlobalSysVersion]
- ldrh w1, [x21]
- ldrh w2, [x21,4]
- ldr w0, [x19]
- str w0, [x21,12]
- add w0, w0, 1
- str w0, [x19]
- ldr x20, [x20, #:got_lo12:p_valid_page_count_table]
- ldr x0, [x20]
- mov w20, -1
- strh w2, [x0,x1,lsl 1]
- adrp x0, :got:g_gc_temp_superblock
- ldr x0, [x0, #:got_lo12:g_gc_temp_superblock]
- strh w20, [x0]
- bl FtlFreeSysBlkQueueOut
- adrp x1, :got:gSysInfo
- ldr x1, [x1, #:got_lo12:gSysInfo]
- strh w0, [x1]
- strh wzr, [x1,2]
- strh w20, [x1,4]
- ldr x22, [x22, #:got_lo12:g_MaxLbn]
- ldr w0, [x22]
- strh w0, [x1,6]
- ldr w0, [x19]
- str w0, [x1,8]
- add w0, w0, 1
- str w0, [x19]
- bl FtlVpcTblFlush
- bl FtlSysBlkInit
- cbnz w0, .L2645
- adrp x0, :got:gFtlInitStatus
+ str w0, [x4,444]
+ msub w0, w26, w1, w23
+ sub w1, w1, w0
+ ubfiz x0, x0, 9, 23
+ cmp w1, w24
+ csel w19, w1, w24, ls
+ ldr x1, [x3,8]
+ lsl w21, w19, 9
+ add x0, x1, x0
+ mov w2, w21
+ mov x1, x25
+ bl ftl_memcpy
+ ldr x4, [x29,192]
+ cbnz w28, .L2744
+ ldr w1, [x4,444]
+ mov w0, w28
+ cmp w1, 2
+ ble .L2740
+.L2744:
+ add x25, x25, x21
+ sub w24, w24, w19
+ add w23, w23, w19
+ add w26, w26, 1
+ mov w21, w28
+.L2743:
+ ldr x0, [x29,152]
+ add x0, x0, :lo12:.LANCHOR4
+ ldr x19, [x0,408]
+ str wzr, [x0,444]
+.L2742:
+ ldr w1, [x29,180]
+ mov w0, w26
+ bl FtlCacheMetchLpa
+ cbz w0, .L2745
+ bl FtlCacheWriteBack
+.L2745:
+ ldr x0, [x29,152]
+ add x20, x20, :lo12:.LANCHOR2
+ str w26, [x29,200]
+ add x0, x0, :lo12:.LANCHOR4
+ str x19, [x0,408]
+ adrp x0, .LC120
+ add x0, x0, :lo12:.LC120
+ str x0, [x29,104]
+.L2746:
+ cbz w21, .L2805
+ ldrh w0, [x19,4]
+ cbnz w0, .L2747
+ cmp x19, x20
+ bne .L2748
+ add x0, x20, 48
+ ldrh w19, [x0,4]
+ cbnz w19, .L2749
+ bl allocate_new_data_superblock
+ adrp x0, .LANCHOR1
+ add x0, x0, :lo12:.LANCHOR1
+ str w19, [x0,3008]
+.L2749:
+ mov x0, x20
+ add x19, x20, 48
+ bl allocate_new_data_superblock
+ adrp x0, .LANCHOR1
+ add x0, x0, :lo12:.LANCHOR1
+ ldr w0, [x0,3008]
+ cbnz w0, .L2750
+.L2751:
+ mov x19, x20
+ b .L2750
+.L2748:
+ adrp x1, .LANCHOR1
+ add x1, x1, :lo12:.LANCHOR1
+ str w0, [x1,3008]
+ ldrh w0, [x20,4]
+ cbnz w0, .L2751
+ mov x0, x19
+ bl allocate_new_data_superblock
+.L2750:
+ ldrh w0, [x19,4]
+ cbnz w0, .L2752
+ mov x0, x19
+ bl allocate_new_data_superblock
+.L2752:
+ ldr x0, [x29,152]
+ add x0, x0, :lo12:.LANCHOR4
+ str x19, [x0,408]
+.L2747:
+ add x2, x22, :lo12:.LANCHOR0
+ ldr w0, [x20,2040]
+ ldrh w1, [x19,4]
+ str xzr, [x29,192]
+ ldr w2, [x2,2088]
+ sub w0, w0, w2
+ cmp w1, w0
+ csel w0, w1, w0, ls
+ cmp w0, w21
+ csel w0, w0, w21, ls
+ str w0, [x29,148]
+ ldr w0, [x29,204]
+ and w0, w0, 1
+ str w0, [x29,116]
+ add w0, w24, w23
+ str w0, [x29,144]
+.L2753:
+ ldr w0, [x29,192]
+ ldr w2, [x29,148]
+ ldr w1, [x29,200]
+ cmp w0, w2
+ add w27, w1, w0
+ bcs .L2806
+ ldrh w1, [x19,4]
+ cbz w1, .L2783
+ ldr w1, [x29,180]
+ cmp w27, w1
+ cset w7, eq
+ cbz w0, .L2755
+ ldr w1, [x29,116]
+ tst w7, w1
+ beq .L2755
+ add x1, x22, :lo12:.LANCHOR0
+ ldr w2, [x29,144]
+ ldrh w1, [x1,2032]
+ msub w2, w27, w1, w2
+ cmp w2, w1
+ bne .L2783
+.L2755:
+ add x1, x29, 220
+ mov w2, 0
+ mov w0, w27
+ str x7, [x29,96]
+ bl log2phys
+ mov x0, x19
+ bl get_new_active_ppa
+ add x4, x22, :lo12:.LANCHOR0
+ mov w5, 56
+ str x4, [x29,184]
+ str x5, [x29,160]
+ ldr w6, [x4,2088]
+ ldr x2, [x4,2096]
+ umull x1, w6, w5
+ add x2, x2, x1
+ str w0, [x2,4]
+ ldrh w2, [x4,2038]
+ ldr x0, [x4,2096]
+ add x1, x0, x1
+ mul w0, w2, w6
+ and x0, x0, 4294967292
+ str x0, [x29,136]
+ ldr x0, [x20,2128]
+ ldr x3, [x29,136]
+ str x0, [x29,128]
+ add x28, x0, x3
+ ldrh w0, [x4,2036]
+ str x28, [x1,16]
+ str w27, [x1,24]
+ mul w0, w0, w6
+ ldr x6, [x20,2088]
+ and x0, x0, 4294967292
+ add x0, x6, x0
+ str x0, [x1,8]
+ mov x0, x28
+ mov w1, 0
+ bl ftl_memset
+ cmp w27, w26
+ ldr x4, [x29,184]
+ cset w0, eq
+ str w0, [x29,176]
+ cbnz w0, .L2786
+ ldr x7, [x29,96]
+ ldr x5, [x29,160]
+ cbz w7, .L2756
+ ldr w0, [x29,144]
+ ldrh w2, [x4,2032]
+ msub w2, w27, w2, w0
+ uxth w0, w2
+ str w0, [x29,184]
+ ldr w0, [x29,176]
+ str w0, [x29,160]
+ b .L2759
+.L2786:
+ ldrh w2, [x4,2032]
+ udiv w0, w23, w2
+ msub w0, w0, w2, w23
+ str w0, [x29,160]
+ sub w2, w2, w0
+ cmp w2, w24
+ csel w0, w2, w24, ls
+ str w0, [x29,184]
+.L2759:
+ add x2, x22, :lo12:.LANCHOR0
+ ldr w1, [x29,184]
+ ldrh w0, [x2,2032]
+ cmp w1, w0
+ bne .L2760
+ ldr w0, [x29,176]
+ mov x1, x25
+ cbnz w0, .L2761
+ ldr w0, [x29,184]
+ mul w1, w0, w27
+ sub w1, w1, w23
+ ubfiz x1, x1, 9, 23
+ add x1, x25, x1
+.L2761:
+ ldr w2, [x29,204]
+ mov w0, 56
+ add x4, x22, :lo12:.LANCHOR0
+ cbz w2, .L2762
+ ldr w2, [x4,2088]
+ umull x0, w2, w0
+ ldr x2, [x4,2096]
+ add x0, x2, x0
+ b .L2804
+.L2762:
+ ldr w2, [x4,2088]
+ umull x0, w2, w0
+ ldr x2, [x4,2096]
+ add x0, x2, x0
+ ldr x0, [x0,8]
+ b .L2802
+.L2760:
+ ldr w0, [x29,220]
+ cmn w0, #1
+ beq .L2764
+ str w0, [x29,228]
+ mov w1, 56
+ ldr w0, [x2,2088]
+ str w27, [x29,248]
+ umull x0, w0, w1
+ ldr x1, [x2,2096]
+ mov w2, 0
+ add x0, x1, x0
+ ldr x1, [x0,8]
+ ldr x0, [x0,16]
+ str x1, [x29,232]
mov w1, 1
- ldr x0, [x0, #:got_lo12:gFtlInitStatus]
- str w1, [x0]
-.L2645:
- mov w0, 0
- ldr x25, [sp,64]
+ str x0, [x29,240]
+ add x0, x29, 224
+ bl FlashReadPages
+ ldr w0, [x29,224]
+ cmn w0, #1
+ bne .L2765
+ ldr w0, [x20,424]
+ add w0, w0, 1
+ str w0, [x20,424]
+ b .L2767
+.L2765:
+ ldr w0, [x28,8]
+ cmp w0, w27
+ beq .L2767
+ ldr w0, [x20,424]
+ mov w2, w27
+ add w0, w0, 1
+ str w0, [x20,424]
+ ldr x0, [x29,104]
+ ldr w1, [x28,8]
+ bl printk
+ b .L2767
+.L2764:
+ ldr w0, [x2,2088]
+ mov w1, 56
+ umull x0, w0, w1
+ ldr x1, [x2,2096]
+ ldrh w2, [x2,2036]
+ add x0, x1, x0
+ mov w1, 0
+ ldr x0, [x0,8]
+ bl ftl_memset
+.L2767:
+ ldr w1, [x29,184]
+ mov w0, 56
+ lsl w2, w1, 9
+ ldr w1, [x29,176]
+ cbz w1, .L2768
+ add x1, x22, :lo12:.LANCHOR0
+ ldr w4, [x1,2088]
+ umull x0, w4, w0
+ ldr x4, [x1,2096]
+ add x4, x4, x0
+ ldr x0, [x29,160]
+ ubfiz x0, x0, 9, 23
+ ldr x1, [x4,8]
+ add x0, x1, x0
+ mov x1, x25
+ b .L2803
+.L2768:
+ add x5, x22, :lo12:.LANCHOR0
+ ldr w4, [x5,2088]
+ ldr x1, [x5,2096]
+ umull x0, w4, w0
+ add x0, x1, x0
+ ldrh w1, [x5,2032]
+ mul w1, w27, w1
+ ldr x0, [x0,8]
+ sub w1, w1, w23
+ ubfiz x1, x1, 9, 23
+ add x1, x25, x1
+ b .L2803
+.L2756:
+ ldr w0, [x29,204]
+ ldrh w1, [x4,2032]
+ ldr w2, [x4,2088]
+ cbz w0, .L2769
+ mul w1, w27, w1
+ umull x0, w2, w5
+ sub w1, w1, w23
+ ldr x2, [x4,2096]
+ ubfiz x1, x1, 9, 23
+ add x0, x2, x0
+ add x1, x25, x1
+.L2804:
+ str x1, [x0,8]
+ b .L2763
+.L2769:
+ umull x0, w2, w5
+ ldr x2, [x4,2096]
+ mul w1, w27, w1
+ add x0, x2, x0
+ sub w1, w1, w23
+ ubfiz x1, x1, 9, 23
+ ldr x0, [x0,8]
+ add x1, x25, x1
+.L2802:
+ ldrh w2, [x4,2036]
+.L2803:
+ bl ftl_memcpy
+.L2763:
+ ldr x1, [x29,128]
+ mov w0, -3947
+ ldr x2, [x29,136]
+ strh w0, [x1,x2]
+ add x1, x22, :lo12:.LANCHOR0
+ str w27, [x28,8]
+ ldr w0, [x20,200]
+ str w0, [x28,4]
+ add w0, w0, 1
+ cmn w0, #1
+ csel w0, w0, wzr, ne
+ str w0, [x20,200]
+ ldr w0, [x29,220]
+ str w0, [x28,12]
+ ldrh w0, [x19]
+ strh w0, [x28,2]
+ ldr w0, [x1,2088]
+ add w0, w0, 1
+ str w0, [x1,2088]
+ ldr x0, [x29,192]
+ add x0, x0, 1
+ str x0, [x29,192]
+ b .L2753
+.L2806:
+ str w27, [x29,200]
+ mov x0, x2
+ b .L2754
+.L2783:
+ str w27, [x29,200]
+.L2754:
+ sub w21, w21, w0
+ ldr w0, [x29,204]
+ cbnz w0, .L2773
+ add x0, x22, :lo12:.LANCHOR0
+ ldr w1, [x0,2088]
+ ldr w0, [x20,2040]
+ cmp w1, w0
+ bcs .L2773
+ ldrh w0, [x19,4]
+ cbz w0, .L2773
+.L2775:
+ str wzr, [x29,204]
+ b .L2746
+.L2773:
+ bl FtlCacheWriteBack
+ add x0, x22, :lo12:.LANCHOR0
+ cmp w21, 3
+ str wzr, [x0,2088]
+ bls .L2775
+ b .L2746
+.L2805:
+ ldr w1, [x29,180]
+ mov w0, w21
+ sub w1, w1, w26
+ bl rk_ftl_garbage_collect
+ mov w0, w21
+.L2740:
+ ldr x1, [x29,120]
+ ldr x2, [x29,280]
+ ldr x1, [x1,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2777
+ bl __stack_chk_fail
+.L2777:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
- ldp x29, x30, [sp], 80
+ ldp x25, x26, [sp,64]
+ ldp x27, x28, [sp,80]
+ ldp x29, x30, [sp], 288
ret
- .size FtlLowFormat, .-FtlLowFormat
+ .size FtlWrite, .-FtlWrite
.align 2
- .global FtlReInitForSDUpdata
- .type FtlReInitForSDUpdata, %function
-FtlReInitForSDUpdata:
- adrp x0, :got:RK29_NANDC_REG_BASE
- stp x29, x30, [sp, -48]!
+ .type FlashReadFacBbtData.part.14, %function
+FlashReadFacBbtData.part.14:
+ stp x29, x30, [sp, -32]!
+ mov w3, 0
+ adrp x4, .LANCHOR0
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:RK29_NANDC_REG_BASE]
str x19, [sp,16]
- ldr x0, [x0]
- bl FlashInit
- mov w1, 0
- cbnz w0, .L2653
- bl FlashLoadFactorBbt
- cbz w0, .L2654
- bl FlashMakeFactorBbt
-.L2654:
- adrp x0, :got:gFlashPageBuffer1
- ldr x0, [x0, #:got_lo12:gFlashPageBuffer1]
- ldr x0, [x0]
- bl FlashReadIdbDataRaw
- cbz w0, .L2655
- mov w1, 0
- mov w2, 16
- add x0, x29, 32
- bl FlashReadFacBbtData
+ mov x19, x0
+ cbnz w1, .L2810
+ adrp x1, .LANCHOR4
+ mov w7, 1
+.L2813:
+ add x0, x1, :lo12:.LANCHOR4
+ ldr w0, [x0,68]
+ cmp w3, w0
+ bcs .L2810
+ add x6, x4, :lo12:.LANCHOR0
+ ubfx x5, x3, 5, 11
+ lsl x5, x5, 2
+ ldr x0, [x6,1856]
+ lsl w6, w7, w3
+ add w3, w3, 1
+ ldr w8, [x0,x5]
+ uxth w3, w3
+ orr w6, w8, w6
+ str w6, [x0,x5]
+ b .L2813
+.L2810:
+ add x4, x4, :lo12:.LANCHOR0
+ mov x0, x19
+ ldr x1, [x4,1856]
+ bl ftl_memcpy
+ mov w2, 4
+ adrp x0, .LC121
+ mov x1, x19
+ add x0, x0, :lo12:.LC121
+ mov w3, w2
+ bl rknand_print_hex
+ ldr x19, [sp,16]
mov w0, 0
- ldr w2, [x29,32]
- mov w1, w0
- mov w4, 1
-.L2657:
- lsl w3, w4, w1
- add w1, w1, 1
- tst w3, w2
- cset w3, ne
- cmp w1, 16
- add w0, w0, w3
- bne .L2657
- cmp w0, 6
- bhi .L2658
- adrp x0, :got:gNandIDBResBlkNum
- ldr x0, [x0, #:got_lo12:gNandIDBResBlkNum]
- b .L2682
-.L2658:
- mov w1, 0
- mov w4, 1
-.L2661:
- lsl w3, w4, w1
- add w1, w1, 1
- tst w3, w2
- cset w3, ne
- cmp w1, 24
- add w0, w0, w3
- bne .L2661
- cmp w0, 17
- adrp x0, :got:gNandIDBResBlkNum
- ldr x0, [x0, #:got_lo12:gNandIDBResBlkNum]
- bls .L2682
- mov w1, 36
-.L2682:
- strb w1, [x0]
- adrp x1, :got:gNandIDBResBlkNum
- adrp x0, :got:gNandPhyInfo
- ldr x1, [x1, #:got_lo12:gNandIDBResBlkNum]
- ldr x0, [x0, #:got_lo12:gNandPhyInfo]
- ldrb w1, [x1]
- strh w1, [x0,26]
-.L2655:
- adrp x0, .LC72
- adrp x1, .LC73
- add x1, x1, :lo12:.LC73
- add x0, x0, :lo12:.LC72
- mov w19, 1
- bl printk
- adrp x0, :got:gNandPhyInfo
- ldr x0, [x0, #:got_lo12:gNandPhyInfo]
- bl FtlConstantsInit
- bl FtlVariablesInit
- adrp x0, :got:c_ftl_nand_max_sys_blks
- ldr x0, [x0, #:got_lo12:c_ftl_nand_max_sys_blks]
- ldrh w0, [x0]
- bl FtlFreeSysBlkQueueInit
-.L2663:
- bl FtlLoadBbt
- cbz w0, .L2664
-.L2684:
- bl FtlLowFormat
- cmp w19, 3
- bhi .L2685
- add w19, w19, 1
- b .L2663
-.L2685:
- mov w1, -1
- b .L2653
-.L2664:
- bl FtlSysBlkInit
- cbnz w0, .L2684
- adrp x1, :got:gFtlInitStatus
- mov w2, 1
- ldr x1, [x1, #:got_lo12:gFtlInitStatus]
- str w2, [x1]
- mov w1, w0
-.L2653:
- mov w0, w1
- ldr x19, [sp,16]
- ldp x29, x30, [sp], 48
+ ldp x29, x30, [sp], 32
ret
- .size FtlReInitForSDUpdata, .-FtlReInitForSDUpdata
+ .size FlashReadFacBbtData.part.14, .-FlashReadFacBbtData.part.14
.align 2
- .global IdBlockReadData
- .type IdBlockReadData, %function
-IdBlockReadData:
- stp x29, x30, [sp, -176]!
+ .global FlashReadFacBbtData
+ .type FlashReadFacBbtData, %function
+FlashReadFacBbtData:
+ stp x29, x30, [sp, -160]!
+ adrp x4, .LANCHOR0
add x29, sp, 0
+ stp x21, x22, [sp,32]
+ adrp x21, __stack_chk_guard
+ add x4, x4, :lo12:.LANCHOR0
stp x19, x20, [sp,16]
stp x23, x24, [sp,48]
- mov w20, w0
- adrp x23, :got:gpNandParaInfo
- adrp x0, :got:gBlockPageAlignSize
- stp x21, x22, [sp,32]
- ldr x21, [x23, #:got_lo12:gpNandParaInfo]
- mov x22, x2
- ldr x0, [x0, #:got_lo12:gBlockPageAlignSize]
- stp x27, x28, [sp,80]
stp x25, x26, [sp,64]
- mov w27, w1
- mov w1, w20
- ldr w3, [x0]
- mov w2, w27
- ldr x0, [x21]
- mov x26, x23
- ldrb w19, [x0,9]
- adrp x0, .LC120
- add x0, x0, :lo12:.LC120
- mul w19, w3, w19
- bl printk
- ldr x0, [x21]
- mov w5, 4
- uxth w19, w19
- mov w21, 0
- adrp x6, :got:slcPageToMlcPageTbl
- adrp x7, :got:gFlashPageBuffer1
- ldrb w28, [x0,9]
- adrp x8, :got:gNandFlashEccBits
- udiv w0, w20, w19
- adrp x9, :got:gNandFlashIDBEccBits
- msub w19, w0, w19, w20
- sub w4, w20, w19
- mul w3, w19, w28
- ubfx x3, x3, 2, 2
-.L2687:
- cmp w21, w27
- bcs .L2689
- add w0, w21, w19
- ldr x1, [x6, #:got_lo12:slcPageToMlcPageTbl]
- ubfx x0, x0, 2, 16
- ldr x25, [x7, #:got_lo12:gFlashPageBuffer1]
- sub w23, w5, w3
- add w3, w3, w4
- str x5, [x29,104]
- ldrh w24, [x1,w0,sxtw 1]
- uxth w23, w23
- ldr x0, [x26, #:got_lo12:gpNandParaInfo]
- ldr x2, [x25]
- str x4, [x29,112]
- ldr x0, [x0]
- str x6, [x29,120]
- str x7, [x29,128]
- ldrb w1, [x0,9]
- ldr x0, [x8, #:got_lo12:gNandFlashEccBits]
- str x8, [x29,152]
- str x9, [x29,168]
- ldrb w10, [x0]
- ldr x0, [x9, #:got_lo12:gNandFlashIDBEccBits]
- madd w24, w24, w28, w3
- str x10, [x29,160]
- ldrb w0, [x0]
- str x2, [x29,136]
- str x1, [x29,144]
- bl FlashBchSel
- ldr x1, [x29,144]
- mov x3, 0
- ldr x2, [x29,136]
- mov w0, 0
- udiv w1, w24, w1
- bl FlashReadPage
- ldr x10, [x29,160]
- mov w0, w10
- bl FlashBchSel
- ubfiz x0, x21, 9, 16
- ldr x1, [x25]
- add x0, x22, x0
- mov w2, 2048
- add w21, w23, w21
- bl ftl_memcpy
- uxth w21, w21
- mov w3, 0
- ldr x5, [x29,104]
- ldr x4, [x29,112]
- ldr x6, [x29,120]
- ldr x7, [x29,128]
- ldr x8, [x29,152]
- ldr x9, [x29,168]
- b .L2687
-.L2689:
- adrp x0, .LC121
- mov w1, w20
- mov w2, w27
- mov w3, 0
- add x0, x0, :lo12:.LC121
- bl printk
- mov w0, 0
+ str x27, [sp,80]
+ mov x23, x0
+ ldr x0, [x21,#:lo12:__stack_chk_guard]
+ mov w24, w1
+ ldrh w3, [x4,180]
+ mov w26, w2
+ str x0, [x29,152]
+ mov w27, 61664
+ ldrh w0, [x4,182]
+ mul w3, w3, w0
+ ldr x0, [x4,1856]
+ adrp x4, .LANCHOR4
+ str x0, [x29,104]
+ add x0, x4, :lo12:.LANCHOR4
+ uxth w3, w3
+ mov x22, x4
+ sub w20, w3, #1
+ sub w19, w3, #16
+ ldr x0, [x0,88]
+ mul w25, w1, w3
+ str x0, [x29,112]
+ uxth w20, w20
+.L2815:
+ cmp w20, w19
+ ble .L2824
+ add w0, w20, w25
+ mov w1, 1
+ lsl w0, w0, 10
+ mov w2, w1
+ str w0, [x29,100]
+ add x0, x29, 96
+ bl FlashReadPages
+ ldr w0, [x29,96]
+ cmn w0, #1
+ beq .L2816
+ add x0, x22, :lo12:.LANCHOR4
+ ldr x0, [x0,88]
+ ldrh w0, [x0]
+ cmp w0, w27
+ bne .L2816
+ mov w0, w23
+ cbz x23, .L2817
+ mov x0, x23
+ mov w1, w24
+ mov w2, w26
+ bl FlashReadFacBbtData.part.14
+ b .L2817
+.L2816:
+ sub w20, w20, #1
+ uxth w20, w20
+ b .L2815
+.L2824:
+ mov w0, -1
+.L2817:
+ ldr x2, [x29,152]
+ ldr x1, [x21,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2819
+ bl __stack_chk_fail
+.L2819:
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 176
+ ldr x27, [sp,80]
+ ldp x29, x30, [sp], 160
ret
- .size IdBlockReadData, .-IdBlockReadData
+ .size FlashReadFacBbtData, .-FlashReadFacBbtData
.align 2
- .global IDBlockWriteData
- .type IDBlockWriteData, %function
-IDBlockWriteData:
- stp x29, x30, [sp, -224]!
+ .global FlashGetBadBlockList
+ .type FlashGetBadBlockList, %function
+FlashGetBadBlockList:
+ stp x29, x30, [sp, -48]!
add x29, sp, 0
- stp x21, x22, [sp,32]
- stp x25, x26, [sp,64]
- adrp x21, :got:gpNandParaInfo
- mov w25, w0
- adrp x0, :got:gBlockPageAlignSize
- stp x23, x24, [sp,48]
- ldr x22, [x21, #:got_lo12:gpNandParaInfo]
- mov w24, 0
- ldr x0, [x0, #:got_lo12:gBlockPageAlignSize]
- stp x27, x28, [sp,80]
+ str x21, [sp,32]
+ mov x21, x0
+ adrp x0, .LANCHOR0+744
stp x19, x20, [sp,16]
- mov w27, w1
- mov x20, x2
- ldr w3, [x0]
- mov w1, w25
- ldr x0, [x22]
- mov w2, w27
- add x28, x29, 160
- ldrb w19, [x0,9]
- adrp x0, .LC122
- add x0, x0, :lo12:.LC122
- mul w19, w3, w19
- bl printk
- adrp x0, :got:gNandPhyInfo
- mov w2, 0
+ adrp x20, .LANCHOR4
+ ldr x0, [x0,#:lo12:.LANCHOR0+744]
+ ldrb w2, [x0,13]
+ ldrh w19, [x0,14]
+ add x0, x20, :lo12:.LANCHOR4
+ mul w19, w2, w19
+ ldr x0, [x0,80]
uxth w19, w19
- ldr x0, [x0, #:got_lo12:gNandPhyInfo]
- ldrh w1, [x0,20]
- mov w0, 0
- udiv w1, w25, w1
- bl FlashEraseBlock
- udiv w26, w25, w19
- ldr x0, [x22]
- adrp x5, :got:slcPageToMlcPageTbl
- adrp x6, :got:gNandFlashEccBits
- adrp x7, :got:gNandFlashIDBEccBits
- ldrb w22, [x0,9]
- msub w26, w26, w19, w25
- sub w23, w25, w26
-.L2691:
- cmp w24, w27
- bcs .L2697
- add w4, w24, w26
- lsr w4, w4, 2
- and w19, w4, 65535
- uxth w0, w4
- cbz w0, .L2692
- ldr x0, [x5, #:got_lo12:slcPageToMlcPageTbl]
- add w1, w19, 1
- str wzr, [x28,4]
- ldrh w4, [x0,w1,sxtw 1]
- sub w4, w4, #1
- lsl w4, w4, 2
- str w4, [x28]
-.L2692:
- ldr x4, [x5, #:got_lo12:slcPageToMlcPageTbl]
- ubfiz x2, x24, 9, 16
- ldr x0, [x6, #:got_lo12:gNandFlashEccBits]
- add x2, x20, x2
- str x5, [x29,104]
- add w24, w24, 4
- ldrh w1, [x4,w19,sxtw 1]
- ldrb w8, [x0]
- uxth w24, w24
- ldr x0, [x7, #:got_lo12:gNandFlashIDBEccBits]
- madd w1, w1, w22, w23
- str x6, [x29,136]
- ldrb w0, [x0]
- str x7, [x29,152]
- str x4, [x29,112]
- str x8, [x29,144]
- str x1, [x29,120]
- str x2, [x29,128]
- bl FlashBchSel
- ldr x0, [x21, #:got_lo12:gpNandParaInfo]
- ldr x1, [x29,120]
- ldr x2, [x29,128]
- ldr x0, [x0]
- ldrb w3, [x0,9]
- mov w0, 0
- udiv w1, w1, w3
- mov x3, x28
- bl FlashProgPage
- ldr x8, [x29,144]
- mov w0, w8
- bl FlashBchSel
- udiv w1, w23, w22
- ldr x4, [x29,112]
- mov w0, 0
- ldrh w2, [x4,w19,sxtw 1]
+ add w2, w19, 7
+ lsr w2, w2, 3
+ bl FlashReadFacBbtData
+ cmn w0, #1
+ bne .L2826
+.L2830:
+ mov w1, 0
+ b .L2827
+.L2826:
+ mov w2, 0
+ lsr w0, w19, 4
+ mov w1, w2
+ sub w19, w19, #1
+ mov w5, 1
+.L2828:
+ cmp w2, w19
+ bge .L2827
+ add x3, x20, :lo12:.LANCHOR4
+ ubfx x4, x2, 5, 11
+ ldr x6, [x3,80]
+ lsl w3, w5, w2
+ ldr w4, [x6,x4,lsl 2]
+ tst w3, w4
+ beq .L2829
+ add w3, w1, 1
+ ubfiz x1, x1, 1, 16
+ strh w2, [x21,x1]
+ uxth w1, w3
+.L2829:
+ cmp w1, w0
+ bcs .L2830
add w2, w2, 1
- bl FlashPageProgMsbFFData
- ldr x5, [x29,104]
- ldr x6, [x29,136]
- ldr x7, [x29,152]
- b .L2691
-.L2697:
- adrp x0, .LC123
- mov w1, w25
- mov w2, w27
- mov w3, 0
- add x0, x0, :lo12:.LC123
- bl printk
- mov w0, 0
+ uxth w2, w2
+ b .L2828
+.L2827:
+ ubfiz x1, x1, 1, 16
+ mov w0, -1
ldp x19, x20, [sp,16]
- ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
- ldp x25, x26, [sp,64]
- ldp x27, x28, [sp,80]
- ldp x29, x30, [sp], 224
+ strh w0, [x21,x1]
+ mov w0, 0
+ ldr x21, [sp,32]
+ ldp x29, x30, [sp], 48
ret
- .size IDBlockWriteData, .-IDBlockWriteData
+ .size FlashGetBadBlockList, .-FlashGetBadBlockList
.align 2
- .global write_idblock
- .type write_idblock, %function
-write_idblock:
+ .global FtlMakeBbt
+ .type FtlMakeBbt, %function
+FtlMakeBbt:
stp x29, x30, [sp, -112]!
add x29, sp, 0
- stp x23, x24, [sp,48]
- mov w24, w0
- adrp x0, :got:gpNandParaInfo
stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR0
+ adrp x20, .LANCHOR4
stp x21, x22, [sp,32]
- ldr x0, [x0, #:got_lo12:gpNandParaInfo]
- mov x21, x1
+ add x20, x20, :lo12:.LANCHOR4
+ add x22, x19, :lo12:.LANCHOR0
+ add x22, x22, 2112
+ add x20, x20, 136
+ stp x23, x24, [sp,48]
stp x25, x26, [sp,64]
+ mov x24, x22
+ mov w23, 0
+ mov x25, x20
stp x27, x28, [sp,80]
- mov w1, 192
- mov x23, x2
- ldr x0, [x0]
- movk w1, 0x240, lsl 16
- mov w2, 6
- ldrb w22, [x0,9]
- adrp x0, :got:gBlockPageAlignSize
- ldr x0, [x0, #:got_lo12:gBlockPageAlignSize]
- ldr w25, [x0]
- mov x0, 59392
- movk x0, 0x3, lsl 16
- bl kmalloc_order_trace
- mov x20, x0
- mov w0, -1
- cbz x20, .L2708
- add w19, w24, 511
- lsr w19, w19, 9
- cmp w19, 255
- bhi .L2700
- ubfiz x0, x19, 9, 23
- mov w2, 256
- add x0, x21, x0
- mov x1, x21
- sub w2, w2, w19
- bl memcpy
-.L2700:
- add w19, w19, 128
- mov w0, 256
- cmp w19, 256
- adrp x26, :got:gNandIDBResBlkNum
- csel w19, w19, w0, ls
- adrp x0, .LC124
- add x0, x0, :lo12:.LC124
- mov x1, x23
- mov w2, 4
- mov w3, 5
- bl rknand_print_hex
- ldr x26, [x26, #:got_lo12:gNandIDBResBlkNum]
- ldr w1, [x21,512]
- adrp x0, .LC125
- add x0, x0, :lo12:.LC125
- ldrb w2, [x26]
- bl printk
- ldrb w0, [x26]
- ldr w1, [x21,512]
- cmp w1, w0
- bls .L2701
- str w0, [x21,512]
-.L2701:
- adrp x0, .LC126
- mov w2, w24
- mul w22, w22, w25
- add x0, x0, :lo12:.LC126
- mov w1, w19
- mov x28, 0
- adrp x25, .LC127
- bl printk
- adrp x26, .LC128
- adrp x27, .LC129
- lsl w0, w19, 7
- uxth w22, w22
- str w0, [x29,108]
- mov w24, w28
- add x25, x25, :lo12:.LC127
- add x26, x26, :lo12:.LC128
- add x27, x27, :lo12:.LC129
-.L2706:
- adrp x0, :got:gNandPhyInfo
- ldr w2, [x23,x28,lsl 2]
- mov w8, w28
- ldr x0, [x0, #:got_lo12:gNandPhyInfo]
- ldrh w0, [x0,26]
- cmp w2, w0
- bcs .L2702
- adrp x0, :got:gNandFlashIdbBlockAddr
- ldr x0, [x0, #:got_lo12:gNandFlashIdbBlockAddr]
- ldr w0, [x0]
- cmp w2, w0
- bcc .L2702
- mov w1, 0
- mov x2, 512
- mov x0, x20
- str x8, [x29,96]
- bl memset
- ldr w0, [x23,x28,lsl 2]
- mov w1, w19
- mov x2, x21
- mul w0, w22, w0
- bl IDBlockWriteData
- ldr w0, [x23,x28,lsl 2]
- mov w1, w19
- mov x2, x20
- mul w0, w22, w0
- bl IdBlockReadData
- ldr x8, [x29,96]
- mov x0, 0
-.L2703:
- ldr w1, [x29,108]
- mov w3, w0
- cmp w0, w1
- bcs .L2713
- ldr w4, [x20,x0,lsl 2]
- mov x7, x0
- add x0, x0, 1
- add x1, x21, x0, lsl 2
- ldr w5, [x1,-4]
- cmp w4, w5
- beq .L2703
- ldr w2, [x23,x28,lsl 2]
- mov w1, w8
- mov x0, x25
- str x7, [x29,96]
- bl printk
- ldr x7, [x29,96]
- mov x0, x26
- mov w2, 4
- mov w3, 256
- and x4, x7, -256
- lsl x4, x4, 2
- str x4, [x29,96]
- add x1, x21, x4
- bl rknand_print_hex
- ldr x4, [x29,96]
- mov w3, 256
- mov x0, x27
- mov w2, 4
- add x1, x20, x4
- bl rknand_print_hex
+ bl FtlBbtMemInit
+ bl FtlLoadFactoryBbt
+.L2836:
+ add x21, x19, :lo12:.LANCHOR0
+ ldrh w0, [x21,1974]
+ cmp w23, w0
+ bcs .L2854
+ adrp x1, .LANCHOR2
+ ldrh w27, [x24,12]
+ add x2, x1, :lo12:.LANCHOR2
+ str x1, [x29,104]
+ ldr x0, [x2,-64]
+ ldr x26, [x2,2112]
+ mov w2, 65535
+ str x0, [x20,8]
+ cmp w27, w2
+ str x26, [x20,16]
+ beq .L2837
+ ldrh w0, [x21,2022]
+ mov w1, 1
+ mov w2, w1
+ madd w27, w23, w0, w27
+ lsl w0, w27, 10
+ str w0, [x20,4]
mov x0, x20
+ bl FlashReadPages
+ ldrh w2, [x21,2022]
+ ldr x0, [x22,32]
+ add w2, w2, 7
+ ldr x1, [x20,8]
+ lsr w2, w2, 3
+ bl ftl_memcpy
+ b .L2838
+.L2837:
+ mov w1, w23
+ mov w28, -3872
+ bl FlashGetBadBlockList
+ ldr x0, [x20,8]
+ ldr x1, [x22,32]
+ bl FtlBbt2Bitmap
+ ldrh w21, [x21,2022]
+ sub w21, w21, #1
+ uxth w21, w21
+.L2839:
+ add x27, x19, :lo12:.LANCHOR0
+ ldrh w0, [x27,2022]
+ madd w0, w23, w0, w21
+ bl FtlBbmIsBadBlock
+ cmp w0, 1
+ bne .L2855
+ sub w21, w21, #1
+ uxth w21, w21
+ b .L2839
+.L2855:
+ ldr x0, [x29,104]
mov w1, 0
- mov x2, 512
- bl memset
- ldr w0, [x23,x28,lsl 2]
- mov w1, 4
- mov x2, x20
- mul w0, w22, w0
- bl IDBlockWriteData
- adrp x0, .LC130
- add x0, x0, :lo12:.LC130
- bl printk
- b .L2702
-.L2713:
- add w24, w24, 1
-.L2702:
- add x28, x28, 1
- cmp x28, 5
- bne .L2706
- mov x0, x20
- bl kfree
- cmp w24, wzr
- csetm w0, eq
-.L2708:
+ mov w2, 16
+ strh w21, [x24,12]
+ add x3, x0, :lo12:.LANCHOR2
+ str x3, [x29,96]
+ ldr x0, [x3,2112]
+ bl ftl_memset
+ strh w28, [x26]
+ str wzr, [x26,4]
+ ldr x3, [x29,96]
+ ldrh w0, [x24,12]
+ strh w0, [x26,2]
+ ldrh w0, [x27,2022]
+ ldrh w1, [x24,12]
+ ldrh w2, [x3,2232]
+ madd w27, w23, w0, w1
+ ldr x1, [x22,32]
+ lsl w2, w2, 2
+ lsl w0, w27, 10
+ str w0, [x25,4]
+ ldr x0, [x25,8]
+ bl ftl_memcpy
+ mov w1, 1
+ mov x0, x25
+ mov w2, w1
+ bl FlashEraseBlocks
+ mov w1, 1
+ mov x0, x25
+ mov w2, w1
+ mov w3, w1
+ bl FlashProgPages
+ ldr w0, [x25]
+ cmn w0, #1
+ bne .L2838
+ mov w0, w27
+ bl FtlBbmMapBadBlock
+ b .L2839
+.L2838:
+ mov w0, w27
+ add w23, w23, 1
+ add x22, x22, 8
+ add x24, x24, 2
+ bl FtlBbmMapBadBlock
+ b .L2836
+.L2854:
+ mov w20, 0
+.L2843:
+ add x21, x19, :lo12:.LANCHOR0
+ ldrh w0, [x21,2040]
+ cmp w0, w20
+ bls .L2856
+ mov w0, w20
+ add w20, w20, 1
+ bl FtlBbmMapBadBlock
+ uxth w20, w20
+ b .L2843
+.L2856:
+ ldrh w20, [x21,2124]
+ mov w23, 65535
+ sub w20, w20, #1
+ uxth w20, w20
+.L2845:
+ add x22, x21, 2112
+ ldrh w0, [x22,12]
+ sub w0, w0, #48
+ cmp w20, w0
+ ble .L2849
+ mov w0, w20
+ bl FtlBbmIsBadBlock
+ cmp w0, 1
+ beq .L2846
+ mov w0, w20
+ bl FlashTestBlk
+ cbz w0, .L2847
+ mov w0, w20
+ bl FtlBbmMapBadBlock
+ b .L2846
+.L2847:
+ ldrh w0, [x21,2112]
+ cmp w0, w23
+ bne .L2848
+ strh w20, [x21,2112]
+ b .L2846
+.L2848:
+ strh w20, [x22,4]
+ b .L2849
+.L2846:
+ sub w20, w20, #1
+ uxth w20, w20
+ b .L2845
+.L2849:
+ adrp x0, .LANCHOR2
+ add x19, x19, :lo12:.LANCHOR0
+ add x0, x0, :lo12:.LANCHOR2
+ ldrh w1, [x19,2112]
+ ldr x2, [x0,-88]
+ str wzr, [x19,2120]
+ lsl w1, w1, 10
+ strh wzr, [x19,2114]
+ str w1, [x2,4]
+ mov w2, 2
+ ldrh w1, [x19,2116]
+ ldr x0, [x0,-88]
+ lsl w1, w1, 10
+ str w1, [x0,60]
+ mov w1, 1
+ bl FlashEraseBlocks
+ ldrh w0, [x19,2112]
+ bl FtlBbmMapBadBlock
+ ldrh w0, [x19,2116]
+ bl FtlBbmMapBadBlock
+ bl FtlBbmTblFlush
+ strh wzr, [x19,2114]
+ ldr w0, [x19,2120]
+ ldrh w1, [x19,2116]
+ add w0, w0, 1
+ str w0, [x19,2120]
+ ldrh w0, [x19,2112]
+ strh w0, [x19,2116]
+ strh w1, [x19,2112]
+ bl FtlBbmTblFlush
+ mov w0, 0
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
ldp x23, x24, [sp,48]
ldp x27, x28, [sp,80]
ldp x29, x30, [sp], 112
ret
- .size write_idblock, .-write_idblock
- .align 2
- .global CRC_32
- .type CRC_32, %function
-CRC_32:
- mov x2, 0
- mov x4, x0
- adrp x5, :got:gTable_Crc32
- mov w0, w2
-.L2715:
- cmp w1, w2
- bls .L2717
- ldrb w3, [x4,x2]
- add x2, x2, 1
- ldr x6, [x5, #:got_lo12:gTable_Crc32]
- eor w3, w3, w0, lsr 24
- ldr w3, [x6,w3,uxtw 2]
- eor w0, w3, w0, lsl 8
- b .L2715
-.L2717:
- ret
- .size CRC_32, .-CRC_32
+ .size FtlMakeBbt, .-FtlMakeBbt
.align 2
- .type rknand_sys_storage_ioctl, %function
-rknand_sys_storage_ioctl:
- sub sp, sp, #528
- stp x29, x30, [sp, -48]!
+ .global FtlLowFormat
+ .type FtlLowFormat, %function
+FtlLowFormat:
+ stp x29, x30, [sp, -64]!
add x29, sp, 0
+ stp x21, x22, [sp,32]
+ adrp x21, .LANCHOR2
+ add x0, x21, :lo12:.LANCHOR2
stp x19, x20, [sp,16]
- str x21, [sp,32]
- mov w19, w1
- mov x21, x2
- ldr x20, [x0,208]
- mov w0, 29187
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2720
- mov w0, 29187
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- bhi .L2721
- mov w0, 25726
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2722
- mov w0, 25726
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- bhi .L2723
- mov w0, 25601
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2724
- mov w0, 25601
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- bhi .L2725
- mov w0, 25364
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- bne .L2773
- bl rknand_dev_flush
- b .L2796
-.L2725:
- mov w0, 25602
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2727
- mov w0, 25603
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2728
- b .L2773
-.L2723:
- mov w0, 27688
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2729
- mov w0, 27688
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- bhi .L2730
- mov w0, 25727
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2731
- b .L2773
-.L2730:
- mov w0, 27698
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2729
- mov w0, 27708
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2729
- b .L2773
-.L2721:
- mov w0, 29267
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2732
- mov w0, 29267
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- bhi .L2733
- mov w0, 29189
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2734
- mov w0, 29189
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- bcc .L2735
- mov w0, 29210
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2736
- mov w0, 29266
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2737
- b .L2773
-.L2733:
- mov w0, 30225
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2738
- mov w0, 30225
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- bhi .L2739
- mov w0, 29268
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2740
- mov w0, 30224
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2741
- b .L2773
-.L2739:
- mov w0, 30226
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2741
- mov w0, 30227
- movk w0, 0x4004, lsl 16
- cmp w1, w0
- beq .L2738
- b .L2773
-.L2735:
- adrp x0, .LC131
- add x0, x0, :lo12:.LC131
- bl printk
+ stp x23, x24, [sp,48]
+ adrp x20, .LANCHOR0
+ str wzr, [x0,196]
+ str wzr, [x0,200]
+ add x0, x20, :lo12:.LANCHOR0
+ ldrh w0, [x0,1956]
+ bl FtlFreeSysBlkQueueInit
+ bl FtlLoadBbt
+ cbz w0, .L2858
+ bl FtlMakeBbt
+.L2858:
+ mov w0, 0
+.L2859:
+ add x1, x20, :lo12:.LANCHOR0
+ ldrh w2, [x1,2032]
+ cmp w0, w2, lsl 7
+ bge .L2882
+ add x3, x21, :lo12:.LANCHOR2
+ ubfiz x2, x0, 2, 16
+ mvn w1, w0
+ ldr x4, [x3,2096]
+ orr w1, w0, w1, lsl 16
+ add w0, w0, 1
+ str w1, [x4,x2]
+ mov w1, 23752
+ movk w1, 0xa0f, lsl 16
+ uxth w0, w0
+ ldr x3, [x3,2104]
+ str w1, [x3,x2]
+ b .L2859
+.L2882:
+ ldrh w22, [x1,1960]
+ mov w19, 0
+.L2861:
+ add x23, x20, :lo12:.LANCHOR0
+ ldrh w0, [x23,1962]
+ cmp w0, w22
+ bls .L2883
+ mov w0, w22
+ mov w1, 1
+ add w22, w22, 1
+ bl FtlLowFormatEraseBlock
+ add w0, w19, w0
+ uxth w22, w22
+ uxth w19, w0
+ b .L2861
+.L2883:
+ ldrh w0, [x23,1952]
+ sub w1, w19, #3
+ cmp w1, w0, lsl 1
+ bge .L2863
+.L2867:
+ mov w19, 0
+ mov w22, w19
+ b .L2864
+.L2863:
+ udiv w19, w19, w0
+ ldr w0, [x23,2060]
+ add w0, w19, w0
+ bl FtlSysBlkNumInit
+ ldrh w0, [x23,1956]
+ bl FtlFreeSysBlkQueueInit
+ ldrh w19, [x23,1960]
+.L2865:
+ add x0, x20, :lo12:.LANCHOR0
+ ldrh w0, [x0,1962]
+ cmp w0, w19
+ bls .L2867
+ mov w0, w19
+ mov w1, 1
+ add w19, w19, 1
+ bl FtlLowFormatEraseBlock
+ uxth w19, w19
+ b .L2865
+.L2864:
+ add x2, x20, :lo12:.LANCHOR0
+ ldrh w0, [x2,1960]
+ cmp w0, w22
+ bls .L2884
+ mov w0, w22
+ mov w1, 0
+ add w22, w22, 1
+ bl FtlLowFormatEraseBlock
+ add w0, w19, w0
+ uxth w22, w22
+ uxth w19, w0
+ b .L2864
+.L2884:
+ ldrh w3, [x2,1952]
+ add x6, x21, :lo12:.LANCHOR2
+ ldr w1, [x2,1964]
+ ldrh w0, [x2,1962]
+ str w0, [x2,2108]
+ udiv w4, w1, w3
+ str w4, [x2,2104]
+ ubfx x5, x4, 5, 16
+ add w0, w5, 36
+ strh w0, [x6,272]
+ mov w0, 24
+ mul w0, w3, w0
+ cmp w19, w0
+ ble .L2869
+ sub w1, w1, w19
+ udiv w1, w1, w3
+ str w1, [x2,2104]
+ lsr w1, w1, 5
+ add w1, w1, 24
+ strh w1, [x6,272]
+.L2869:
+ add x2, x21, :lo12:.LANCHOR2
+ ldr w0, [x2,160]
+ cmp w0, 1
+ bne .L2870
+ ldrh w1, [x2,272]
+ udiv w0, w19, w3
+ add w0, w1, w0
+ add w0, w1, w0, asr 2
+ strh w0, [x2,272]
+.L2870:
+ add x6, x20, :lo12:.LANCHOR0
+ ldrh w1, [x6,2018]
+ cbz w1, .L2872
+ add x0, x21, :lo12:.LANCHOR2
+ ldrh w2, [x0,272]
+ add w2, w2, w1, lsr 1
+ strh w2, [x0,272]
+ mul w2, w1, w3
+ cmp w2, w19
+ ble .L2872
+ add w1, w1, 32
+ str w4, [x6,2104]
+ add w1, w5, w1
+ strh w1, [x0,272]
+.L2872:
+ add x19, x21, :lo12:.LANCHOR2
+ add x22, x20, :lo12:.LANCHOR0
+ adrp x24, .LANCHOR4
+ mov w23, -1
+ ldr w1, [x22,2104]
+ ldrh w0, [x19,272]
+ sub w0, w1, w0
+ add x1, x24, :lo12:.LANCHOR4
+ mul w0, w0, w3
+ str w0, [x1,192]
+ ldrh w1, [x22,2026]
+ mul w0, w0, w1
+ ldrh w1, [x22,2032]
+ str w0, [x22,2104]
+ mul w0, w0, w1
+ str w0, [x22,2068]
+ bl FtlBbmTblFlush
+ ldrh w2, [x22,1962]
+ mov w1, 0
+ ldr x0, [x19,-40]
+ lsl w2, w2, 1
+ bl ftl_memset
+ strh wzr, [x21,#:lo12:.LANCHOR2]
+ mov w0, 1
+ ldrh w2, [x22,1960]
+ strb w0, [x19,8]
+ mov w1, 255
+ ldr x0, [x20,#:lo12:.LANCHOR0]
+ lsr w2, w2, 3
+ mov x21, x24
+ str wzr, [x19,156]
+ strh w23, [x19,296]
+ strh wzr, [x19,298]
+ strb wzr, [x19,302]
+ strb wzr, [x19,304]
+ strh wzr, [x19,2]
+ strb wzr, [x19,6]
+ bl ftl_memset
+.L2874:
+ mov x0, x19
+ bl make_superblock
+ ldrb w0, [x19,7]
+ cbnz w0, .L2875
+ ldrh w1, [x19]
+ ldr x0, [x19,-40]
+ strh w23, [x0,x1,lsl 1]
+ ldrh w0, [x19]
+ add w0, w0, 1
+ strh w0, [x19]
+ b .L2874
+.L2875:
+ ldr w0, [x19,196]
+ add x20, x19, 48
+ str w0, [x19,12]
+ mov w22, -1
+ add w0, w0, 1
+ ldrh w1, [x19]
+ str w0, [x19,196]
+ ldr x0, [x19,-40]
+ ldrh w2, [x19,4]
+ strh w2, [x0,x1,lsl 1]
+ strh wzr, [x20,2]
+ ldrh w0, [x19]
+ strb wzr, [x20,6]
+ add w0, w0, 1
+ strh w0, [x19,48]
+ mov w0, 1
+ strb w0, [x20,8]
+.L2876:
mov x0, x20
- mov x1, x21
- mov x2, 512
- bl rk_copy_from_user
- cbz x0, .L2742
-.L2746:
- adrp x0, .LC132
- add x0, x0, :lo12:.LC132
- b .L2800
-.L2742:
- adrp x0, .LC133
- ldr w1, [x20]
- ldr w2, [x20,4]
- add x0, x0, :lo12:.LC133
+ bl make_superblock
+ ldrb w0, [x20,7]
+ cbnz w0, .L2877
+ ldrh w1, [x20]
+ ldr x0, [x19,-40]
+ strh w22, [x0,x1,lsl 1]
+ ldrh w0, [x20]
+ add w0, w0, 1
+ strh w0, [x20]
+ b .L2876
+.L2877:
+ ldr w0, [x19,196]
+ add x21, x21, :lo12:.LANCHOR4
+ str w0, [x20,12]
+ add w0, w0, 1
+ ldrh w1, [x20]
+ str w0, [x19,196]
+ ldr x0, [x19,-40]
+ ldrh w2, [x20,4]
+ mov w20, -1
+ strh w2, [x0,x1,lsl 1]
+ strh w20, [x19,96]
+ bl FtlFreeSysBlkQueueOut
+ strh w0, [x19,280]
+ ldr w0, [x21,192]
+ strh w0, [x19,286]
+ ldr w0, [x19,196]
+ str w0, [x19,288]
+ add w0, w0, 1
+ strh wzr, [x19,282]
+ strh w20, [x19,284]
+ str w0, [x19,196]
+ bl FtlVpcTblFlush
+ bl FtlSysBlkInit
+ cbnz w0, .L2878
+ adrp x0, .LANCHOR1+532
+ mov w1, 1
+ str w1, [x0,#:lo12:.LANCHOR1+532]
+.L2878:
+ mov w0, 0
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
+ ldp x29, x30, [sp], 64
+ ret
+ .size FtlLowFormat, .-FtlLowFormat
+ .align 2
+ .global FtlReInitForSDUpdata
+ .type FtlReInitForSDUpdata, %function
+FtlReInitForSDUpdata:
+ stp x29, x30, [sp, -64]!
+ add x29, sp, 0
+ stp x19, x20, [sp,16]
+ adrp x20, __stack_chk_guard
+ adrp x19, .LANCHOR4
+ ldr x0, [x20,#:lo12:__stack_chk_guard]
+ str x0, [x29,56]
+ add x0, x19, :lo12:.LANCHOR4
+ ldr x0, [x0,32]
+ bl FlashInit
+ mov w1, 0
+ cbnz w0, .L2886
+ bl FlashLoadFactorBbt
+ cbz w0, .L2887
+ bl FlashMakeFactorBbt
+.L2887:
+ add x19, x19, :lo12:.LANCHOR4
+ ldr x0, [x19,80]
+ bl FlashReadIdbDataRaw
+ cbz w0, .L2888
+ mov w1, 0
+ mov w2, 16
+ add x0, x29, 40
+ bl FlashReadFacBbtData
+ mov w0, 0
+ ldr w2, [x29,40]
+ mov w1, w0
+ mov w4, 1
+.L2890:
+ lsl w3, w4, w1
+ add w1, w1, 1
+ tst w3, w2
+ cset w3, ne
+ cmp w1, 16
+ add w0, w0, w3
+ bne .L2890
+ cmp w0, 6
+ bhi .L2891
+ adrp x0, .LANCHOR0+9
+ strb w1, [x0,#:lo12:.LANCHOR0+9]
+ b .L2892
+.L2891:
+ mov w1, 0
+ mov w4, 1
+.L2894:
+ lsl w3, w4, w1
+ add w1, w1, 1
+ tst w3, w2
+ cset w3, ne
+ cmp w1, 24
+ add w0, w0, w3
+ bne .L2894
+ cmp w0, 17
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ bls .L2916
+ mov w1, 36
+.L2916:
+ strb w1, [x0,9]
+.L2892:
+ adrp x0, .LANCHOR0
+ add x0, x0, :lo12:.LANCHOR0
+ ldrb w1, [x0,9]
+ strh w1, [x0,194]
+.L2888:
+ adrp x0, .LC73
+ adrp x1, .LC74
+ add x1, x1, :lo12:.LC74
+ add x0, x0, :lo12:.LC73
+ adrp x19, .LANCHOR0
bl printk
- ldr w19, [x20,4]
- cmp w19, 8
- bhi .L2799
- bl rknand_device_unlock
- ldr w0, [x20]
- mov w1, w19
- mov x2, x20
- bl IdBlockReadData
- bl rknand_device_unlock
- mov x0, x21
- mov x1, x20
- ubfiz x2, x19, 9, 23
- bl rk_copy_to_user
- cbz x0, .L2796
- adrp x0, .LC134
- add x0, x0, :lo12:.LC134
-.L2800:
+ add x19, x19, :lo12:.LANCHOR0
+ add x0, x19, 168
+ bl FtlConstantsInit
+ bl FtlVariablesInit
+ ldrh w0, [x19,1956]
+ mov w19, 1
+ bl FtlFreeSysBlkQueueInit
+.L2896:
+ bl FtlLoadBbt
+ cbz w0, .L2897
+.L2918:
+ bl FtlLowFormat
+ cmp w19, 3
+ bhi .L2919
+ add w19, w19, 1
+ b .L2896
+.L2919:
+ mov w1, -1
+ b .L2886
+.L2897:
+ bl FtlSysBlkInit
+ cbnz w0, .L2918
+ adrp x1, .LANCHOR1+532
+ mov w2, 1
+ str w2, [x1,#:lo12:.LANCHOR1+532]
+ mov w1, w0
+.L2886:
+ ldr x2, [x29,56]
+ mov w0, w1
+ ldr x1, [x20,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2902
+ bl __stack_chk_fail
+.L2902:
+ ldp x19, x20, [sp,16]
+ ldp x29, x30, [sp], 64
+ ret
+ .size FtlReInitForSDUpdata, .-FtlReInitForSDUpdata
+ .align 2
+ .global flash_boot_enter_slc_mode
+ .type flash_boot_enter_slc_mode, %function
+flash_boot_enter_slc_mode:
+ adrp x1, .LANCHOR0+1872
+ uxtb w0, w0
+ stp x29, x30, [sp, -16]!
+ add x29, sp, 0
+ ldr w2, [x1,#:lo12:.LANCHOR0+1872]
+ mov w1, 12336
+ movk w1, 0x5638, lsl 16
+ cmp w2, w1
+ bne .L2920
+ bl flash_enter_slc_mode
+.L2920:
+ ldp x29, x30, [sp], 16
+ ret
+ .size flash_boot_enter_slc_mode, .-flash_boot_enter_slc_mode
+ .align 2
+ .global flash_boot_exit_slc_mode
+ .type flash_boot_exit_slc_mode, %function
+flash_boot_exit_slc_mode:
+ adrp x1, .LANCHOR0+1872
+ uxtb w0, w0
+ stp x29, x30, [sp, -16]!
+ add x29, sp, 0
+ ldr w2, [x1,#:lo12:.LANCHOR0+1872]
+ mov w1, 12336
+ movk w1, 0x5638, lsl 16
+ cmp w2, w1
+ bne .L2922
+ bl flash_exit_slc_mode
+.L2922:
+ ldp x29, x30, [sp], 16
+ ret
+ .size flash_boot_exit_slc_mode, .-flash_boot_exit_slc_mode
+ .align 2
+ .global IdBlockReadData
+ .type IdBlockReadData, %function
+IdBlockReadData:
+ stp x29, x30, [sp, -144]!
+ add x29, sp, 0
+ stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR0
+ mov x20, x2
+ add x19, x19, :lo12:.LANCHOR0
+ stp x21, x22, [sp,32]
+ mov w22, w0
+ ldr x0, [x19,744]
+ stp x23, x24, [sp,48]
+ stp x25, x26, [sp,64]
+ stp x27, x28, [sp,80]
+ ldr w3, [x19,12]
+ mov w26, w1
+ ldrb w21, [x0,9]
+ adrp x0, .LC122
+ add x0, x0, :lo12:.LC122
+ mov w1, w22
+ mov w2, w26
+ mov w23, 0
+ mul w21, w3, w21
bl printk
- b .L2799
-.L2734:
- adrp x0, .LC135
- add x0, x0, :lo12:.LC135
+ ldr x0, [x19,744]
+ mov w6, 4
+ uxth w21, w21
+ adrp x7, .LANCHOR4
+ ldrb w28, [x0,9]
+ udiv w0, w22, w21
+ msub w21, w0, w21, w22
+ sub w5, w22, w21
+ mul w3, w21, w28
+ ubfx x3, x3, 2, 2
+.L2925:
+ cmp w23, w26
+ bcs .L2931
+ ldrb w1, [x19,120]
+ sub w24, w6, w3
+ add w4, w23, w21
+ lsr w4, w4, 2
+ uxth w24, w24
+ add x0, x19, x4, uxth 1
+ ldrh w0, [x0,196]
+ cbz w1, .L2926
+ ldr w2, [x19,1872]
+ mov w1, 12336
+ movk w1, 0x5638, lsl 16
+ uxth w4, w4
+ cmp w2, w1
+ csel w0, w4, w0, eq
+.L2926:
+ add w3, w3, w5
+ add x27, x7, :lo12:.LANCHOR4
+ ldrb w4, [x19,1944]
+ madd w25, w0, w28, w3
+ ldr x0, [x19,744]
+ ldr x2, [x27,80]
+ str x6, [x29,96]
+ ldrb w1, [x0,9]
+ ldrb w0, [x27,74]
+ str x5, [x29,104]
+ str x7, [x29,112]
+ str x4, [x29,136]
+ str x2, [x29,120]
+ str x1, [x29,128]
+ bl FlashBchSel
+ mov w0, 0
+ bl flash_boot_enter_slc_mode
+ ldr x1, [x29,128]
+ mov x3, 0
+ ldr x2, [x29,120]
+ mov w0, 0
+ udiv w1, w25, w1
+ bl FlashReadPage
+ mov w0, 0
+ bl flash_boot_exit_slc_mode
+ ldr x4, [x29,136]
+ mov w0, w4
+ bl FlashBchSel
+ ubfiz x0, x23, 9, 16
+ ldr x1, [x27,80]
+ add x0, x20, x0
+ mov w2, 2048
+ add w23, w24, w23
+ bl ftl_memcpy
+ uxth w23, w23
+ mov w3, 0
+ ldr x6, [x29,96]
+ ldr x5, [x29,104]
+ ldr x7, [x29,112]
+ b .L2925
+.L2931:
+ adrp x0, .LC123
+ mov w1, w22
+ mov w2, w26
+ mov w3, 0
+ add x0, x0, :lo12:.LC123
bl printk
- mov x0, x20
- mov x1, x21
- mov x2, 4096
- bl rk_copy_from_user
- cbnz x0, .L2746
- ldr w1, [x20]
- adrp x0, .LC136
- ldr w2, [x20,4]
- add x0, x0, :lo12:.LC136
+ mov w0, 0
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
+ ldp x27, x28, [sp,80]
+ ldp x29, x30, [sp], 144
+ ret
+ .size IdBlockReadData, .-IdBlockReadData
+ .align 2
+ .global IDBlockWriteData
+ .type IDBlockWriteData, %function
+IDBlockWriteData:
+ stp x29, x30, [sp, -208]!
+ add x29, sp, 0
+ stp x19, x20, [sp,16]
+ adrp x19, .LANCHOR0
+ adrp x20, __stack_chk_guard
+ add x19, x19, :lo12:.LANCHOR0
+ stp x27, x28, [sp,80]
+ mov w28, w1
+ ldr x1, [x19,744]
+ stp x23, x24, [sp,48]
+ stp x21, x22, [sp,32]
+ stp x25, x26, [sp,64]
+ mov w25, w0
+ ldr x0, [x20,#:lo12:__stack_chk_guard]
+ ldrb w22, [x1,9]
+ mov x23, x2
+ str x0, [x29,200]
+ mov w1, w25
+ ldr w0, [x19,12]
+ mov w2, w28
+ mov w24, 0
+ mul w22, w0, w22
+ adrp x0, .LC124
+ add x0, x0, :lo12:.LC124
+ uxth w22, w22
bl printk
- adrp x0, :got:g_idb_buffer
- mov x19, x0
- ldr x21, [x0, #:got_lo12:g_idb_buffer]
- ldr x1, [x21]
- cbz x1, .L2747
-.L2750:
- ldr w2, [x20,4]
- cmp w2, 4088
- bls .L2748
- b .L2799
-.L2747:
+ mov w0, 0
+ bl flash_boot_enter_slc_mode
+ ldrh w1, [x19,188]
+ mov w2, 0
+ mov w0, 0
+ udiv w1, w25, w1
+ bl FlashEraseBlock
+ mov w0, 0
+ bl flash_boot_exit_slc_mode
+ udiv w27, w25, w22
+ ldr x0, [x19,744]
+ adrp x5, .LANCHOR4
+ ldrb w21, [x0,9]
+ msub w27, w27, w22, w25
+ sub w22, w25, w27
+.L2933:
+ cmp w24, w28
+ bcs .L2948
+ add w4, w24, w27
+ lsr w4, w4, 2
+ uxth w0, w4
+ and w4, w4, 65535
+ cbz w0, .L2934
+ add x1, x19, 196
+ add w2, w4, 1
+ ldrh w3, [x1,w2,sxtw 1]
+ ldrb w1, [x19,120]
+ cbz w1, .L2935
+ ldr w2, [x19,1872]
+ mov w1, 12336
+ movk w1, 0x5638, lsl 16
+ cmp w2, w1
+ bne .L2935
+ add w3, w0, 1
+ uxth w3, w3
+.L2935:
+ sub w3, w3, #1
+ str wzr, [x29,140]
+ lsl w3, w3, 2
+ str w3, [x29,136]
+.L2934:
+ add x1, x19, 196
+ ldrh w26, [x1,w4,sxtw 1]
+ ldrb w1, [x19,120]
+ cbz w1, .L2936
+ ldr w2, [x19,1872]
+ mov w1, 12336
+ movk w1, 0x5638, lsl 16
+ cmp w2, w1
+ csel w26, w26, w0, ne
+.L2936:
+ add x0, x5, :lo12:.LANCHOR4
+ ldrb w4, [x19,1944]
+ madd w3, w26, w21, w22
+ ubfiz x2, x24, 9, 16
+ str x5, [x29,120]
+ ldrb w0, [x0,74]
+ add x2, x23, x2
+ str x4, [x29,112]
+ add w24, w24, 4
+ str x3, [x29,96]
+ str x2, [x29,104]
+ bl FlashBchSel
+ mov w0, 0
+ uxth w24, w24
+ bl flash_boot_enter_slc_mode
+ ldr x0, [x19,744]
+ ldr x3, [x29,96]
+ ldr x2, [x29,104]
+ ldrb w1, [x0,9]
+ mov w0, 0
+ udiv w1, w3, w1
+ add x3, x29, 136
+ bl FlashProgPage
+ mov w0, 0
+ bl flash_boot_exit_slc_mode
+ ldr x4, [x29,112]
+ mov w0, w4
+ bl FlashBchSel
+ udiv w1, w22, w21
+ add w2, w26, 1
+ mov w0, 0
+ bl FlashPageProgMsbFFData
+ ldr x5, [x29,120]
+ b .L2933
+.L2948:
+ adrp x0, .LC125
+ mov w1, w25
+ mov w2, w28
+ add x0, x0, :lo12:.LC125
+ mov w3, 0
+ bl printk
+ ldr x2, [x29,200]
+ mov w0, 0
+ ldr x1, [x20,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L2938
+ bl __stack_chk_fail
+.L2938:
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
+ ldp x27, x28, [sp,80]
+ ldp x29, x30, [sp], 208
+ ret
+ .size IDBlockWriteData, .-IDBlockWriteData
+ .align 2
+ .global write_idblock
+ .type write_idblock, %function
+write_idblock:
+ stp x29, x30, [sp, -128]!
+ add x29, sp, 0
+ stp x23, x24, [sp,48]
+ adrp x24, .LANCHOR0
+ mov x23, x2
+ stp x25, x26, [sp,64]
+ mov w25, w0
+ add x0, x24, :lo12:.LANCHOR0
+ stp x19, x20, [sp,16]
+ stp x21, x22, [sp,32]
+ stp x27, x28, [sp,80]
+ mov x21, x1
+ mov w2, 6
+ ldr x1, [x0,744]
+ ldr w26, [x0,12]
+ mov x0, 59392
+ movk x0, 0x3, lsl 16
+ ldrb w22, [x1,9]
mov w1, 192
- mov x0, 260096
movk w1, 0x240, lsl 16
- mov w2, 6
bl kmalloc_order_trace
- str x0, [x21]
- cbnz x0, .L2750
- b .L2799
-.L2748:
- ldr w0, [x20]
- mov w1, 55296
- movk w1, 0x3, lsl 16
- cmp w0, w1
- bhi .L2799
- ldr x19, [x19, #:got_lo12:g_idb_buffer]
- uxtw x2, w2
- ldr x1, [x19]
- add x0, x1, x0, uxtw
- add x1, x20, 8
- bl memcpy
- b .L2796
-.L2737:
- adrp x0, .LC137
- add x0, x0, :lo12:.LC137
- bl printk
- mov x0, x20
+ str x24, [x29,120]
+ mov x20, x0
+ mov w0, -1
+ cbz x20, .L2959
+ add w19, w25, 511
+ lsr w19, w19, 9
+ cmp w19, 255
+ bhi .L2951
+ ubfiz x0, x19, 9, 23
+ mov w2, 256
+ add x0, x21, x0
mov x1, x21
- mov x2, 28
- bl rk_copy_from_user
- cbnz x0, .L2746
- ldr w1, [x20]
- adrp x0, .LC138
- ldr w2, [x20,4]
- add x0, x0, :lo12:.LC138
+ sub w2, w2, w19
+ bl memcpy
+.L2951:
+ add w19, w19, 128
+ mov w0, 256
+ cmp w19, 256
+ mov x1, x23
+ csel w19, w19, w0, ls
+ adrp x0, .LC126
+ add x0, x0, :lo12:.LC126
+ mov w2, 4
+ mov w3, 5
+ bl rknand_print_hex
+ ldr x0, [x29,120]
+ ldr w1, [x21,512]
+ add x27, x0, :lo12:.LANCHOR0
+ adrp x0, .LC127
+ add x0, x0, :lo12:.LC127
+ ldrb w2, [x27,9]
bl printk
- ldr w1, [x20]
- mov w0, 59392
- movk w0, 0x3, lsl 16
+ ldrb w0, [x27,9]
+ ldr w1, [x21,512]
cmp w1, w0
- bhi .L2799
- adrp x19, :got:g_idb_buffer
- ldr x19, [x19, #:got_lo12:g_idb_buffer]
- ldr x0, [x19]
- cbz x0, .L2799
- ldr w21, [x20,4]
- bl CRC_32
- cmp w21, w0
- beq .L2751
-.L2756:
- mov x0, -2
- b .L2719
-.L2751:
- bl rknand_device_unlock
- ldr x1, [x19]
- add x2, x20, 8
- ldr w0, [x20]
- bl write_idblock
- bl rknand_device_unlock
- ldr x0, [x19]
- bl kfree
- str xzr, [x19]
- b .L2796
-.L2736:
- adrp x0, .LC139
- add x0, x0, :lo12:.LC139
+ bls .L2952
+ str w0, [x21,512]
+.L2952:
+ adrp x0, .LC128
+ mov w2, w25
+ mul w22, w22, w26
+ add x0, x0, :lo12:.LC128
+ mov w1, w19
+ mov x24, 0
+ adrp x26, .LC129
bl printk
+ adrp x27, .LC130
+ adrp x28, .LC131
+ lsl w0, w19, 7
+ uxth w22, w22
+ str w0, [x29,116]
+ mov w25, w24
+ add x26, x26, :lo12:.LC129
+ add x27, x27, :lo12:.LC130
+ add x28, x28, :lo12:.LC131
+.L2957:
+ ldr x1, [x29,120]
+ mov w8, w24
+ ldr w0, [x23,x24,lsl 2]
+ add x1, x1, :lo12:.LANCHOR0
+ ldrh w1, [x1,194]
+ cmp w0, w1
+ bcs .L2953
+ adrp x1, .LANCHOR4+68
+ ldr w1, [x1,#:lo12:.LANCHOR4+68]
+ cmp w0, w1
+ bcc .L2953
+ mov w1, 0
+ mov x2, 512
mov x0, x20
- bl ReadFlashInfo
- mov x0, x21
- mov x1, x20
- mov x2, 11
- b .L2791
-.L2720:
- adrp x0, .LC140
- add x0, x0, :lo12:.LC140
- bl printk
- bl rknand_device_unlock
- bl FtlReInitForSDUpdata
- mov w19, w0
- bl rknand_device_unlock
- cbnz w19, .L2799
- bl nand_blk_add_whole_disk
- bl rknand_device_unlock
+ str x8, [x29,104]
+ bl memset
+ ldr w0, [x23,x24,lsl 2]
mov w1, w19
- mov w2, 64
- mov x0, x20
- bl FlashReadFacBbtData
- bl rknand_device_unlock
- adrp x0, .LC141
- mov x1, x20
- add x0, x0, :lo12:.LC141
- mov w2, 4
- mov w3, 8
- bl rknand_print_hex
- mov x0, x21
- mov x1, x20
- mov x2, 64
- b .L2791
-.L2732:
- adrp x0, .LC142
- add x0, x0, :lo12:.LC142
- bl printk
- adrp x0, :got:gpDrmKeyInfo
- mov x1, x20
- mov x2, 4
- ldr x0, [x0, #:got_lo12:gpDrmKeyInfo]
- ldr x0, [x0]
- ldr w0, [x0,20]
- str w0, [x20]
- mov x0, x21
- b .L2791
-.L2740:
- adrp x0, .LC143
- add x0, x0, :lo12:.LC143
+ mov x2, x21
+ mul w0, w22, w0
+ bl IDBlockWriteData
+ ldr w0, [x23,x24,lsl 2]
+ mov w1, w19
+ mov x2, x20
+ mul w0, w22, w0
+ bl IdBlockReadData
+ ldr x8, [x29,104]
+ mov x0, 0
+.L2954:
+ ldr w1, [x29,116]
+ mov w3, w0
+ cmp w0, w1
+ bcs .L2964
+ ldr w4, [x20,x0,lsl 2]
+ mov x7, x0
+ add x0, x0, 1
+ add x1, x21, x0, lsl 2
+ ldr w5, [x1,-4]
+ cmp w4, w5
+ beq .L2954
+ ldr w2, [x23,x24,lsl 2]
+ mov w1, w8
+ mov x0, x26
+ str x7, [x29,104]
+ bl printk
+ ldr x7, [x29,104]
+ mov x0, x27
+ mov w2, 4
+ mov w3, 256
+ and x4, x7, -256
+ lsl x4, x4, 2
+ str x4, [x29,104]
+ add x1, x21, x4
+ bl rknand_print_hex
+ ldr x4, [x29,104]
+ mov w3, 256
+ mov x0, x28
+ mov w2, 4
+ add x1, x20, x4
+ bl rknand_print_hex
+ mov x0, x20
+ mov w1, 0
+ mov x2, 512
+ bl memset
+ ldr w0, [x23,x24,lsl 2]
+ mov w1, 4
+ mov x2, x20
+ mul w0, w22, w0
+ bl IDBlockWriteData
+ adrp x0, .LC132
+ add x0, x0, :lo12:.LC132
+ bl printk
+ b .L2953
+.L2964:
+ add w25, w25, 1
+.L2953:
+ add x24, x24, 1
+ cmp x24, 5
+ bne .L2957
+ mov x0, x20
+ bl kfree
+ cmp w25, wzr
+ csetm w0, eq
+.L2959:
+ ldp x19, x20, [sp,16]
+ ldp x21, x22, [sp,32]
+ ldp x23, x24, [sp,48]
+ ldp x25, x26, [sp,64]
+ ldp x27, x28, [sp,80]
+ ldp x29, x30, [sp], 128
+ ret
+ .size write_idblock, .-write_idblock
+ .align 2
+ .global CRC_32
+ .type CRC_32, %function
+CRC_32:
+ mov x2, 0
+ adrp x3, .LANCHOR1
+ mov x5, x0
+ add x3, x3, :lo12:.LANCHOR1
+ mov w0, w2
+.L2966:
+ cmp w1, w2
+ bls .L2968
+ ldrb w4, [x5,x2]
+ add x6, x3, 3016
+ add x2, x2, 1
+ eor w4, w4, w0, lsr 24
+ ldr w4, [x6,w4,uxtw 2]
+ eor w0, w4, w0, lsl 8
+ b .L2966
+.L2968:
+ ret
+ .size CRC_32, .-CRC_32
+ .align 2
+ .type rknand_sys_storage_ioctl, %function
+rknand_sys_storage_ioctl:
+ sub sp, sp, #528
+ stp x29, x30, [sp, -48]!
+ add x29, sp, 0
+ stp x21, x22, [sp,32]
+ stp x19, x20, [sp,16]
+ adrp x22, __stack_chk_guard
+ mov w19, w1
+ ldr x20, [x0,208]
+ mov w0, 29187
+ movk w0, 0x4004, lsl 16
+ mov x21, x2
+ ldr x1, [x22,#:lo12:__stack_chk_guard]
+ cmp w19, w0
+ str x1, [x29,568]
+ beq .L2971
+ mov w0, 29187
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ bhi .L2972
+ mov w0, 25726
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2973
+ mov w0, 25726
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ bhi .L2974
+ mov w0, 25601
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2975
+ mov w0, 25601
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ bhi .L2976
+ mov w0, 25364
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ bne .L3026
+ bl rknand_dev_flush
+ b .L3060
+.L2976:
+ mov w0, 25602
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2978
+ mov w0, 25603
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2979
+ b .L3026
+.L2974:
+ mov w0, 27688
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2980
+ mov w0, 27688
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ bhi .L2981
+ mov w0, 25727
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2982
+ b .L3026
+.L2981:
+ mov w0, 27698
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2980
+ mov w0, 27708
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2980
+ b .L3026
+.L2972:
+ mov w0, 29267
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2983
+ mov w0, 29267
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ bhi .L2984
+ mov w0, 29189
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2985
+ mov w0, 29189
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ bcc .L2986
+ mov w0, 29210
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2987
+ mov w0, 29266
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2988
+ b .L3026
+.L2984:
+ mov w0, 30225
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2989
+ mov w0, 30225
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ bhi .L2990
+ mov w0, 29268
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2991
+ mov w0, 30224
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2992
+ b .L3026
+.L2990:
+ mov w0, 30226
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2992
+ mov w0, 30227
+ movk w0, 0x4004, lsl 16
+ cmp w19, w0
+ beq .L2989
+ b .L3026
+.L2986:
+ adrp x0, .LC133
+ add x0, x0, :lo12:.LC133
+ bl printk
+ mov x0, x20
+ mov x1, x21
+ mov x2, 512
+ bl rk_copy_from_user
+ cbz x0, .L2993
+.L2997:
+ adrp x0, .LC134
+ add x0, x0, :lo12:.LC134
+ b .L3063
+.L2993:
+ adrp x0, .LC135
+ ldr w1, [x20]
+ ldr w2, [x20,4]
+ add x0, x0, :lo12:.LC135
bl printk
+ ldr w19, [x20,4]
+ cmp w19, 8
+ bhi .L3062
bl rknand_device_unlock
- mov w1, 264
- mov w2, 2
- mov x3, x20
- mov w0, 16
- bl FtlRead
+ ldr w0, [x20]
+ mov w1, w19
+ mov x2, x20
+ bl IdBlockReadData
bl rknand_device_unlock
mov x0, x21
mov x1, x20
- mov x2, 1024
- b .L2791
-.L2724:
- adrp x0, .LC144
- add x19, x29, 56
- add x0, x0, :lo12:.LC144
+ ubfiz x2, x19, 9, 23
+ bl rk_copy_to_user
+ cbz x0, .L3060
+ adrp x0, .LC136
+ add x0, x0, :lo12:.LC136
+ b .L3063
+.L2985:
+ adrp x0, .LC137
+ add x0, x0, :lo12:.LC137
bl printk
- mov x0, x19
+ mov x0, x20
mov x1, x21
- mov x2, 520
+ mov x2, 4096
bl rk_copy_from_user
- mov x20, x0
- cbnz x0, .L2746
- ldr w1, [x19]
- mov w0, 21060
- movk w0, 0x4b4d, lsl 16
- cmp w1, w0
- beq .L2753
-.L2754:
- mov x19, -1
- b .L2745
-.L2753:
- ldr w0, [x19,4]
- cmp w0, 512
- bhi .L2754
- adrp x1, :got:gpDrmKeyInfo
- mov x0, x19
- mov x2, 512
- ldr x1, [x1, #:got_lo12:gpDrmKeyInfo]
- ldr x1, [x1]
+ cbnz x0, .L2997
+ ldr w1, [x20]
+ adrp x0, .LC138
+ ldr w2, [x20,4]
+ add x0, x0, :lo12:.LC138
+ bl printk
+ adrp x0, .LANCHOR4
+ add x21, x0, :lo12:.LANCHOR4
+ mov x19, x0
+ ldr x1, [x21,448]
+ cbz x1, .L2998
+.L3001:
+ ldr w2, [x20,4]
+ cmp w2, 4088
+ bls .L2999
+ b .L3062
+.L2998:
+ mov w1, 192
+ mov x0, 260096
+ movk w1, 0x240, lsl 16
+ mov w2, 6
+ bl kmalloc_order_trace
+ str x0, [x21,448]
+ cbnz x0, .L3001
+ b .L3062
+.L2999:
+ ldr w0, [x20]
+ mov w1, 55296
+ movk w1, 0x3, lsl 16
+ cmp w0, w1
+ bhi .L3062
+ add x19, x19, :lo12:.LANCHOR4
+ uxtw x2, w2
+ ldr x1, [x19,448]
+ add x0, x1, x0, uxtw
+ add x1, x20, 8
bl memcpy
- adrp x0, :got:SecureBootCheckOK
- ldr x0, [x0, #:got_lo12:SecureBootCheckOK]
- ldr w1, [x0]
- mov w0, 5161
- movk w0, 0xc059, lsl 16
- cmp w1, w0
- beq .L2755
- str w20, [x19,8]
- add x0, x19, 64
- str w20, [x19,12]
- mov w1, w20
- mov x2, 128
- bl memset
-.L2755:
- str wzr, [x19,16]
- add x0, x19, 256
- mov w1, 0
- mov x2, 256
- bl memset
- b .L2795
-.L2727:
- adrp x0, .LC145
- add x19, x29, 56
- add x0, x0, :lo12:.LC145
+ b .L3060
+.L2988:
+ adrp x0, .LC139
+ add x0, x0, :lo12:.LC139
bl printk
- mov x0, x19
+ mov x0, x20
mov x1, x21
- mov x2, 520
+ mov x2, 28
bl rk_copy_from_user
- cbnz x0, .L2746
- ldr w1, [x19]
+ cbnz x0, .L2997
+ ldr w1, [x20]
+ adrp x0, .LC140
+ ldr w2, [x20,4]
+ add x0, x0, :lo12:.LC140
+ bl printk
+ ldr w1, [x20]
+ mov w0, 59392
+ movk w0, 0x3, lsl 16
+ cmp w1, w0
+ bhi .L3062
+ adrp x19, .LANCHOR4
+ add x19, x19, :lo12:.LANCHOR4
+ ldr x0, [x19,448]
+ cbz x0, .L3062
+ bl CRC_32
+ ldr w1, [x20,4]
+ cmp w1, w0
+ beq .L3002
+.L3008:
+ mov x0, -2
+ b .L2970
+.L3002:
+ bl rknand_device_unlock
+ ldr x1, [x19,448]
+ add x2, x20, 8
+ ldr w0, [x20]
+ bl write_idblock
+ bl rknand_device_unlock
+ ldr x0, [x19,448]
+ bl kfree
+ str xzr, [x19,448]
+ b .L3060
+.L2987:
+ adrp x0, .LC141
+ add x0, x0, :lo12:.LC141
+ bl printk
+ mov x0, x20
+ bl ReadFlashInfo
+ mov x0, x21
+ mov x1, x20
+ mov x2, 11
+ b .L3059
+.L2971:
+ adrp x0, .LC142
+ add x0, x0, :lo12:.LC142
+ bl printk
+ bl rknand_device_unlock
+ bl FtlReInitForSDUpdata
+ mov w19, w0
+ bl rknand_device_unlock
+ cbnz w19, .L3062
+ bl nand_blk_add_whole_disk
+ bl rknand_device_unlock
+ mov w1, w19
+ mov w2, 64
+ mov x0, x20
+ bl FlashReadFacBbtData
+ bl rknand_device_unlock
+ adrp x0, .LC143
+ mov x1, x20
+ add x0, x0, :lo12:.LC143
+ mov w2, 4
+ mov w3, 8
+ bl rknand_print_hex
+ mov x0, x21
+ mov x1, x20
+ mov x2, 64
+.L3059:
+ bl rk_copy_to_user
+ b .L3053
+.L2983:
+ adrp x0, .LC144
+ add x0, x0, :lo12:.LC144
+ bl printk
+ adrp x0, .LANCHOR4+456
+ mov x1, x20
+ mov x2, 4
+ ldr x0, [x0,#:lo12:.LANCHOR4+456]
+ ldr w0, [x0,20]
+ str w0, [x20]
+ mov x0, x21
+ b .L3059
+.L2991:
+ adrp x0, .LC145
+ add x0, x0, :lo12:.LC145
+ bl printk
+ bl rknand_device_unlock
+ mov w1, 2
+ mov x2, x20
+ mov w0, 520
+ bl FtlVendorPartRead
+ bl rknand_device_unlock
+ mov x0, x21
+ mov x1, x20
+ mov x2, 1024
+ b .L3059
+.L2975:
+ adrp x0, .LC146
+ add x0, x0, :lo12:.LC146
+ bl printk
+ add x0, x29, 48
+ mov x1, x21
+ mov x2, 520
+ bl rk_copy_from_user
+ mov x19, x0
+ cbnz x0, .L2997
+ ldr w1, [x29,48]
mov w0, 21060
movk w0, 0x4b4d, lsl 16
cmp w1, w0
- bne .L2754
- ldr w0, [x19,4]
+ beq .L3004
+.L3005:
+ mov x19, -1
+ b .L2996
+.L3004:
+ ldr w0, [x29,52]
cmp w0, 512
- bhi .L2754
- adrp x0, :got:SecureBootCheckOK
- ldr x0, [x0, #:got_lo12:SecureBootCheckOK]
- ldr w1, [x0]
+ bhi .L3005
+ adrp x20, .LANCHOR4
+ add x0, x29, 48
+ add x20, x20, :lo12:.LANCHOR4
+ mov x2, 512
+ ldr x1, [x20,456]
+ bl memcpy
+ ldr w1, [x20,464]
mov w0, 5161
movk w0, 0xc059, lsl 16
cmp w1, w0
- bne .L2756
- ldr w1, [x19,12]
+ beq .L3006
+ add x0, x29, 112
+ mov w1, w19
+ mov x2, 128
+ str w19, [x29,56]
+ str w19, [x29,60]
+ bl memset
+.L3006:
+ mov w1, 0
+ mov x2, 256
+ add x0, x29, 304
+ str wzr, [x29,64]
+ bl memset
+ mov x0, x21
+ add x1, x29, 48
+ mov x2, 520
+ b .L3059
+.L2978:
+ adrp x0, .LC147
+ add x0, x0, :lo12:.LC147
+ bl printk
+ add x0, x29, 48
+ mov x1, x21
+ mov x2, 520
+ bl rk_copy_from_user
+ cbz x0, .L3007
+ adrp x0, .LC148
+ add x0, x0, :lo12:.LC148
+.L3063:
+ bl printk
+ b .L3062
+.L3007:
+ ldr w1, [x29,48]
+ mov w0, 21060
+ movk w0, 0x4b4d, lsl 16
+ cmp w1, w0
+ bne .L3005
+ ldr w0, [x29,52]
+ cmp w0, 512
+ bhi .L3005
+ adrp x1, .LANCHOR4
+ mov w0, 5161
+ add x1, x1, :lo12:.LANCHOR4
+ movk w0, 0xc059, lsl 16
+ ldr w2, [x1,464]
+ cmp w2, w0
+ bne .L3008
+ ldr w2, [x29,60]
mov x0, -3
- sub w2, w1, #1
- cmp w2, 127
- bhi .L2719
- adrp x0, :got:gpDrmKeyInfo
- ldr x0, [x0, #:got_lo12:gpDrmKeyInfo]
- ldr x20, [x0]
- add x0, x20, 64
- str w1, [x20,12]
- add x1, x19, 64
- ldr w2, [x19,12]
+ sub w3, w2, #1
+ cmp w3, 127
+ bhi .L2970
+ ldr x19, [x1,456]
+ add x1, x29, 112
+ add x0, x19, 64
+ str w2, [x19,12]
+ ldr w2, [x29,60]
bl memcpy
mov w0, 1
- mov x1, x20
- b .L2798
-.L2731:
- adrp x0, .LC146
- add x19, x29, 56
- add x0, x0, :lo12:.LC146
+ mov x1, x19
+ b .L3061
+.L2982:
+ adrp x0, .LC149
+ add x0, x0, :lo12:.LC149
bl printk
- mov x0, x19
+ add x0, x29, 48
mov x1, x21
mov x2, 520
bl rk_copy_from_user
- cbnz x0, .L2746
- ldr w1, [x19]
+ cbnz x0, .L2997
+ ldr w1, [x29,48]
mov w0, 17476
movk w0, 0x4253, lsl 16
cmp w1, w0
- bne .L2754
- ldr w0, [x19,4]
+ bne .L3005
+ ldr w0, [x29,52]
cmp w0, 512
- bhi .L2754
- adrp x19, :got:SecureBootEn
- ldr x0, [x19, #:got_lo12:SecureBootEn]
- ldr w0, [x0]
- cbnz w0, .L2757
-.L2760:
+ bhi .L3005
+ adrp x19, .LANCHOR4
+ add x0, x19, :lo12:.LANCHOR4
+ ldr w1, [x0,468]
+ cbnz w1, .L3009
+.L3012:
mov x0, 0
- b .L2719
-.L2757:
- adrp x0, :got:gpBootConfig
- mov w3, 22867
- movk w3, 0x4453, lsl 16
- ldr x1, [x0, #:got_lo12:gpBootConfig]
- ldr x2, [x1]
- ldr w4, [x2]
- cmp w4, w3
- beq .L2758
- mov w3, 22867
- movk w3, 0x4453, lsl 16
- str w3, [x2]
- mov w3, 504
- ldr x2, [x1]
- str w3, [x2,4]
- ldr x1, [x1]
- str wzr, [x1,8]
- str wzr, [x1,12]
-.L2758:
- ldr x0, [x0, #:got_lo12:gpBootConfig]
- ldr x1, [x0]
+ b .L2970
+.L3009:
+ ldr x1, [x0,472]
+ mov w2, 22867
+ movk w2, 0x4453, lsl 16
+ ldr w3, [x1]
+ cmp w3, w2
+ beq .L3010
+ mov w2, 22867
+ movk w2, 0x4453, lsl 16
+ str w2, [x1]
+ mov w2, 504
+ ldr x1, [x0,472]
+ str w2, [x1,4]
+ ldr x0, [x0,472]
+ str wzr, [x0,8]
+ str wzr, [x0,12]
+.L3010:
+ add x20, x19, :lo12:.LANCHOR4
mov w0, 0
+ ldr x1, [x20,472]
str wzr, [x1,16]
bl StorageSysDataStore
- adrp x0, :got:gpDrmKeyInfo
- mov w3, 21060
- movk w3, 0x4b4d, lsl 16
- ldr x1, [x0, #:got_lo12:gpDrmKeyInfo]
- ldr x2, [x1]
- ldr w4, [x2]
- cmp w4, w3
- beq .L2759
- mov w3, 21060
- movk w3, 0x4b4d, lsl 16
- str w3, [x2]
- mov w3, 504
- ldr x2, [x1]
- str w3, [x2,4]
- ldr x1, [x1]
- str wzr, [x1,8]
-.L2759:
- ldr x0, [x0, #:got_lo12:gpDrmKeyInfo]
+ ldr x0, [x20,456]
+ mov w1, 21060
+ movk w1, 0x4b4d, lsl 16
+ ldr w2, [x0]
+ cmp w2, w1
+ beq .L3011
+ mov w1, 21060
+ movk w1, 0x4b4d, lsl 16
+ str w1, [x0]
+ mov w1, 504
+ ldr x0, [x20,456]
+ str w1, [x0,4]
+ ldr x0, [x20,456]
+ str wzr, [x0,8]
+.L3011:
+ add x19, x19, :lo12:.LANCHOR4
mov w1, 0
mov x2, 128
- ldr x20, [x0]
+ ldr x20, [x19,456]
add x0, x20, 64
str wzr, [x20,12]
bl memset
mov w0, 1
mov x1, x20
bl StorageSysDataStore
- ldr x19, [x19, #:got_lo12:SecureBootEn]
- adrp x0, :got:SecureBootCheckOK
- str wzr, [x19]
- ldr x0, [x0, #:got_lo12:SecureBootCheckOK]
- str wzr, [x0]
- b .L2796
-.L2722:
- adrp x0, .LC147
- add x19, x29, 56
- add x0, x0, :lo12:.LC147
+ str wzr, [x19,468]
+ str wzr, [x19,464]
+ b .L3060
+.L2973:
+ adrp x0, .LC150
+ add x0, x0, :lo12:.LC150
bl printk
- mov x0, x19
+ add x0, x29, 48
mov x1, x21
mov x2, 520
bl rk_copy_from_user
- cbnz x0, .L2746
- ldr w2, [x19]
+ cbnz x0, .L2997
+ ldr w2, [x29,48]
mov w1, 20037
movk w1, 0x4253, lsl 16
cmp w2, w1
- bne .L2754
- ldr w1, [x19,4]
+ bne .L3005
+ ldr w1, [x29,52]
cmp w1, 512
- bhi .L2754
- adrp x19, :got:SecureBootEn
- ldr x1, [x19, #:got_lo12:SecureBootEn]
- ldr w1, [x1]
- cmp w1, 1
- beq .L2760
- adrp x1, :got:gpBootConfig
- mov w4, 22867
- movk w4, 0x4453, lsl 16
- ldr x2, [x1, #:got_lo12:gpBootConfig]
- ldr x3, [x2]
- ldr w5, [x3]
- cmp w5, w4
- beq .L2761
- mov w4, 22867
- movk w4, 0x4453, lsl 16
- str w4, [x3]
- mov w4, 504
- ldr x3, [x2]
- str w4, [x3,4]
- ldr x2, [x2]
- str w0, [x2,8]
- str w0, [x2,12]
-.L2761:
- ldr x1, [x1, #:got_lo12:gpBootConfig]
- mov w0, 1
- ldr x1, [x1]
- str w0, [x1,16]
- mov w0, 0
- bl StorageSysDataStore
- adrp x0, :got:gpDrmKeyInfo
- mov w3, 21060
- movk w3, 0x4b4d, lsl 16
- ldr x1, [x0, #:got_lo12:gpDrmKeyInfo]
- ldr x2, [x1]
+ bhi .L3005
+ adrp x19, .LANCHOR4
+ add x1, x19, :lo12:.LANCHOR4
+ ldr w2, [x1,468]
+ cmp w2, 1
+ beq .L3012
+ ldr x2, [x1,472]
+ mov w3, 22867
+ movk w3, 0x4453, lsl 16
ldr w4, [x2]
cmp w4, w3
- beq .L2762
- mov w3, 21060
- movk w3, 0x4b4d, lsl 16
+ beq .L3013
+ mov w3, 22867
+ movk w3, 0x4453, lsl 16
str w3, [x2]
mov w3, 504
- ldr x2, [x1]
+ ldr x2, [x1,472]
str w3, [x2,4]
- ldr x1, [x1]
- str wzr, [x1,8]
-.L2762:
- ldr x0, [x0, #:got_lo12:gpDrmKeyInfo]
+ ldr x1, [x1,472]
+ str w0, [x1,8]
+ str w0, [x1,12]
+.L3013:
+ add x20, x19, :lo12:.LANCHOR4
+ mov w0, 1
+ ldr x1, [x20,472]
+ str w0, [x1,16]
+ mov w0, 0
+ bl StorageSysDataStore
+ ldr x0, [x20,456]
+ mov w1, 21060
+ movk w1, 0x4b4d, lsl 16
+ ldr w2, [x0]
+ cmp w2, w1
+ beq .L3014
+ mov w1, 21060
+ movk w1, 0x4b4d, lsl 16
+ str w1, [x0]
+ mov w1, 504
+ ldr x0, [x20,456]
+ str w1, [x0,4]
+ ldr x0, [x20,456]
+ str wzr, [x0,8]
+.L3014:
+ add x19, x19, :lo12:.LANCHOR4
mov w1, 0
mov x2, 128
- ldr x20, [x0]
+ ldr x20, [x19,456]
add x0, x20, 64
str wzr, [x20,12]
bl memset
mov w0, 1
mov x1, x20
bl StorageSysDataStore
- ldr x19, [x19, #:got_lo12:SecureBootEn]
mov w0, 1
- str w0, [x19]
- b .L2796
-.L2728:
- adrp x0, .LC148
- add x19, x29, 56
- add x0, x0, :lo12:.LC148
+ str w0, [x19,468]
+ b .L3060
+.L2979:
+ adrp x0, .LC151
+ add x0, x0, :lo12:.LC151
bl printk
- mov x0, x19
+ add x0, x29, 48
mov x1, x21
mov x2, 520
bl rk_copy_from_user
- cbnz x0, .L2746
- ldr w1, [x19]
+ cbnz x0, .L2997
+ ldr w1, [x29,48]
mov w0, 20051
movk w0, 0x4144, lsl 16
cmp w1, w0
- bne .L2754
- ldr w2, [x19,4]
+ bne .L3005
+ ldr w2, [x29,52]
cmp w2, 512
- bhi .L2754
- adrp x1, :got:gSnSectorData
- add x0, x19, 8
+ bhi .L3005
+ adrp x1, .LANCHOR4
+ add x0, x29, 56
+ add x1, x1, :lo12:.LANCHOR4
uxtw x2, w2
- ldr x1, [x1, #:got_lo12:gSnSectorData]
- bl memcpy
-.L2795:
- mov x0, x21
- mov x1, x19
- b .L2792
-.L2729:
+ add x1, x1, 480
+ b .L3058
+.L2980:
mov w0, 27698
movk w0, 0x4004, lsl 16
cmp w19, w0
- bne .L2763
- adrp x0, .LC149
- add x0, x0, :lo12:.LC149
- b .L2793
-.L2763:
+ bne .L3015
+ adrp x0, .LC152
+ add x0, x0, :lo12:.LC152
+ b .L3055
+.L3015:
mov w0, 27708
movk w0, 0x4004, lsl 16
cmp w19, w0
- bne .L2765
- adrp x0, .LC150
- add x0, x0, :lo12:.LC150
- b .L2793
-.L2765:
- adrp x0, .LC151
- add x0, x0, :lo12:.LC151
-.L2793:
+ bne .L3017
+ adrp x0, .LC153
+ add x0, x0, :lo12:.LC153
+ b .L3055
+.L3017:
+ adrp x0, .LC154
+ add x0, x0, :lo12:.LC154
+.L3055:
bl printk
- add x20, x29, 56
- mov x0, x20
+ add x0, x29, 48
mov x1, x21
mov x2, 520
bl rk_copy_from_user
- cbnz x0, .L2746
- ldr w1, [x20]
+ cbnz x0, .L2997
+ ldr w1, [x29,48]
mov w0, 17227
movk w0, 0x4c4f, lsl 16
cmp w1, w0
- bne .L2799
+ bne .L3062
mov w0, 27708
movk w0, 0x4004, lsl 16
cmp w19, w0
- bne .L2766
- adrp x0, :got:gpDrmKeyInfo
- mov x1, x20
- mov x2, 16
- ldr x0, [x0, #:got_lo12:gpDrmKeyInfo]
- ldr x0, [x0]
+ adrp x0, .LANCHOR4
+ bne .L3018
+ add x0, x0, :lo12:.LANCHOR4
+ ldr x0, [x0,456]
ldr w0, [x0,20]
- str w0, [x20,4]
- strb w0, [x20,8]
+ strb w0, [x29,56]
+ str w0, [x29,52]
+#APP
+// 86 "./arch/arm64/include/asm/thread_info.h" 1
+ mrs x0, sp_el0
+// 0 "" 2
+#NO_APP
+ ldr x1, [x0,8]
mov x0, x21
- bl rk_copy_to_user
- cbz x0, .L2719
- b .L2799
-.L2766:
- adrp x2, :got:SecureBootUnlockTryCount
- mov x3, x2
- ldr x21, [x2, #:got_lo12:SecureBootUnlockTryCount]
- ldr w0, [x21]
- cmp w0, 10
- bhi .L2799
- adrp x0, :got:gpDrmKeyInfo
- ldr w1, [x20,4]
- ldr x0, [x0, #:got_lo12:gpDrmKeyInfo]
- ldr x2, [x0]
- ldr w0, [x2,24]
- cmp w0, w1
- beq .L2767
- cbz w0, .L2767
- adrp x0, .LC152
- add x0, x0, :lo12:.LC152
+#APP
+// 394 "./arch/arm64/include/asm/uaccess.h" 1
+ adds x0, x0, 16; ccmp x0, x1, #2, cc; cset x2, ls
+// 0 "" 2
+#NO_APP
+ cbz x2, .L3062
+ mov x0, x21
+ add x1, x29, 48
+ mov x2, 16
+ bl __arch_copy_to_user
+ cbz x0, .L2970
+ b .L3062
+.L3018:
+ add x20, x0, :lo12:.LANCHOR4
+ ldr w1, [x20,992]
+ cmp w1, 10
+ bhi .L3062
+ ldr x1, [x20,456]
+ ldr w2, [x29,52]
+ ldr w3, [x1,24]
+ cmp w3, w2
+ beq .L3019
+ cbz w3, .L3019
+ adrp x0, .LC155
+ mov w1, w2
+ add x0, x0, :lo12:.LC155
bl printk
- ldr w0, [x21]
+ ldr w0, [x20,992]
add w0, w0, 1
- str w0, [x21]
-.L2799:
+ str w0, [x20,992]
+.L3062:
mov x0, -14
- b .L2719
-.L2767:
- ldr x3, [x3, #:got_lo12:SecureBootUnlockTryCount]
+ b .L2970
+.L3019:
+ add x0, x0, :lo12:.LANCHOR4
+ str wzr, [x0,992]
mov w0, 27698
movk w0, 0x4004, lsl 16
cmp w19, w0
- str wzr, [x3]
- bne .L2768
- str wzr, [x2,20]
- str wzr, [x2,24]
- b .L2769
-.L2768:
+ bne .L3020
+ str wzr, [x1,20]
+ str wzr, [x1,24]
+ b .L3021
+.L3020:
mov w0, 1
- str w1, [x2,24]
- str w0, [x2,20]
-.L2769:
+ str w2, [x1,24]
+ str w0, [x1,20]
+.L3021:
mov w0, 1
- mov x1, x2
mov x19, -2
bl StorageSysDataStore
cmn w0, #1
- bne .L2796
- b .L2745
-.L2741:
- adrp x0, .LC153
- add x20, x29, 56
- add x0, x0, :lo12:.LC153
+ bne .L3060
+ b .L2996
+.L2992:
+ adrp x0, .LC156
+ add x0, x0, :lo12:.LC156
bl printk
- mov x0, x20
+ add x0, x29, 48
mov x1, x21
mov x2, 520
bl rk_copy_from_user
- cbnz x0, .L2746
- ldr w1, [x20]
+ cbnz x0, .L2997
+ ldr w1, [x29,48]
mov w0, 17750
movk w0, 0x444e, lsl 16
cmp w1, w0
- bne .L2754
- ldr w2, [x20,4]
+ bne .L3005
+ ldr w2, [x29,52]
cmp w2, 504
- bhi .L2754
+ bhi .L3005
mov w0, 30224
- uxtw x2, w2
+ adrp x1, .LANCHOR4
movk w0, 0x4004, lsl 16
+ uxtw x2, w2
cmp w19, w0
- add x0, x20, 8
- bne .L2770
- adrp x1, :got:gpVendor0Info
- ldr x1, [x1, #:got_lo12:gpVendor0Info]
- b .L2794
-.L2770:
- adrp x1, :got:gpVendor1Info
- ldr x1, [x1, #:got_lo12:gpVendor1Info]
-.L2794:
- ldr x1, [x1]
+ add x1, x1, :lo12:.LANCHOR4
+ add x0, x29, 56
+ bne .L3022
+ ldr x1, [x1,1000]
+ b .L3056
+.L3022:
+ ldr x1, [x1,1008]
+.L3056:
add x1, x1, 8
+.L3058:
bl memcpy
+#APP
+// 86 "./arch/arm64/include/asm/thread_info.h" 1
+ mrs x0, sp_el0
+// 0 "" 2
+#NO_APP
+ ldr x1, [x0,8]
mov x0, x21
- mov x1, x20
-.L2792:
+#APP
+// 394 "./arch/arm64/include/asm/uaccess.h" 1
+ adds x0, x0, 520; ccmp x0, x1, #2, cc; cset x2, ls
+// 0 "" 2
+#NO_APP
+ cbz x2, .L3062
+ mov x0, x21
+ add x1, x29, 48
mov x2, 520
-.L2791:
- bl rk_copy_to_user
- cbnz x0, .L2799
- b .L2796
-.L2738:
- adrp x0, .LC154
- add x20, x29, 56
- add x0, x0, :lo12:.LC154
+ bl __arch_copy_to_user
+.L3053:
+ cbnz x0, .L3062
+ b .L3060
+.L2989:
+ adrp x0, .LC157
+ add x0, x0, :lo12:.LC157
bl printk
- mov x0, x20
+ add x0, x29, 48
mov x1, x21
mov x2, 520
bl rk_copy_from_user
- cbnz x0, .L2746
- ldr w1, [x20]
+ cbnz x0, .L2997
+ ldr w1, [x29,48]
mov w0, 17750
movk w0, 0x444e, lsl 16
cmp w1, w0
- bne .L2754
- ldr w2, [x20,4]
+ bne .L3005
+ ldr w2, [x29,52]
cmp w2, 504
- bhi .L2754
+ bhi .L3005
mov w0, 30225
add w2, w2, 8
movk w0, 0x4004, lsl 16
cmp w19, w0
- bne .L2772
- adrp x19, :got:gpVendor0Info
- mov x1, x20
- ldr x19, [x19, #:got_lo12:gpVendor0Info]
- ldr x0, [x19]
+ adrp x19, .LANCHOR4
+ add x19, x19, :lo12:.LANCHOR4
+ bne .L3024
+ ldr x0, [x19,1000]
+ add x1, x29, 48
bl memcpy
mov w0, 2
- b .L2797
-.L2772:
- adrp x19, :got:gpVendor1Info
- mov x1, x20
- ldr x19, [x19, #:got_lo12:gpVendor1Info]
- ldr x0, [x19]
+ ldr x1, [x19,1000]
+ b .L3061
+.L3024:
+ ldr x0, [x19,1008]
+ add x1, x29, 48
bl memcpy
+ ldr x1, [x19,1008]
mov w0, 3
-.L2797:
- ldr x1, [x19]
-.L2798:
+.L3061:
bl StorageSysDataStore
uxtw x19, w0
- b .L2745
-.L2796:
+ b .L2996
+.L3060:
mov x19, 0
-.L2745:
- adrp x0, .LC155
+.L2996:
+ adrp x0, .LC158
mov x1, x19
- add x0, x0, :lo12:.LC155
+ add x0, x0, :lo12:.LC158
bl printk
mov x0, x19
- b .L2719
-.L2773:
+ b .L2970
+.L3026:
mov x0, -22
-.L2719:
+.L2970:
+ ldr x2, [x29,568]
+ ldr x1, [x22,#:lo12:__stack_chk_guard]
+ cmp x2, x1
+ beq .L3025
+ bl __stack_chk_fail
+.L3025:
ldp x19, x20, [sp,16]
- ldr x21, [sp,32]
+ ldp x21, x22, [sp,32]
ldp x29, x30, [sp], 48
add sp, sp, 528
ret
.global rk_ftl_storage_sys_init
.type rk_ftl_storage_sys_init, %function
rk_ftl_storage_sys_init:
- adrp x0, :got:g_idb_buffer
- stp x29, x30, [sp, -80]!
+ stp x29, x30, [sp, -48]!
+ mov w2, 512
add x29, sp, 0
- ldr x0, [x0, #:got_lo12:g_idb_buffer]
stp x19, x20, [sp,16]
+ adrp x20, .LANCHOR4
+ add x19, x20, :lo12:.LANCHOR4
stp x21, x22, [sp,32]
- stp x23, x24, [sp,48]
- str x25, [sp,64]
- adrp x21, :got:gpBootConfig
- str xzr, [x0]
- adrp x0, :got:gLoaderBootInfo
- adrp x20, :got:gpVendor0Info
- adrp x19, :got:gpVendor1Info
- ldr x21, [x21, #:got_lo12:gpBootConfig]
- ldr x0, [x0, #:got_lo12:gLoaderBootInfo]
- ldr x1, [x0]
- adrp x0, :got:gpDrmKeyInfo
- str x1, [x21]
- add x2, x1, 512
- ldr x0, [x0, #:got_lo12:gpDrmKeyInfo]
- str x2, [x0]
- add x2, x1, 1024
+ ldr x1, [x19,424]
+ str x1, [x19,472]
+ add x0, x1, 512
+ str x0, [x19,456]
+ add x0, x1, 1024
add x1, x1, 1536
- ldr x0, [x20, #:got_lo12:gpVendor0Info]
- str x2, [x0]
- mov w2, 512
- ldr x0, [x19, #:got_lo12:gpVendor1Info]
- str x1, [x0]
- adrp x0, :got:gSnSectorData
- ldr x0, [x0, #:got_lo12:gSnSectorData]
+ str x0, [x19,1000]
+ add x0, x19, 480
+ str xzr, [x19,448]
+ str x1, [x19,1008]
bl ftl_memcpy
- adrp x1, :got:SecureBootEn
- ldr x0, [x21]
- adrp x3, :got:SecureBootCheckOK
- mov x25, x1
- mov x24, x3
- ldr x22, [x1, #:got_lo12:SecureBootEn]
- ldr w2, [x0,16]
- ldr w23, [x0,508]
- str w2, [x22]
- ldr x2, [x3, #:got_lo12:SecureBootCheckOK]
- str wzr, [x2]
- adrp x2, :got:SecureBootUnlockTryCount
- ldr x2, [x2, #:got_lo12:SecureBootUnlockTryCount]
- str wzr, [x2]
- cbz w23, .L2803
+ ldr x21, [x19,472]
+ str wzr, [x19,464]
+ str wzr, [x19,992]
+ ldr w0, [x21,16]
+ ldr w22, [x21,508]
+ str w0, [x19,468]
+ cbz w22, .L3065
+ mov x0, x21
mov w1, 508
bl JSHash
- cmp w23, w0
- beq .L2803
- ldr x0, [x21]
- str wzr, [x22]
- str wzr, [x0,16]
- adrp x0, .LC156
- add x0, x0, :lo12:.LC156
+ cmp w22, w0
+ beq .L3065
+ adrp x0, .LC159
+ str wzr, [x21,16]
+ add x0, x0, :lo12:.LC159
+ str wzr, [x19,468]
bl printk
-.L2803:
- ldr x1, [x25, #:got_lo12:SecureBootEn]
- ldr w0, [x1]
- cbz w0, .L2805
- ldr x0, [x24, #:got_lo12:SecureBootCheckOK]
+.L3065:
+ add x0, x20, :lo12:.LANCHOR4
+ ldr w1, [x0,468]
+ cbz w1, .L3066
mov w1, 5161
movk w1, 0xc059, lsl 16
- str w1, [x0]
-.L2805:
- ldr x20, [x20, #:got_lo12:gpVendor0Info]
+ str w1, [x0,464]
+.L3066:
+ add x20, x20, :lo12:.LANCHOR4
mov w0, 2
- ldr x1, [x20]
+ ldr x1, [x20,1000]
bl StorageSysDataLoad
- ldr x19, [x19, #:got_lo12:gpVendor1Info]
+ ldr x1, [x20,1008]
mov w0, 3
- ldr x1, [x19]
bl StorageSysDataLoad
- adrp x0, .LANCHOR3
- add x0, x0, :lo12:.LANCHOR3
+ adrp x0, .LANCHOR1
+ add x0, x0, :lo12:.LANCHOR1
+ add x0, x0, 4040
bl misc_register
- ldr x25, [sp,64]
ldp x19, x20, [sp,16]
ldp x21, x22, [sp,32]
- ldp x23, x24, [sp,48]
- ldp x29, x30, [sp], 80
+ ldp x29, x30, [sp], 48
ret
.size rk_ftl_storage_sys_init, .-rk_ftl_storage_sys_init
.align 2
.type StorageSysDataDeInit, %function
StorageSysDataDeInit:
stp x29, x30, [sp, -16]!
- adrp x0, .LANCHOR3
+ adrp x0, .LANCHOR1
+ add x0, x0, :lo12:.LANCHOR1
add x29, sp, 0
- add x0, x0, :lo12:.LANCHOR3
+ add x0, x0, 4040
bl misc_deregister
mov w0, 0
ldp x29, x30, [sp], 16
.global p_map_block_ver_table
.global p_map_block_valid_page_count
.global p_map_block_table
+ .global p_blk_mode_table
.global p_valid_page_count_check_table
.global p_valid_page_count_table
.global g_totle_swl_count
.global gNandcEccBits
.global gpNandc1
.global gpNandc
+ .global g_nandc_version_data
.global gNandcVer
.global gNandChipMap
.global gNandIDataBuf
.global FlashDdrTunningReadCount
+ .global FlashWaitBusyScheduleEn
.global gNandPhyInfo
.global gFlashProgCheckSpareBuffer
.global gFlashProgCheckBuffer
.global gNandMaxChip
.global gNandMaxDie
.global gFlashInterfaceMode
+ .global gFlashSlcMode
.global gFlashOnfiModeEn
.global gFlashToggleModeEn
.global gFlashSdrModeEn
.global read_retry_cur_offset
.section .rodata
.align 3
-.LANCHOR1 = . + 0
- .type __func__.18162, %object
- .size __func__.18162, 11
-__func__.18162:
+.LANCHOR3 = . + 0
+ .type __func__.19127, %object
+ .size __func__.19127, 11
+__func__.19127:
.string "FtlMemInit"
.zero 5
- .type __func__.19016, %object
- .size __func__.19016, 21
-__func__.19016:
+ .type __func__.20003, %object
+ .size __func__.20003, 21
+__func__.20003:
.string "FtlVpcCheckAndModify"
- .section .data.rel.local,"aw",%progbits
- .align 3
- .type rknand_sys_storage_fops, %object
- .size rknand_sys_storage_fops, 216
-rknand_sys_storage_fops:
- .zero 64
- .xword rknand_sys_storage_ioctl
- .xword rknand_sys_storage_ioctl
- .zero 8
- .xword rknand_sys_storage_open
- .zero 8
- .xword rknand_sys_storage_release
- .zero 104
- .data
- .align 3
-.LANCHOR2 = . + 0
- .type NandOptPara, %object
- .size NandOptPara, 128
-NandOptPara:
- .byte 1
- .byte 0
- .byte 49
- .byte 63
- .byte 0
- .byte 49
- .byte -128
- .byte 21
- .byte 0
- .byte 50
- .byte 17
- .byte -128
- .byte 112
- .byte 120
- .byte 120
- .byte 3
- .byte 1
- .byte 0
- .zero 14
- .byte 2
- .byte 0
- .byte 49
- .byte 63
- .byte 0
- .byte 49
- .byte -128
- .byte 21
- .byte 0
- .byte 0
- .byte 17
- .byte -127
- .byte 112
- .byte -15
- .byte -14
- .byte 0
- .byte 0
- .byte 0
- .zero 14
- .byte 3
- .byte 0
- .byte 49
- .byte 63
- .byte 0
- .byte 49
- .byte -128
- .byte 21
- .byte 96
- .byte 96
- .byte 17
- .byte -127
- .byte 112
- .byte -15
- .byte -14
- .byte 0
- .byte 0
- .byte 0
- .zero 14
- .byte 4
- .byte 0
- .byte 49
- .byte 63
- .byte 0
- .byte 49
- .byte -128
- .byte 21
- .byte 96
- .byte 96
- .byte 17
- .byte -127
- .byte 112
- .byte 112
- .byte 112
- .byte 0
- .byte 0
- .byte 0
- .zero 14
- .type ftl_gc_temp_block_bops_scan_page_addr, %object
- .size ftl_gc_temp_block_bops_scan_page_addr, 2
-ftl_gc_temp_block_bops_scan_page_addr:
- .hword -1
- .zero 6
- .type gTable_Crc32, %object
- .size gTable_Crc32, 1024
-gTable_Crc32:
- .word 0
- .word 79760823
- .word 159521646
- .word 222500569
- .word 319043292
- .word 398801771
- .word 445001138
- .word 507977733
- .word 638086584
- .word 583622671
- .word 797603542
- .word 726367073
- .word 890002276
- .word 835540691
- .word 1015955466
- .word 944721341
- .word 1276173168
- .word 1221711559
- .word 1167245342
- .word 1096011177
- .word 1595207084
- .word 1540743195
- .word 1452734146
- .word 1381497717
- .word 1780004552
- .word 1859763071
- .word 1671081382
- .word 1734058001
- .word 2031910932
- .word 2111671715
- .word 1889442682
- .word 1952421581
- .word -1742620960
- .word -1662993577
- .word -1851544178
- .word -1788698567
- .word -1960476612
- .word -1880846965
- .word -2102944942
- .word -2040097051
- .word -1104553128
- .word -1159145745
- .word -1213480906
- .word -1284846207
- .word -1389499004
- .word -1444093901
- .word -1531971862
- .word -1603339427
- .word -734958192
- .word -789553113
- .word -575441154
- .word -646808759
- .word -952804532
- .word -1007397125
- .word -826851294
- .word -898216555
- .word -231145432
- .word -151515745
- .word -71623866
- .word -8775951
- .word -516081932
- .word -436454589
- .word -390124134
- .word -327278547
- .word 880959607
- .word 809725376
- .word 1023441689
- .word 968980142
- .word 663115435
- .word 591878940
- .word 772033989
- .word 717570162
- .word 311037391
- .word 374014072
- .word 453514913
- .word 533273366
- .word 26098451
- .word 89077412
- .word 135012477
- .word 214773194
- .word 2022882055
- .word 2085861040
- .word 1896915049
- .word 1976675806
- .word 1805028827
- .word 1868005484
- .word 1645516469
- .word 1725274882
- .word 1587205823
- .word 1515969288
- .word 1461243345
- .word 1406779494
- .word 1302257763
- .word 1231023572
- .word 1142749965
- .word 1088288442
- .word -1398548841
- .word -1469916384
- .word -1524511239
- .word -1579106226
- .word -1079517109
- .word -1150882308
- .word -1239024859
- .word -1293617518
- .word -1968456913
- .word -1905609064
- .word -2094423999
- .word -2014794250
- .word -1716548109
- .word -1653702588
- .word -1876060515
- .word -1796433110
- .word -525136409
- .word -462290864
- .word -382658935
- .word -303031490
- .word -206095557
- .word -143247732
- .word -97181611
- .word -17551902
- .word -960798625
- .word -1032163864
- .word -818316495
- .word -872909178
- .word -708880765
- .word -780248268
- .word -599962131
- .word -654557094
- .word 1761919214
- .word 1841679705
- .word 1619450752
- .word 1682429495
- .word 2046883378
- .word 2126642053
- .word 1937960284
- .word 2000937195
- .word 1326230870
- .word 1271767265
- .word 1183757880
- .word 1112521615
- .word 1544067978
- .word 1489606205
- .word 1435140324
- .word 1363905875
- .word 622074782
- .word 567612969
- .word 748028144
- .word 676793671
- .word 907029826
- .word 852566261
- .word 1066546732
- .word 995310491
- .word 52196902
- .word 131955601
- .word 178154824
- .word 241131775
- .word 270024954
- .word 349785421
- .word 429546388
- .word 492525091
- .word -249203186
- .word -169575495
- .word -123245216
- .word -60399401
- .word -501137198
- .word -421507739
- .word -341615684
- .word -278768117
- .word -684909642
- .word -739502591
- .word -558956328
- .word -630321809
- .word -1003934358
- .word -1058529059
- .word -844417532
- .word -915784781
- .word -1120555650
- .word -1175150391
- .word -1263028720
- .word -1334395993
- .word -1372480606
- .word -1427073515
- .word -1481408308
- .word -1552773765
- .word -1690451770
- .word -1610822287
- .word -1832920152
- .word -1770072545
- .word -2009467366
- .word -1929839699
- .word -2118390412
- .word -2055544637
- .word 1569104025
- .word 1497869614
- .word 1409596407
- .word 1355134528
- .word 1317180997
- .word 1245944818
- .word 1191218475
- .word 1136754844
- .word 2072956193
- .word 2135933078
- .word 1913443919
- .word 1993202680
- .word 1753938941
- .word 1816917578
- .word 1627971731
- .word 1707732260
- .word 295074793
- .word 358053470
- .word 403988615
- .word 483749168
- .word 43142453
- .word 106119298
- .word 185620059
- .word 265378796
- .word 933107281
- .word 861871078
- .word 1042025791
- .word 987562120
- .word 614080653
- .word 542846266
- .word 756562915
- .word 702101076
- .word -978905479
- .word -1050272818
- .word -869987049
- .word -924581728
- .word -693952347
- .word -765317870
- .word -551470133
- .word -606062980
- .word -475038783
- .word -412191114
- .word -366124881
- .word -286495464
- .word -257209059
- .word -194363222
- .word -114731405
- .word -35103804
- .word -1984443127
- .word -1921597250
- .word -2143955353
- .word -2064327728
- .word -1699480619
- .word -1636632990
- .word -1825447749
- .word -1745818356
- .word -1346395983
- .word -1417761530
- .word -1505903649
- .word -1560496536
- .word -1128556947
- .word -1199924262
- .word -1254519549
- .word -1309114188
- .type power_up_flag, %object
- .size power_up_flag, 4
-power_up_flag:
- .word 1
- .type gFtlInitStatus, %object
- .size gFtlInitStatus, 4
-gFtlInitStatus:
- .word -1
- .type ToshibaRefValue, %object
- .size ToshibaRefValue, 8
-ToshibaRefValue:
- .byte 0
- .byte 4
- .byte 124
- .byte 120
- .byte 116
- .byte 8
- .byte 12
- .byte 112
- .type Toshiba15RefValue, %object
- .size Toshiba15RefValue, 95
-Toshiba15RefValue:
- .byte 4
- .byte 5
- .byte 6
- .byte 7
- .byte 13
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 2
- .byte 4
- .byte 2
- .byte 0
- .byte 0
- .byte 8
- .byte 8
- .byte 0
- .byte 0
- .byte 0
- .byte 124
- .byte 0
- .byte 124
- .byte 124
- .byte 0
- .byte 122
- .byte 0
- .byte 122
- .byte 122
- .byte 0
- .byte 11
- .byte 126
- .byte 118
- .byte 116
- .byte 0
- .byte 120
- .byte 2
- .byte 120
- .byte 122
- .byte 0
- .byte 126
- .byte 4
- .byte 126
- .byte 122
- .byte 0
- .byte 16
- .byte 118
- .byte 114
- .byte 112
- .byte 0
- .byte 118
- .byte 4
- .byte 118
- .byte 120
- .byte 0
- .byte 4
- .byte 4
- .byte 4
- .byte 118
- .byte 0
- .byte 2
- .byte 0
- .byte 126
- .byte 124
- .byte 0
- .byte 6
- .byte 10
- .byte 6
- .byte 2
- .byte 0
- .byte 116
- .byte 124
- .byte 116
- .byte 118
- .byte 0
- .byte 4
- .byte 4
- .byte 124
- .byte 126
- .byte 0
- .byte 0
- .byte 124
- .byte 120
- .byte 120
- .byte 0
- .byte 124
- .byte 118
- .byte 116
- .byte 114
- .byte 0
- .zero 1
- .type ToshibaA19RefValue, %object
- .size ToshibaA19RefValue, 45
-ToshibaA19RefValue:
- .byte 4
- .byte 5
- .byte 6
- .byte 7
- .byte 13
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 4
- .byte 4
- .byte 124
- .byte 126
- .byte 0
- .byte 0
- .byte 124
- .byte 120
- .byte 120
- .byte 0
- .byte 124
- .byte 118
- .byte 116
- .byte 114
- .byte 0
- .byte 8
- .byte 8
- .byte 0
- .byte 0
- .byte 0
- .byte 11
- .byte 126
- .byte 118
- .byte 116
- .byte 0
- .byte 16
- .byte 118
- .byte 114
- .byte 112
- .byte 0
- .byte 2
- .byte 0
- .byte 126
- .byte 124
- .byte 0
- .zero 3
- .type SamsungRefValue, %object
- .size SamsungRefValue, 64
-SamsungRefValue:
- .byte -89
- .byte -92
- .byte -91
- .byte -90
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 5
- .byte 10
- .byte 0
- .byte 0
- .byte 40
- .byte 0
- .byte -20
- .byte -40
- .byte -19
- .byte -11
- .byte -19
- .byte -26
- .byte 10
- .byte 15
- .byte 5
- .byte 0
- .byte 15
- .byte 10
- .byte -5
- .byte -20
- .byte -24
- .byte -17
- .byte -24
- .byte -36
- .byte -15
- .byte -5
- .byte -2
- .byte -16
- .byte 10
- .byte 0
- .byte -5
- .byte -20
- .byte -48
- .byte -30
- .byte -48
- .byte -62
- .byte 20
- .byte 15
- .byte -5
- .byte -20
- .byte -24
- .byte -5
- .byte -24
- .byte -36
- .byte 30
- .byte 20
- .byte -5
- .byte -20
- .byte -5
- .byte -1
- .byte -5
- .byte -8
- .byte 7
- .byte 12
- .byte 2
- .byte 0
- .type refValueDefault, %object
- .size refValueDefault, 28
-refValueDefault:
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 6
- .byte 10
- .byte 6
- .byte 0
- .byte -3
- .byte -7
- .byte -8
- .byte 0
- .byte -6
- .byte -13
- .byte -15
- .byte 0
- .byte -11
- .byte -20
- .byte -23
- .byte 0
- .byte 0
- .byte -26
- .byte -30
- .byte 0
- .byte 0
- .byte -32
- .byte -37
- .zero 4
- .type random_seed, %object
- .size random_seed, 256
-random_seed:
- .hword 22378
- .hword 1512
- .hword 25245
- .hword 17827
- .hword 25756
- .hword 19440
- .hword 9026
- .hword 10030
- .hword 29528
- .hword 20467
- .hword 29676
- .hword 24432
- .hword 31328
- .hword 6872
- .hword 13426
- .hword 13842
- .hword 8783
- .hword 1108
- .hword 782
- .hword 28837
- .hword 30729
- .hword 9505
- .hword 18676
- .hword 23085
- .hword 18730
- .hword 1085
- .hword 32609
- .hword 14697
- .hword 20858
- .hword 15170
- .hword 30365
- .hword 1607
- .hword 32298
- .hword 4995
- .hword 18905
- .hword 1976
- .hword 9592
- .hword 20204
- .hword 17443
- .hword 13615
- .hword 23330
- .hword 29369
- .hword 13947
- .hword 9398
- .hword 32398
- .hword 8984
- .hword 27600
- .hword 21785
- .hword 6019
- .hword 6311
- .hword 31598
- .hword 30210
- .hword 19327
- .hword 13896
- .hword 11347
- .hword 27545
- .hword 3107
- .hword 26575
- .hword 32270
- .hword 19852
- .hword 20601
- .hword 8349
- .hword 9290
- .hword 29819
- .hword 13579
- .hword 3661
- .hword 28676
- .hword 27331
- .hword 32574
- .hword 8693
- .hword 31253
- .hword 9081
- .hword 5399
- .hword 6842
- .hword 20087
- .hword 5537
- .hword 1274
- .hword 11617
- .hword 9530
- .hword 4866
- .hword 8035
- .hword 23219
- .hword 1178
- .hword 23272
- .hword 7383
- .hword 18944
- .hword 12488
- .hword 12871
- .hword 29340
- .hword 20532
- .hword 11022
- .hword 22514
- .hword 228
- .hword 22363
- .hword 24978
- .hword 14584
- .hword 12138
- .hword 3092
- .hword 17916
- .hword 16863
- .hword 14554
- .hword 31457
- .hword 29474
- .hword 25311
- .hword 24121
- .hword 3684
- .hword 28037
- .hword 22865
- .hword 22839
- .hword 25217
- .hword 13217
- .hword 27186
- .hword 14938
- .hword 11180
- .hword 29754
- .hword 24180
- .hword 15150
- .hword 32455
- .hword 20434
- .hword 23848
- .hword 29983
- .hword 16120
- .hword 14769
- .hword 20041
- .hword 29803
- .hword 28406
- .hword 17598
- .hword 28087
- .type gSlcNandParaInfo, %object
- .size gSlcNandParaInfo, 32
-gSlcNandParaInfo:
- .byte 2
- .byte -104
- .byte -15
- .byte 0
- .byte 0
- .byte 0
- .byte 0
- .byte 1
- .byte 1
- .byte 4
- .hword 64
- .byte 1
- .byte 1
- .hword 1024
- .hword 256
- .byte 0
- .byte 0
- .byte 16
- .byte 40
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .type gNandParaInfo, %object
- .size gNandParaInfo, 32
-gNandParaInfo:
- .byte 0
- .byte 0
- .zero 5
- .byte 0
- .byte 1
- .byte 8
- .hword 128
- .byte 2
- .byte 1
- .hword 2048
- .hword 0
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .type NandFlashParaTbl, %object
- .size NandFlashParaTbl, 2112
-NandFlashParaTbl:
- .byte 6
- .byte 44
- .byte 100
- .byte 68
- .byte 75
- .byte -87
- .byte 0
- .byte 4
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 479
- .byte 3
- .byte 17
- .byte 40
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte 68
- .byte 68
- .byte 75
- .byte -87
- .byte 0
- .byte 4
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 1064
- .hword 479
- .byte 3
- .byte 17
- .byte 40
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte 104
- .byte 4
- .byte 74
- .byte -87
- .byte 0
- .byte 4
- .byte 1
- .byte 8
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 287
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 5
- .byte 44
- .byte -120
- .byte 4
- .byte 75
- .byte -87
- .byte 0
- .byte 4
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 287
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte -88
- .byte 5
- .byte -53
- .byte -87
- .byte 0
- .byte 4
- .byte 2
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 287
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte 104
- .byte 4
- .byte 70
- .byte -119
- .byte 0
- .byte 4
- .byte 1
- .byte 8
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 287
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte 72
- .byte 4
- .byte 74
- .byte -91
- .byte 0
- .byte 4
- .byte 1
- .byte 8
- .hword 256
- .byte 2
- .byte 2
- .hword 1024
- .hword 287
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte -124
- .byte 100
- .byte 60
- .byte -91
- .byte 0
- .byte 4
- .byte 1
- .byte 32
- .hword 512
- .byte 2
- .byte 2
- .hword 1024
- .hword 479
- .byte 3
- .byte 17
- .byte 40
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte -124
- .byte 100
- .byte 84
- .byte -87
- .byte 0
- .byte 4
- .byte 1
- .byte 32
- .hword 512
- .byte 2
- .byte 2
- .hword 1024
- .hword 479
- .byte 4
- .byte 18
- .byte 60
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte -41
- .byte -108
- .byte 62
- .byte -124
- .byte 0
- .byte 4
- .byte 1
- .byte 8
- .hword 128
- .byte 2
- .byte 2
- .hword 4096
- .hword 279
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte 72
- .byte 4
- .byte 70
- .byte -123
- .byte 0
- .byte 4
- .byte 1
- .byte 8
- .hword 256
- .byte 2
- .byte 2
- .hword 1024
- .hword 287
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte -120
- .byte 5
- .byte -58
- .byte -119
- .byte 0
- .byte 4
- .byte 2
- .byte 8
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 287
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 5
- .byte 44
- .byte -120
- .byte 36
- .byte 75
- .byte -87
- .byte 0
- .byte 4
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 287
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte 104
- .byte 0
- .byte 39
- .byte -87
- .byte 0
- .byte 4
- .byte 1
- .byte 16
- .hword 128
- .byte 1
- .byte 2
- .hword 2048
- .hword 287
- .byte 0
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 5
- .byte 44
- .byte 100
- .byte 100
- .byte 86
- .byte -91
- .byte 0
- .byte 4
- .byte 1
- .byte 24
- .hword 512
- .byte 2
- .byte 2
- .hword 700
- .hword 479
- .byte 4
- .byte 18
- .byte 60
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte -124
- .byte -59
- .byte 75
- .byte -87
- .byte 0
- .byte 4
- .byte 2
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 479
- .byte 3
- .byte 17
- .byte 40
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 44
- .byte -43
- .byte -47
- .byte -90
- .byte 104
- .byte 0
- .byte 4
- .byte 2
- .byte 8
- .hword 64
- .byte 1
- .byte 2
- .hword 2048
- .hword 279
- .byte 0
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -34
- .byte -108
- .byte -46
- .byte 4
- .byte 67
- .byte 2
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 473
- .byte 1
- .byte 1
- .byte 24
- .byte 32
- .byte 4
- .byte 0
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -41
- .byte -108
- .byte -38
- .byte 116
- .byte -61
- .byte 2
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 1024
- .hword 473
- .byte 1
- .byte 2
- .byte 40
- .byte 32
- .byte 4
- .byte 0
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -41
- .byte -108
- .byte -111
- .byte 96
- .byte 68
- .byte 2
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 1046
- .hword 473
- .byte 1
- .byte 3
- .byte 40
- .byte 32
- .byte 4
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -34
- .byte -108
- .byte -38
- .byte 116
- .byte -60
- .byte 2
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2090
- .hword 473
- .byte 1
- .byte 4
- .byte 40
- .byte 32
- .byte 4
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -34
- .byte -108
- .byte -21
- .byte 116
- .byte 68
- .byte 2
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1066
- .hword 473
- .byte 1
- .byte 3
- .byte 40
- .byte 32
- .byte 4
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -43
- .byte -108
- .byte -38
- .byte 116
- .byte -60
- .byte 2
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 530
- .hword 473
- .byte 1
- .byte 3
- .byte 40
- .byte 32
- .byte 4
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -41
- .byte -108
- .byte -102
- .byte 116
- .byte 66
- .byte 2
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 1024
- .hword 281
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 4
- .byte 0
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -34
- .byte 20
- .byte -89
- .byte 66
- .byte 74
- .byte 2
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1060
- .hword 473
- .byte 2
- .byte 5
- .byte 40
- .byte 32
- .byte 4
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -41
- .byte 20
- .byte -98
- .byte 52
- .byte 74
- .byte 2
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 1056
- .hword 473
- .byte 2
- .byte 5
- .byte 40
- .byte 32
- .byte 4
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -34
- .byte -108
- .byte -89
- .byte 66
- .byte 72
- .byte 2
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1060
- .hword 473
- .byte 2
- .byte 5
- .byte 40
- .byte 32
- .byte 4
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte -34
- .byte 20
- .byte -85
- .byte 66
- .byte 74
- .byte 2
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1056
- .hword 1497
- .byte 2
- .byte 6
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -83
- .byte 58
- .byte 20
- .byte -85
- .byte 66
- .byte 74
- .byte 2
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 2092
- .hword 1497
- .byte 2
- .byte 5
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -119
- .byte 100
- .byte 68
- .byte 75
- .byte -87
- .byte 0
- .byte 7
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 479
- .byte 3
- .byte 17
- .byte 40
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -119
- .byte -120
- .byte 36
- .byte 75
- .byte -87
- .byte -124
- .byte 7
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 479
- .byte 3
- .byte 17
- .byte 40
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -119
- .byte -120
- .byte 36
- .byte 75
- .byte -87
- .byte 0
- .byte 7
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 279
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -119
- .byte 104
- .byte 36
- .byte 74
- .byte -87
- .byte 0
- .byte 7
- .byte 1
- .byte 8
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 279
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -119
- .byte 104
- .byte 4
- .byte 74
- .byte -87
- .byte 0
- .byte 7
- .byte 1
- .byte 8
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 279
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -119
- .byte -41
- .byte -108
- .byte 62
- .byte -124
- .byte 0
- .byte 7
- .byte 1
- .byte 8
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 279
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -119
- .byte 104
- .byte 4
- .byte 70
- .byte -87
- .byte 0
- .byte 7
- .byte 1
- .byte 8
- .hword 256
- .byte 2
- .byte 2
- .hword 2048
- .hword 279
- .byte 1
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 0
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -41
- .byte -124
- .byte -109
- .byte 114
- .byte 87
- .byte 1
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 1
- .hword 1060
- .hword 1473
- .byte 2
- .byte 33
- .byte 40
- .byte 32
- .byte 2
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -34
- .byte -124
- .byte -109
- .byte 114
- .byte 87
- .byte 1
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 1
- .hword 2092
- .hword 1473
- .byte 2
- .byte 33
- .byte 40
- .byte 32
- .byte 2
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte 58
- .byte -123
- .byte -109
- .byte 118
- .byte 87
- .byte 1
- .byte 2
- .byte 32
- .hword 256
- .byte 2
- .byte 1
- .hword 2092
- .hword 1505
- .byte 2
- .byte 33
- .byte 40
- .byte 32
- .byte 2
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -43
- .byte -124
- .byte 50
- .byte 114
- .byte 86
- .byte 1
- .byte 1
- .byte 16
- .hword 128
- .byte 2
- .byte 1
- .hword 2056
- .hword 1473
- .byte 2
- .byte 33
- .byte 40
- .byte 32
- .byte 2
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -41
- .byte -108
- .byte 50
- .byte 118
- .byte 86
- .byte 1
- .byte 1
- .byte 16
- .hword 128
- .byte 2
- .byte 2
- .hword 2058
- .hword 1489
- .byte 2
- .byte 33
- .byte 40
- .byte 32
- .byte 2
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -34
- .byte -108
- .byte -126
- .byte 118
- .byte 86
- .byte 1
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2062
- .hword 1489
- .byte 1
- .byte 33
- .byte 40
- .byte 32
- .byte 2
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -34
- .byte -108
- .byte -109
- .byte 118
- .byte 80
- .byte 1
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1066
- .hword 1497
- .byte 2
- .byte 34
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte 58
- .byte -107
- .byte -109
- .byte 122
- .byte 80
- .byte 1
- .byte 2
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1066
- .hword 1497
- .byte 2
- .byte 34
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -41
- .byte -108
- .byte 50
- .byte 118
- .byte 85
- .byte 1
- .byte 1
- .byte 16
- .hword 128
- .byte 2
- .byte 2
- .hword 2050
- .hword 401
- .byte 2
- .byte 0
- .byte 24
- .byte 32
- .byte 1
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -34
- .byte -108
- .byte -109
- .byte 118
- .byte 87
- .byte 1
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1058
- .hword 1497
- .byte 2
- .byte 33
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -41
- .byte -124
- .byte -109
- .byte 114
- .byte 80
- .byte 1
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 1
- .hword 1060
- .hword 1473
- .byte 2
- .byte 34
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -34
- .byte -108
- .byte -109
- .byte 118
- .byte 81
- .byte 1
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1074
- .hword 1497
- .byte 2
- .byte 35
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 4
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte 58
- .byte -108
- .byte -109
- .byte 118
- .byte 81
- .byte 1
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 2106
- .hword 1497
- .byte 2
- .byte 35
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 4
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -104
- .byte -41
- .byte -124
- .byte -109
- .byte 114
- .byte 81
- .byte 1
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 1
- .hword 1056
- .hword 1497
- .byte 2
- .byte 35
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 4
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte -34
- .byte -108
- .byte -109
- .byte 118
- .byte 87
- .byte 8
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1058
- .hword 1497
- .byte 2
- .byte 66
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte -41
- .byte -124
- .byte -109
- .byte 114
- .byte 87
- .byte 8
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 1
- .hword 1060
- .hword 1473
- .byte 2
- .byte 66
- .byte 40
- .byte 32
- .byte 2
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte -34
- .byte -92
- .byte -126
- .byte 118
- .byte 86
- .byte 8
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2082
- .hword 473
- .byte 1
- .byte 65
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte -34
- .byte -108
- .byte -109
- .byte 118
- .byte 80
- .byte 8
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1066
- .hword 1497
- .byte 2
- .byte 67
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte -41
- .byte -124
- .byte -109
- .byte 114
- .byte 80
- .byte 8
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 1
- .hword 1060
- .hword 1473
- .byte 2
- .byte 67
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte -34
- .byte -92
- .byte -126
- .byte 118
- .byte -41
- .byte 8
- .byte 1
- .byte 16
- .hword 256
- .byte 2
- .byte 2
- .hword 2090
- .hword 1241
- .byte 1
- .byte 66
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte -34
- .byte -124
- .byte -109
- .byte 114
- .byte 87
- .byte 8
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 1
- .hword 2092
- .hword 1473
- .byte 2
- .byte 66
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte 58
- .byte -108
- .byte -109
- .byte 118
- .byte 81
- .byte 8
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 2106
- .hword 1497
- .byte 2
- .byte 68
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 4
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte -34
- .byte -108
- .byte -109
- .byte 118
- .byte 81
- .byte 8
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 1074
- .hword 1497
- .byte 2
- .byte 68
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 4
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte 69
- .byte 58
- .byte -92
- .byte -109
- .byte 122
- .byte 80
- .byte 8
- .byte 1
- .byte 32
- .hword 256
- .byte 2
- .byte 2
- .hword 2138
- .hword 1497
- .byte 2
- .byte 0
- .byte 40
- .byte 32
- .byte 3
- .byte 1
- .byte 1
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -20
- .byte -41
- .byte -108
- .byte 126
- .byte 100
- .byte 68
- .byte 0
- .byte 1
- .byte 16
- .hword 128
- .byte 2
- .byte 2
- .hword 2048
- .hword 473
- .byte 2
- .byte 49
- .byte 60
- .byte 36
- .byte 3
- .byte 0
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -20
- .byte -34
- .byte -43
- .byte 126
- .byte 104
- .byte 68
- .byte 0
- .byte 2
- .byte 16
- .hword 128
- .byte 2
- .byte 2
- .hword 2048
- .hword 505
- .byte 2
- .byte 49
- .byte 60
- .byte 36
- .byte 3
- .byte 0
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -20
- .byte -41
- .byte -108
- .byte 122
- .byte 84
- .byte 67
- .byte 0
- .byte 1
- .byte 16
- .hword 128
- .byte 2
- .byte 2
- .hword 2076
- .hword 409
- .byte 2
- .byte 0
- .byte 40
- .byte 36
- .byte 3
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -20
- .byte -34
- .byte -43
- .byte 122
- .byte 88
- .byte 67
- .byte 0
- .byte 2
- .byte 16
- .hword 128
- .byte 2
- .byte 2
- .hword 2076
- .hword 441
- .byte 2
- .byte 0
- .byte 40
- .byte 36
- .byte 3
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -20
- .byte -43
- .byte -108
- .byte 118
- .byte 84
- .byte 67
- .byte 0
- .byte 1
- .byte 16
- .hword 128
- .byte 2
- .byte 2
- .hword 1038
- .hword 281
- .byte 2
- .byte 0
- .byte 24
- .byte 36
- .byte 3
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
- .byte 6
- .byte -20
- .byte -41
- .byte 20
- .byte 118
- .byte 84
- .byte -62
- .byte 0
- .byte 1
- .byte 16
- .hword 128
- .byte 2
- .byte 2
- .hword 2076
- .hword 1169
- .byte 2
- .byte 0
- .byte 24
- .byte 40
- .byte 3
- .byte 1
- .byte 3
- .byte 0
- .byte 0
- .zero 5
.section .rodata.str1.1,"aMS",%progbits,1
.LC0:
.string "Context allocation failed\n"
.LC1:
- .string "phyBlk = 0x%x die = %d block_in_die = 0x%x 0x%8x\n"
+ .string "FlashEraseBlocks pageAddr error %x\n"
.LC2:
- .string "FLASH INFO:\n"
+ .string "phyBlk = 0x%x die = %d block_in_die = 0x%x 0x%8x\n"
.LC3:
- .string "FLASH ID: %x\n"
+ .string "FLASH INFO:\n"
.LC4:
- .string "Device Capacity: %d MB\n"
+ .string "FLASH ID: %x\n"
.LC5:
- .string "FMWAIT: %x %x %x %x\n"
+ .string "Device Capacity: %d MB\n"
.LC6:
- .string "FTL INFO:\n"
+ .string "FMWAIT: %x %x %x %x\n"
.LC7:
- .string "g_MaxLpn = 0x%x\n"
+ .string "FTL INFO:\n"
.LC8:
- .string "g_VaildLpn = 0x%x\n"
+ .string "g_MaxLpn = 0x%x\n"
.LC9:
- .string "read_page_count = 0x%x\n"
+ .string "g_VaildLpn = 0x%x\n"
.LC10:
- .string "discard_page_count = 0x%x\n"
+ .string "read_page_count = 0x%x\n"
.LC11:
- .string "write_page_count = 0x%x\n"
+ .string "discard_page_count = 0x%x\n"
.LC12:
- .string "cache_write_count = 0x%x\n"
+ .string "write_page_count = 0x%x\n"
.LC13:
- .string "l2p_write_count = 0x%x\n"
+ .string "cache_write_count = 0x%x\n"
.LC14:
- .string "gc_page_count = 0x%x\n"
+ .string "l2p_write_count = 0x%x\n"
.LC15:
- .string "totle_write = %d MB\n"
+ .string "gc_page_count = 0x%x\n"
.LC16:
- .string "totle_read = %d MB\n"
+ .string "totle_write = %d MB\n"
.LC17:
- .string "GSV = 0x%x\n"
+ .string "totle_read = %d MB\n"
.LC18:
- .string "GDV = 0x%x\n"
+ .string "GSV = 0x%x\n"
.LC19:
- .string "bad blk num = %d %d\n"
+ .string "GDV = 0x%x\n"
.LC20:
- .string "free_superblocks = 0x%x\n"
+ .string "bad blk num = %d %d\n"
.LC21:
- .string "mlc_EC = 0x%x\n"
+ .string "free_superblocks = 0x%x\n"
.LC22:
- .string "slc_EC = 0x%x\n"
+ .string "mlc_EC = 0x%x\n"
.LC23:
- .string "avg_EC = 0x%x\n"
+ .string "slc_EC = 0x%x\n"
.LC24:
- .string "sys_EC = 0x%x\n"
+ .string "avg_EC = 0x%x\n"
.LC25:
- .string "max_EC = 0x%x\n"
+ .string "sys_EC = 0x%x\n"
.LC26:
- .string "min_EC = 0x%x\n"
+ .string "max_EC = 0x%x\n"
.LC27:
- .string "PLT = 0x%x\n"
+ .string "min_EC = 0x%x\n"
.LC28:
- .string "POT = 0x%x\n"
+ .string "PLT = 0x%x\n"
.LC29:
- .string "MaxSector = 0x%x\n"
+ .string "POT = 0x%x\n"
.LC30:
- .string "init_sys_blks_pp = 0x%x\n"
+ .string "MaxSector = 0x%x\n"
.LC31:
- .string "sys_blks_pp = 0x%x\n"
+ .string "init_sys_blks_pp = 0x%x\n"
.LC32:
- .string "free sysblock = 0x%x\n"
+ .string "sys_blks_pp = 0x%x\n"
.LC33:
- .string "data_blks_pp = 0x%x\n"
+ .string "free sysblock = 0x%x\n"
.LC34:
- .string "data_op_blks_pp = 0x%x\n"
+ .string "data_blks_pp = 0x%x\n"
.LC35:
- .string "max_data_blks = 0x%x\n"
+ .string "data_op_blks_pp = 0x%x\n"
.LC36:
- .string "Sys.id = 0x%x\n"
+ .string "max_data_blks = 0x%x\n"
.LC37:
- .string "Bbt.id = 0x%x\n"
+ .string "Sys.id = 0x%x\n"
.LC38:
- .string "ACT.page = 0x%x\n"
+ .string "Bbt.id = 0x%x\n"
.LC39:
- .string "ACT.plane = 0x%x\n"
+ .string "ACT.page = 0x%x\n"
.LC40:
- .string "ACT.id = 0x%x\n"
+ .string "ACT.plane = 0x%x\n"
.LC41:
- .string "ACT.mode = 0x%x\n"
+ .string "ACT.id = 0x%x\n"
.LC42:
- .string "ACT.a_pages = 0x%x\n"
+ .string "ACT.mode = 0x%x\n"
.LC43:
- .string "ACT VPC = 0x%x\n"
+ .string "ACT.a_pages = 0x%x\n"
.LC44:
- .string "BUF.page = 0x%x\n"
+ .string "ACT VPC = 0x%x\n"
.LC45:
- .string "BUF.plane = 0x%x\n"
+ .string "BUF.page = 0x%x\n"
.LC46:
- .string "BUF.id = 0x%x\n"
+ .string "BUF.plane = 0x%x\n"
.LC47:
- .string "BUF.mode = 0x%x\n"
+ .string "BUF.id = 0x%x\n"
.LC48:
- .string "BUF.a_pages = 0x%x\n"
+ .string "BUF.mode = 0x%x\n"
.LC49:
- .string "BUF VPC = 0x%x\n"
+ .string "BUF.a_pages = 0x%x\n"
.LC50:
- .string "TMP.page = 0x%x\n"
+ .string "BUF VPC = 0x%x\n"
.LC51:
- .string "TMP.plane = 0x%x\n"
+ .string "TMP.page = 0x%x\n"
.LC52:
- .string "TMP.id = 0x%x\n"
+ .string "TMP.plane = 0x%x\n"
.LC53:
- .string "TMP.mode = 0x%x\n"
+ .string "TMP.id = 0x%x\n"
.LC54:
- .string "TMP.a_pages = 0x%x\n"
+ .string "TMP.mode = 0x%x\n"
.LC55:
- .string "GC.page = 0x%x\n"
+ .string "TMP.a_pages = 0x%x\n"
.LC56:
- .string "GC.plane = 0x%x\n"
+ .string "GC.page = 0x%x\n"
.LC57:
- .string "GC.id = 0x%x\n"
+ .string "GC.plane = 0x%x\n"
.LC58:
- .string "GC.mode = 0x%x\n"
+ .string "GC.id = 0x%x\n"
.LC59:
- .string "GC.a_pages = 0x%x\n"
+ .string "GC.mode = 0x%x\n"
.LC60:
- .string "WR_CHK = 0x%x %x %x %x\n"
+ .string "GC.a_pages = 0x%x\n"
.LC61:
- .string "Read Err Cnt = 0x%x\n"
+ .string "WR_CHK = 0x%x %x %x %x\n"
.LC62:
- .string "Prog Err Cnt = 0x%x\n"
+ .string "Read Err Cnt = 0x%x\n"
.LC63:
- .string "gc_free_blk_th= 0x%x\n"
+ .string "Prog Err Cnt = 0x%x\n"
.LC64:
- .string "gc_merge_free_blk_th= 0x%x\n"
+ .string "gc_free_blk_th= 0x%x\n"
.LC65:
- .string "gc_skip_write_count= 0x%x\n"
+ .string "gc_merge_free_blk_th= 0x%x\n"
.LC66:
- .string "gc_blk_index= 0x%x\n"
+ .string "gc_skip_write_count= 0x%x\n"
.LC67:
- .string "free min EC= 0x%x\n"
+ .string "gc_blk_index= 0x%x\n"
.LC68:
- .string "free max EC= 0x%x\n"
+ .string "free min EC= 0x%x\n"
.LC69:
- .string "GC__SB VPC = 0x%x\n"
+ .string "free max EC= 0x%x\n"
.LC70:
- .string "%d. [0x%x]=0x%x 0x%x 0x%x\n"
+ .string "GC__SB VPC = 0x%x\n"
.LC71:
- .string "free %d. [0x%x] 0x%x 0x%x\n"
+ .string "%d. [0x%x]=0x%x 0x%x 0x%x\n"
.LC72:
- .string "%s\n"
+ .string "free %d. [0x%x] 0x%x 0x%x\n"
.LC73:
- .string "FTL version: 5.0.31 20160315"
+ .string "%s\n"
.LC74:
- .string "GetSwlReplaceBlock min_ec_id =%x %x\n"
+ .string "FTL version: 5.0.36 20170316"
.LC75:
- .string "swblk %x ,avg = %x max= %x vpc= %x,ec=%x ,max ec=%x\n"
+ .string "GetSwlReplaceBlock min_ec_id =%x %x\n"
.LC76:
- .string "FtlGcRefreshBlock 0x%x \n"
+ .string "swblk %x ,avg = %x max= %x vpc= %x,ec=%x ,max ec=%x\n"
.LC77:
- .string "FtlGcMarkBadPhyBlk %d 0x%x\n"
+ .string "FtlGcRefreshBlock 0x%x\n"
.LC78:
- .string "%s error allocating memory. return -1\n"
+ .string "FtlGcMarkBadPhyBlk %d 0x%x\n"
.LC79:
- .string "%s 0x%x:"
+ .string "%s error allocating memory. return -1\n"
.LC80:
- .string "%x "
+ .string "%s 0x%x:"
.LC81:
- .string ""
+ .string "%x "
.LC82:
- .string "%d statReg->V6.mtrans_cnt=%d flReg.V6.page_num=%d\n"
+ .string ""
.LC83:
- .string "nandc:"
+ .string "%d statReg->V6.mtrans_cnt=%d flReg.V6.page_num=%d\n"
.LC84:
- .string "%d flReg.d32=%x %x\n"
+ .string "nandc:"
.LC85:
- .string "sdr read ok %x ecc=%d\n"
+ .string "%d flReg.d32=%x %x\n"
.LC86:
- .string "sync para %d\n"
+ .string "sdr read ok %x ecc=%d\n"
.LC87:
- .string "TOG mode Read error %x %x\n"
+ .string "sync para %d\n"
.LC88:
- .string "read retry status %x %x %x\n"
+ .string "TOG mode Read error %x %x\n"
.LC89:
- .string "ECC:%d\n"
+ .string "read retry status %x %x %x\n"
.LC90:
- .string "No.%d FLASH ID:%x %x %x %x %x %x\n"
+ .string "ECC:%d\n"
.LC91:
- .string "FlashLoadPhyInfo fail %x!!\n"
+ .string "No.%d FLASH ID:%x %x %x %x %x %x\n"
.LC92:
- .string "ReadRetry pageadd=%x ecc=%x err=%x\n"
+ .string "FlashLoadPhyInfo fail %x!!\n"
.LC93:
.string "Read pageadd=%x ecc=%x err=%x\n"
.LC94:
- .string "spare:"
+ .string "data:"
.LC95:
- .string "FLFB:%d %d\n"
+ .string "spare:"
.LC96:
- .string "no ect"
+ .string "ReadRetry pageadd=%x ecc=%x err=%x\n"
.LC97:
- .string "slc mode"
+ .string "FLFB:%d %d\n"
.LC98:
.string "prog error: = %x\n"
.LC99:
.LC101:
.string "prog read d error: = %x %x %x\n"
.LC102:
- .string "FlashMakeFactorBbt %d\n"
+ .string "no ect"
.LC103:
- .string "bad block:%d %d\n"
+ .string "slc mode"
.LC104:
- .string "FMFB:%d %d\n"
+ .string "FlashMakeFactorBbt %d\n"
.LC105:
- .string "E:bad block:%d\n"
+ .string "bad block:%d %d\n"
.LC106:
- .string "FMFB:Save %d %d\n"
+ .string "FMFB:%d %d\n"
.LC107:
- .string "FtlBbmTblFlush id=%x,page=%x,previd=%x cnt=%d\n"
+ .string "E:bad block:%d\n"
.LC108:
- .string "FtlBbmTblFlush error:%x\n"
+ .string "FMFB:Save %d %d\n"
.LC109:
- .string "FtlGcFreeBadSuperBlk 0x%x\n"
+ .string "FtlBbmTblFlush id=%x,page=%x,previd=%x cnt=%d\n"
.LC110:
- .string "decrement_vpc_count %x = %d\n"
+ .string "FtlBbmTblFlush error:%x\n"
.LC111:
- .string "spuer block %x vpn is 0\n "
+ .string "FtlGcFreeBadSuperBlk 0x%x\n"
.LC112:
- .string "...%s enter...\n"
+ .string "decrement_vpc_count %x = %d\n"
.LC113:
- .string "FtlCheckVpc %x = %x %x\n"
+ .string "spuer block %x vpn is 0\n "
.LC114:
- .string "Ftlwrite decrement_vpc_count %x = %d\n"
+ .string "...%s enter...\n"
.LC115:
- .string "FtlInit %x\n"
+ .string "FtlCheckVpc %x = %x %x\n"
.LC116:
.string "%d GC datablk = %x vpc %x %x\n"
.LC117:
.string "SWL %x, FSB = %x vpc= %x,ec=%x th=%x\n"
.LC118:
- .string "FtlWrite: lpa error:%x %x\n"
+ .string "Ftlwrite decrement_vpc_count %x = %d\n"
.LC119:
- .string "BBT:"
+ .string "FtlInit %x\n"
.LC120:
- .string "IdBlockReadData %x %x\n"
+ .string "FtlWrite: lpa error:%x %x\n"
.LC121:
- .string "IdBlockReadData %x %x ret= %x\n"
+ .string "BBT:"
.LC122:
- .string "IDBlockWriteData %x %x\n"
+ .string "IdBlockReadData %x %x\n"
.LC123:
- .string "IDBlockWriteData %x %x ret= %x\n"
+ .string "IdBlockReadData %x %x ret= %x\n"
.LC124:
- .string "idblk:"
+ .string "IDBlockWriteData %x %x\n"
.LC125:
- .string "idb reverse %x %x\n"
+ .string "IDBlockWriteData %x %x ret= %x\n"
.LC126:
- .string "write_idblock totle_sec %x %x\n"
+ .string "idblk:"
.LC127:
- .string "write and check error:%d idb=%x,offset=%x,r=%x,w=%x \n"
+ .string "idb reverse %x %x\n"
.LC128:
- .string "write"
+ .string "write_idblock totle_sec %x %x\n"
.LC129:
- .string "read"
+ .string "write and check error:%d idb=%x,offset=%x,r=%x,w=%x\n"
.LC130:
- .string "write_idblock error\n"
+ .string "write"
.LC131:
- .string "READ_SECTOR_IO\n"
+ .string "read"
.LC132:
- .string "rk_copy_from_user error \n"
+ .string "write_idblock error\n"
.LC133:
- .string "READ_SECTOR_IO %x %x\n"
+ .string "READ_SECTOR_IO\n"
.LC134:
- .string "rk_copy_to_user error\n"
+ .string "rk_copy_from_user error\n"
.LC135:
- .string "WRITE_SECTOR_IO\n"
+ .string "READ_SECTOR_IO %x %x\n"
.LC136:
- .string "WRITE_SECTOR_IO %x %x\n"
+ .string "rk_copy_to_user error\n"
.LC137:
- .string "END_WRITE_SECTOR_IO\n"
+ .string "WRITE_SECTOR_IO\n"
.LC138:
- .string "END_WRITE_SECTOR_IO %x %x\n"
+ .string "WRITE_SECTOR_IO %x %x\n"
.LC139:
- .string "GET_FLASH_INFO_IO\n"
+ .string "END_WRITE_SECTOR_IO\n"
.LC140:
- .string "GET_BAD_BLOCK_IO\n"
+ .string "END_WRITE_SECTOR_IO %x %x\n"
.LC141:
- .string "bbt:"
+ .string "GET_FLASH_INFO_IO\n"
.LC142:
- .string "GET_LOCK_FLAG_IO\n"
+ .string "GET_BAD_BLOCK_IO\n"
.LC143:
- .string "GET_PUBLIC_KEY_IO\n"
+ .string "bbt:"
.LC144:
- .string "RKNAND_GET_DRM_KEY\n"
+ .string "GET_LOCK_FLAG_IO\n"
.LC145:
- .string "RKNAND_STORE_DRM_KEY\n"
+ .string "GET_PUBLIC_KEY_IO\n"
.LC146:
- .string "RKNAND_DIASBLE_SECURE_BOOT\n"
+ .string "RKNAND_GET_DRM_KEY\n"
.LC147:
- .string "RKNAND_ENASBLE_SECURE_BOOT\n"
+ .string "RKNAND_STORE_DRM_KEY\n"
.LC148:
- .string "RKNAND_GET_SN_SECTOR\n"
+ .string "copy_from_user error\n"
.LC149:
- .string "RKNAND_LOADER_UNLOCK\n"
+ .string "RKNAND_DIASBLE_SECURE_BOOT\n"
.LC150:
- .string "RKNAND_LOADER_STATUS\n"
+ .string "RKNAND_ENASBLE_SECURE_BOOT\n"
.LC151:
- .string "RKNAND_LOADER_LOCK\n"
+ .string "RKNAND_GET_SN_SECTOR\n"
.LC152:
- .string "LockKey not match %d\n"
+ .string "RKNAND_LOADER_UNLOCK\n"
.LC153:
- .string "RKNAND_GET_VENDOR_SECTOR\n"
+ .string "RKNAND_LOADER_STATUS\n"
.LC154:
- .string "RKNAND_STORE_VENDOR_SECTOR\n"
+ .string "RKNAND_LOADER_LOCK\n"
.LC155:
- .string "return ret = %lx\n"
+ .string "LockKey not match %d\n"
.LC156:
- .string "secureBootEn check error\n"
+ .string "RKNAND_GET_VENDOR_SECTOR\n"
.LC157:
+ .string "RKNAND_STORE_VENDOR_SECTOR\n"
+.LC158:
+ .string "return ret = %lx\n"
+.LC159:
+ .string "secureBootEn check error\n"
+.LC160:
.string "rknand_sys_storage"
+ .data
+ .align 3
+.LANCHOR1 = . + 0
+ .type random_seed, %object
+ .size random_seed, 256
+random_seed:
+ .hword 22378
+ .hword 1512
+ .hword 25245
+ .hword 17827
+ .hword 25756
+ .hword 19440
+ .hword 9026
+ .hword 10030
+ .hword 29528
+ .hword 20467
+ .hword 29676
+ .hword 24432
+ .hword 31328
+ .hword 6872
+ .hword 13426
+ .hword 13842
+ .hword 8783
+ .hword 1108
+ .hword 782
+ .hword 28837
+ .hword 30729
+ .hword 9505
+ .hword 18676
+ .hword 23085
+ .hword 18730
+ .hword 1085
+ .hword 32609
+ .hword 14697
+ .hword 20858
+ .hword 15170
+ .hword 30365
+ .hword 1607
+ .hword 32298
+ .hword 4995
+ .hword 18905
+ .hword 1976
+ .hword 9592
+ .hword 20204
+ .hword 17443
+ .hword 13615
+ .hword 23330
+ .hword 29369
+ .hword 13947
+ .hword 9398
+ .hword 32398
+ .hword 8984
+ .hword 27600
+ .hword 21785
+ .hword 6019
+ .hword 6311
+ .hword 31598
+ .hword 30210
+ .hword 19327
+ .hword 13896
+ .hword 11347
+ .hword 27545
+ .hword 3107
+ .hword 26575
+ .hword 32270
+ .hword 19852
+ .hword 20601
+ .hword 8349
+ .hword 9290
+ .hword 29819
+ .hword 13579
+ .hword 3661
+ .hword 28676
+ .hword 27331
+ .hword 32574
+ .hword 8693
+ .hword 31253
+ .hword 9081
+ .hword 5399
+ .hword 6842
+ .hword 20087
+ .hword 5537
+ .hword 1274
+ .hword 11617
+ .hword 9530
+ .hword 4866
+ .hword 8035
+ .hword 23219
+ .hword 1178
+ .hword 23272
+ .hword 7383
+ .hword 18944
+ .hword 12488
+ .hword 12871
+ .hword 29340
+ .hword 20532
+ .hword 11022
+ .hword 22514
+ .hword 228
+ .hword 22363
+ .hword 24978
+ .hword 14584
+ .hword 12138
+ .hword 3092
+ .hword 17916
+ .hword 16863
+ .hword 14554
+ .hword 31457
+ .hword 29474
+ .hword 25311
+ .hword 24121
+ .hword 3684
+ .hword 28037
+ .hword 22865
+ .hword 22839
+ .hword 25217
+ .hword 13217
+ .hword 27186
+ .hword 14938
+ .hword 11180
+ .hword 29754
+ .hword 24180
+ .hword 15150
+ .hword 32455
+ .hword 20434
+ .hword 23848
+ .hword 29983
+ .hword 16120
+ .hword 14769
+ .hword 20041
+ .hword 29803
+ .hword 28406
+ .hword 17598
+ .hword 28087
+ .type ToshibaA19RefValue, %object
+ .size ToshibaA19RefValue, 45
+ToshibaA19RefValue:
+ .byte 4
+ .byte 5
+ .byte 6
+ .byte 7
+ .byte 13
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 4
+ .byte 4
+ .byte 124
+ .byte 126
+ .byte 0
+ .byte 0
+ .byte 124
+ .byte 120
+ .byte 120
+ .byte 0
+ .byte 124
+ .byte 118
+ .byte 116
+ .byte 114
+ .byte 0
+ .byte 8
+ .byte 8
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 11
+ .byte 126
+ .byte 118
+ .byte 116
+ .byte 0
+ .byte 16
+ .byte 118
+ .byte 114
+ .byte 112
+ .byte 0
+ .byte 2
+ .byte 0
+ .byte 126
+ .byte 124
+ .byte 0
+ .zero 3
+ .type Toshiba15RefValue, %object
+ .size Toshiba15RefValue, 95
+Toshiba15RefValue:
+ .byte 4
+ .byte 5
+ .byte 6
+ .byte 7
+ .byte 13
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 2
+ .byte 4
+ .byte 2
+ .byte 0
+ .byte 0
+ .byte 8
+ .byte 8
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 124
+ .byte 0
+ .byte 124
+ .byte 124
+ .byte 0
+ .byte 122
+ .byte 0
+ .byte 122
+ .byte 122
+ .byte 0
+ .byte 11
+ .byte 126
+ .byte 118
+ .byte 116
+ .byte 0
+ .byte 120
+ .byte 2
+ .byte 120
+ .byte 122
+ .byte 0
+ .byte 126
+ .byte 4
+ .byte 126
+ .byte 122
+ .byte 0
+ .byte 16
+ .byte 118
+ .byte 114
+ .byte 112
+ .byte 0
+ .byte 118
+ .byte 4
+ .byte 118
+ .byte 120
+ .byte 0
+ .byte 4
+ .byte 4
+ .byte 4
+ .byte 118
+ .byte 0
+ .byte 2
+ .byte 0
+ .byte 126
+ .byte 124
+ .byte 0
+ .byte 6
+ .byte 10
+ .byte 6
+ .byte 2
+ .byte 0
+ .byte 116
+ .byte 124
+ .byte 116
+ .byte 118
+ .byte 0
+ .byte 4
+ .byte 4
+ .byte 124
+ .byte 126
+ .byte 0
+ .byte 0
+ .byte 124
+ .byte 120
+ .byte 120
+ .byte 0
+ .byte 124
+ .byte 118
+ .byte 116
+ .byte 114
+ .byte 0
+ .zero 1
+ .type ToshibaRefValue, %object
+ .size ToshibaRefValue, 8
+ToshibaRefValue:
+ .byte 0
+ .byte 4
+ .byte 124
+ .byte 120
+ .byte 116
+ .byte 8
+ .byte 12
+ .byte 112
+ .type SamsungRefValue, %object
+ .size SamsungRefValue, 64
+SamsungRefValue:
+ .byte -89
+ .byte -92
+ .byte -91
+ .byte -90
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 5
+ .byte 10
+ .byte 0
+ .byte 0
+ .byte 40
+ .byte 0
+ .byte -20
+ .byte -40
+ .byte -19
+ .byte -11
+ .byte -19
+ .byte -26
+ .byte 10
+ .byte 15
+ .byte 5
+ .byte 0
+ .byte 15
+ .byte 10
+ .byte -5
+ .byte -20
+ .byte -24
+ .byte -17
+ .byte -24
+ .byte -36
+ .byte -15
+ .byte -5
+ .byte -2
+ .byte -16
+ .byte 10
+ .byte 0
+ .byte -5
+ .byte -20
+ .byte -48
+ .byte -30
+ .byte -48
+ .byte -62
+ .byte 20
+ .byte 15
+ .byte -5
+ .byte -20
+ .byte -24
+ .byte -5
+ .byte -24
+ .byte -36
+ .byte 30
+ .byte 20
+ .byte -5
+ .byte -20
+ .byte -5
+ .byte -1
+ .byte -5
+ .byte -8
+ .byte 7
+ .byte 12
+ .byte 2
+ .byte 0
+ .type gNandParaInfo, %object
+ .size gNandParaInfo, 32
+gNandParaInfo:
+ .byte 0
+ .byte 0
+ .zero 5
+ .byte 0
+ .byte 1
+ .byte 8
+ .hword 128
+ .byte 2
+ .byte 1
+ .hword 2048
+ .hword 0
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .type refValueDefault, %object
+ .size refValueDefault, 28
+refValueDefault:
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 6
+ .byte 10
+ .byte 6
+ .byte 0
+ .byte -3
+ .byte -7
+ .byte -8
+ .byte 0
+ .byte -6
+ .byte -13
+ .byte -15
+ .byte 0
+ .byte -11
+ .byte -20
+ .byte -23
+ .byte 0
+ .byte 0
+ .byte -26
+ .byte -30
+ .byte 0
+ .byte 0
+ .byte -32
+ .byte -37
+ .type gFtlInitStatus, %object
+ .size gFtlInitStatus, 4
+gFtlInitStatus:
+ .word -1
+ .type NandFlashParaTbl, %object
+ .size NandFlashParaTbl, 2304
+NandFlashParaTbl:
+ .byte 6
+ .byte 44
+ .byte 100
+ .byte 68
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte 68
+ .byte 68
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1064
+ .hword 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte 104
+ .byte 4
+ .byte 74
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 5
+ .byte 44
+ .byte -120
+ .byte 4
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte -88
+ .byte 5
+ .byte -53
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 2
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte 104
+ .byte 4
+ .byte 70
+ .byte -119
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte 72
+ .byte 4
+ .byte 74
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1024
+ .hword 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte -124
+ .byte 100
+ .byte 60
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 32
+ .hword 512
+ .byte 2
+ .byte 2
+ .hword 1024
+ .hword 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte -124
+ .byte 100
+ .byte 84
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 32
+ .hword 512
+ .byte 2
+ .byte 2
+ .hword 1024
+ .hword 479
+ .byte 4
+ .byte 18
+ .byte 60
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte -41
+ .byte -108
+ .byte 62
+ .byte -124
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .hword 128
+ .byte 2
+ .byte 2
+ .hword 4096
+ .hword 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte 72
+ .byte 4
+ .byte 70
+ .byte -123
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1024
+ .hword 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte -120
+ .byte 5
+ .byte -58
+ .byte -119
+ .byte 0
+ .byte 4
+ .byte 2
+ .byte 8
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 5
+ .byte 44
+ .byte -120
+ .byte 36
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 287
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte 104
+ .byte 0
+ .byte 39
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 16
+ .hword 128
+ .byte 1
+ .byte 2
+ .hword 2048
+ .hword 287
+ .byte 0
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 5
+ .byte 44
+ .byte 100
+ .byte 100
+ .byte 86
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 24
+ .hword 512
+ .byte 2
+ .byte 2
+ .hword 700
+ .hword 479
+ .byte 4
+ .byte 18
+ .byte 60
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte -124
+ .byte -59
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 4
+ .byte 2
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte -43
+ .byte -47
+ .byte -90
+ .byte 104
+ .byte 0
+ .byte 4
+ .byte 2
+ .byte 8
+ .hword 64
+ .byte 1
+ .byte 2
+ .hword 2048
+ .hword 279
+ .byte 0
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 44
+ .byte -36
+ .byte -112
+ .byte -90
+ .byte 84
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 8
+ .hword 64
+ .byte 1
+ .byte 2
+ .hword 1024
+ .hword 279
+ .byte 0
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 5
+ .byte -75
+ .byte 100
+ .byte 100
+ .byte 86
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 24
+ .hword 512
+ .byte 2
+ .byte 2
+ .hword 700
+ .hword 479
+ .byte 4
+ .byte 18
+ .byte 60
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 5
+ .byte 44
+ .byte 100
+ .byte 68
+ .byte 50
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 32
+ .hword 512
+ .byte 2
+ .byte 1
+ .hword 1088
+ .hword 1503
+ .byte 5
+ .byte 19
+ .byte 60
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .zero 4
+ .byte 5
+ .byte 44
+ .byte 100
+ .byte 100
+ .byte 60
+ .byte -91
+ .byte 0
+ .byte 4
+ .byte 1
+ .byte 32
+ .hword 512
+ .byte 2
+ .byte 1
+ .hword 1044
+ .hword 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte -108
+ .byte -46
+ .byte 4
+ .byte 67
+ .byte 2
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 473
+ .byte 1
+ .byte 1
+ .byte 24
+ .byte 32
+ .byte 4
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -41
+ .byte -108
+ .byte -38
+ .byte 116
+ .byte -61
+ .byte 2
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1024
+ .hword 473
+ .byte 1
+ .byte 2
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -41
+ .byte -108
+ .byte -111
+ .byte 96
+ .byte 68
+ .byte 2
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1046
+ .hword 473
+ .byte 1
+ .byte 3
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte -108
+ .byte -38
+ .byte 116
+ .byte -60
+ .byte 2
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2090
+ .hword 473
+ .byte 1
+ .byte 4
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte -108
+ .byte -21
+ .byte 116
+ .byte 68
+ .byte 2
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1066
+ .hword 473
+ .byte 1
+ .byte 3
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -43
+ .byte -108
+ .byte -38
+ .byte 116
+ .byte -60
+ .byte 2
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 530
+ .hword 473
+ .byte 1
+ .byte 3
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -41
+ .byte -108
+ .byte -102
+ .byte 116
+ .byte 66
+ .byte 2
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1024
+ .hword 281
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 4
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte 20
+ .byte -89
+ .byte 66
+ .byte 74
+ .byte 2
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1060
+ .hword 473
+ .byte 2
+ .byte 5
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -41
+ .byte 20
+ .byte -98
+ .byte 52
+ .byte 74
+ .byte 2
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1056
+ .hword 473
+ .byte 2
+ .byte 5
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte -108
+ .byte -89
+ .byte 66
+ .byte 72
+ .byte 2
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1060
+ .hword 473
+ .byte 2
+ .byte 5
+ .byte 40
+ .byte 32
+ .byte 4
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte -34
+ .byte 20
+ .byte -85
+ .byte 66
+ .byte 74
+ .byte 2
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1056
+ .hword 473
+ .byte 2
+ .byte 6
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -83
+ .byte 58
+ .byte 20
+ .byte -85
+ .byte 66
+ .byte 74
+ .byte 2
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2092
+ .hword 473
+ .byte 2
+ .byte 5
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -119
+ .byte 100
+ .byte 68
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -119
+ .byte -120
+ .byte 36
+ .byte 75
+ .byte -87
+ .byte -124
+ .byte 7
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 479
+ .byte 3
+ .byte 17
+ .byte 40
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -119
+ .byte -120
+ .byte 36
+ .byte 75
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -119
+ .byte 104
+ .byte 36
+ .byte 74
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 8
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -119
+ .byte 104
+ .byte 4
+ .byte 74
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 8
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -119
+ .byte -41
+ .byte -108
+ .byte 62
+ .byte -124
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 8
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -119
+ .byte 104
+ .byte 4
+ .byte 70
+ .byte -87
+ .byte 0
+ .byte 7
+ .byte 1
+ .byte 8
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 279
+ .byte 1
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 87
+ .byte 1
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 1
+ .hword 1060
+ .hword 1473
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 87
+ .byte 1
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 1
+ .hword 2092
+ .hword 1473
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte 58
+ .byte -123
+ .byte -109
+ .byte 118
+ .byte 87
+ .byte 1
+ .byte 2
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 1
+ .hword 2092
+ .hword 1505
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -43
+ .byte -124
+ .byte 50
+ .byte 114
+ .byte 86
+ .byte 1
+ .byte 1
+ .byte 16
+ .hword 128
+ .byte 2
+ .byte 1
+ .hword 2056
+ .hword 1473
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -108
+ .byte 50
+ .byte 118
+ .byte 86
+ .byte 1
+ .byte 1
+ .byte 16
+ .hword 128
+ .byte 2
+ .byte 2
+ .hword 2058
+ .hword 1489
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -108
+ .byte -126
+ .byte 118
+ .byte 86
+ .byte 1
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2062
+ .hword 1489
+ .byte 1
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 80
+ .byte 1
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1066
+ .hword 1497
+ .byte 2
+ .byte 34
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte 58
+ .byte -107
+ .byte -109
+ .byte 122
+ .byte 80
+ .byte 1
+ .byte 2
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1066
+ .hword 1497
+ .byte 2
+ .byte 34
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -108
+ .byte 50
+ .byte 118
+ .byte 85
+ .byte 1
+ .byte 1
+ .byte 16
+ .hword 128
+ .byte 2
+ .byte 2
+ .hword 2050
+ .hword 401
+ .byte 2
+ .byte 0
+ .byte 24
+ .byte 32
+ .byte 1
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 87
+ .byte 1
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1058
+ .hword 1497
+ .byte 2
+ .byte 33
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 80
+ .byte 1
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 1
+ .hword 1060
+ .hword 1473
+ .byte 2
+ .byte 34
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 81
+ .byte 1
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1074
+ .hword 1497
+ .byte 2
+ .byte 35
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte 58
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 81
+ .byte 1
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2106
+ .hword 1497
+ .byte 2
+ .byte 35
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -104
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 81
+ .byte 1
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 1
+ .hword 1056
+ .hword 1497
+ .byte 2
+ .byte 35
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 87
+ .byte 8
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1058
+ .hword 1497
+ .byte 2
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 87
+ .byte 8
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 1
+ .hword 1060
+ .hword 1473
+ .byte 2
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 2
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -92
+ .byte -126
+ .byte 118
+ .byte 86
+ .byte 8
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2082
+ .hword 473
+ .byte 1
+ .byte 65
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 80
+ .byte 8
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1066
+ .hword 1497
+ .byte 2
+ .byte 67
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -41
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 80
+ .byte 8
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 1
+ .hword 1060
+ .hword 1473
+ .byte 2
+ .byte 67
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -92
+ .byte -126
+ .byte 118
+ .byte -41
+ .byte 8
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2090
+ .hword 1241
+ .byte 1
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -124
+ .byte -109
+ .byte 114
+ .byte 87
+ .byte 8
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 1
+ .hword 2092
+ .hword 1473
+ .byte 2
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte 58
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 81
+ .byte 8
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2106
+ .hword 1497
+ .byte 2
+ .byte 68
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte 81
+ .byte 8
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1074
+ .hword 1497
+ .byte 2
+ .byte 68
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 4
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte 58
+ .byte -92
+ .byte -109
+ .byte 122
+ .byte 80
+ .byte 8
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2138
+ .hword 1497
+ .byte 2
+ .byte 0
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -126
+ .byte 118
+ .byte 86
+ .byte 8
+ .byte 1
+ .byte 16
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 2062
+ .hword 473
+ .byte 1
+ .byte 0
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte 69
+ .byte -34
+ .byte -108
+ .byte -109
+ .byte 118
+ .byte -41
+ .byte 8
+ .byte 1
+ .byte 32
+ .hword 256
+ .byte 2
+ .byte 2
+ .hword 1058
+ .hword 1497
+ .byte 2
+ .byte 66
+ .byte 40
+ .byte 32
+ .byte 3
+ .byte 1
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -20
+ .byte -41
+ .byte -108
+ .byte 126
+ .byte 100
+ .byte 68
+ .byte 0
+ .byte 1
+ .byte 16
+ .hword 128
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 473
+ .byte 2
+ .byte 49
+ .byte 60
+ .byte 36
+ .byte 3
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -20
+ .byte -34
+ .byte -43
+ .byte 126
+ .byte 104
+ .byte 68
+ .byte 0
+ .byte 2
+ .byte 16
+ .hword 128
+ .byte 2
+ .byte 2
+ .hword 2048
+ .hword 505
+ .byte 2
+ .byte 49
+ .byte 60
+ .byte 36
+ .byte 3
+ .byte 0
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -20
+ .byte -41
+ .byte -108
+ .byte 122
+ .byte 84
+ .byte 67
+ .byte 0
+ .byte 1
+ .byte 16
+ .hword 128
+ .byte 2
+ .byte 2
+ .hword 2076
+ .hword 409
+ .byte 2
+ .byte 0
+ .byte 40
+ .byte 36
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -20
+ .byte -34
+ .byte -43
+ .byte 122
+ .byte 88
+ .byte 67
+ .byte 0
+ .byte 2
+ .byte 16
+ .hword 128
+ .byte 2
+ .byte 2
+ .hword 2076
+ .hword 441
+ .byte 2
+ .byte 0
+ .byte 40
+ .byte 36
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -20
+ .byte -43
+ .byte -108
+ .byte 118
+ .byte 84
+ .byte 67
+ .byte 0
+ .byte 1
+ .byte 16
+ .hword 128
+ .byte 2
+ .byte 2
+ .hword 1038
+ .hword 281
+ .byte 2
+ .byte 0
+ .byte 24
+ .byte 36
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .byte 6
+ .byte -20
+ .byte -41
+ .byte 20
+ .byte 118
+ .byte 84
+ .byte -62
+ .byte 0
+ .byte 1
+ .byte 16
+ .hword 128
+ .byte 2
+ .byte 2
+ .hword 2076
+ .hword 1169
+ .byte 2
+ .byte 0
+ .byte 24
+ .byte 40
+ .byte 3
+ .byte 1
+ .byte 3
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .type NandOptPara, %object
+ .size NandOptPara, 128
+NandOptPara:
+ .byte 1
+ .byte 0
+ .byte 49
+ .byte 63
+ .byte 0
+ .byte 49
+ .byte -128
+ .byte 21
+ .byte 0
+ .byte 50
+ .byte 17
+ .byte -128
+ .byte 112
+ .byte 120
+ .byte 120
+ .byte 3
+ .byte 1
+ .byte 0
+ .zero 14
+ .byte 2
+ .byte 0
+ .byte 49
+ .byte 63
+ .byte 0
+ .byte 49
+ .byte -128
+ .byte 21
+ .byte 0
+ .byte 0
+ .byte 17
+ .byte -127
+ .byte 112
+ .byte -15
+ .byte -14
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 14
+ .byte 3
+ .byte 0
+ .byte 49
+ .byte 63
+ .byte 0
+ .byte 49
+ .byte -128
+ .byte 21
+ .byte 96
+ .byte 96
+ .byte 17
+ .byte -127
+ .byte 112
+ .byte -15
+ .byte -14
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 14
+ .byte 4
+ .byte 0
+ .byte 49
+ .byte 63
+ .byte 0
+ .byte 49
+ .byte -128
+ .byte 21
+ .byte 96
+ .byte 96
+ .byte 17
+ .byte -127
+ .byte 112
+ .byte 112
+ .byte 112
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 14
+ .type gSlcNandParaInfo, %object
+ .size gSlcNandParaInfo, 32
+gSlcNandParaInfo:
+ .byte 2
+ .byte -104
+ .byte -15
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 1
+ .byte 1
+ .byte 4
+ .hword 64
+ .byte 1
+ .byte 1
+ .hword 1024
+ .hword 256
+ .byte 0
+ .byte 0
+ .byte 16
+ .byte 40
+ .byte 1
+ .byte 0
+ .byte 1
+ .byte 0
+ .byte 0
+ .byte 0
+ .zero 4
+ .type micron_flash_randomizer_flag, %object
+ .size micron_flash_randomizer_flag, 4
+micron_flash_randomizer_flag:
+ .word 1
+ .type ftl_gc_temp_block_bops_scan_page_addr, %object
+ .size ftl_gc_temp_block_bops_scan_page_addr, 2
+ftl_gc_temp_block_bops_scan_page_addr:
+ .hword -1
+ .zero 2
+ .type power_up_flag, %object
+ .size power_up_flag, 4
+power_up_flag:
+ .word 1
+ .zero 4
+ .type gTable_Crc32, %object
+ .size gTable_Crc32, 1024
+gTable_Crc32:
+ .word 0
+ .word 79760823
+ .word 159521646
+ .word 222500569
+ .word 319043292
+ .word 398801771
+ .word 445001138
+ .word 507977733
+ .word 638086584
+ .word 583622671
+ .word 797603542
+ .word 726367073
+ .word 890002276
+ .word 835540691
+ .word 1015955466
+ .word 944721341
+ .word 1276173168
+ .word 1221711559
+ .word 1167245342
+ .word 1096011177
+ .word 1595207084
+ .word 1540743195
+ .word 1452734146
+ .word 1381497717
+ .word 1780004552
+ .word 1859763071
+ .word 1671081382
+ .word 1734058001
+ .word 2031910932
+ .word 2111671715
+ .word 1889442682
+ .word 1952421581
+ .word -1742620960
+ .word -1662993577
+ .word -1851544178
+ .word -1788698567
+ .word -1960476612
+ .word -1880846965
+ .word -2102944942
+ .word -2040097051
+ .word -1104553128
+ .word -1159145745
+ .word -1213480906
+ .word -1284846207
+ .word -1389499004
+ .word -1444093901
+ .word -1531971862
+ .word -1603339427
+ .word -734958192
+ .word -789553113
+ .word -575441154
+ .word -646808759
+ .word -952804532
+ .word -1007397125
+ .word -826851294
+ .word -898216555
+ .word -231145432
+ .word -151515745
+ .word -71623866
+ .word -8775951
+ .word -516081932
+ .word -436454589
+ .word -390124134
+ .word -327278547
+ .word 880959607
+ .word 809725376
+ .word 1023441689
+ .word 968980142
+ .word 663115435
+ .word 591878940
+ .word 772033989
+ .word 717570162
+ .word 311037391
+ .word 374014072
+ .word 453514913
+ .word 533273366
+ .word 26098451
+ .word 89077412
+ .word 135012477
+ .word 214773194
+ .word 2022882055
+ .word 2085861040
+ .word 1896915049
+ .word 1976675806
+ .word 1805028827
+ .word 1868005484
+ .word 1645516469
+ .word 1725274882
+ .word 1587205823
+ .word 1515969288
+ .word 1461243345
+ .word 1406779494
+ .word 1302257763
+ .word 1231023572
+ .word 1142749965
+ .word 1088288442
+ .word -1398548841
+ .word -1469916384
+ .word -1524511239
+ .word -1579106226
+ .word -1079517109
+ .word -1150882308
+ .word -1239024859
+ .word -1293617518
+ .word -1968456913
+ .word -1905609064
+ .word -2094423999
+ .word -2014794250
+ .word -1716548109
+ .word -1653702588
+ .word -1876060515
+ .word -1796433110
+ .word -525136409
+ .word -462290864
+ .word -382658935
+ .word -303031490
+ .word -206095557
+ .word -143247732
+ .word -97181611
+ .word -17551902
+ .word -960798625
+ .word -1032163864
+ .word -818316495
+ .word -872909178
+ .word -708880765
+ .word -780248268
+ .word -599962131
+ .word -654557094
+ .word 1761919214
+ .word 1841679705
+ .word 1619450752
+ .word 1682429495
+ .word 2046883378
+ .word 2126642053
+ .word 1937960284
+ .word 2000937195
+ .word 1326230870
+ .word 1271767265
+ .word 1183757880
+ .word 1112521615
+ .word 1544067978
+ .word 1489606205
+ .word 1435140324
+ .word 1363905875
+ .word 622074782
+ .word 567612969
+ .word 748028144
+ .word 676793671
+ .word 907029826
+ .word 852566261
+ .word 1066546732
+ .word 995310491
+ .word 52196902
+ .word 131955601
+ .word 178154824
+ .word 241131775
+ .word 270024954
+ .word 349785421
+ .word 429546388
+ .word 492525091
+ .word -249203186
+ .word -169575495
+ .word -123245216
+ .word -60399401
+ .word -501137198
+ .word -421507739
+ .word -341615684
+ .word -278768117
+ .word -684909642
+ .word -739502591
+ .word -558956328
+ .word -630321809
+ .word -1003934358
+ .word -1058529059
+ .word -844417532
+ .word -915784781
+ .word -1120555650
+ .word -1175150391
+ .word -1263028720
+ .word -1334395993
+ .word -1372480606
+ .word -1427073515
+ .word -1481408308
+ .word -1552773765
+ .word -1690451770
+ .word -1610822287
+ .word -1832920152
+ .word -1770072545
+ .word -2009467366
+ .word -1929839699
+ .word -2118390412
+ .word -2055544637
+ .word 1569104025
+ .word 1497869614
+ .word 1409596407
+ .word 1355134528
+ .word 1317180997
+ .word 1245944818
+ .word 1191218475
+ .word 1136754844
+ .word 2072956193
+ .word 2135933078
+ .word 1913443919
+ .word 1993202680
+ .word 1753938941
+ .word 1816917578
+ .word 1627971731
+ .word 1707732260
+ .word 295074793
+ .word 358053470
+ .word 403988615
+ .word 483749168
+ .word 43142453
+ .word 106119298
+ .word 185620059
+ .word 265378796
+ .word 933107281
+ .word 861871078
+ .word 1042025791
+ .word 987562120
+ .word 614080653
+ .word 542846266
+ .word 756562915
+ .word 702101076
+ .word -978905479
+ .word -1050272818
+ .word -869987049
+ .word -924581728
+ .word -693952347
+ .word -765317870
+ .word -551470133
+ .word -606062980
+ .word -475038783
+ .word -412191114
+ .word -366124881
+ .word -286495464
+ .word -257209059
+ .word -194363222
+ .word -114731405
+ .word -35103804
+ .word -1984443127
+ .word -1921597250
+ .word -2143955353
+ .word -2064327728
+ .word -1699480619
+ .word -1636632990
+ .word -1825447749
+ .word -1745818356
+ .word -1346395983
+ .word -1417761530
+ .word -1505903649
+ .word -1560496536
+ .word -1128556947
+ .word -1199924262
+ .word -1254519549
+ .word -1309114188
+ .type rknand_sys_storage_dev, %object
+ .size rknand_sys_storage_dev, 80
+rknand_sys_storage_dev:
+ .word 255
+ .zero 4
+ .xword .LC160
+ .xword rknand_sys_storage_fops
+ .zero 56
+ .type rknand_sys_storage_fops, %object
+ .size rknand_sys_storage_fops, 216
+rknand_sys_storage_fops:
+ .zero 64
+ .xword rknand_sys_storage_ioctl
+ .xword rknand_sys_storage_ioctl
+ .zero 8
+ .xword rknand_sys_storage_open
+ .zero 8
+ .xword rknand_sys_storage_release
+ .zero 104
.bss
.align 3
.LANCHOR0 = . + 0
+.LANCHOR2 = . + 4352
+.LANCHOR4 = . + 8704
+ .type p_blk_mode_table, %object
+ .size p_blk_mode_table, 8
+p_blk_mode_table:
+ .zero 8
+ .type g_slc2KBNand, %object
+ .size g_slc2KBNand, 1
+g_slc2KBNand:
+ .zero 1
+ .type gNandIDBResBlkNum, %object
+ .size gNandIDBResBlkNum, 1
+gNandIDBResBlkNum:
+ .zero 1
+ .zero 2
+ .type gBlockPageAlignSize, %object
+ .size gBlockPageAlignSize, 4
+gBlockPageAlignSize:
+ .zero 4
+ .type gNandRandomizer, %object
+ .size gNandRandomizer, 1
+gNandRandomizer:
+ .zero 1
+ .zero 3
+ .type gNandcVer, %object
+ .size gNandcVer, 4
+gNandcVer:
+ .zero 4
+ .type gNandChipMap, %object
+ .size gNandChipMap, 64
+gNandChipMap:
+ .zero 64
+ .type gNandOptPara, %object
+ .size gNandOptPara, 32
+gNandOptPara:
+ .zero 32
+ .type gFlashSlcMode, %object
+ .size gFlashSlcMode, 1
+gFlashSlcMode:
+ .zero 1
+ .zero 7
+ .type gpNandc, %object
+ .size gpNandc, 8
+gpNandc:
+ .zero 8
.type NANDC_FMCTL, %object
.size NANDC_FMCTL, 4
NANDC_FMCTL:
.size NANDC_FMWAIT_SYN, 4
NANDC_FMWAIT_SYN:
.zero 4
- .type gc_discard_updated, %object
- .size gc_discard_updated, 4
-gc_discard_updated:
- .zero 4
- .type SecureBootUnlockTryCount, %object
- .size SecureBootUnlockTryCount, 4
-SecureBootUnlockTryCount:
- .zero 4
- .type SecureBootCheckOK, %object
- .size SecureBootCheckOK, 4
-SecureBootCheckOK:
- .zero 4
- .type SecureBootEn, %object
- .size SecureBootEn, 4
-SecureBootEn:
- .zero 4
- .type gpVendor1Info, %object
- .size gpVendor1Info, 8
-gpVendor1Info:
- .zero 8
- .type gpVendor0Info, %object
- .size gpVendor0Info, 8
-gpVendor0Info:
- .zero 8
- .type g_idb_buffer, %object
- .size g_idb_buffer, 8
-g_idb_buffer:
- .zero 8
- .type gSnSectorData, %object
- .size gSnSectorData, 512
-gSnSectorData:
+ .type gNandPhyInfo, %object
+ .size gNandPhyInfo, 28
+gNandPhyInfo:
+ .zero 28
+ .type slcPageToMlcPageTbl, %object
+ .size slcPageToMlcPageTbl, 512
+slcPageToMlcPageTbl:
.zero 512
- .type gpDrmKeyInfo, %object
- .size gpDrmKeyInfo, 8
-gpDrmKeyInfo:
- .zero 8
- .type gpBootConfig, %object
- .size gpBootConfig, 8
-gpBootConfig:
- .zero 8
- .type gLoaderBootInfo, %object
- .size gLoaderBootInfo, 8
-gLoaderBootInfo:
- .zero 8
- .type RK29_NANDC1_REG_BASE, %object
- .size RK29_NANDC1_REG_BASE, 8
-RK29_NANDC1_REG_BASE:
- .zero 8
- .type RK29_NANDC_REG_BASE, %object
- .size RK29_NANDC_REG_BASE, 8
-RK29_NANDC_REG_BASE:
- .zero 8
- .type gc_ink_free_return_value, %object
- .size gc_ink_free_return_value, 2
-gc_ink_free_return_value:
- .zero 2
- .type FtlUpdateVaildLpnCount, %object
- .size FtlUpdateVaildLpnCount, 2
-FtlUpdateVaildLpnCount:
- .zero 2
- .type g_ect_tbl_power_up_flush, %object
- .size g_ect_tbl_power_up_flush, 2
-g_ect_tbl_power_up_flush:
- .zero 2
- .zero 2
- .type last_cache_match_count, %object
- .size last_cache_match_count, 4
-last_cache_match_count:
- .zero 4
- .type g_LowFormat, %object
- .size g_LowFormat, 4
-g_LowFormat:
+ .type DieAddrs, %object
+ .size DieAddrs, 32
+DieAddrs:
+ .zero 32
+ .type FlashWaitBusyScheduleEn, %object
+ .size FlashWaitBusyScheduleEn, 4
+FlashWaitBusyScheduleEn:
.zero 4
- .type DeviceCapacity, %object
- .size DeviceCapacity, 4
-DeviceCapacity:
+ .type gpNandParaInfo, %object
+ .size gpNandParaInfo, 8
+gpNandParaInfo:
+ .zero 8
+ .type g_retryMode, %object
+ .size g_retryMode, 1
+g_retryMode:
+ .zero 1
+ .type g_maxRegNum, %object
+ .size g_maxRegNum, 1
+g_maxRegNum:
+ .zero 1
+ .zero 6
+ .type gReadRetryInfo, %object
+ .size gReadRetryInfo, 852
+gReadRetryInfo:
+ .zero 852
.zero 4
+ .type read_retry_cur_offset, %object
+ .size read_retry_cur_offset, 4
+read_retry_cur_offset:
.zero 4
- .type FbbtBlk, %object
- .size FbbtBlk, 16
-FbbtBlk:
- .zero 16
- .type g_power_lost_recovery_flag, %object
- .size g_power_lost_recovery_flag, 2
-g_power_lost_recovery_flag:
- .zero 2
- .type c_mlc_erase_count_value, %object
- .size c_mlc_erase_count_value, 2
-c_mlc_erase_count_value:
+ .type IDByte, %object
+ .size IDByte, 32
+IDByte:
+ .zero 32
+ .type gDieOp, %object
+ .size gDieOp, 192
+gDieOp:
+ .zero 192
+ .type gFlashInterfaceMode, %object
+ .size gFlashInterfaceMode, 1
+gFlashInterfaceMode:
+ .zero 1
+ .type gNandMaxDie, %object
+ .size gNandMaxDie, 1
+gNandMaxDie:
+ .zero 1
.zero 2
+ .type DieCsIndex, %object
+ .size DieCsIndex, 8
+DieCsIndex:
+ .zero 8
+ .type gFlashPageBuffer0, %object
+ .size gFlashPageBuffer0, 8
+gFlashPageBuffer0:
+ .zero 8
+ .type gFlashToggleModeEn, %object
+ .size gFlashToggleModeEn, 1
+gFlashToggleModeEn:
+ .zero 1
+ .zero 3
+ .type gBootDdrMode, %object
+ .size gBootDdrMode, 4
+gBootDdrMode:
.zero 4
- .type g_recovery_ppa_tbl, %object
- .size g_recovery_ppa_tbl, 128
-g_recovery_ppa_tbl:
- .zero 128
- .type g_recovery_page_min_ver, %object
- .size g_recovery_page_min_ver, 4
-g_recovery_page_min_ver:
- .zero 4
- .type g_recovery_page_num, %object
- .size g_recovery_page_num, 4
-g_recovery_page_num:
- .zero 4
- .type g_cur_erase_blk, %object
- .size g_cur_erase_blk, 4
-g_cur_erase_blk:
- .zero 4
- .type g_gc_skip_write_count, %object
- .size g_gc_skip_write_count, 4
-g_gc_skip_write_count:
- .zero 4
- .type g_gc_head_data_block_count, %object
- .size g_gc_head_data_block_count, 4
-g_gc_head_data_block_count:
- .zero 4
- .type g_gc_head_data_block, %object
- .size g_gc_head_data_block, 4
-g_gc_head_data_block:
- .zero 4
- .type g_ftl_nand_free_count, %object
- .size g_ftl_nand_free_count, 4
-g_ftl_nand_free_count:
- .zero 4
- .type g_in_swl_replace, %object
- .size g_in_swl_replace, 4
-g_in_swl_replace:
- .zero 4
- .type g_in_gc_progress, %object
- .size g_in_gc_progress, 4
-g_in_gc_progress:
- .zero 4
- .type g_all_blk_used_slc_mode, %object
- .size g_all_blk_used_slc_mode, 4
-g_all_blk_used_slc_mode:
- .zero 4
- .type g_max_erase_count, %object
- .size g_max_erase_count, 4
-g_max_erase_count:
- .zero 4
- .type g_totle_sys_slc_erase_count, %object
- .size g_totle_sys_slc_erase_count, 4
-g_totle_sys_slc_erase_count:
- .zero 4
- .type g_totle_slc_erase_count, %object
- .size g_totle_slc_erase_count, 4
-g_totle_slc_erase_count:
- .zero 4
- .type g_min_erase_count, %object
- .size g_min_erase_count, 4
-g_min_erase_count:
- .zero 4
- .type g_totle_avg_erase_count, %object
- .size g_totle_avg_erase_count, 4
-g_totle_avg_erase_count:
- .zero 4
- .type g_totle_mlc_erase_count, %object
- .size g_totle_mlc_erase_count, 4
-g_totle_mlc_erase_count:
- .zero 4
- .type g_totle_l2p_write_count, %object
- .size g_totle_l2p_write_count, 4
-g_totle_l2p_write_count:
+ .type g_nandc_version_data, %object
+ .size g_nandc_version_data, 4
+g_nandc_version_data:
.zero 4
- .type g_totle_cache_write_count, %object
- .size g_totle_cache_write_count, 4
-g_totle_cache_write_count:
.zero 4
- .type g_tmp_data_superblock_id, %object
- .size g_tmp_data_superblock_id, 2
-g_tmp_data_superblock_id:
- .zero 2
- .zero 2
- .type g_totle_read_page_count, %object
- .size g_totle_read_page_count, 4
-g_totle_read_page_count:
+ .type gMasterTempBuf, %object
+ .size gMasterTempBuf, 8
+gMasterTempBuf:
+ .zero 8
+ .type gMasterInfo, %object
+ .size gMasterInfo, 48
+gMasterInfo:
+ .zero 48
+ .type gNandcDumpWriteEn, %object
+ .size gNandcDumpWriteEn, 4
+gNandcDumpWriteEn:
.zero 4
- .type g_totle_discard_page_count, %object
- .size g_totle_discard_page_count, 4
-g_totle_discard_page_count:
+ .type gNandcEccBits, %object
+ .size gNandcEccBits, 4
+gNandcEccBits:
.zero 4
- .type g_totle_read_sector, %object
- .size g_totle_read_sector, 4
-g_totle_read_sector:
+ .type gNandFlashEccBits, %object
+ .size gNandFlashEccBits, 1
+gNandFlashEccBits:
+ .zero 1
+ .type gMultiPageProgEn, %object
+ .size gMultiPageProgEn, 1
+gMultiPageProgEn:
+ .zero 1
+ .zero 2
+ .type c_ftl_nand_sys_blks_per_plane, %object
+ .size c_ftl_nand_sys_blks_per_plane, 4
+c_ftl_nand_sys_blks_per_plane:
.zero 4
- .type g_totle_write_sector, %object
- .size g_totle_write_sector, 4
-g_totle_write_sector:
+ .type c_ftl_nand_planes_num, %object
+ .size c_ftl_nand_planes_num, 2
+c_ftl_nand_planes_num:
+ .zero 2
+ .zero 2
+ .type c_ftl_nand_max_sys_blks, %object
+ .size c_ftl_nand_max_sys_blks, 4
+c_ftl_nand_max_sys_blks:
.zero 4
- .type g_totle_write_page_count, %object
- .size g_totle_write_page_count, 4
-g_totle_write_page_count:
+ .type c_ftl_nand_data_blks_per_plane, %object
+ .size c_ftl_nand_data_blks_per_plane, 2
+c_ftl_nand_data_blks_per_plane:
+ .zero 2
+ .type c_ftl_nand_blk_pre_plane, %object
+ .size c_ftl_nand_blk_pre_plane, 2
+c_ftl_nand_blk_pre_plane:
+ .zero 2
+ .type c_ftl_nand_max_data_blks, %object
+ .size c_ftl_nand_max_data_blks, 4
+c_ftl_nand_max_data_blks:
.zero 4
- .type g_totle_gc_page_count, %object
- .size g_totle_gc_page_count, 4
-g_totle_gc_page_count:
+ .type c_ftl_nand_totle_phy_blks, %object
+ .size c_ftl_nand_totle_phy_blks, 4
+c_ftl_nand_totle_phy_blks:
.zero 4
- .type g_gc_blk_index, %object
- .size g_gc_blk_index, 2
-g_gc_blk_index:
+ .type c_ftl_nand_type, %object
+ .size c_ftl_nand_type, 2
+c_ftl_nand_type:
.zero 2
- .type g_gc_merge_free_blk_threshold, %object
- .size g_gc_merge_free_blk_threshold, 2
-g_gc_merge_free_blk_threshold:
+ .type c_ftl_nand_die_num, %object
+ .size c_ftl_nand_die_num, 2
+c_ftl_nand_die_num:
.zero 2
- .type g_gc_free_blk_threshold, %object
- .size g_gc_free_blk_threshold, 2
-g_gc_free_blk_threshold:
+ .type c_ftl_nand_planes_per_die, %object
+ .size c_ftl_nand_planes_per_die, 2
+c_ftl_nand_planes_per_die:
.zero 2
.zero 6
- .type g_gc_bad_block_temp_tbl, %object
- .size g_gc_bad_block_temp_tbl, 34
-g_gc_bad_block_temp_tbl:
- .zero 34
- .type g_gc_bad_block_gc_index, %object
- .size g_gc_bad_block_gc_index, 2
-g_gc_bad_block_gc_index:
+ .type p_plane_order_table, %object
+ .size p_plane_order_table, 32
+p_plane_order_table:
+ .zero 32
+ .type c_mlc_erase_count_value, %object
+ .size c_mlc_erase_count_value, 2
+c_mlc_erase_count_value:
.zero 2
- .type g_gc_bad_block_temp_num, %object
- .size g_gc_bad_block_temp_num, 2
-g_gc_bad_block_temp_num:
+ .type c_ftl_nand_ext_blk_pre_plane, %object
+ .size c_ftl_nand_ext_blk_pre_plane, 2
+c_ftl_nand_ext_blk_pre_plane:
.zero 2
- .type g_gc_next_blk_1, %object
- .size g_gc_next_blk_1, 2
-g_gc_next_blk_1:
+ .type c_ftl_vendor_part_size, %object
+ .size c_ftl_vendor_part_size, 2
+c_ftl_vendor_part_size:
.zero 2
- .type g_gc_next_blk, %object
- .size g_gc_next_blk, 2
-g_gc_next_blk:
+ .type c_ftl_nand_blks_per_die, %object
+ .size c_ftl_nand_blks_per_die, 2
+c_ftl_nand_blks_per_die:
.zero 2
- .type g_gc_cur_blk_max_valid_pages, %object
- .size g_gc_cur_blk_max_valid_pages, 2
-g_gc_cur_blk_max_valid_pages:
+ .type c_ftl_nand_blks_per_die_shift, %object
+ .size c_ftl_nand_blks_per_die_shift, 2
+c_ftl_nand_blks_per_die_shift:
.zero 2
- .type g_gc_cur_blk_valid_pages, %object
- .size g_gc_cur_blk_valid_pages, 2
-g_gc_cur_blk_valid_pages:
+ .type c_ftl_nand_page_pre_blk, %object
+ .size c_ftl_nand_page_pre_blk, 2
+c_ftl_nand_page_pre_blk:
.zero 2
- .type g_gc_page_offset, %object
- .size g_gc_page_offset, 2
-g_gc_page_offset:
+ .type c_ftl_nand_page_pre_slc_blk, %object
+ .size c_ftl_nand_page_pre_slc_blk, 2
+c_ftl_nand_page_pre_slc_blk:
.zero 2
- .type g_gc_blk_num, %object
- .size g_gc_blk_num, 2
-g_gc_blk_num:
+ .type c_ftl_nand_page_pre_super_blk, %object
+ .size c_ftl_nand_page_pre_super_blk, 2
+c_ftl_nand_page_pre_super_blk:
+ .zero 2
+ .type c_ftl_nand_sec_pre_page, %object
+ .size c_ftl_nand_sec_pre_page, 2
+c_ftl_nand_sec_pre_page:
+ .zero 2
+ .type c_ftl_nand_sec_pre_page_shift, %object
+ .size c_ftl_nand_sec_pre_page_shift, 2
+c_ftl_nand_sec_pre_page_shift:
+ .zero 2
+ .type c_ftl_nand_byte_pre_page, %object
+ .size c_ftl_nand_byte_pre_page, 2
+c_ftl_nand_byte_pre_page:
+ .zero 2
+ .type c_ftl_nand_byte_pre_oob, %object
+ .size c_ftl_nand_byte_pre_oob, 2
+c_ftl_nand_byte_pre_oob:
+ .zero 2
+ .type c_ftl_nand_reserved_blks, %object
+ .size c_ftl_nand_reserved_blks, 2
+c_ftl_nand_reserved_blks:
+ .zero 2
+ .zero 2
+ .type DeviceCapacity, %object
+ .size DeviceCapacity, 4
+DeviceCapacity:
+ .zero 4
+ .type c_ftl_nand_max_vendor_blks, %object
+ .size c_ftl_nand_max_vendor_blks, 2
+c_ftl_nand_max_vendor_blks:
+ .zero 2
+ .type c_ftl_nand_vendor_region_num, %object
+ .size c_ftl_nand_vendor_region_num, 2
+c_ftl_nand_vendor_region_num:
+ .zero 2
+ .type c_ftl_nand_map_blks_per_plane, %object
+ .size c_ftl_nand_map_blks_per_plane, 2
+c_ftl_nand_map_blks_per_plane:
+ .zero 2
+ .zero 2
+ .type c_ftl_nand_max_map_blks, %object
+ .size c_ftl_nand_max_map_blks, 4
+c_ftl_nand_max_map_blks:
+ .zero 4
+ .type c_ftl_nand_init_sys_blks_per_plane, %object
+ .size c_ftl_nand_init_sys_blks_per_plane, 4
+c_ftl_nand_init_sys_blks_per_plane:
+ .zero 4
+ .type c_ftl_nand_map_region_num, %object
+ .size c_ftl_nand_map_region_num, 2
+c_ftl_nand_map_region_num:
+ .zero 2
+ .type c_ftl_nand_l2pmap_ram_region_num, %object
+ .size c_ftl_nand_l2pmap_ram_region_num, 2
+c_ftl_nand_l2pmap_ram_region_num:
+ .zero 2
+ .type g_MaxLbaSector, %object
+ .size g_MaxLbaSector, 4
+g_MaxLbaSector:
+ .zero 4
+ .type g_totle_vendor_block, %object
+ .size g_totle_vendor_block, 2
+g_totle_vendor_block:
.zero 2
.zero 6
- .type p_gc_blk_tbl, %object
- .size p_gc_blk_tbl, 8
-p_gc_blk_tbl:
+ .type p_vendor_block_table, %object
+ .size p_vendor_block_table, 8
+p_vendor_block_table:
.zero 8
- .type p_gc_page_info, %object
- .size p_gc_page_info, 8
-p_gc_page_info:
+ .type g_wr_page_num, %object
+ .size g_wr_page_num, 4
+g_wr_page_num:
+ .zero 4
+ .zero 4
+ .type req_wr_io, %object
+ .size req_wr_io, 8
+req_wr_io:
.zero 8
- .type g_sys_ext_data, %object
- .size g_sys_ext_data, 512
-g_sys_ext_data:
- .zero 512
- .type g_sys_save_data, %object
- .size g_sys_save_data, 48
-g_sys_save_data:
- .zero 48
- .type gp_last_act_superblock, %object
- .size gp_last_act_superblock, 8
-gp_last_act_superblock:
+ .type g_MaxLpn, %object
+ .size g_MaxLpn, 4
+g_MaxLpn:
+ .zero 4
+ .type g_cur_erase_blk, %object
+ .size g_cur_erase_blk, 4
+g_cur_erase_blk:
+ .zero 4
+ .type gBbtInfo, %object
+ .size gBbtInfo, 96
+gBbtInfo:
+ .zero 96
+ .type gSysFreeQueue, %object
+ .size gSysFreeQueue, 2056
+gSysFreeQueue:
+ .zero 2056
+ .type req_erase, %object
+ .size req_erase, 8
+req_erase:
.zero 8
- .type g_gc_superblock, %object
- .size g_gc_superblock, 48
-g_gc_superblock:
- .zero 48
- .type g_gc_temp_superblock, %object
- .size g_gc_temp_superblock, 48
-g_gc_temp_superblock:
- .zero 48
- .type g_buffer_superblock, %object
- .size g_buffer_superblock, 48
-g_buffer_superblock:
- .zero 48
- .type g_active_superblock, %object
- .size g_active_superblock, 48
-g_active_superblock:
- .zero 48
- .type g_num_data_superblocks, %object
- .size g_num_data_superblocks, 2
-g_num_data_superblocks:
- .zero 2
- .type g_num_free_superblocks, %object
- .size g_num_free_superblocks, 2
-g_num_free_superblocks:
- .zero 2
+ .type p_erase_count_table, %object
+ .size p_erase_count_table, 8
+p_erase_count_table:
+ .zero 8
+ .type g_totle_sys_slc_erase_count, %object
+ .size g_totle_sys_slc_erase_count, 4
+g_totle_sys_slc_erase_count:
.zero 4
- .type p_data_block_list_tail, %object
- .size p_data_block_list_tail, 8
-p_data_block_list_tail:
+ .zero 4
+ .type p_sys_data_buf, %object
+ .size p_sys_data_buf, 8
+p_sys_data_buf:
+ .zero 8
+ .type p_data_block_list_table, %object
+ .size p_data_block_list_table, 8
+p_data_block_list_table:
.zero 8
.type p_data_block_list_head, %object
.size p_data_block_list_head, 8
p_data_block_list_head:
.zero 8
+ .type p_valid_page_count_table, %object
+ .size p_valid_page_count_table, 8
+p_valid_page_count_table:
+ .zero 8
+ .type p_data_block_list_tail, %object
+ .size p_data_block_list_tail, 8
+p_data_block_list_tail:
+ .zero 8
+ .type g_num_data_superblocks, %object
+ .size g_num_data_superblocks, 2
+g_num_data_superblocks:
+ .zero 2
+ .zero 6
.type p_free_data_block_list_head, %object
.size p_free_data_block_list_head, 8
p_free_data_block_list_head:
.zero 8
- .type p_data_block_list_table, %object
- .size p_data_block_list_table, 8
-p_data_block_list_table:
- .zero 8
- .type g_l2p_last_update_region_id, %object
- .size g_l2p_last_update_region_id, 2
-g_l2p_last_update_region_id:
+ .type g_num_free_superblocks, %object
+ .size g_num_free_superblocks, 2
+g_num_free_superblocks:
.zero 2
.zero 6
- .type p_l2p_map_buf, %object
- .size p_l2p_map_buf, 8
-p_l2p_map_buf:
- .zero 8
+ .type g_active_superblock, %object
+ .size g_active_superblock, 48
+g_active_superblock:
+ .zero 48
+ .type g_buffer_superblock, %object
+ .size g_buffer_superblock, 48
+g_buffer_superblock:
+ .zero 48
+ .type g_gc_temp_superblock, %object
+ .size g_gc_temp_superblock, 48
+g_gc_temp_superblock:
+ .zero 48
.type p_l2p_ram_map, %object
.size p_l2p_ram_map, 8
p_l2p_ram_map:
.zero 8
- .type g_totle_vendor_block, %object
- .size g_totle_vendor_block, 2
-g_totle_vendor_block:
+ .type g_l2p_last_update_region_id, %object
+ .size g_l2p_last_update_region_id, 2
+g_l2p_last_update_region_id:
.zero 2
- .zero 6
- .type p_vendor_region_ppn_table, %object
- .size p_vendor_region_ppn_table, 8
-p_vendor_region_ppn_table:
- .zero 8
- .type p_vendor_block_ver_table, %object
- .size p_vendor_block_ver_table, 8
-p_vendor_block_ver_table:
- .zero 8
- .type p_vendor_block_valid_page_count, %object
- .size p_vendor_block_valid_page_count, 8
-p_vendor_block_valid_page_count:
- .zero 8
- .type p_vendor_block_table, %object
- .size p_vendor_block_table, 8
-p_vendor_block_table:
- .zero 8
- .type g_totle_map_block, %object
- .size g_totle_map_block, 2
-g_totle_map_block:
+ .type FtlUpdateVaildLpnCount, %object
+ .size FtlUpdateVaildLpnCount, 2
+FtlUpdateVaildLpnCount:
+ .zero 2
+ .type g_VaildLpn, %object
+ .size g_VaildLpn, 4
+g_VaildLpn:
+ .zero 4
+ .type g_inkDie_check_enable, %object
+ .size g_inkDie_check_enable, 4
+g_inkDie_check_enable:
+ .zero 4
+ .type g_totle_read_page_count, %object
+ .size g_totle_read_page_count, 4
+g_totle_read_page_count:
+ .zero 4
+ .type g_totle_discard_page_count, %object
+ .size g_totle_discard_page_count, 4
+g_totle_discard_page_count:
+ .zero 4
+ .type g_totle_write_page_count, %object
+ .size g_totle_write_page_count, 4
+g_totle_write_page_count:
+ .zero 4
+ .type g_totle_cache_write_count, %object
+ .size g_totle_cache_write_count, 4
+g_totle_cache_write_count:
+ .zero 4
+ .type g_totle_l2p_write_count, %object
+ .size g_totle_l2p_write_count, 4
+g_totle_l2p_write_count:
+ .zero 4
+ .type g_totle_gc_page_count, %object
+ .size g_totle_gc_page_count, 4
+g_totle_gc_page_count:
+ .zero 4
+ .type g_totle_write_sector, %object
+ .size g_totle_write_sector, 4
+g_totle_write_sector:
+ .zero 4
+ .type g_totle_read_sector, %object
+ .size g_totle_read_sector, 4
+g_totle_read_sector:
+ .zero 4
+ .type g_GlobalSysVersion, %object
+ .size g_GlobalSysVersion, 4
+g_GlobalSysVersion:
+ .zero 4
+ .type g_GlobalDataVersion, %object
+ .size g_GlobalDataVersion, 4
+g_GlobalDataVersion:
+ .zero 4
+ .type g_totle_mlc_erase_count, %object
+ .size g_totle_mlc_erase_count, 4
+g_totle_mlc_erase_count:
+ .zero 4
+ .type g_totle_slc_erase_count, %object
+ .size g_totle_slc_erase_count, 4
+g_totle_slc_erase_count:
+ .zero 4
+ .type g_totle_avg_erase_count, %object
+ .size g_totle_avg_erase_count, 4
+g_totle_avg_erase_count:
+ .zero 4
+ .type g_max_erase_count, %object
+ .size g_max_erase_count, 4
+g_max_erase_count:
+ .zero 4
+ .type g_min_erase_count, %object
+ .size g_min_erase_count, 4
+g_min_erase_count:
+ .zero 4
+ .type g_sys_save_data, %object
+ .size g_sys_save_data, 48
+g_sys_save_data:
+ .zero 48
+ .type c_ftl_nand_data_op_blks_per_plane, %object
+ .size c_ftl_nand_data_op_blks_per_plane, 2
+c_ftl_nand_data_op_blks_per_plane:
.zero 2
.zero 6
- .type p_map_region_ppn_table, %object
- .size p_map_region_ppn_table, 8
-p_map_region_ppn_table:
- .zero 8
- .type p_map_block_ver_table, %object
- .size p_map_block_ver_table, 8
-p_map_block_ver_table:
- .zero 8
- .type p_map_block_valid_page_count, %object
- .size p_map_block_valid_page_count, 8
-p_map_block_valid_page_count:
- .zero 8
- .type p_map_block_table, %object
- .size p_map_block_table, 8
-p_map_block_table:
- .zero 8
- .type p_valid_page_count_check_table, %object
- .size p_valid_page_count_check_table, 8
-p_valid_page_count_check_table:
- .zero 8
- .type p_valid_page_count_table, %object
- .size p_valid_page_count_table, 8
-p_valid_page_count_table:
- .zero 8
- .type g_totle_swl_count, %object
- .size g_totle_swl_count, 4
-g_totle_swl_count:
+ .type gSysInfo, %object
+ .size gSysInfo, 12
+gSysInfo:
+ .zero 12
+ .zero 4
+ .type g_gc_superblock, %object
+ .size g_gc_superblock, 48
+g_gc_superblock:
+ .zero 48
+ .type g_all_blk_used_slc_mode, %object
+ .size g_all_blk_used_slc_mode, 4
+g_all_blk_used_slc_mode:
.zero 4
.zero 4
- .type p_swl_mul_table, %object
- .size p_swl_mul_table, 8
-p_swl_mul_table:
- .zero 8
- .type p_erase_count_table, %object
- .size p_erase_count_table, 8
-p_erase_count_table:
- .zero 8
- .type g_ect_tbl_info_size, %object
- .size g_ect_tbl_info_size, 2
-g_ect_tbl_info_size:
+ .type g_sys_ext_data, %object
+ .size g_sys_ext_data, 512
+g_sys_ext_data:
+ .zero 512
+ .type g_gc_free_blk_threshold, %object
+ .size g_gc_free_blk_threshold, 2
+g_gc_free_blk_threshold:
+ .zero 2
+ .type g_gc_merge_free_blk_threshold, %object
+ .size g_gc_merge_free_blk_threshold, 2
+g_gc_merge_free_blk_threshold:
+ .zero 2
+ .type g_gc_skip_write_count, %object
+ .size g_gc_skip_write_count, 4
+g_gc_skip_write_count:
+ .zero 4
+ .type g_gc_blk_index, %object
+ .size g_gc_blk_index, 2
+g_gc_blk_index:
.zero 2
- .zero 6
- .type gp_ect_tbl_info, %object
- .size gp_ect_tbl_info, 8
-gp_ect_tbl_info:
- .zero 8
+ .zero 2
+ .type g_in_swl_replace, %object
+ .size g_in_swl_replace, 4
+g_in_swl_replace:
+ .zero 4
.type g_gc_num_req, %object
.size g_gc_num_req, 4
g_gc_num_req:
.zero 4
- .type c_gc_page_buf_num, %object
- .size c_gc_page_buf_num, 4
-c_gc_page_buf_num:
.zero 4
.type gp_gc_page_buf_info, %object
.size gp_gc_page_buf_info, 8
.size p_gc_spare_buf, 8
p_gc_spare_buf:
.zero 8
- .type p_io_spare_buf, %object
- .size p_io_spare_buf, 8
-p_io_spare_buf:
- .zero 8
- .type p_io_data_buf_1, %object
- .size p_io_data_buf_1, 8
-p_io_data_buf_1:
- .zero 8
- .type p_io_data_buf_0, %object
- .size p_io_data_buf_0, 8
-p_io_data_buf_0:
- .zero 8
- .type p_sys_spare_buf, %object
- .size p_sys_spare_buf, 8
-p_sys_spare_buf:
- .zero 8
- .type p_vendor_data_buf, %object
- .size p_vendor_data_buf, 8
-p_vendor_data_buf:
+ .type req_gc, %object
+ .size req_gc, 8
+req_gc:
.zero 8
- .type p_sys_data_buf_1, %object
- .size p_sys_data_buf_1, 8
-p_sys_data_buf_1:
+ .type c_gc_page_buf_num, %object
+ .size c_gc_page_buf_num, 4
+c_gc_page_buf_num:
+ .zero 4
+ .type g_gc_blk_num, %object
+ .size g_gc_blk_num, 2
+g_gc_blk_num:
+ .zero 2
+ .zero 2
+ .type p_gc_blk_tbl, %object
+ .size p_gc_blk_tbl, 8
+p_gc_blk_tbl:
.zero 8
- .type p_sys_data_buf, %object
- .size p_sys_data_buf, 8
-p_sys_data_buf:
+ .type g_gc_page_offset, %object
+ .size g_gc_page_offset, 2
+g_gc_page_offset:
+ .zero 2
+ .zero 6
+ .type p_gc_page_info, %object
+ .size p_gc_page_info, 8
+p_gc_page_info:
.zero 8
- .type g_wr_page_num, %object
- .size g_wr_page_num, 4
-g_wr_page_num:
+ .type g_gc_next_blk, %object
+ .size g_gc_next_blk, 2
+g_gc_next_blk:
+ .zero 2
+ .type g_gc_next_blk_1, %object
+ .size g_gc_next_blk_1, 2
+g_gc_next_blk_1:
+ .zero 2
+ .type g_gc_bad_block_temp_num, %object
+ .size g_gc_bad_block_temp_num, 2
+g_gc_bad_block_temp_num:
+ .zero 2
+ .zero 2
+ .type g_gc_bad_block_temp_tbl, %object
+ .size g_gc_bad_block_temp_tbl, 34
+g_gc_bad_block_temp_tbl:
+ .zero 34
+ .type g_gc_bad_block_gc_index, %object
+ .size g_gc_bad_block_gc_index, 2
+g_gc_bad_block_gc_index:
+ .zero 2
+ .type mlcPageToSlcPageTbl, %object
+ .size mlcPageToSlcPageTbl, 1024
+mlcPageToSlcPageTbl:
+ .zero 1024
+ .type gNandMaxChip, %object
+ .size gNandMaxChip, 1
+gNandMaxChip:
+ .zero 1
+ .zero 1
+ .type gTotleBlock, %object
+ .size gTotleBlock, 2
+gTotleBlock:
+ .zero 2
+ .type g_SlcPartLbaEndSector, %object
+ .size g_SlcPartLbaEndSector, 4
+g_SlcPartLbaEndSector:
.zero 4
+ .type g_in_gc_progress, %object
+ .size g_in_gc_progress, 4
+g_in_gc_progress:
+ .zero 4
+ .type g_gc_head_data_block, %object
+ .size g_gc_head_data_block, 4
+g_gc_head_data_block:
+ .zero 4
+ .type g_gc_head_data_block_count, %object
+ .size g_gc_head_data_block_count, 4
+g_gc_head_data_block_count:
.zero 4
- .type req_wr_io, %object
- .size req_wr_io, 8
-req_wr_io:
- .zero 8
.type c_wr_page_buf_num, %object
.size c_wr_page_buf_num, 4
c_wr_page_buf_num:
.zero 4
.zero 4
+ .type req_read, %object
+ .size req_read, 8
+req_read:
+ .zero 8
+ .type req_gc_dst, %object
+ .size req_gc_dst, 8
+req_gc_dst:
+ .zero 8
+ .type req_prgm, %object
+ .size req_prgm, 8
+req_prgm:
+ .zero 8
+ .type p_sys_data_buf_1, %object
+ .size p_sys_data_buf_1, 8
+p_sys_data_buf_1:
+ .zero 8
+ .type p_vendor_data_buf, %object
+ .size p_vendor_data_buf, 8
+p_vendor_data_buf:
+ .zero 8
.type p_wr_io_data_buf, %object
.size p_wr_io_data_buf, 8
p_wr_io_data_buf:
+ .zero 8
+ .type p_io_data_buf_0, %object
+ .size p_io_data_buf_0, 8
+p_io_data_buf_0:
+ .zero 8
+ .type p_io_data_buf_1, %object
+ .size p_io_data_buf_1, 8
+p_io_data_buf_1:
+ .zero 8
+ .type p_sys_spare_buf, %object
+ .size p_sys_spare_buf, 8
+p_sys_spare_buf:
+ .zero 8
+ .type p_io_spare_buf, %object
+ .size p_io_spare_buf, 8
+p_io_spare_buf:
.zero 8
.type p_wr_io_spare_buf, %object
.size p_wr_io_spare_buf, 8
p_wr_io_spare_buf:
.zero 8
- .type p_plane_order_table, %object
- .size p_plane_order_table, 32
-p_plane_order_table:
- .zero 32
+ .type g_ect_tbl_info_size, %object
+ .size g_ect_tbl_info_size, 2
+g_ect_tbl_info_size:
+ .zero 2
+ .zero 6
+ .type p_swl_mul_table, %object
+ .size p_swl_mul_table, 8
+p_swl_mul_table:
+ .zero 8
+ .type gp_ect_tbl_info, %object
+ .size gp_ect_tbl_info, 8
+gp_ect_tbl_info:
+ .zero 8
+ .type p_valid_page_count_check_table, %object
+ .size p_valid_page_count_check_table, 8
+p_valid_page_count_check_table:
+ .zero 8
+ .type p_map_block_table, %object
+ .size p_map_block_table, 8
+p_map_block_table:
+ .zero 8
+ .type p_map_block_valid_page_count, %object
+ .size p_map_block_valid_page_count, 8
+p_map_block_valid_page_count:
+ .zero 8
+ .type p_vendor_block_valid_page_count, %object
+ .size p_vendor_block_valid_page_count, 8
+p_vendor_block_valid_page_count:
+ .zero 8
+ .type p_vendor_block_ver_table, %object
+ .size p_vendor_block_ver_table, 8
+p_vendor_block_ver_table:
+ .zero 8
+ .type p_vendor_region_ppn_table, %object
+ .size p_vendor_region_ppn_table, 8
+p_vendor_region_ppn_table:
+ .zero 8
+ .type p_map_region_ppn_table, %object
+ .size p_map_region_ppn_table, 8
+p_map_region_ppn_table:
+ .zero 8
+ .type p_map_block_ver_table, %object
+ .size p_map_block_ver_table, 8
+p_map_block_ver_table:
+ .zero 8
+ .type p_l2p_map_buf, %object
+ .size p_l2p_map_buf, 8
+p_l2p_map_buf:
+ .zero 8
+ .type c_ftl_nand_bbm_buf_size, %object
+ .size c_ftl_nand_bbm_buf_size, 2
+c_ftl_nand_bbm_buf_size:
+ .zero 2
+ .zero 6
+ .type gL2pMapInfo, %object
+ .size gL2pMapInfo, 64
+gL2pMapInfo:
+ .zero 64
+ .type g_totle_map_block, %object
+ .size g_totle_map_block, 2
+g_totle_map_block:
+ .zero 2
+ .zero 6
.type g_req_cache, %object
.size g_req_cache, 8
g_req_cache:
.zero 8
- .type req_gc_dst, %object
- .size req_gc_dst, 8
-req_gc_dst:
+ .type g_tmp_data_superblock_id, %object
+ .size g_tmp_data_superblock_id, 2
+g_tmp_data_superblock_id:
+ .zero 2
+ .zero 2
+ .type g_totle_swl_count, %object
+ .size g_totle_swl_count, 4
+g_totle_swl_count:
+ .zero 4
+ .type ftl_gc_temp_power_lost_recovery_flag, %object
+ .size ftl_gc_temp_power_lost_recovery_flag, 4
+ftl_gc_temp_power_lost_recovery_flag:
+ .zero 4
+ .type g_recovery_page_min_ver, %object
+ .size g_recovery_page_min_ver, 4
+g_recovery_page_min_ver:
+ .zero 4
+ .type gNandIDataBuf, %object
+ .size gNandIDataBuf, 2048
+gNandIDataBuf:
+ .zero 2048
+ .type RK29_NANDC_REG_BASE, %object
+ .size RK29_NANDC_REG_BASE, 8
+RK29_NANDC_REG_BASE:
+ .zero 8
+ .type FlashDdrTunningReadCount, %object
+ .size FlashDdrTunningReadCount, 4
+FlashDdrTunningReadCount:
+ .zero 4
+ .zero 4
+ .type gpReadRetrial, %object
+ .size gpReadRetrial, 8
+gpReadRetrial:
+ .zero 8
+ .type gpFlashSaveInfo, %object
+ .size gpFlashSaveInfo, 8
+gpFlashSaveInfo:
.zero 8
- .type req_gc, %object
- .size req_gc, 8
-req_gc:
+ .type gNandFlashInfoBlockAddr, %object
+ .size gNandFlashInfoBlockAddr, 4
+gNandFlashInfoBlockAddr:
+ .zero 4
+ .type gNandFlashIdbBlockAddr, %object
+ .size gNandFlashIdbBlockAddr, 4
+gNandFlashIdbBlockAddr:
+ .zero 4
+ .type gNandIDBResBlkNumSaveInFlash, %object
+ .size gNandIDBResBlkNumSaveInFlash, 1
+gNandIDBResBlkNumSaveInFlash:
+ .zero 1
+ .type g_maxRetryCount, %object
+ .size g_maxRetryCount, 1
+g_maxRetryCount:
+ .zero 1
+ .type gNandFlashIDBEccBits, %object
+ .size gNandFlashIDBEccBits, 1
+gNandFlashIDBEccBits:
+ .zero 1
+ .zero 5
+ .type gFlashPageBuffer1, %object
+ .size gFlashPageBuffer1, 8
+gFlashPageBuffer1:
.zero 8
- .type req_erase, %object
- .size req_erase, 8
-req_erase:
+ .type gFlashSpareBuffer, %object
+ .size gFlashSpareBuffer, 8
+gFlashSpareBuffer:
.zero 8
- .type req_prgm, %object
- .size req_prgm, 8
-req_prgm:
+ .type gFlashProgCheckBuffer, %object
+ .size gFlashProgCheckBuffer, 8
+gFlashProgCheckBuffer:
.zero 8
- .type req_read, %object
- .size req_read, 8
-req_read:
+ .type gFlashProgCheckSpareBuffer, %object
+ .size gFlashProgCheckSpareBuffer, 8
+gFlashProgCheckSpareBuffer:
.zero 8
+ .type gMultiPageReadEn, %object
+ .size gMultiPageReadEn, 1
+gMultiPageReadEn:
+ .zero 1
+ .zero 7
+ .type FbbtBlk, %object
+ .size FbbtBlk, 16
+FbbtBlk:
+ .zero 16
.type req_sys, %object
.size req_sys, 56
req_sys:
.zero 56
- .type gVendorBlkInfo, %object
- .size gVendorBlkInfo, 64
-gVendorBlkInfo:
- .zero 64
- .type gL2pMapInfo, %object
- .size gL2pMapInfo, 64
-gL2pMapInfo:
- .zero 64
- .type gSysFreeQueue, %object
- .size gSysFreeQueue, 2056
-gSysFreeQueue:
- .zero 2056
- .type gSysInfo, %object
- .size gSysInfo, 12
-gSysInfo:
- .zero 12
- .zero 4
- .type gBbtInfo, %object
- .size gBbtInfo, 96
-gBbtInfo:
- .zero 96
- .type g_inkDie_check_enable, %object
- .size g_inkDie_check_enable, 4
-g_inkDie_check_enable:
- .zero 4
- .type g_SlcPartLbaEndSector, %object
- .size g_SlcPartLbaEndSector, 4
-g_SlcPartLbaEndSector:
- .zero 4
.type g_MaxLbn, %object
.size g_MaxLbn, 4
g_MaxLbn:
.zero 4
- .type g_VaildLpn, %object
- .size g_VaildLpn, 4
-g_VaildLpn:
- .zero 4
- .type g_MaxLpn, %object
- .size g_MaxLpn, 4
-g_MaxLpn:
- .zero 4
- .type g_MaxLbaSector, %object
- .size g_MaxLbaSector, 4
-g_MaxLbaSector:
- .zero 4
- .type g_GlobalDataVersion, %object
- .size g_GlobalDataVersion, 4
-g_GlobalDataVersion:
- .zero 4
- .type g_GlobalSysVersion, %object
- .size g_GlobalSysVersion, 4
-g_GlobalSysVersion:
- .zero 4
- .type ftl_gc_temp_power_lost_recovery_flag, %object
- .size ftl_gc_temp_power_lost_recovery_flag, 4
-ftl_gc_temp_power_lost_recovery_flag:
- .zero 4
- .type c_ftl_nand_max_data_blks, %object
- .size c_ftl_nand_max_data_blks, 4
-c_ftl_nand_max_data_blks:
- .zero 4
- .type c_ftl_nand_data_op_blks_per_plane, %object
- .size c_ftl_nand_data_op_blks_per_plane, 2
-c_ftl_nand_data_op_blks_per_plane:
- .zero 2
- .type c_ftl_nand_data_blks_per_plane, %object
- .size c_ftl_nand_data_blks_per_plane, 2
-c_ftl_nand_data_blks_per_plane:
- .zero 2
- .type c_ftl_nand_max_sys_blks, %object
- .size c_ftl_nand_max_sys_blks, 4
-c_ftl_nand_max_sys_blks:
- .zero 4
- .type c_ftl_nand_init_sys_blks_per_plane, %object
- .size c_ftl_nand_init_sys_blks_per_plane, 4
-c_ftl_nand_init_sys_blks_per_plane:
- .zero 4
- .type c_ftl_nand_sys_blks_per_plane, %object
- .size c_ftl_nand_sys_blks_per_plane, 4
-c_ftl_nand_sys_blks_per_plane:
- .zero 4
- .type c_ftl_vendor_part_size, %object
- .size c_ftl_vendor_part_size, 2
-c_ftl_vendor_part_size:
- .zero 2
- .type c_ftl_nand_max_vendor_blks, %object
- .size c_ftl_nand_max_vendor_blks, 2
-c_ftl_nand_max_vendor_blks:
- .zero 2
- .type c_ftl_nand_max_map_blks, %object
- .size c_ftl_nand_max_map_blks, 4
-c_ftl_nand_max_map_blks:
.zero 4
- .type c_ftl_nand_map_blks_per_plane, %object
- .size c_ftl_nand_map_blks_per_plane, 2
-c_ftl_nand_map_blks_per_plane:
- .zero 2
- .type c_ftl_nand_vendor_region_num, %object
- .size c_ftl_nand_vendor_region_num, 2
-c_ftl_nand_vendor_region_num:
- .zero 2
- .type c_ftl_nand_l2pmap_ram_region_num, %object
- .size c_ftl_nand_l2pmap_ram_region_num, 2
-c_ftl_nand_l2pmap_ram_region_num:
+ .type gVendorBlkInfo, %object
+ .size gVendorBlkInfo, 64
+gVendorBlkInfo:
+ .zero 64
+ .type g_ect_tbl_power_up_flush, %object
+ .size g_ect_tbl_power_up_flush, 2
+g_ect_tbl_power_up_flush:
.zero 2
- .type c_ftl_nand_map_region_num, %object
- .size c_ftl_nand_map_region_num, 2
-c_ftl_nand_map_region_num:
+ .type g_power_lost_recovery_flag, %object
+ .size g_power_lost_recovery_flag, 2
+g_power_lost_recovery_flag:
.zero 2
- .type c_ftl_nand_totle_phy_blks, %object
- .size c_ftl_nand_totle_phy_blks, 4
-c_ftl_nand_totle_phy_blks:
+ .type g_recovery_page_num, %object
+ .size g_recovery_page_num, 4
+g_recovery_page_num:
.zero 4
- .type c_ftl_nand_reserved_blks, %object
- .size c_ftl_nand_reserved_blks, 2
-c_ftl_nand_reserved_blks:
- .zero 2
- .type c_ftl_nand_byte_pre_oob, %object
- .size c_ftl_nand_byte_pre_oob, 2
-c_ftl_nand_byte_pre_oob:
- .zero 2
- .type c_ftl_nand_byte_pre_page, %object
- .size c_ftl_nand_byte_pre_page, 2
-c_ftl_nand_byte_pre_page:
- .zero 2
- .type c_ftl_nand_sec_pre_page_shift, %object
- .size c_ftl_nand_sec_pre_page_shift, 2
-c_ftl_nand_sec_pre_page_shift:
- .zero 2
- .type c_ftl_nand_sec_pre_page, %object
- .size c_ftl_nand_sec_pre_page, 2
-c_ftl_nand_sec_pre_page:
- .zero 2
- .type c_ftl_nand_page_pre_super_blk, %object
- .size c_ftl_nand_page_pre_super_blk, 2
-c_ftl_nand_page_pre_super_blk:
- .zero 2
- .type c_ftl_nand_page_pre_slc_blk, %object
- .size c_ftl_nand_page_pre_slc_blk, 2
-c_ftl_nand_page_pre_slc_blk:
- .zero 2
- .type c_ftl_nand_page_pre_blk, %object
- .size c_ftl_nand_page_pre_blk, 2
-c_ftl_nand_page_pre_blk:
- .zero 2
- .type c_ftl_nand_bbm_buf_size, %object
- .size c_ftl_nand_bbm_buf_size, 2
-c_ftl_nand_bbm_buf_size:
- .zero 2
- .type c_ftl_nand_ext_blk_pre_plane, %object
- .size c_ftl_nand_ext_blk_pre_plane, 2
-c_ftl_nand_ext_blk_pre_plane:
- .zero 2
- .type c_ftl_nand_blk_pre_plane, %object
- .size c_ftl_nand_blk_pre_plane, 2
-c_ftl_nand_blk_pre_plane:
- .zero 2
- .type c_ftl_nand_planes_num, %object
- .size c_ftl_nand_planes_num, 2
-c_ftl_nand_planes_num:
- .zero 2
- .type c_ftl_nand_blks_per_die_shift, %object
- .size c_ftl_nand_blks_per_die_shift, 2
-c_ftl_nand_blks_per_die_shift:
- .zero 2
- .type c_ftl_nand_blks_per_die, %object
- .size c_ftl_nand_blks_per_die, 2
-c_ftl_nand_blks_per_die:
- .zero 2
- .type c_ftl_nand_planes_per_die, %object
- .size c_ftl_nand_planes_per_die, 2
-c_ftl_nand_planes_per_die:
+ .type g_recovery_ppa_tbl, %object
+ .size g_recovery_ppa_tbl, 128
+g_recovery_ppa_tbl:
+ .zero 128
+ .type gc_ink_free_return_value, %object
+ .size gc_ink_free_return_value, 2
+gc_ink_free_return_value:
.zero 2
- .type c_ftl_nand_die_num, %object
- .size c_ftl_nand_die_num, 2
-c_ftl_nand_die_num:
+ .type g_gc_cur_blk_valid_pages, %object
+ .size g_gc_cur_blk_valid_pages, 2
+g_gc_cur_blk_valid_pages:
.zero 2
- .type c_ftl_nand_type, %object
- .size c_ftl_nand_type, 2
-c_ftl_nand_type:
+ .type g_gc_cur_blk_max_valid_pages, %object
+ .size g_gc_cur_blk_max_valid_pages, 2
+g_gc_cur_blk_max_valid_pages:
.zero 2
.zero 2
- .type gMasterTempBuf, %object
- .size gMasterTempBuf, 8
-gMasterTempBuf:
+ .type gp_last_act_superblock, %object
+ .size gp_last_act_superblock, 8
+gp_last_act_superblock:
.zero 8
- .type gMasterInfo, %object
- .size gMasterInfo, 48
-gMasterInfo:
- .zero 48
- .type gNandcDumpWriteEn, %object
- .size gNandcDumpWriteEn, 4
-gNandcDumpWriteEn:
+ .type gc_discard_updated, %object
+ .size gc_discard_updated, 4
+gc_discard_updated:
.zero 4
- .type gToggleModeClkDiv, %object
- .size gToggleModeClkDiv, 4
-gToggleModeClkDiv:
+ .type g_LowFormat, %object
+ .size g_LowFormat, 4
+g_LowFormat:
.zero 4
- .type gBootDdrMode, %object
- .size gBootDdrMode, 4
-gBootDdrMode:
+ .type gLoaderBootInfo, %object
+ .size gLoaderBootInfo, 8
+gLoaderBootInfo:
+ .zero 8
+ .type RK29_NANDC1_REG_BASE, %object
+ .size RK29_NANDC1_REG_BASE, 8
+RK29_NANDC1_REG_BASE:
+ .zero 8
+ .type g_ftl_nand_free_count, %object
+ .size g_ftl_nand_free_count, 4
+g_ftl_nand_free_count:
.zero 4
- .type gNandcEccBits, %object
- .size gNandcEccBits, 4
-gNandcEccBits:
+ .type last_cache_match_count, %object
+ .size last_cache_match_count, 4
+last_cache_match_count:
.zero 4
- .type gpNandc1, %object
- .size gpNandc1, 8
-gpNandc1:
+ .type g_idb_buffer, %object
+ .size g_idb_buffer, 8
+g_idb_buffer:
.zero 8
- .type gpNandc, %object
- .size gpNandc, 8
-gpNandc:
+ .type gpDrmKeyInfo, %object
+ .size gpDrmKeyInfo, 8
+gpDrmKeyInfo:
.zero 8
- .type gNandcVer, %object
- .size gNandcVer, 4
-gNandcVer:
- .zero 4
+ .type SecureBootCheckOK, %object
+ .size SecureBootCheckOK, 4
+SecureBootCheckOK:
.zero 4
- .type gNandChipMap, %object
- .size gNandChipMap, 64
-gNandChipMap:
- .zero 64
- .type gNandIDataBuf, %object
- .size gNandIDataBuf, 2048
-gNandIDataBuf:
- .zero 2048
- .type FlashDdrTunningReadCount, %object
- .size FlashDdrTunningReadCount, 4
-FlashDdrTunningReadCount:
+ .type SecureBootEn, %object
+ .size SecureBootEn, 4
+SecureBootEn:
.zero 4
+ .type gpBootConfig, %object
+ .size gpBootConfig, 8
+gpBootConfig:
+ .zero 8
+ .type gSnSectorData, %object
+ .size gSnSectorData, 512
+gSnSectorData:
+ .zero 512
+ .type SecureBootUnlockTryCount, %object
+ .size SecureBootUnlockTryCount, 4
+SecureBootUnlockTryCount:
.zero 4
- .type gNandPhyInfo, %object
- .size gNandPhyInfo, 28
-gNandPhyInfo:
- .zero 28
.zero 4
- .type gFlashProgCheckSpareBuffer, %object
- .size gFlashProgCheckSpareBuffer, 8
-gFlashProgCheckSpareBuffer:
- .zero 8
- .type gFlashProgCheckBuffer, %object
- .size gFlashProgCheckBuffer, 8
-gFlashProgCheckBuffer:
- .zero 8
- .type gFlashSpareBuffer, %object
- .size gFlashSpareBuffer, 8
-gFlashSpareBuffer:
- .zero 8
- .type gFlashPageBuffer1, %object
- .size gFlashPageBuffer1, 8
-gFlashPageBuffer1:
- .zero 8
- .type gFlashPageBuffer0, %object
- .size gFlashPageBuffer0, 8
-gFlashPageBuffer0:
+ .type gpVendor0Info, %object
+ .size gpVendor0Info, 8
+gpVendor0Info:
.zero 8
- .type gpFlashSaveInfo, %object
- .size gpFlashSaveInfo, 8
-gpFlashSaveInfo:
+ .type gpVendor1Info, %object
+ .size gpVendor1Info, 8
+gpVendor1Info:
.zero 8
- .type gReadRetryInfo, %object
- .size gReadRetryInfo, 852
-gReadRetryInfo:
- .zero 852
+ .type gToggleModeClkDiv, %object
+ .size gToggleModeClkDiv, 4
+gToggleModeClkDiv:
.zero 4
- .type gpNandParaInfo, %object
- .size gpNandParaInfo, 8
-gpNandParaInfo:
+ .zero 4
+ .type gpNandc1, %object
+ .size gpNandc1, 8
+gpNandc1:
.zero 8
- .type gNandOptPara, %object
- .size gNandOptPara, 32
-gNandOptPara:
- .zero 32
- .type g_slc2KBNand, %object
- .size g_slc2KBNand, 1
-g_slc2KBNand:
- .zero 1
- .type g_maxRetryCount, %object
- .size g_maxRetryCount, 1
-g_maxRetryCount:
- .zero 1
- .type g_maxRegNum, %object
- .size g_maxRegNum, 1
-g_maxRegNum:
- .zero 1
- .type g_retryMode, %object
- .size g_retryMode, 1
-g_retryMode:
- .zero 1
- .type gNandIDBResBlkNumSaveInFlash, %object
- .size gNandIDBResBlkNumSaveInFlash, 1
-gNandIDBResBlkNumSaveInFlash:
- .zero 1
- .type gNandIDBResBlkNum, %object
- .size gNandIDBResBlkNum, 1
-gNandIDBResBlkNum:
- .zero 1
- .zero 2
.type gNandFlashResEndPageAddr, %object
.size gNandFlashResEndPageAddr, 4
gNandFlashResEndPageAddr:
- .zero 4
- .type gNandFlashInfoBlockAddr, %object
- .size gNandFlashInfoBlockAddr, 4
-gNandFlashInfoBlockAddr:
- .zero 4
- .type gNandFlashIdbBlockAddr, %object
- .size gNandFlashIdbBlockAddr, 4
-gNandFlashIdbBlockAddr:
.zero 4
.type gNandFlashInfoBlockEcc, %object
.size gNandFlashInfoBlockEcc, 1
gNandFlashInfoBlockEcc:
- .zero 1
- .type gNandFlashIDBEccBits, %object
- .size gNandFlashIDBEccBits, 1
-gNandFlashIDBEccBits:
- .zero 1
- .type gNandFlashEccBits, %object
- .size gNandFlashEccBits, 1
-gNandFlashEccBits:
- .zero 1
- .type gNandRandomizer, %object
- .size gNandRandomizer, 1
-gNandRandomizer:
- .zero 1
- .type gBlockPageAlignSize, %object
- .size gBlockPageAlignSize, 4
-gBlockPageAlignSize:
- .zero 4
- .type gTotleBlock, %object
- .size gTotleBlock, 2
-gTotleBlock:
- .zero 2
- .type gNandMaxChip, %object
- .size gNandMaxChip, 1
-gNandMaxChip:
- .zero 1
- .type gNandMaxDie, %object
- .size gNandMaxDie, 1
-gNandMaxDie:
- .zero 1
- .type gFlashInterfaceMode, %object
- .size gFlashInterfaceMode, 1
-gFlashInterfaceMode:
.zero 1
.type gFlashOnfiModeEn, %object
.size gFlashOnfiModeEn, 1
gFlashOnfiModeEn:
- .zero 1
- .type gFlashToggleModeEn, %object
- .size gFlashToggleModeEn, 1
-gFlashToggleModeEn:
.zero 1
.type gFlashSdrModeEn, %object
.size gFlashSdrModeEn, 1
gFlashSdrModeEn:
.zero 1
- .type gMultiPageProgEn, %object
- .size gMultiPageProgEn, 1
-gMultiPageProgEn:
- .zero 1
- .type gMultiPageReadEn, %object
- .size gMultiPageReadEn, 1
-gMultiPageReadEn:
- .zero 1
- .zero 2
- .type gpReadRetrial, %object
- .size gpReadRetrial, 8
-gpReadRetrial:
- .zero 8
- .type mlcPageToSlcPageTbl, %object
- .size mlcPageToSlcPageTbl, 1024
-mlcPageToSlcPageTbl:
- .zero 1024
- .type slcPageToMlcPageTbl, %object
- .size slcPageToMlcPageTbl, 512
-slcPageToMlcPageTbl:
- .zero 512
- .type DieAddrs, %object
- .size DieAddrs, 32
-DieAddrs:
- .zero 32
- .type gDieOp, %object
- .size gDieOp, 192
-gDieOp:
- .zero 192
- .type DieCsIndex, %object
- .size DieCsIndex, 8
-DieCsIndex:
- .zero 8
- .type IDByte, %object
- .size IDByte, 32
-IDByte:
- .zero 32
- .type read_retry_cur_offset, %object
- .size read_retry_cur_offset, 4
-read_retry_cur_offset:
- .zero 4
- .section .data.rel,"aw",%progbits
- .align 3
-.LANCHOR3 = . + 0
- .type rknand_sys_storage_dev, %object
- .size rknand_sys_storage_dev, 80
-rknand_sys_storage_dev:
- .word 255
- .zero 4
- .xword .LC157
- .xword rknand_sys_storage_fops
- .zero 56