From 94b85d035db9aedd6602c619c2e2595e0cfc24ea Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Thu, 23 Apr 2020 16:53:24 +0800 Subject: [PATCH 01/18] misc: otp: use buffer to store capability ioctl() should return error code but not data. Signed-off-by: Jason Zhu Change-Id: Ica1242619ed59728acbeda7db493e5710f410a17 --- drivers/misc/rockchip-secure-otp-v2.S | 1943 +++++++++++++------------ 1 file changed, 1003 insertions(+), 940 deletions(-) diff --git a/drivers/misc/rockchip-secure-otp-v2.S b/drivers/misc/rockchip-secure-otp-v2.S index 333893a1f7..afb6b6edc2 100644 --- a/drivers/misc/rockchip-secure-otp-v2.S +++ b/drivers/misc/rockchip-secure-otp-v2.S @@ -20,25 +20,42 @@ .fpu softvfp .type rockchip_secure_otp_v2_ioctl, %function rockchip_secure_otp_v2_ioctl: -.LFB271: +.LFB272: .file 1 "drivers/misc/rockchip-secure-otp-v2.c" - .loc 1 158 0 + .loc 1 165 0 .cfi_startproc @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. .LVL0: - .loc 1 161 0 + .loc 1 168 0 movw r3, #27908 cmp r1, r3 - .loc 1 170 0 - ite eq - moveq r0, #8 .LVL1: +.LBB18: +.LBB19: + .loc 1 158 0 + ittte eq + moveq r3, #8 +.LBE19: +.LBE18: + .loc 1 171 0 + moveq r0, #0 +.LVL2: +.LBB21: +.LBB20: + .loc 1 158 0 + streq r3, [r2] +.LVL3: +.LBE20: +.LBE21: + .loc 1 166 0 mvnne r0, #21 +.LVL4: + .loc 1 178 0 bx lr .cfi_endproc -.LFE271: +.LFE272: .size rockchip_secure_otp_v2_ioctl, .-rockchip_secure_otp_v2_ioctl .section .text.rockchip_secure_otp_v2_read,"ax",%progbits .align 1 @@ -53,7 +70,7 @@ rockchip_secure_otp_v2_read: .cfi_startproc @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -.LVL2: +.LVL5: push {r4, r5, r6, r7, r8, r10, fp, lr} .cfi_def_cfa_offset 32 .cfi_offset 4, -32 @@ -70,15 +87,15 @@ rockchip_secure_otp_v2_read: mov r6, r2 .loc 1 18 0 bl dev_get_platdata -.LVL3: +.LVL6: mov r3, #768 mov r5, r0 -.LVL4: -.LBB16: +.LVL7: +.LBB22: .loc 1 25 0 movs r1, #0 -.LVL5: -.L6: +.LVL8: +.L7: .loc 1 25 0 is_stmt 0 discriminator 3 .syntax unified @ 25 "drivers/misc/rockchip-secure-otp-v2.c" 1 @@ -89,44 +106,44 @@ rockchip_secure_otp_v2_read: ldr r2, [r5] str r1, [r2, r3] adds r3, r3, #4 -.LBE16: +.LBE22: .loc 1 24 0 is_stmt 1 discriminator 3 cmp r3, #896 - bne .L6 + bne .L7 subs r6, r6, #1 -.LVL6: +.LVL9: .loc 1 24 0 is_stmt 0 mov r4, r8 -.LBB17: +.LBB23: .loc 1 45 0 is_stmt 1 mov fp, #1 -.LVL7: -.L7: -.LBE17: +.LVL10: +.L8: +.LBE23: .loc 1 27 0 discriminator 1 sub r3, r4, r8 cmp r10, r3 - bgt .L14 + bgt .L15 .loc 1 19 0 movs r0, #0 - b .L9 -.L14: -.LVL8: + b .L10 +.L15: +.LVL11: .loc 1 30 0 cmp r4, #448 - ble .L8 -.L24: -.LVL9: + ble .L9 +.L25: +.LVL12: .loc 1 40 0 mov r0, #-1 -.LVL10: -.L9: +.LVL13: +.L10: mov r3, #768 -.LBB18: +.LBB24: .loc 1 66 0 movs r1, #255 -.LVL11: -.L15: +.LVL14: +.L16: .loc 1 66 0 is_stmt 0 discriminator 3 .syntax unified @ 66 "drivers/misc/rockchip-secure-otp-v2.c" 1 @@ -137,32 +154,32 @@ rockchip_secure_otp_v2_read: ldr r2, [r5] str r1, [r2, r3] adds r3, r3, #4 -.LBE18: +.LBE24: .loc 1 65 0 is_stmt 1 discriminator 3 cmp r3, #896 - bne .L15 + bne .L16 .loc 1 69 0 pop {r4, r5, r6, r7, r8, r10, fp, pc} -.LVL12: -.L8: +.LVL15: +.L9: .loc 1 36 0 - cbz r4, .L10 + cbz r4, .L11 .loc 1 36 0 is_stmt 0 discriminator 1 sub r3, r4, #16 cmp r3, #31 - bls .L10 + bls .L11 .loc 1 36 0 discriminator 2 sub r3, r4, #104 cmp r3, #284 - bls .L10 + bls .L11 .loc 1 39 0 is_stmt 1 - ldr r0, .L25 + ldr r0, .L26 bl printf -.LVL13: - b .L24 -.L10: -.LVL14: -.LBB19: +.LVL16: + b .L25 +.L11: +.LVL17: +.LBB25: .loc 1 44 0 .syntax unified @ 44 "drivers/misc/rockchip-secure-otp-v2.c" 1 @@ -172,9 +189,9 @@ rockchip_secure_otp_v2_read: .syntax unified ldr r3, [r5] str r4, [r3, #28] -.LVL15: -.LBE19: -.LBB20: +.LVL18: +.LBE25: +.LBB26: .loc 1 45 0 .syntax unified @ 45 "drivers/misc/rockchip-secure-otp-v2.c" 1 @@ -185,58 +202,58 @@ rockchip_secure_otp_v2_read: ldr r3, [r5] movw r7, #10002 str fp, [r3, #32] -.LVL16: -.L13: -.LBE20: -.LBB21: +.LVL19: +.L14: +.LBE26: +.LBB27: .loc 1 48 0 ldr r3, [r5] ldr r3, [r3, #48] -.LVL17: +.LVL20: .syntax unified @ 48 "drivers/misc/rockchip-secure-otp-v2.c" 1 dmb sy @ 0 "" 2 -.LVL18: +.LVL21: .thumb .syntax unified -.LBE21: +.LBE27: .loc 1 49 0 - cbz r3, .L11 + cbz r3, .L12 .loc 1 52 0 subs r7, r7, #1 -.LVL19: - beq .L24 -.LVL20: +.LVL22: + beq .L25 +.LVL23: .loc 1 58 0 movs r0, #1 bl udelay -.LVL21: +.LVL24: .loc 1 48 0 - b .L13 -.LVL22: -.L11: -.LBB22: + b .L14 +.LVL25: +.L12: +.LBB28: .loc 1 61 0 discriminator 2 ldr r3, [r5] -.LVL23: +.LVL26: ldr r3, [r3, #36] -.LVL24: +.LVL27: .syntax unified @ 61 "drivers/misc/rockchip-secure-otp-v2.c" 1 dmb sy @ 0 "" 2 .thumb .syntax unified -.LBE22: +.LBE28: strb r3, [r6, #1]! -.LVL25: +.LVL28: adds r4, r4, #1 -.LVL26: - b .L7 -.L26: +.LVL29: + b .L8 +.L27: .align 2 -.L25: +.L26: .word .LC0 .cfi_endproc .LFE268: @@ -249,50 +266,50 @@ rockchip_secure_otp_v2_read: .fpu softvfp .type rockchip_secure_otp_v2_ofdata_to_platdata, %function rockchip_secure_otp_v2_ofdata_to_platdata: -.LFB272: - .loc 1 179 0 +.LFB273: + .loc 1 187 0 .cfi_startproc @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -.LVL27: +.LVL30: push {r3, r4, r5, lr} .cfi_def_cfa_offset 16 .cfi_offset 3, -16 .cfi_offset 4, -12 .cfi_offset 5, -8 .cfi_offset 14, -4 - .loc 1 179 0 + .loc 1 187 0 mov r5, r0 - .loc 1 180 0 + .loc 1 188 0 bl dev_get_platdata -.LVL28: - mov r4, r0 -.LVL29: - .loc 1 182 0 - mov r0, r5 -.LVL30: - bl dev_read_addr_ptr .LVL31: - .loc 1 183 0 + mov r4, r0 +.LVL32: + .loc 1 190 0 + mov r0, r5 +.LVL33: + bl dev_read_addr_ptr +.LVL34: + .loc 1 191 0 movs r2, #0 - .loc 1 182 0 + .loc 1 190 0 str r0, [r4] - .loc 1 183 0 - ldr r1, .L28 + .loc 1 191 0 + ldr r1, .L29 mov r0, r5 bl dev_read_u32_default -.LVL32: +.LVL35: str r0, [r4, #4] - .loc 1 187 0 + .loc 1 195 0 movs r0, #0 pop {r3, r4, r5, pc} -.LVL33: -.L29: +.LVL36: +.L30: .align 2 -.L28: +.L29: .word .LC1 .cfi_endproc -.LFE272: +.LFE273: .size rockchip_secure_otp_v2_ofdata_to_platdata, .-rockchip_secure_otp_v2_ofdata_to_platdata .section .text.rockchip_secure_otp_v2_write,"ax",%progbits .align 1 @@ -307,7 +324,7 @@ rockchip_secure_otp_v2_write: .cfi_startproc @ args = 0, pretend = 0, frame = 8 @ frame_needed = 0, uses_anonymous_args = 0 -.LVL34: +.LVL37: push {r0, r1, r4, r5, r6, r7, r8, r10, fp, lr} .cfi_def_cfa_offset 40 .cfi_offset 4, -32 @@ -325,22 +342,22 @@ rockchip_secure_otp_v2_write: mov r7, r0 .loc 1 115 0 bl dev_get_platdata -.LVL35: +.LVL38: mov r4, r0 -.LVL36: +.LVL39: .loc 1 118 0 mov r0, r8 -.LVL37: +.LVL40: bl malloc_simple -.LVL38: +.LVL41: .loc 1 120 0 mov r6, r0 - cbnz r0, .L31 -.LVL39: -.L63: + cbnz r0, .L32 +.LVL42: +.L64: .loc 1 133 0 mov r7, #-1 -.L30: +.L31: .loc 1 154 0 mov r0, r7 add sp, sp, #8 @@ -348,36 +365,36 @@ rockchip_secure_otp_v2_write: .cfi_def_cfa_offset 32 @ sp needed pop {r4, r5, r6, r7, r8, r10, fp, pc} -.LVL40: -.L31: +.LVL43: +.L32: .cfi_restore_state .loc 1 123 0 mov r2, r0 mov r3, r8 mov r0, r7 -.LVL41: +.LVL44: mov r1, r5 bl rockchip_secure_otp_v2_read -.LVL42: +.LVL45: .loc 1 124 0 mov r7, r0 -.LVL43: +.LVL46: cmp r0, #0 - bne .L63 + bne .L64 mov r3, r6 -.L34: -.LVL44: +.L35: +.LVL47: .loc 1 129 0 discriminator 1 subs r2, r3, r6 cmp r8, r2 - bgt .L35 + bgt .L36 mov r3, #512 -.LVL45: -.LBB33: +.LVL48: +.LBB39: .loc 1 140 0 discriminator 3 movs r1, #0 -.L36: -.LVL46: +.L37: +.LVL49: .syntax unified @ 140 "drivers/misc/rockchip-secure-otp-v2.c" 1 dmb sy @@ -386,33 +403,33 @@ rockchip_secure_otp_v2_write: .syntax unified ldr r2, [r4] str r1, [r2, r3] -.LVL47: +.LVL50: adds r3, r3, #4 -.LBE33: +.LBE39: .loc 1 139 0 discriminator 3 cmp r3, #640 - bne .L36 + bne .L37 movs r6, #0 -.LVL48: -.LBB34: -.LBB35: +.LVL51: +.LBB40: +.LBB41: .loc 1 82 0 discriminator 1 sub r2, r5, #104 sub r3, r5, #16 str r3, [sp] -.LVL49: -.L37: -.LBE35: -.LBE34: +.LVL52: +.L38: +.LBE41: +.LBE40: .loc 1 142 0 discriminator 1 cmp r6, r8 - blt .L44 + blt .L45 mov r3, #512 -.LBB45: +.LBB51: .loc 1 151 0 discriminator 3 movs r1, #255 -.L45: -.LVL50: +.L46: +.LVL53: .syntax unified @ 151 "drivers/misc/rockchip-secure-otp-v2.c" 1 dmb sy @@ -422,62 +439,62 @@ rockchip_secure_otp_v2_write: ldr r2, [r4] str r1, [r2, r3] adds r3, r3, #4 -.LBE45: +.LBE51: .loc 1 150 0 discriminator 3 cmp r3, #640 - bne .L45 - b .L30 -.LVL51: -.L35: + bne .L46 + b .L31 +.LVL54: +.L36: .loc 1 130 0 ldrb r2, [r3], #1 @ zero_extendqisi2 -.LVL52: - cmp r2, #0 - beq .L34 - .loc 1 131 0 - ldr r0, .L64 -.LVL53: - bl printf -.LVL54: - b .L63 .LVL55: -.L44: -.LBB46: -.LBB42: - .loc 1 78 0 - cmp r5, #448 -.LBE42: -.LBE46: - .loc 1 143 0 - ldrb r3, [r10, r6] @ zero_extendqisi2 + cmp r2, #0 + beq .L35 + .loc 1 131 0 + ldr r0, .L65 .LVL56: -.LBB47: -.LBB43: - .loc 1 78 0 - bgt .L40 - .loc 1 82 0 - cbz r5, .L39 - ldr r1, [sp] - cmp r1, #31 - bls .L39 - cmp r2, #284 - bls .L39 - .loc 1 85 0 - ldr r0, .L64+4 bl printf .LVL57: -.L40: -.LBB36: + b .L64 +.LVL58: +.L45: +.LBB52: +.LBB48: + .loc 1 78 0 + cmp r5, #448 +.LBE48: +.LBE52: + .loc 1 143 0 + ldrb r3, [r10, r6] @ zero_extendqisi2 +.LVL59: +.LBB53: +.LBB49: + .loc 1 78 0 + bgt .L41 + .loc 1 82 0 + cbz r5, .L40 + ldr r1, [sp] + cmp r1, #31 + bls .L40 + cmp r2, #284 + bls .L40 + .loc 1 85 0 + ldr r0, .L65+4 + bl printf +.LVL60: +.L41: +.LBB42: .loc 1 95 0 discriminator 3 mov r3, #512 -.LBE36: -.LBE43: -.LBE47: -.LBB48: +.LBE42: +.LBE49: +.LBE53: +.LBB54: .loc 1 145 0 discriminator 3 movs r1, #255 -.L43: -.LVL58: +.L44: +.LVL61: .syntax unified @ 145 "drivers/misc/rockchip-secure-otp-v2.c" 1 dmb sy @@ -487,21 +504,21 @@ rockchip_secure_otp_v2_write: ldr r2, [r4] str r1, [r2, r3] adds r3, r3, #4 -.LBE48: +.LBE54: .loc 1 144 0 discriminator 3 cmp r3, #640 - bne .L43 - b .L63 -.LVL59: -.L39: -.LBB49: -.LBB44: + bne .L44 + b .L64 +.LVL62: +.L40: +.LBB55: +.LBB50: .loc 1 89 0 - cbz r3, .L41 + cbz r3, .L42 adds r0, r5, r6 lsls r0, r0, #3 -.LVL60: -.LBB37: +.LVL63: +.LBB43: .loc 1 92 0 .syntax unified @ 92 "drivers/misc/rockchip-secure-otp-v2.c" 1 @@ -511,9 +528,9 @@ rockchip_secure_otp_v2_write: .syntax unified ldr r1, [r4] str r0, [r1, #52] -.LVL61: -.LBE37: -.LBB38: +.LVL64: +.LBE43: +.LBB44: .loc 1 93 0 .syntax unified @ 93 "drivers/misc/rockchip-secure-otp-v2.c" 1 @@ -523,11 +540,11 @@ rockchip_secure_otp_v2_write: .syntax unified ldr r1, [r4] movs r0, #7 -.LVL62: +.LVL65: str r0, [r1, #56] -.LVL63: -.LBE38: -.LBB39: +.LVL66: +.LBE44: +.LBB45: .loc 1 94 0 .syntax unified @ 94 "drivers/misc/rockchip-secure-otp-v2.c" 1 @@ -537,9 +554,9 @@ rockchip_secure_otp_v2_write: .syntax unified ldr r1, [r4] str r3, [r1, #60] -.LVL64: -.LBE39: -.LBB40: +.LVL67: +.LBE45: +.LBB46: .loc 1 95 0 .syntax unified @ 95 "drivers/misc/rockchip-secure-otp-v2.c" 1 @@ -547,51 +564,51 @@ rockchip_secure_otp_v2_write: @ 0 "" 2 .thumb .syntax unified - ldr fp, .L64+8 + ldr fp, .L65+8 movs r0, #1 ldr r1, [r4] str r0, [r1, #68] -.LVL65: -.L42: -.LBE40: -.LBB41: +.LVL68: +.L43: +.LBE46: +.LBB47: .loc 1 98 0 ldr r1, [r4] ldr r1, [r1, #72] -.LVL66: +.LVL69: .syntax unified @ 98 "drivers/misc/rockchip-secure-otp-v2.c" 1 dmb sy @ 0 "" 2 -.LVL67: +.LVL70: .thumb .syntax unified -.LBE41: +.LBE47: .loc 1 99 0 - cbz r1, .L41 + cbz r1, .L42 .loc 1 102 0 subs fp, fp, #1 -.LVL68: +.LVL71: str r2, [sp, #4] - beq .L40 -.LVL69: + beq .L41 +.LVL72: .loc 1 106 0 movs r0, #1 bl udelay -.LVL70: +.LVL73: ldr r2, [sp, #4] - b .L42 -.LVL71: -.L41: -.LBE44: -.LBE49: + b .L43 +.LVL74: +.L42: +.LBE50: +.LBE55: .loc 1 142 0 adds r6, r6, #1 -.LVL72: - b .L37 -.L65: +.LVL75: + b .L38 +.L66: .align 2 -.L64: +.L65: .word .LC2 .word .LC0 .word 100002 @@ -683,7 +700,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .file 35 "include/log.h" .section .debug_info,"",%progbits .Ldebug_info0: - .4byte 0x1cb6 + .4byte 0x1ce8 .2byte 0x4 .4byte .Ldebug_abbrev0 .byte 0x4 @@ -692,7 +709,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0xc .4byte .LASF426 .4byte .LASF427 - .4byte .Ldebug_ranges0+0x58 + .4byte .Ldebug_ranges0+0x70 .4byte 0 .4byte .Ldebug_line0 .uleb128 0x2 @@ -864,7 +881,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF27 .byte 0x8 .byte 0x81 - .4byte 0x13dd + .4byte 0x13e3 .byte 0 .uleb128 0xe .4byte .LASF28 @@ -894,7 +911,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF32 .byte 0x8 .byte 0x86 - .4byte 0x1384 + .4byte 0x138a .byte 0x14 .uleb128 0xe .4byte .LASF33 @@ -918,7 +935,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF36 .byte 0x8 .byte 0x8a - .4byte 0x1420 + .4byte 0x1426 .byte 0x24 .uleb128 0xe .4byte .LASF37 @@ -2489,7 +2506,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF297 .byte 0x16 .byte 0x2f - .4byte 0x12fe + .4byte 0x1304 .byte 0x8 .uleb128 0xe .4byte .LASF298 @@ -2501,7 +2518,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF299 .byte 0x16 .byte 0x32 - .4byte 0x1346 + .4byte 0x134c .byte 0x10 .uleb128 0xe .4byte .LASF34 @@ -2909,12 +2926,15 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x17 .2byte 0x28c .4byte 0x11eb + .uleb128 0x8 + .byte 0x4 + .4byte 0x9f .uleb128 0xd .4byte .LASF27 .byte 0x44 .byte 0x8 .byte 0xee - .4byte 0x12f9 + .4byte 0x12ff .uleb128 0xe .4byte .LASF28 .byte 0x8 @@ -2931,55 +2951,55 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF353 .byte 0x8 .byte 0xf1 - .4byte 0x1450 + .4byte 0x1456 .byte 0x8 .uleb128 0xe .4byte .LASF354 .byte 0x8 .byte 0xf2 - .4byte 0x1465 + .4byte 0x146b .byte 0xc .uleb128 0xe .4byte .LASF355 .byte 0x8 .byte 0xf3 - .4byte 0x1465 + .4byte 0x146b .byte 0x10 .uleb128 0xe .4byte .LASF356 .byte 0x8 .byte 0xf4 - .4byte 0x1465 + .4byte 0x146b .byte 0x14 .uleb128 0xe .4byte .LASF357 .byte 0x8 .byte 0xf5 - .4byte 0x1465 + .4byte 0x146b .byte 0x18 .uleb128 0xe .4byte .LASF358 .byte 0x8 .byte 0xf6 - .4byte 0x1465 + .4byte 0x146b .byte 0x1c .uleb128 0xe .4byte .LASF359 .byte 0x8 .byte 0xf7 - .4byte 0x1465 + .4byte 0x146b .byte 0x20 .uleb128 0xe .4byte .LASF360 .byte 0x8 .byte 0xf8 - .4byte 0x1465 + .4byte 0x146b .byte 0x24 .uleb128 0xe .4byte .LASF361 .byte 0x8 .byte 0xf9 - .4byte 0x1465 + .4byte 0x146b .byte 0x28 .uleb128 0xe .4byte .LASF362 @@ -3019,7 +3039,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x40 .byte 0 .uleb128 0x7 - .4byte 0x1221 + .4byte 0x1227 .uleb128 0x2 .4byte .LASF297 .byte 0x16 @@ -3030,7 +3050,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x10 .byte 0x16 .byte 0x19 - .4byte 0x1346 + .4byte 0x134c .uleb128 0xe .4byte .LASF28 .byte 0x16 @@ -3053,17 +3073,17 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF47 .byte 0x16 .byte 0x1d - .4byte 0x1346 + .4byte 0x134c .byte 0xc .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x1309 + .4byte 0x130f .uleb128 0x28 .ascii "gd\000" .byte 0x16 .byte 0x57 - .4byte 0x1356 + .4byte 0x135c .uleb128 0x8 .byte 0x4 .4byte 0xef2 @@ -3072,12 +3092,12 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x4 .byte 0x19 .byte 0x33 - .4byte 0x137e + .4byte 0x1384 .uleb128 0x2a .ascii "np\000" .byte 0x19 .byte 0x34 - .4byte 0x137e + .4byte 0x1384 .uleb128 0x2b .4byte .LASF369 .byte 0x19 @@ -3091,7 +3111,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF370 .byte 0x19 .byte 0x36 - .4byte 0x135c + .4byte 0x1362 .uleb128 0xc .4byte .LASF371 .byte 0x1a @@ -3112,7 +3132,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x4 .byte 0x1b .byte 0xd - .4byte 0x13cc + .4byte 0x13d2 .uleb128 0xf .ascii "pid\000" .byte 0x1b @@ -3124,19 +3144,19 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF375 .byte 0x1b .byte 0x11 - .4byte 0x13d7 + .4byte 0x13dd .uleb128 0x8 .byte 0x4 - .4byte 0x13b3 + .4byte 0x13b9 .uleb128 0x8 .byte 0x4 - .4byte 0x12f9 + .4byte 0x12ff .uleb128 0xd .4byte .LASF36 .byte 0x18 .byte 0x1c .byte 0x23 - .4byte 0x1420 + .4byte 0x1426 .uleb128 0xe .4byte .LASF35 .byte 0x1c @@ -3147,7 +3167,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF376 .byte 0x1c .byte 0x25 - .4byte 0x154f + .4byte 0x1555 .byte 0x4 .uleb128 0xe .4byte .LASF377 @@ -3164,13 +3184,13 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x13e3 + .4byte 0x13e9 .uleb128 0xd .4byte .LASF378 .byte 0x8 .byte 0x8 .byte 0xb5 - .4byte 0x144b + .4byte 0x1451 .uleb128 0xe .4byte .LASF379 .byte 0x8 @@ -3185,25 +3205,25 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x4 .byte 0 .uleb128 0x7 - .4byte 0x1426 + .4byte 0x142c .uleb128 0x8 .byte 0x4 - .4byte 0x144b + .4byte 0x1451 .uleb128 0x12 .4byte 0x50 - .4byte 0x1465 + .4byte 0x146b .uleb128 0x13 .4byte 0x250 .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x1456 + .4byte 0x145c .uleb128 0xd .4byte .LASF381 .byte 0x48 .byte 0x1c .byte 0x54 - .4byte 0x154f + .4byte 0x1555 .uleb128 0xe .4byte .LASF28 .byte 0x1c @@ -3220,55 +3240,55 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LASF382 .byte 0x1c .byte 0x57 - .4byte 0x1465 + .4byte 0x146b .byte 0x8 .uleb128 0xe .4byte .LASF383 .byte 0x1c .byte 0x58 - .4byte 0x1465 + .4byte 0x146b .byte 0xc .uleb128 0xe .4byte .LASF384 .byte 0x1c .byte 0x59 - .4byte 0x1465 + .4byte 0x146b .byte 0x10 .uleb128 0xe .4byte .LASF385 .byte 0x1c .byte 0x5a - .4byte 0x1465 + .4byte 0x146b .byte 0x14 .uleb128 0xe .4byte .LASF386 .byte 0x1c .byte 0x5b - .4byte 0x1465 + .4byte 0x146b .byte 0x18 .uleb128 0xe .4byte .LASF359 .byte 0x1c .byte 0x5c - .4byte 0x1465 + .4byte 0x146b .byte 0x1c .uleb128 0xe .4byte .LASF360 .byte 0x1c .byte 0x5d - .4byte 0x1465 + .4byte 0x146b .byte 0x20 .uleb128 0xe .4byte .LASF316 .byte 0x1c .byte 0x5e - .4byte 0x1564 + .4byte 0x156a .byte 0x24 .uleb128 0xe .4byte .LASF387 .byte 0x1c .byte 0x5f - .4byte 0x1564 + .4byte 0x156a .byte 0x28 .uleb128 0xe .4byte .LASF362 @@ -3315,16 +3335,16 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x146b + .4byte 0x1471 .uleb128 0x12 .4byte 0x50 - .4byte 0x1564 + .4byte 0x156a .uleb128 0x13 - .4byte 0x1420 + .4byte 0x1426 .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x1555 + .4byte 0x155b .uleb128 0x4 .4byte .LASF390 .byte 0x1d @@ -3336,7 +3356,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte 0x7b .byte 0x1e .byte 0x14 - .4byte 0x15b0 + .4byte 0x15aa .uleb128 0x22 .4byte .LASF392 .byte 0x1 @@ -3352,49 +3372,43 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .uleb128 0x22 .4byte .LASF396 .byte 0x10 - .uleb128 0x22 - .4byte .LASF397 - .byte 0x20 - .uleb128 0x22 - .4byte .LASF398 - .byte 0x40 .byte 0 .uleb128 0xd - .4byte .LASF399 + .4byte .LASF397 .byte 0x10 .byte 0x1e - .byte 0x57 - .4byte 0x15ed + .byte 0x60 + .4byte 0x15e7 + .uleb128 0xe + .4byte .LASF398 + .byte 0x1e + .byte 0x6a + .4byte 0x160a + .byte 0 + .uleb128 0xe + .4byte .LASF399 + .byte 0x1e + .byte 0x74 + .4byte 0x162e + .byte 0x4 .uleb128 0xe .4byte .LASF400 .byte 0x1e - .byte 0x61 - .4byte 0x1610 - .byte 0 + .byte 0x7e + .4byte 0x164d + .byte 0x8 .uleb128 0xe .4byte .LASF401 .byte 0x1e - .byte 0x6b - .4byte 0x1634 - .byte 0x4 - .uleb128 0xe - .4byte .LASF402 - .byte 0x1e - .byte 0x75 - .4byte 0x1653 - .byte 0x8 - .uleb128 0xe - .4byte .LASF403 - .byte 0x1e - .byte 0x82 - .4byte 0x1681 + .byte 0x8b + .4byte 0x167b .byte 0xc .byte 0 .uleb128 0x7 - .4byte 0x15b0 + .4byte 0x15aa .uleb128 0x12 .4byte 0x50 - .4byte 0x1610 + .4byte 0x160a .uleb128 0x13 .4byte 0x250 .uleb128 0x13 @@ -3406,10 +3420,10 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x15f2 + .4byte 0x15ec .uleb128 0x12 .4byte 0x50 - .4byte 0x1634 + .4byte 0x162e .uleb128 0x13 .4byte 0x250 .uleb128 0x13 @@ -3421,10 +3435,10 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x1616 + .4byte 0x1610 .uleb128 0x12 .4byte 0x50 - .4byte 0x1653 + .4byte 0x164d .uleb128 0x13 .4byte 0x250 .uleb128 0x13 @@ -3434,10 +3448,10 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x163a + .4byte 0x1634 .uleb128 0x12 .4byte 0x50 - .4byte 0x1681 + .4byte 0x167b .uleb128 0x13 .4byte 0x250 .uleb128 0x13 @@ -3453,13 +3467,13 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x1659 + .4byte 0x1653 .uleb128 0xd - .4byte .LASF404 + .4byte .LASF402 .byte 0x8 .byte 0x1f .byte 0x36 - .4byte 0x16ac + .4byte 0x16a6 .uleb128 0xe .4byte .LASF60 .byte 0x1f @@ -3467,71 +3481,71 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte 0x128 .byte 0 .uleb128 0xe - .4byte .LASF405 + .4byte .LASF403 .byte 0x1f .byte 0x38 .4byte 0x37 .byte 0x4 .byte 0 .uleb128 0x2c - .4byte .LASF406 + .4byte .LASF404 .byte 0x1 - .byte 0xac - .4byte 0x15ed + .byte 0xb4 + .4byte 0x15e7 .uleb128 0x5 .byte 0x3 .4byte rockchip_secure_otp_ops .uleb128 0xa - .4byte 0x144b - .4byte 0x16cd + .4byte 0x1451 + .4byte 0x16c7 .uleb128 0x11 .4byte 0xcb .byte 0x1 .byte 0 .uleb128 0x7 - .4byte 0x16bd + .4byte 0x16b7 .uleb128 0x2c - .4byte .LASF407 + .4byte .LASF405 .byte 0x1 - .byte 0xbd - .4byte 0x16cd + .byte 0xc5 + .4byte 0x16c7 .uleb128 0x5 .byte 0x3 .4byte rockchip_otp_ids .uleb128 0x2d - .4byte .LASF408 + .4byte .LASF406 .byte 0x1 - .byte 0xc4 - .4byte 0x1221 + .byte 0xcc + .4byte 0x1227 .uleb128 0x5 .byte 0x3 .4byte _u_boot_list_2_driver_2_rockchip_secure_otp_v2 .uleb128 0x2e - .4byte .LASF409 + .4byte .LASF407 .byte 0x1 - .byte 0xb2 + .byte 0xba .4byte 0x50 - .4byte .LFB272 - .4byte .LFE272-.LFB272 + .4byte .LFB273 + .4byte .LFE273-.LFB273 .uleb128 0x1 .byte 0x9c - .4byte 0x1772 + .4byte 0x176c .uleb128 0x2f .ascii "dev\000" .byte 0x1 - .byte 0xb2 + .byte 0xba .4byte 0x250 - .4byte .LLST16 + .4byte .LLST18 .uleb128 0x30 .ascii "otp\000" .byte 0x1 - .byte 0xb4 - .4byte 0x1772 - .4byte .LLST17 + .byte 0xbc + .4byte 0x176c + .4byte .LLST19 .uleb128 0x31 - .4byte .LVL28 - .4byte 0x1c75 - .4byte 0x173f + .4byte .LVL31 + .4byte 0x1ca7 + .4byte 0x1739 .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -3540,9 +3554,9 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .sleb128 0 .byte 0 .uleb128 0x31 - .4byte .LVL31 - .4byte 0x1c81 - .4byte 0x1753 + .4byte .LVL34 + .4byte 0x1cb3 + .4byte 0x174d .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -3551,8 +3565,8 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .sleb128 0 .byte 0 .uleb128 0x33 - .4byte .LVL32 - .4byte 0x1c8c + .4byte .LVL35 + .4byte 0x1cbe .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -3574,46 +3588,69 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .uleb128 0x8 .byte 0x4 - .4byte 0x1687 + .4byte 0x1681 .uleb128 0x2e - .4byte .LASF410 + .4byte .LASF408 .byte 0x1 - .byte 0x9c + .byte 0xa3 .4byte 0x50 - .4byte .LFB271 - .4byte .LFE271-.LFB271 + .4byte .LFB272 + .4byte .LFE272-.LFB272 .uleb128 0x1 .byte 0x9c - .4byte 0x17c7 + .4byte 0x17dd .uleb128 0x2f .ascii "dev\000" .byte 0x1 - .byte 0x9c + .byte 0xa3 .4byte 0x250 .4byte .LLST0 .uleb128 0x34 - .4byte .LASF411 + .4byte .LASF409 .byte 0x1 - .byte 0x9c + .byte 0xa3 .4byte 0x37 .uleb128 0x1 .byte 0x51 .uleb128 0x35 .ascii "buf\000" .byte 0x1 - .byte 0x9d + .byte 0xa4 .4byte 0x128 .uleb128 0x1 .byte 0x52 - .uleb128 0x36 + .uleb128 0x30 .ascii "ret\000" .byte 0x1 - .byte 0x9f + .byte 0xa6 .4byte 0x50 - .sleb128 -22 + .4byte .LLST1 + .uleb128 0x36 + .4byte 0x17dd + .4byte .LBB18 + .4byte .Ldebug_ranges0+0 + .byte 0x1 + .byte 0xab + .uleb128 0x37 + .4byte 0x17ed + .4byte .LLST2 + .byte 0 + .byte 0 + .uleb128 0x38 + .4byte .LASF413 + .byte 0x1 + .byte 0x9c + .4byte 0x50 + .byte 0x1 + .4byte 0x17f9 + .uleb128 0x39 + .ascii "buf\000" + .byte 0x1 + .byte 0x9c + .4byte 0x1221 .byte 0 .uleb128 0x2e - .4byte .LASF412 + .4byte .LASF410 .byte 0x1 .byte 0x70 .4byte 0x50 @@ -3621,44 +3658,44 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LFE270-.LFB270 .uleb128 0x1 .byte 0x9c - .4byte 0x1a06 + .4byte 0x1a38 .uleb128 0x2f .ascii "dev\000" .byte 0x1 .byte 0x70 .4byte 0x250 - .4byte .LLST18 - .uleb128 0x37 - .4byte .LASF413 + .4byte .LLST20 + .uleb128 0x3a + .4byte .LASF411 .byte 0x1 .byte 0x70 .4byte 0x50 - .4byte .LLST19 + .4byte .LLST21 .uleb128 0x2f .ascii "buf\000" .byte 0x1 .byte 0x71 .4byte 0x256 - .4byte .LLST20 - .uleb128 0x37 + .4byte .LLST22 + .uleb128 0x3a .4byte .LASF51 .byte 0x1 .byte 0x71 .4byte 0x50 - .4byte .LLST21 + .4byte .LLST23 .uleb128 0x30 .ascii "otp\000" .byte 0x1 .byte 0x73 - .4byte 0x1772 - .4byte .LLST22 + .4byte 0x176c + .4byte .LLST24 .uleb128 0x30 .ascii "i\000" .byte 0x1 .byte 0x74 .4byte 0x50 - .4byte .LLST23 - .uleb128 0x38 + .4byte .LLST25 + .uleb128 0x3b .ascii "n\000" .byte 0x1 .byte 0x74 @@ -3668,7 +3705,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x1 .byte 0x74 .4byte 0x50 - .4byte .LLST24 + .4byte .LLST26 .uleb128 0x2c .4byte .LASF380 .byte 0x1 @@ -3676,114 +3713,114 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte 0xeb .uleb128 0x1 .byte 0x5a - .uleb128 0x39 - .4byte .LASF414 + .uleb128 0x3c + .4byte .LASF412 .byte 0x1 .byte 0x76 .4byte 0xeb - .4byte .LLST25 - .uleb128 0x3a - .4byte .LBB33 - .4byte .LBE33-.LBB33 - .4byte 0x1889 + .4byte .LLST27 + .uleb128 0x3d + .4byte .LBB39 + .4byte .LBE39-.LBB39 + .4byte 0x18bb .uleb128 0x30 .ascii "__v\000" .byte 0x1 .byte 0x8c .4byte 0x9f - .4byte .LLST26 + .4byte .LLST28 .byte 0 - .uleb128 0x3a - .4byte .LBB48 - .4byte .LBE48-.LBB48 - .4byte 0x18a6 + .uleb128 0x3d + .4byte .LBB54 + .4byte .LBE54-.LBB54 + .4byte 0x18d8 .uleb128 0x30 .ascii "__v\000" .byte 0x1 .byte 0x91 .4byte 0x9f - .4byte .LLST38 + .4byte .LLST40 .byte 0 - .uleb128 0x3a - .4byte .LBB45 - .4byte .LBE45-.LBB45 - .4byte 0x18c3 + .uleb128 0x3d + .4byte .LBB51 + .4byte .LBE51-.LBB51 + .4byte 0x18f5 .uleb128 0x30 .ascii "__v\000" .byte 0x1 .byte 0x97 .4byte 0x9f - .4byte .LLST37 + .4byte .LLST39 .byte 0 - .uleb128 0x3b - .4byte 0x1a06 - .4byte .LBB34 - .4byte .Ldebug_ranges0+0x18 + .uleb128 0x3e + .4byte 0x1a38 + .4byte .LBB40 + .4byte .Ldebug_ranges0+0x30 .byte 0x1 .byte 0x8f - .4byte 0x19a4 - .uleb128 0x3c - .4byte 0x1a16 - .uleb128 0x3d - .4byte 0x1a37 - .4byte .LLST27 - .uleb128 0x3d - .4byte 0x1a2c - .4byte .LLST28 - .uleb128 0x3d - .4byte 0x1a21 + .4byte 0x19d6 + .uleb128 0x3f + .4byte 0x1a48 + .uleb128 0x37 + .4byte 0x1a69 .4byte .LLST29 - .uleb128 0x3e - .4byte .Ldebug_ranges0+0x18 - .uleb128 0x3f - .4byte 0x1a40 + .uleb128 0x37 + .4byte 0x1a5e .4byte .LLST30 - .uleb128 0x3f - .4byte 0x1a4b + .uleb128 0x37 + .4byte 0x1a53 .4byte .LLST31 .uleb128 0x40 - .4byte .Ldebug_ranges0+0x40 - .4byte 0x1920 - .uleb128 0x3f - .4byte 0x1a8e + .4byte .Ldebug_ranges0+0x30 + .uleb128 0x41 + .4byte 0x1a72 .4byte .LLST32 - .byte 0 - .uleb128 0x3a - .4byte .LBB37 - .4byte .LBE37-.LBB37 - .4byte 0x1937 - .uleb128 0x3f - .4byte 0x1a5b + .uleb128 0x41 + .4byte 0x1a7d .4byte .LLST33 - .byte 0 - .uleb128 0x3a - .4byte .LBB38 - .4byte .LBE38-.LBB38 - .4byte 0x194e - .uleb128 0x3f - .4byte 0x1a6c + .uleb128 0x42 + .4byte .Ldebug_ranges0+0x58 + .4byte 0x1952 + .uleb128 0x41 + .4byte 0x1ac0 .4byte .LLST34 .byte 0 - .uleb128 0x3a - .4byte .LBB39 - .4byte .LBE39-.LBB39 - .4byte 0x1965 - .uleb128 0x3f - .4byte 0x1a7d + .uleb128 0x3d + .4byte .LBB43 + .4byte .LBE43-.LBB43 + .4byte 0x1969 + .uleb128 0x41 + .4byte 0x1a8d .4byte .LLST35 .byte 0 - .uleb128 0x3a - .4byte .LBB41 - .4byte .LBE41-.LBB41 - .4byte 0x197c - .uleb128 0x3f - .4byte 0x1a9b + .uleb128 0x3d + .4byte .LBB44 + .4byte .LBE44-.LBB44 + .4byte 0x1980 + .uleb128 0x41 + .4byte 0x1a9e .4byte .LLST36 .byte 0 + .uleb128 0x3d + .4byte .LBB45 + .4byte .LBE45-.LBB45 + .4byte 0x1997 + .uleb128 0x41 + .4byte 0x1aaf + .4byte .LLST37 + .byte 0 + .uleb128 0x3d + .4byte .LBB47 + .4byte .LBE47-.LBB47 + .4byte 0x19ae + .uleb128 0x41 + .4byte 0x1acd + .4byte .LLST38 + .byte 0 .uleb128 0x31 - .4byte .LVL57 - .4byte 0x1c97 - .4byte 0x1993 + .4byte .LVL60 + .4byte 0x1cc9 + .4byte 0x19c5 .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -3792,8 +3829,8 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LC0 .byte 0 .uleb128 0x33 - .4byte .LVL70 - .4byte 0x1ca2 + .4byte .LVL73 + .4byte 0x1cd4 .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -3803,9 +3840,9 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .byte 0 .uleb128 0x31 - .4byte .LVL35 - .4byte 0x1c75 - .4byte 0x19b8 + .4byte .LVL38 + .4byte 0x1ca7 + .4byte 0x19ea .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -3814,9 +3851,9 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .sleb128 0 .byte 0 .uleb128 0x31 - .4byte .LVL38 - .4byte 0x1cad - .4byte 0x19cc + .4byte .LVL41 + .4byte 0x1cdf + .4byte 0x19fe .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -3825,9 +3862,9 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .sleb128 0 .byte 0 .uleb128 0x31 - .4byte .LVL42 - .4byte 0x1aa8 - .4byte 0x19f2 + .4byte .LVL45 + .4byte 0x1ada + .4byte 0x1a24 .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -3854,8 +3891,8 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .sleb128 0 .byte 0 .uleb128 0x33 - .4byte .LVL54 - .4byte 0x1c97 + .4byte .LVL57 + .4byte 0x1cc9 .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -3864,20 +3901,20 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LC2 .byte 0 .byte 0 - .uleb128 0x41 - .4byte .LASF429 + .uleb128 0x38 + .4byte .LASF414 .byte 0x1 .byte 0x47 .4byte 0x50 .byte 0x1 - .4byte 0x1aa8 - .uleb128 0x42 + .4byte 0x1ada + .uleb128 0x39 .ascii "otp\000" .byte 0x1 .byte 0x47 - .4byte 0x1772 + .4byte 0x176c .uleb128 0x43 - .4byte .LASF413 + .4byte .LASF411 .byte 0x1 .byte 0x48 .4byte 0x50 @@ -3886,7 +3923,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x1 .byte 0x48 .4byte 0x90 - .uleb128 0x42 + .uleb128 0x39 .ascii "i\000" .byte 0x1 .byte 0x48 @@ -3902,39 +3939,39 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x4b .4byte 0x9f .uleb128 0x45 - .4byte 0x1a67 - .uleb128 0x38 + .4byte 0x1a99 + .uleb128 0x3b .ascii "__v\000" .byte 0x1 .byte 0x5c .4byte 0x9f .byte 0 .uleb128 0x45 - .4byte 0x1a78 - .uleb128 0x38 + .4byte 0x1aaa + .uleb128 0x3b .ascii "__v\000" .byte 0x1 .byte 0x5d .4byte 0x9f .byte 0 .uleb128 0x45 - .4byte 0x1a89 - .uleb128 0x38 + .4byte 0x1abb + .uleb128 0x3b .ascii "__v\000" .byte 0x1 .byte 0x5e .4byte 0x9f .byte 0 .uleb128 0x45 - .4byte 0x1a9a - .uleb128 0x38 + .4byte 0x1acc + .uleb128 0x3b .ascii "__v\000" .byte 0x1 .byte 0x5f .4byte 0x9f .byte 0 .uleb128 0x46 - .uleb128 0x38 + .uleb128 0x3b .ascii "__v\000" .byte 0x1 .byte 0x62 @@ -3950,88 +3987,88 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LFE268-.LFB268 .uleb128 0x1 .byte 0x9c - .4byte 0x1c5b + .4byte 0x1c8d .uleb128 0x2f .ascii "dev\000" .byte 0x1 .byte 0xf .4byte 0x250 - .4byte .LLST1 - .uleb128 0x37 - .4byte .LASF413 + .4byte .LLST3 + .uleb128 0x3a + .4byte .LASF411 .byte 0x1 .byte 0xf .4byte 0x50 - .4byte .LLST2 + .4byte .LLST4 .uleb128 0x2f .ascii "buf\000" .byte 0x1 .byte 0x10 .4byte 0x128 - .4byte .LLST3 - .uleb128 0x37 + .4byte .LLST5 + .uleb128 0x3a .4byte .LASF51 .byte 0x1 .byte 0x10 .4byte 0x50 - .4byte .LLST4 + .4byte .LLST6 .uleb128 0x30 .ascii "otp\000" .byte 0x1 .byte 0x12 - .4byte 0x1772 - .4byte .LLST5 + .4byte 0x176c + .4byte .LLST7 .uleb128 0x30 .ascii "i\000" .byte 0x1 .byte 0x13 .4byte 0x50 - .4byte .LLST6 - .uleb128 0x39 + .4byte .LLST8 + .uleb128 0x3c .4byte .LASF415 .byte 0x1 .byte 0x13 .4byte 0x50 - .4byte .LLST7 + .4byte .LLST9 .uleb128 0x30 .ascii "n\000" .byte 0x1 .byte 0x13 .4byte 0x50 - .4byte .LLST8 + .4byte .LLST10 .uleb128 0x30 .ascii "ret\000" .byte 0x1 .byte 0x13 .4byte 0x50 - .4byte .LLST9 - .uleb128 0x39 + .4byte .LLST11 + .uleb128 0x3c .4byte .LASF380 .byte 0x1 .byte 0x14 .4byte 0xeb - .4byte .LLST10 - .uleb128 0x39 + .4byte .LLST12 + .uleb128 0x3c .4byte .LASF416 .byte 0x1 .byte 0x15 .4byte 0x9f - .4byte .LLST11 - .uleb128 0x39 + .4byte .LLST13 + .uleb128 0x3c .4byte .LASF418 .byte 0x1 .byte 0x16 .4byte 0x50 - .4byte .LLST12 + .4byte .LLST14 .uleb128 0x47 .ascii "out\000" .byte 0x1 .byte 0x40 - .4byte .L9 - .uleb128 0x3a - .4byte .LBB16 - .4byte .LBE16-.LBB16 - .4byte 0x1b96 + .4byte .L10 + .uleb128 0x3d + .4byte .LBB22 + .4byte .LBE22-.LBB22 + .4byte 0x1bc8 .uleb128 0x48 .ascii "__v\000" .byte 0x1 @@ -4039,20 +4076,20 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte 0x9f .byte 0 .byte 0 - .uleb128 0x3a - .4byte .LBB19 - .4byte .LBE19-.LBB19 - .4byte 0x1bb3 + .uleb128 0x3d + .4byte .LBB25 + .4byte .LBE25-.LBB25 + .4byte 0x1be5 .uleb128 0x30 .ascii "__v\000" .byte 0x1 .byte 0x2c .4byte 0x9f - .4byte .LLST14 + .4byte .LLST16 .byte 0 - .uleb128 0x40 - .4byte .Ldebug_ranges0+0 - .4byte 0x1bc9 + .uleb128 0x42 + .4byte .Ldebug_ranges0+0x18 + .4byte 0x1bfb .uleb128 0x48 .ascii "__v\000" .byte 0x1 @@ -4060,21 +4097,21 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte 0x9f .byte 0x1 .byte 0 - .uleb128 0x3a - .4byte .LBB21 - .4byte .LBE21-.LBB21 - .4byte 0x1be6 + .uleb128 0x3d + .4byte .LBB27 + .4byte .LBE27-.LBB27 + .4byte 0x1c18 .uleb128 0x30 .ascii "__v\000" .byte 0x1 .byte 0x30 .4byte 0x9f - .4byte .LLST15 + .4byte .LLST17 .byte 0 - .uleb128 0x3a - .4byte .LBB22 - .4byte .LBE22-.LBB22 - .4byte 0x1c01 + .uleb128 0x3d + .4byte .LBB28 + .4byte .LBE28-.LBB28 + .4byte 0x1c33 .uleb128 0x49 .ascii "__v\000" .byte 0x1 @@ -4083,21 +4120,21 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .uleb128 0x1 .byte 0x53 .byte 0 - .uleb128 0x3a - .4byte .LBB18 - .4byte .LBE18-.LBB18 - .4byte 0x1c1e + .uleb128 0x3d + .4byte .LBB24 + .4byte .LBE24-.LBB24 + .4byte 0x1c50 .uleb128 0x30 .ascii "__v\000" .byte 0x1 .byte 0x42 .4byte 0x9f - .4byte .LLST13 + .4byte .LLST15 .byte 0 .uleb128 0x31 - .4byte .LVL3 - .4byte 0x1c75 - .4byte 0x1c33 + .4byte .LVL6 + .4byte 0x1ca7 + .4byte 0x1c65 .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -4107,9 +4144,9 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x50 .byte 0 .uleb128 0x31 - .4byte .LVL13 - .4byte 0x1c97 - .4byte 0x1c4a + .4byte .LVL16 + .4byte 0x1cc9 + .4byte 0x1c7c .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -4118,8 +4155,8 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte .LC0 .byte 0 .uleb128 0x33 - .4byte .LVL21 - .4byte 0x1ca2 + .4byte .LVL24 + .4byte 0x1cd4 .uleb128 0x32 .uleb128 0x1 .byte 0x50 @@ -4129,11 +4166,11 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .byte 0 .uleb128 0x4a - .4byte .LASF430 + .4byte .LASF429 .byte 0x1a .2byte 0x36f .byte 0x3 - .4byte 0x1c75 + .4byte 0x1ca7 .uleb128 0x4b .ascii "ptr\000" .byte 0x1a @@ -4853,75 +4890,6 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .byte 0 .uleb128 0x36 - .uleb128 0x34 - .byte 0 - .uleb128 0x3 - .uleb128 0x8 - .uleb128 0x3a - .uleb128 0xb - .uleb128 0x3b - .uleb128 0xb - .uleb128 0x49 - .uleb128 0x13 - .uleb128 0x1c - .uleb128 0xd - .byte 0 - .byte 0 - .uleb128 0x37 - .uleb128 0x5 - .byte 0 - .uleb128 0x3 - .uleb128 0xe - .uleb128 0x3a - .uleb128 0xb - .uleb128 0x3b - .uleb128 0xb - .uleb128 0x49 - .uleb128 0x13 - .uleb128 0x2 - .uleb128 0x17 - .byte 0 - .byte 0 - .uleb128 0x38 - .uleb128 0x34 - .byte 0 - .uleb128 0x3 - .uleb128 0x8 - .uleb128 0x3a - .uleb128 0xb - .uleb128 0x3b - .uleb128 0xb - .uleb128 0x49 - .uleb128 0x13 - .byte 0 - .byte 0 - .uleb128 0x39 - .uleb128 0x34 - .byte 0 - .uleb128 0x3 - .uleb128 0xe - .uleb128 0x3a - .uleb128 0xb - .uleb128 0x3b - .uleb128 0xb - .uleb128 0x49 - .uleb128 0x13 - .uleb128 0x2 - .uleb128 0x17 - .byte 0 - .byte 0 - .uleb128 0x3a - .uleb128 0xb - .byte 0x1 - .uleb128 0x11 - .uleb128 0x1 - .uleb128 0x12 - .uleb128 0x6 - .uleb128 0x1 - .uleb128 0x13 - .byte 0 - .byte 0 - .uleb128 0x3b .uleb128 0x1d .byte 0x1 .uleb128 0x31 @@ -4934,18 +4902,9 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .uleb128 0xb .uleb128 0x59 .uleb128 0xb - .uleb128 0x1 - .uleb128 0x13 .byte 0 .byte 0 - .uleb128 0x3c - .uleb128 0x5 - .byte 0 - .uleb128 0x31 - .uleb128 0x13 - .byte 0 - .byte 0 - .uleb128 0x3d + .uleb128 0x37 .uleb128 0x5 .byte 0 .uleb128 0x31 @@ -4954,32 +4913,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .uleb128 0x17 .byte 0 .byte 0 - .uleb128 0x3e - .uleb128 0xb - .byte 0x1 - .uleb128 0x55 - .uleb128 0x17 - .byte 0 - .byte 0 - .uleb128 0x3f - .uleb128 0x34 - .byte 0 - .uleb128 0x31 - .uleb128 0x13 - .uleb128 0x2 - .uleb128 0x17 - .byte 0 - .byte 0 - .uleb128 0x40 - .uleb128 0xb - .byte 0x1 - .uleb128 0x55 - .uleb128 0x17 - .uleb128 0x1 - .uleb128 0x13 - .byte 0 - .byte 0 - .uleb128 0x41 + .uleb128 0x38 .uleb128 0x2e .byte 0x1 .uleb128 0x3 @@ -4998,7 +4932,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .uleb128 0x13 .byte 0 .byte 0 - .uleb128 0x42 + .uleb128 0x39 .uleb128 0x5 .byte 0 .uleb128 0x3 @@ -5011,6 +4945,109 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .uleb128 0x13 .byte 0 .byte 0 + .uleb128 0x3a + .uleb128 0x5 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x3b + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3c + .uleb128 0x34 + .byte 0 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x3d + .uleb128 0xb + .byte 0x1 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x6 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3e + .uleb128 0x1d + .byte 0x1 + .uleb128 0x31 + .uleb128 0x13 + .uleb128 0x52 + .uleb128 0x1 + .uleb128 0x55 + .uleb128 0x17 + .uleb128 0x58 + .uleb128 0xb + .uleb128 0x59 + .uleb128 0xb + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x3f + .uleb128 0x5 + .byte 0 + .uleb128 0x31 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x40 + .uleb128 0xb + .byte 0x1 + .uleb128 0x55 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x41 + .uleb128 0x34 + .byte 0 + .uleb128 0x31 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0x17 + .byte 0 + .byte 0 + .uleb128 0x42 + .uleb128 0xb + .byte 0x1 + .uleb128 0x55 + .uleb128 0x17 + .uleb128 0x1 + .uleb128 0x13 + .byte 0 + .byte 0 .uleb128 0x43 .uleb128 0x5 .byte 0 @@ -5159,71 +5196,17 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .section .debug_loc,"",%progbits .Ldebug_loc0: -.LLST16: - .4byte .LVL27 - .4byte .LVL28-1 +.LLST18: + .4byte .LVL30 + .4byte .LVL31-1 .2byte 0x1 .byte 0x50 - .4byte .LVL28-1 - .4byte .LVL33 + .4byte .LVL31-1 + .4byte .LVL36 .2byte 0x1 .byte 0x55 - .4byte .LVL33 - .4byte .LFE272 - .2byte 0x4 - .byte 0xf3 - .uleb128 0x1 - .byte 0x50 - .byte 0x9f - .4byte 0 - .4byte 0 -.LLST17: - .4byte .LVL29 - .4byte .LVL30 - .2byte 0x1 - .byte 0x50 - .4byte .LVL30 - .4byte .LVL33 - .2byte 0x1 - .byte 0x54 - .4byte 0 - .4byte 0 -.LLST0: - .4byte .LVL0 - .4byte .LVL1 - .2byte 0x1 - .byte 0x50 - .4byte .LVL1 - .4byte .LFE271 - .2byte 0x4 - .byte 0xf3 - .uleb128 0x1 - .byte 0x50 - .byte 0x9f - .4byte 0 - .4byte 0 -.LLST18: - .4byte .LVL34 - .4byte .LVL35-1 - .2byte 0x1 - .byte 0x50 - .4byte .LVL35-1 - .4byte .LVL39 - .2byte 0x1 - .byte 0x57 - .4byte .LVL39 - .4byte .LVL40 - .2byte 0x4 - .byte 0xf3 - .uleb128 0x1 - .byte 0x50 - .byte 0x9f - .4byte .LVL40 - .4byte .LVL43 - .2byte 0x1 - .byte 0x57 - .4byte .LVL43 - .4byte .LFE270 + .4byte .LVL36 + .4byte .LFE273 .2byte 0x4 .byte 0xf3 .uleb128 0x1 @@ -5232,52 +5215,128 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .4byte 0 .4byte 0 .LLST19: - .4byte .LVL34 - .4byte .LVL35-1 + .4byte .LVL32 + .4byte .LVL33 + .2byte 0x1 + .byte 0x50 + .4byte .LVL33 + .4byte .LVL36 + .2byte 0x1 + .byte 0x54 + .4byte 0 + .4byte 0 +.LLST0: + .4byte .LVL0 + .4byte .LVL2 + .2byte 0x1 + .byte 0x50 + .4byte .LVL2 + .4byte .LFE272 + .2byte 0x4 + .byte 0xf3 + .uleb128 0x1 + .byte 0x50 + .byte 0x9f + .4byte 0 + .4byte 0 +.LLST1: + .4byte .LVL0 + .4byte .LVL3 + .2byte 0x3 + .byte 0x9 + .byte 0xea + .byte 0x9f + .4byte .LVL4 + .4byte .LFE272 + .2byte 0x3 + .byte 0x9 + .byte 0xea + .byte 0x9f + .4byte 0 + .4byte 0 +.LLST2: + .4byte .LVL1 + .4byte .LVL3 + .2byte 0x1 + .byte 0x52 + .4byte 0 + .4byte 0 +.LLST20: + .4byte .LVL37 + .4byte .LVL38-1 + .2byte 0x1 + .byte 0x50 + .4byte .LVL38-1 + .4byte .LVL42 + .2byte 0x1 + .byte 0x57 + .4byte .LVL42 + .4byte .LVL43 + .2byte 0x4 + .byte 0xf3 + .uleb128 0x1 + .byte 0x50 + .byte 0x9f + .4byte .LVL43 + .4byte .LVL46 + .2byte 0x1 + .byte 0x57 + .4byte .LVL46 + .4byte .LFE270 + .2byte 0x4 + .byte 0xf3 + .uleb128 0x1 + .byte 0x50 + .byte 0x9f + .4byte 0 + .4byte 0 +.LLST21: + .4byte .LVL37 + .4byte .LVL38-1 .2byte 0x1 .byte 0x51 - .4byte .LVL35-1 + .4byte .LVL38-1 .4byte .LFE270 .2byte 0x1 .byte 0x55 .4byte 0 .4byte 0 -.LLST20: - .4byte .LVL34 - .4byte .LVL35-1 +.LLST22: + .4byte .LVL37 + .4byte .LVL38-1 .2byte 0x1 .byte 0x52 - .4byte .LVL35-1 + .4byte .LVL38-1 .4byte .LFE270 .2byte 0x1 .byte 0x5a .4byte 0 .4byte 0 -.LLST21: - .4byte .LVL34 - .4byte .LVL35-1 +.LLST23: + .4byte .LVL37 + .4byte .LVL38-1 .2byte 0x1 .byte 0x53 - .4byte .LVL35-1 + .4byte .LVL38-1 .4byte .LFE270 .2byte 0x1 .byte 0x58 .4byte 0 .4byte 0 -.LLST22: - .4byte .LVL36 - .4byte .LVL37 +.LLST24: + .4byte .LVL39 + .4byte .LVL40 .2byte 0x1 .byte 0x50 - .4byte .LVL37 + .4byte .LVL40 .4byte .LFE270 .2byte 0x1 .byte 0x54 .4byte 0 .4byte 0 -.LLST23: - .4byte .LVL44 - .4byte .LVL45 +.LLST25: + .4byte .LVL47 + .4byte .LVL48 .2byte 0x6 .byte 0x73 .sleb128 0 @@ -5285,12 +5344,12 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .sleb128 0 .byte 0x1c .byte 0x9f - .4byte .LVL49 - .4byte .LVL51 + .4byte .LVL52 + .4byte .LVL54 .2byte 0x1 .byte 0x56 - .4byte .LVL51 - .4byte .LVL52 + .4byte .LVL54 + .4byte .LVL55 .2byte 0x6 .byte 0x73 .sleb128 0 @@ -5298,8 +5357,8 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .sleb128 0 .byte 0x1c .byte 0x9f - .4byte .LVL52 - .4byte .LVL54-1 + .4byte .LVL55 + .4byte .LVL57-1 .2byte 0x7 .byte 0x76 .sleb128 0 @@ -5308,157 +5367,157 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .sleb128 0 .byte 0x22 .byte 0x9f - .4byte .LVL55 + .4byte .LVL58 .4byte .LFE270 .2byte 0x1 .byte 0x56 .4byte 0 .4byte 0 -.LLST24: - .4byte .LVL42 - .4byte .LVL49 - .2byte 0x1 - .byte 0x50 - .4byte .LVL49 - .4byte .LVL51 - .2byte 0x1 - .byte 0x57 - .4byte .LVL51 - .4byte .LVL53 - .2byte 0x1 - .byte 0x50 - .4byte .LVL53 - .4byte .LFE270 - .2byte 0x1 - .byte 0x57 - .4byte 0 - .4byte 0 -.LLST25: - .4byte .LVL38 - .4byte .LVL39 - .2byte 0x1 - .byte 0x50 - .4byte .LVL40 - .4byte .LVL41 - .2byte 0x1 - .byte 0x50 - .4byte .LVL41 - .4byte .LVL48 - .2byte 0x1 - .byte 0x56 - .4byte .LVL51 - .4byte .LVL55 - .2byte 0x1 - .byte 0x56 - .4byte 0 - .4byte 0 .LLST26: - .4byte .LVL46 + .4byte .LVL45 + .4byte .LVL52 + .2byte 0x1 + .byte 0x50 + .4byte .LVL52 + .4byte .LVL54 + .2byte 0x1 + .byte 0x57 + .4byte .LVL54 + .4byte .LVL56 + .2byte 0x1 + .byte 0x50 + .4byte .LVL56 + .4byte .LFE270 + .2byte 0x1 + .byte 0x57 + .4byte 0 + .4byte 0 +.LLST27: + .4byte .LVL41 + .4byte .LVL42 + .2byte 0x1 + .byte 0x50 + .4byte .LVL43 + .4byte .LVL44 + .2byte 0x1 + .byte 0x50 + .4byte .LVL44 .4byte .LVL51 + .2byte 0x1 + .byte 0x56 + .4byte .LVL54 + .4byte .LVL58 + .2byte 0x1 + .byte 0x56 + .4byte 0 + .4byte 0 +.LLST28: + .4byte .LVL49 + .4byte .LVL54 .2byte 0x2 .byte 0x30 .byte 0x9f - .4byte .LVL55 + .4byte .LVL58 .4byte .LFE270 .2byte 0x2 .byte 0x30 .byte 0x9f .4byte 0 .4byte 0 -.LLST38: - .4byte .LVL58 +.LLST40: + .4byte .LVL61 + .4byte .LVL62 + .2byte 0x3 + .byte 0x8 + .byte 0xff + .byte 0x9f + .4byte 0 + .4byte 0 +.LLST39: + .4byte .LVL53 + .4byte .LVL54 + .2byte 0x3 + .byte 0x8 + .byte 0xff + .byte 0x9f + .4byte 0 + .4byte 0 +.LLST29: .4byte .LVL59 - .2byte 0x3 - .byte 0x8 - .byte 0xff - .byte 0x9f - .4byte 0 - .4byte 0 -.LLST37: - .4byte .LVL50 - .4byte .LVL51 - .2byte 0x3 - .byte 0x8 - .byte 0xff - .byte 0x9f - .4byte 0 - .4byte 0 -.LLST27: - .4byte .LVL56 - .4byte .LVL71 + .4byte .LVL74 .2byte 0x1 .byte 0x56 .4byte 0 .4byte 0 -.LLST28: - .4byte .LVL56 - .4byte .LVL57-1 - .2byte 0x1 - .byte 0x53 +.LLST30: .4byte .LVL59 - .4byte .LVL65 + .4byte .LVL60-1 + .2byte 0x1 + .byte 0x53 + .4byte .LVL62 + .4byte .LVL68 .2byte 0x1 .byte 0x53 .4byte 0 .4byte 0 -.LLST29: - .4byte .LVL56 - .4byte .LVL71 +.LLST31: + .4byte .LVL59 + .4byte .LVL74 .2byte 0x1 .byte 0x55 .4byte 0 .4byte 0 -.LLST30: - .4byte .LVL65 +.LLST32: .4byte .LVL68 + .4byte .LVL71 .2byte 0x3 .byte 0x7b .sleb128 -2 .byte 0x9f - .4byte .LVL68 - .4byte .LVL69 + .4byte .LVL71 + .4byte .LVL72 .2byte 0x3 .byte 0x7b .sleb128 -1 .byte 0x9f - .4byte .LVL69 - .4byte .LVL71 + .4byte .LVL72 + .4byte .LVL74 .2byte 0x3 .byte 0x7b .sleb128 -2 .byte 0x9f .4byte 0 .4byte 0 -.LLST31: - .4byte .LVL67 - .4byte .LVL70-1 +.LLST33: + .4byte .LVL70 + .4byte .LVL73-1 .2byte 0x1 .byte 0x51 .4byte 0 .4byte 0 -.LLST32: - .4byte .LVL64 - .4byte .LVL71 +.LLST34: + .4byte .LVL67 + .4byte .LVL74 .2byte 0x2 .byte 0x31 .byte 0x9f .4byte 0 .4byte 0 -.LLST33: - .4byte .LVL60 - .4byte .LVL62 +.LLST35: + .4byte .LVL63 + .4byte .LVL65 .2byte 0x1 .byte 0x50 - .4byte .LVL62 - .4byte .LVL63 + .4byte .LVL65 + .4byte .LVL66 .2byte 0x5 .byte 0x74 .sleb128 0 .byte 0x6 .byte 0x23 .uleb128 0x34 - .4byte .LVL63 - .4byte .LVL71 + .4byte .LVL66 + .4byte .LVL74 .2byte 0x8 .byte 0x75 .sleb128 0 @@ -5470,34 +5529,34 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x9f .4byte 0 .4byte 0 -.LLST34: - .4byte .LVL61 - .4byte .LVL71 +.LLST36: + .4byte .LVL64 + .4byte .LVL74 .2byte 0x2 .byte 0x37 .byte 0x9f .4byte 0 .4byte 0 -.LLST35: - .4byte .LVL63 - .4byte .LVL65 +.LLST37: + .4byte .LVL66 + .4byte .LVL68 .2byte 0x1 .byte 0x53 .4byte 0 .4byte 0 -.LLST36: - .4byte .LVL66 - .4byte .LVL70-1 +.LLST38: + .4byte .LVL69 + .4byte .LVL73-1 .2byte 0x1 .byte 0x51 .4byte 0 .4byte 0 -.LLST1: - .4byte .LVL2 - .4byte .LVL3-1 +.LLST3: + .4byte .LVL5 + .4byte .LVL6-1 .2byte 0x1 .byte 0x50 - .4byte .LVL3-1 + .4byte .LVL6-1 .4byte .LFE268 .2byte 0x4 .byte 0xf3 @@ -5506,33 +5565,33 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x9f .4byte 0 .4byte 0 -.LLST2: - .4byte .LVL2 - .4byte .LVL3-1 +.LLST4: + .4byte .LVL5 + .4byte .LVL6-1 .2byte 0x1 .byte 0x51 - .4byte .LVL3-1 + .4byte .LVL6-1 .4byte .LFE268 .2byte 0x1 .byte 0x58 .4byte 0 .4byte 0 -.LLST3: - .4byte .LVL2 - .4byte .LVL3-1 +.LLST5: + .4byte .LVL5 + .4byte .LVL6-1 .2byte 0x1 .byte 0x52 - .4byte .LVL3-1 - .4byte .LVL6 + .4byte .LVL6-1 + .4byte .LVL9 .2byte 0x1 .byte 0x56 - .4byte .LVL6 - .4byte .LVL7 + .4byte .LVL9 + .4byte .LVL10 .2byte 0x3 .byte 0x76 .sleb128 1 .byte 0x9f - .4byte .LVL7 + .4byte .LVL10 .4byte .LFE268 .2byte 0x4 .byte 0xf3 @@ -5541,31 +5600,31 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x9f .4byte 0 .4byte 0 -.LLST4: - .4byte .LVL2 - .4byte .LVL3-1 +.LLST6: + .4byte .LVL5 + .4byte .LVL6-1 .2byte 0x1 .byte 0x53 - .4byte .LVL3-1 + .4byte .LVL6-1 .4byte .LFE268 .2byte 0x1 .byte 0x5a .4byte 0 .4byte 0 -.LLST5: - .4byte .LVL4 +.LLST7: .4byte .LVL7 + .4byte .LVL10 .2byte 0x1 .byte 0x50 - .4byte .LVL7 + .4byte .LVL10 .4byte .LFE268 .2byte 0x1 .byte 0x55 .4byte 0 .4byte 0 -.LLST6: - .4byte .LVL7 - .4byte .LVL25 +.LLST8: + .4byte .LVL10 + .4byte .LVL28 .2byte 0x6 .byte 0x74 .sleb128 0 @@ -5573,8 +5632,8 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .sleb128 0 .byte 0x1c .byte 0x9f - .4byte .LVL25 - .4byte .LVL26 + .4byte .LVL28 + .4byte .LVL29 .2byte 0x8 .byte 0x74 .sleb128 0 @@ -5584,7 +5643,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x23 .uleb128 0x1 .byte 0x9f - .4byte .LVL26 + .4byte .LVL29 .4byte .LFE268 .2byte 0x6 .byte 0x74 @@ -5595,20 +5654,20 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x9f .4byte 0 .4byte 0 -.LLST7: - .4byte .LVL16 +.LLST9: .4byte .LVL19 + .4byte .LVL22 .2byte 0x3 .byte 0x77 .sleb128 -2 .byte 0x9f - .4byte .LVL19 - .4byte .LVL20 + .4byte .LVL22 + .4byte .LVL23 .2byte 0x3 .byte 0x77 .sleb128 -1 .byte 0x9f - .4byte .LVL20 + .4byte .LVL23 .4byte .LFE268 .2byte 0x3 .byte 0x77 @@ -5616,54 +5675,54 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x9f .4byte 0 .4byte 0 -.LLST8: - .4byte .LVL4 - .4byte .LVL5 +.LLST10: + .4byte .LVL7 + .4byte .LVL8 .2byte 0x2 .byte 0x30 .byte 0x9f - .4byte .LVL10 - .4byte .LVL11 + .4byte .LVL13 + .4byte .LVL14 .2byte 0x2 .byte 0x30 .byte 0x9f .4byte 0 .4byte 0 -.LLST9: - .4byte .LVL4 - .4byte .LVL9 +.LLST11: + .4byte .LVL7 + .4byte .LVL12 .2byte 0x2 .byte 0x30 .byte 0x9f - .4byte .LVL9 - .4byte .LVL10 + .4byte .LVL12 + .4byte .LVL13 .2byte 0x3 .byte 0x9 .byte 0xff .byte 0x9f - .4byte .LVL10 - .4byte .LVL12 + .4byte .LVL13 + .4byte .LVL15 .2byte 0x1 .byte 0x50 - .4byte .LVL12 + .4byte .LVL15 .4byte .LFE268 .2byte 0x2 .byte 0x30 .byte 0x9f .4byte 0 .4byte 0 -.LLST10: - .4byte .LVL4 - .4byte .LVL6 +.LLST12: + .4byte .LVL7 + .4byte .LVL9 .2byte 0x1 .byte 0x56 - .4byte .LVL6 - .4byte .LVL7 + .4byte .LVL9 + .4byte .LVL10 .2byte 0x3 .byte 0x76 .sleb128 1 .byte 0x9f - .4byte .LVL7 + .4byte .LVL10 .4byte .LFE268 .2byte 0x4 .byte 0xf3 @@ -5672,40 +5731,27 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x9f .4byte 0 .4byte 0 -.LLST11: - .4byte .LVL18 - .4byte .LVL21-1 +.LLST13: + .4byte .LVL21 + .4byte .LVL24-1 .2byte 0x1 .byte 0x53 - .4byte .LVL22 - .4byte .LVL23 + .4byte .LVL25 + .4byte .LVL26 .2byte 0x1 .byte 0x53 .4byte 0 .4byte 0 -.LLST12: - .4byte .LVL8 - .4byte .LVL10 - .2byte 0x1 - .byte 0x54 - .4byte .LVL12 - .4byte .LVL26 - .2byte 0x1 - .byte 0x54 - .4byte .LVL26 - .4byte .LFE268 - .2byte 0x3 - .byte 0x74 - .sleb128 -1 - .byte 0x9f - .4byte 0 - .4byte 0 .LLST14: - .4byte .LVL14 - .4byte .LVL26 + .4byte .LVL11 + .4byte .LVL13 .2byte 0x1 .byte 0x54 - .4byte .LVL26 + .4byte .LVL15 + .4byte .LVL29 + .2byte 0x1 + .byte 0x54 + .4byte .LVL29 .4byte .LFE268 .2byte 0x3 .byte 0x74 @@ -5713,20 +5759,33 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0x9f .4byte 0 .4byte 0 -.LLST15: +.LLST16: .4byte .LVL17 - .4byte .LVL21-1 + .4byte .LVL29 + .2byte 0x1 + .byte 0x54 + .4byte .LVL29 + .4byte .LFE268 + .2byte 0x3 + .byte 0x74 + .sleb128 -1 + .byte 0x9f + .4byte 0 + .4byte 0 +.LLST17: + .4byte .LVL20 + .4byte .LVL24-1 .2byte 0x1 .byte 0x53 - .4byte .LVL22 - .4byte .LVL23 + .4byte .LVL25 + .4byte .LVL26 .2byte 0x1 .byte 0x53 .4byte 0 .4byte 0 -.LLST13: - .4byte .LVL11 - .4byte .LVL12 +.LLST15: + .4byte .LVL14 + .4byte .LVL15 .2byte 0x3 .byte 0x8 .byte 0xff @@ -5741,46 +5800,52 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .byte 0 .2byte 0 .2byte 0 - .4byte .LFB271 - .4byte .LFE271-.LFB271 - .4byte .LFB268 - .4byte .LFE268-.LFB268 .4byte .LFB272 .4byte .LFE272-.LFB272 + .4byte .LFB268 + .4byte .LFE268-.LFB268 + .4byte .LFB273 + .4byte .LFE273-.LFB273 .4byte .LFB270 .4byte .LFE270-.LFB270 .4byte 0 .4byte 0 .section .debug_ranges,"",%progbits .Ldebug_ranges0: - .4byte .LBB17 - .4byte .LBE17 - .4byte .LBB20 - .4byte .LBE20 + .4byte .LBB18 + .4byte .LBE18 + .4byte .LBB21 + .4byte .LBE21 .4byte 0 .4byte 0 - .4byte .LBB34 - .4byte .LBE34 - .4byte .LBB46 - .4byte .LBE46 - .4byte .LBB47 - .4byte .LBE47 - .4byte .LBB49 - .4byte .LBE49 + .4byte .LBB23 + .4byte .LBE23 + .4byte .LBB26 + .4byte .LBE26 .4byte 0 .4byte 0 - .4byte .LBB36 - .4byte .LBE36 .4byte .LBB40 .4byte .LBE40 + .4byte .LBB52 + .4byte .LBE52 + .4byte .LBB53 + .4byte .LBE53 + .4byte .LBB55 + .4byte .LBE55 + .4byte 0 + .4byte 0 + .4byte .LBB42 + .4byte .LBE42 + .4byte .LBB46 + .4byte .LBE46 .4byte 0 .4byte 0 - .4byte .LFB271 - .4byte .LFE271 - .4byte .LFB268 - .4byte .LFE268 .4byte .LFB272 .4byte .LFE272 + .4byte .LFB268 + .4byte .LFE268 + .4byte .LFB273 + .4byte .LFE273 .4byte .LFB270 .4byte .LFE270 .4byte 0 @@ -5850,7 +5915,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "bi_intfreq\000" .LASF11: .ascii "phys_addr_t\000" -.LASF401: +.LASF399: .ascii "write\000" .LASF236: .ascii "UCLASS_VIDEO_BRIDGE\000" @@ -5878,7 +5943,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "UCLASS_CROS_EC\000" .LASF74: .ascii "bi_dsp_freq\000" -.LASF407: +.LASF405: .ascii "rockchip_otp_ids\000" .LASF122: .ascii "image_start\000" @@ -5918,7 +5983,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "UCLASS_CODEC\000" .LASF285: .ascii "env_buf\000" -.LASF429: +.LASF414: .ascii "rockchip_secure_otp_write_byte\000" .LASF21: .ascii "errno\000" @@ -5938,7 +6003,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "size_dt_strings\000" .LASF235: .ascii "UCLASS_VIDEO\000" -.LASF408: +.LASF406: .ascii "_u_boot_list_2_driver_2_rockchip_secure_otp_v2\000" .LASF269: .ascii "relocaddr\000" @@ -5980,7 +6045,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "ih_hcrc\000" .LASF271: .ascii "mon_len\000" -.LASF403: +.LASF401: .ascii "call\000" .LASF124: .ascii "load\000" @@ -6006,6 +6071,8 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "UCLASS_LED\000" .LASF111: .ascii "ih_size\000" +.LASF413: + .ascii "rockchip_secure_otp_v2_capability\000" .LASF39: .ascii "uclass_node\000" .LASF23: @@ -6016,8 +6083,6 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "net_state\000" .LASF368: .ascii "value\000" -.LASF397: - .ascii "EFUSE_S\000" .LASF185: .ascii "UCLASS_I2C_MUX\000" .LASF14: @@ -6056,7 +6121,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "net_restart_wrap\000" .LASF329: .ascii "net_ethaddr\000" -.LASF412: +.LASF410: .ascii "rockchip_secure_otp_v2_write\000" .LASF42: .ascii "flags\000" @@ -6166,7 +6231,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "net_nis_domain\000" .LASF142: .ascii "fit_noffset_fdt\000" -.LASF406: +.LASF404: .ascii "rockchip_secure_otp_ops\000" .LASF351: .ascii "NETLOOP_FAIL\000" @@ -6234,7 +6299,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "___strtok\000" .LASF344: .ascii "net_boot_file_expected_size_in_blocks\000" -.LASF404: +.LASF402: .ascii "rockchip_otp_v2_platdata\000" .LASF353: .ascii "of_match\000" @@ -6280,7 +6345,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "timeout\000" .LASF259: .ascii "addr\000" -.LASF400: +.LASF398: .ascii "read\000" .LASF8: .ascii "unsigned int\000" @@ -6288,7 +6353,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "ushort\000" .LASF313: .ascii "eth_device\000" -.LASF402: +.LASF400: .ascii "ioctl\000" .LASF421: .ascii "dev_read_u32_default\000" @@ -6320,11 +6385,11 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "UCLASS_FIRMWARE\000" .LASF191: .ascii "UCLASS_LPC\000" -.LASF413: +.LASF411: .ascii "offset\000" .LASF187: .ascii "UCLASS_IDE\000" -.LASF399: +.LASF397: .ascii "misc_ops\000" .LASF297: .ascii "phandle\000" @@ -6424,9 +6489,9 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "sibling_node\000" .LASF284: .ascii "of_root\000" -.LASF409: +.LASF407: .ascii "rockchip_secure_otp_v2_ofdata_to_platdata\000" -.LASF414: +.LASF412: .ascii "data_temp\000" .LASF57: .ascii "flash_info\000" @@ -6438,15 +6503,13 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "region\000" .LASF105: .ascii "size_dt_struct\000" -.LASF398: - .ascii "EFUSE_NS\000" .LASF276: .ascii "dm_root\000" .LASF294: .ascii "sys_start_tick\000" .LASF299: .ascii "properties\000" -.LASF410: +.LASF408: .ascii "rockchip_secure_otp_v2_ioctl\000" .LASF197: .ascii "UCLASS_MTD\000" @@ -6518,7 +6581,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "per_child_auto_alloc_size\000" .LASF290: .ascii "malloc_ptr\000" -.LASF405: +.LASF403: .ascii "secure_conf_base\000" .LASF151: .ascii "initrd_end\000" @@ -6562,7 +6625,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "bd_t\000" .LASF312: .ascii "s_addr\000" -.LASF411: +.LASF409: .ascii "request\000" .LASF385: .ascii "post_probe\000" @@ -6596,7 +6659,7 @@ _u_boot_list_2_driver_2_rockchip_secure_otp_v2: .ascii "ofdata_to_platdata\000" .LASF64: .ascii "reserved\000" -.LASF430: +.LASF429: .ascii "free\000" .LASF85: .ascii "bi_dram\000" From 1f21bf610b77e407869c4efc5d02a312f10bf2c5 Mon Sep 17 00:00:00 2001 From: Jon Lin Date: Fri, 3 Apr 2020 13:02:52 +0800 Subject: [PATCH 02/18] mtd: mtd_blk: add flash map block management 1.SPI Nand MTD partition bad block will not be detected if the address isn't begin with the partition first block. 2.To avoid this problem, we should use map partition block address to get right data. 3.It's compatible if the map table isn't initialed. Change-Id: I11858b9b30a8fffecdbad804b1bad7b247b51d23 Signed-off-by: Jon Lin --- drivers/mtd/mtd_blk.c | 128 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 115 insertions(+), 13 deletions(-) diff --git a/drivers/mtd/mtd_blk.c b/drivers/mtd/mtd_blk.c index 1c233c3658..ed4f9a6b25 100644 --- a/drivers/mtd/mtd_blk.c +++ b/drivers/mtd/mtd_blk.c @@ -18,6 +18,113 @@ #define MTD_PART_INFO_MAX_SIZE 512 #define MTD_SINGLE_PART_INFO_MAX_SIZE 40 +static int *mtd_map_blk_table; + +int mtd_blk_map_table_init(struct blk_desc *desc, + loff_t offset, + size_t length) +{ + u32 blk_total, blk_begin, blk_cnt; + struct mtd_info *mtd = NULL; + int i, j; + + if (!desc) + return -ENODEV; + + if (desc->devnum == BLK_MTD_NAND) { +#if defined(CONFIG_NAND) && !defined(CONFIG_SPL_BUILD) + mtd = dev_get_priv(desc->bdev->parent); +#endif + } else if (desc->devnum == BLK_MTD_SPI_NAND) { +#if defined(CONFIG_MTD_SPI_NAND) && !defined(CONFIG_SPL_BUILD) + mtd = desc->bdev->priv; +#endif + } + + if (!mtd) { + return -ENODEV; + } else { + blk_total = mtd->size / mtd->erasesize; + if (!mtd_map_blk_table) { + mtd_map_blk_table = (int *)malloc(blk_total * 4); + for (i = 0; i < blk_total; i++) + mtd_map_blk_table[i] = i; + } + + blk_begin = (u32)offset / mtd->erasesize; + blk_cnt = (u32)length / mtd->erasesize; + j = 0; + /* should not across blk_cnt */ + for (i = 0; i < blk_cnt; i++) { + if (j >= blk_cnt) + mtd_map_blk_table[blk_begin + i] = -1; + for (; j < blk_cnt; j++) { + if (!mtd_block_isbad(mtd, (blk_begin + j) * mtd->erasesize)) { + mtd_map_blk_table[blk_begin + i] = blk_begin + j; + j++; + if (j == blk_cnt) + j++; + break; + } + } + } + + return 0; + } +} + +static __maybe_unused int mtd_map_read(struct mtd_info *mtd, loff_t offset, + size_t *length, size_t *actual, + loff_t lim, u_char *buffer) +{ + size_t left_to_read = *length; + u_char *p_buffer = buffer; + u32 erasesize = mtd->erasesize; + int rval; + + while (left_to_read > 0) { + size_t block_offset = offset & (erasesize - 1); + size_t read_length; + loff_t mapped_offset; + + if (offset >= mtd->size) + return 0; + + mapped_offset = offset; + if (mtd_map_blk_table) { + mapped_offset = (loff_t)((u32)mtd_map_blk_table[(u64)offset / + erasesize] * erasesize + block_offset); + } else { + if (mtd_block_isbad(mtd, offset & ~(erasesize - 1))) { + printf("Skip bad block 0x%08llx\n", + offset & ~(erasesize - 1)); + offset += erasesize - block_offset; + continue; + } + } + + if (left_to_read < (erasesize - block_offset)) + read_length = left_to_read; + else + read_length = erasesize - block_offset; + + rval = mtd_read(mtd, mapped_offset, read_length, &read_length, + p_buffer); + if (rval && rval != -EUCLEAN) { + printf("NAND read from offset %llx failed %d\n", + mapped_offset, rval); + *length -= left_to_read; + return rval; + } + + left_to_read -= read_length; + offset += read_length; + p_buffer += read_length; + } + + return 0; +} + char *mtd_part_parse(void) { char mtd_part_info_temp[MTD_SINGLE_PART_INFO_MAX_SIZE] = {0}; @@ -122,27 +229,22 @@ ulong mtd_dread(struct udevice *udev, lbaint_t start, ret = nand_read_skip_bad(mtd, off, &rwsize, NULL, mtd->size, (u_char *)(dst)); +#else + ret = mtd_map_read(mtd, off, &rwsize, + NULL, mtd->size, + (u_char *)(dst)); +#endif if (!ret) return blkcnt; else -#endif return 0; } else if (desc->devnum == BLK_MTD_SPI_NAND) { -#if defined(CONFIG_MTD_SPI_NAND) && !defined(CONFIG_SPL_BUILD) - ret = nand_read_skip_bad(mtd, off, &rwsize, - NULL, mtd->size, - (u_char *)(dst)); + ret = mtd_map_read(mtd, off, &rwsize, + NULL, mtd->size, + (u_char *)(dst)); if (!ret) return blkcnt; else -#elif defined(CONFIG_SPL_BUILD) - size_t retlen; - - mtd_read(mtd, off, rwsize, &retlen, dst); - if (retlen == rwsize) - return blkcnt; - else -#endif return 0; } else if (desc->devnum == BLK_MTD_SPI_NOR) { #if defined(CONFIG_SPI_FLASH_MTD) || defined(CONFIG_SPL_BUILD) From 0fb435fa051047f1ecd4293f97f5ebcb139ebd9a Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Thu, 23 Apr 2020 19:53:56 +0800 Subject: [PATCH 03/18] scripts: fit-unpack: add hash verify Signed-off-by: Joseph Chen Change-Id: I11982ee2e6fb09f5c0007334832d7decb6025756 --- scripts/fit-unpack.sh | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/scripts/fit-unpack.sh b/scripts/fit-unpack.sh index cfef5a98ad..2fb7ba5eb4 100755 --- a/scripts/fit-unpack.sh +++ b/scripts/fit-unpack.sh @@ -52,10 +52,11 @@ function args_process() function gen_images() { - printf "\n## Unpack $file to directory $output/\n" + printf "\n# Unpack $file to directory $output/\n" fdtget -l $file /images > $output/unpack.txt cat $output/unpack.txt | while read line do + # generate image node="/images/${line}" name=`fdtget -ts $file $node image` offs=`fdtget -ti $file $node data-position` @@ -64,7 +65,6 @@ function gen_images() continue; fi - printf " %-15s: %d bytes\n" ${name} $size if [ $size -ne 0 ]; then dd if=$file of=$output/dd.tmp bs=$offs skip=1 >/dev/null 2>&1 dd if=$output/dd.tmp of=$output/$name bs=$size count=1 >/dev/null 2>&1 @@ -72,6 +72,36 @@ function gen_images() else touch $output/$name fi + + # hash verify + algo=`fdtget -ts $file $node/hash@1 algo` + if [ -z $algo ]; then + printf " %-20s: %d bytes" $name $size + continue; + fi + + data=`fdtget -tx $file $node/hash@1 value` + data=`echo " "$data | sed "s/ / 0x/g"` + csum=`"$algo"sum $output/$name | awk '{ print $1}'` + + hash="" + for((i=1;;i++)); + do + hex=`echo $data | awk -v idx=$i '{ print $idx }'` + if [ -z $hex ]; then + break; + fi + + hex=`printf "%08x" $hex` # align !! + hash="$hash$hex" + done + + printf " %-20s: %d bytes... %s" $name $size $algo + if [ "$csum" = "$hash" -o $size -eq 0 ]; then + echo "+" + else + echo "-" + fi done rm $output/unpack.txt @@ -79,4 +109,5 @@ function gen_images() } args_process $* -gen_images \ No newline at end of file +gen_images + From a46b05016b00bae1541757b4edb054c8e0d6e2f7 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Thu, 23 Apr 2020 20:12:56 +0800 Subject: [PATCH 04/18] scripts: add uimage pack script Signed-off-by: Joseph Chen Change-Id: Id1570789d84f8aba3a6b857e92cc2941e640aaa4 --- scripts/uimage-pack.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/uimage-pack.sh diff --git a/scripts/uimage-pack.sh b/scripts/uimage-pack.sh new file mode 100755 index 0000000000..57222bae03 --- /dev/null +++ b/scripts/uimage-pack.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0 +# +set -e + +IMG_DIR=images +IMG_NAME=boot.img + +if grep -Eq ''^CONFIG_ARM64=y'|'^CONFIG_ARM64_BOOT_AARCH32=y'' .config ; then + ARCH=arm64 +else + ARCH=arm +fi + +echo +./tools/mkimage -n 'Multi Images' -A $ARCH -O linux -T multi -C none -a 0xffffffff -e 0xffffffff -d ${IMG_DIR}/kernel.img:${IMG_DIR}/ramdisk.img:${IMG_DIR}/rk-kernel.dtb:${IMG_DIR}/resource.img $IMG_NAME +echo + From d6290238894eff0376dcf9b0fdf0c7ca7449d6e7 Mon Sep 17 00:00:00 2001 From: Jon Lin Date: Fri, 24 Apr 2020 09:42:48 +0800 Subject: [PATCH 05/18] mtd: mtd_blk: skip bad block if mtd map isn't initiated Change-Id: I3a2b5d311b43cc82135ecd84956e7a365c5910db Signed-off-by: Jon Lin --- drivers/mtd/mtd_blk.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/mtd_blk.c b/drivers/mtd/mtd_blk.c index ed4f9a6b25..c24f2fcdb9 100644 --- a/drivers/mtd/mtd_blk.c +++ b/drivers/mtd/mtd_blk.c @@ -44,7 +44,7 @@ int mtd_blk_map_table_init(struct blk_desc *desc, if (!mtd) { return -ENODEV; } else { - blk_total = mtd->size / mtd->erasesize; + blk_total = (mtd->size + mtd->erasesize - 1) / mtd->erasesize; if (!mtd_map_blk_table) { mtd_map_blk_table = (int *)malloc(blk_total * 4); for (i = 0; i < blk_total; i++) @@ -52,7 +52,9 @@ int mtd_blk_map_table_init(struct blk_desc *desc, } blk_begin = (u32)offset / mtd->erasesize; - blk_cnt = (u32)length / mtd->erasesize; + blk_cnt = ((u32)(offset % mtd->erasesize + length) / mtd->erasesize); + if ((blk_begin + blk_cnt) > blk_total) + blk_cnt = blk_total - blk_begin; j = 0; /* should not across blk_cnt */ for (i = 0; i < blk_cnt; i++) { @@ -86,15 +88,20 @@ static __maybe_unused int mtd_map_read(struct mtd_info *mtd, loff_t offset, size_t block_offset = offset & (erasesize - 1); size_t read_length; loff_t mapped_offset; + bool mapped; if (offset >= mtd->size) return 0; mapped_offset = offset; + mapped = false; if (mtd_map_blk_table) { + mapped = true; mapped_offset = (loff_t)((u32)mtd_map_blk_table[(u64)offset / erasesize] * erasesize + block_offset); - } else { + } + + if (!mapped) { if (mtd_block_isbad(mtd, offset & ~(erasesize - 1))) { printf("Skip bad block 0x%08llx\n", offset & ~(erasesize - 1)); From 5033bc62feb0a935bf71dd6d960da9b184da7840 Mon Sep 17 00:00:00 2001 From: zain wang Date: Fri, 24 Apr 2020 14:40:46 +0800 Subject: [PATCH 06/18] tools: trust_merger: copy ImageSize from Component to ComponentData rk3399_miniloader_v1.25 read ImageSize from ComponentData first now. So copy ImageSize to ComponentData (named LoadSize). For other chips, ComponentDate->LoadSize is reserved area, it no inflence on other chips. Signed-off-by: zain wang Change-Id: I51468aa3fad90d8999c1943ab9c720f7c90cefc1 --- tools/rockchip/trust_merger.c | 1 + tools/rockchip/trust_merger.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/rockchip/trust_merger.c b/tools/rockchip/trust_merger.c index f36b5c8008..627108ea81 100644 --- a/tools/rockchip/trust_merger.c +++ b/tools/rockchip/trust_merger.c @@ -606,6 +606,7 @@ static bool mergetrust(void) pComponent->ComponentID = pEntry->id; pComponent->StorageAddr = (OutFileSize >> 9); pComponent->ImageSize = (pEntry->align_size >> 9); + pComponentData->LoadSize = pComponent->ImageSize; LOGD("bl3%c: LoadAddr = 0x%08x, StorageAddr = %d, ImageSize = %d\n", (char)((pEntry->id & 0xFF000000) >> 24), pComponentData->LoadAddr, diff --git a/tools/rockchip/trust_merger.h b/tools/rockchip/trust_merger.h index e25683fdf3..e00ab52400 100644 --- a/tools/rockchip/trust_merger.h +++ b/tools/rockchip/trust_merger.h @@ -114,7 +114,8 @@ typedef struct { typedef struct { uint32_t HashData[8]; uint32_t LoadAddr; - uint32_t reserved[3]; + uint32_t LoadSize; + uint32_t reserved[2]; } COMPONENT_DATA, *PCOMPONENT_DATA; From a5373663e81be1530154976d0f815d5436125ce6 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Fri, 24 Apr 2020 09:44:00 +0800 Subject: [PATCH 07/18] rockchip: spl: implement fit_board_verify_required_sigs() Signed-off-by: Jason Zhu Change-Id: I5dbebf21a8c3ae76550fec7262bee66c256b5682 --- arch/arm/mach-rockchip/spl.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index ae6b195829..ef086d1f66 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -311,3 +312,21 @@ void spl_hang_reset(void) do_reset(NULL, 0, 0, NULL); #endif } + +int fit_board_verify_required_sigs(void) +{ + uint8_t vboot = 0; +#if defined(CONFIG_SPL_ROCKCHIP_SECURE_OTP) || defined(CONFIG_SPL_ROCKCHIP_SECURE_OTP_v2) + struct udevice *dev; + + dev = misc_otp_get_device(OTP_S); + if (!dev) + return 1; + + if (misc_otp_read(dev, 0, &vboot, 1)) { + printf("Can't read verified-boot flag\n"); + return 1; + } +#endif + return vboot; +} From aedeb70ba0911e336a88a7fd1b320fa86a143ff3 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Sun, 26 Apr 2020 14:41:23 +0800 Subject: [PATCH 08/18] ram: Kconfig: RAMDISK_RO requires rkparam partition Signed-off-by: Joseph Chen Change-Id: I166450ab0d406d2a452afb137c57511def54760c --- drivers/ram/Kconfig | 2 +- drivers/ram/Makefile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/ram/Kconfig b/drivers/ram/Kconfig index 3139af0833..b45def497d 100644 --- a/drivers/ram/Kconfig +++ b/drivers/ram/Kconfig @@ -43,7 +43,7 @@ config DM_RAMDISK config RAMDISK_RO bool "Enable read only ramdisk support" - depends on DM_RAMDISK + depends on DM_RAMDISK && RKPARM_PARTITION help This enables the read only ramdisk support. diff --git a/drivers/ram/Makefile b/drivers/ram/Makefile index b4dd4d3293..287cb08be9 100644 --- a/drivers/ram/Makefile +++ b/drivers/ram/Makefile @@ -10,5 +10,8 @@ obj-$(CONFIG_STM32_SDRAM) += stm32_sdram.o obj-$(CONFIG_ARCH_BMIPS) += bmips_ram.o obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ + +ifndef CONFIG_SPL_BUILD obj-$(CONFIG_DM_RAMDISK) += ramdisk-uclass.o obj-$(CONFIG_RAMDISK_RO) += ramdisk_ro.o +endif From 5d458522616ce5bad99f61ea23f49faa9fd7e730 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Sun, 26 Apr 2020 15:00:09 +0800 Subject: [PATCH 09/18] ram: ramdisk_ro: add u-boot device definition In order not to add the device info in dts. Signed-off-by: Joseph Chen Change-Id: I334c2c99a71476545f311d26b32d7954ca8d8dfd --- drivers/ram/ramdisk_ro.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ram/ramdisk_ro.c b/drivers/ram/ramdisk_ro.c index 47fad6dbe6..c1179edacb 100644 --- a/drivers/ram/ramdisk_ro.c +++ b/drivers/ram/ramdisk_ro.c @@ -63,3 +63,7 @@ U_BOOT_DRIVER(ramdisk_ro) = { .of_match = ramdisk_ro_ids, .bind = ramdisk_ro_bind, }; + +U_BOOT_DEVICE(ramdisk_ro) = { + .name = "ramdisk-ro", +}; From 8e2870c0cf500c9370d3a48ac6eed51fe28c5b72 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Sun, 26 Apr 2020 14:31:03 +0800 Subject: [PATCH 10/18] rockchip: common: add rkimg_bootdev for dm ramdisk Signed-off-by: Joseph Chen Change-Id: Iea6b8cdd7c629be136e83de8e9626394a85b410d --- include/configs/rockchip-common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h index 591bcb46d3..4103342d42 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -113,6 +113,11 @@ "name=security,size=2M,uuid=${uuid_gpt_security};" \ "name=userdata,size=-,uuid=${uuid_gpt_userdata};\0" +#ifdef CONFIG_DM_RAMDISK +#define RKIMG_DET_BOOTDEV \ + "rkimg_bootdev=" \ + "setenv devtype ramdisk; setenv devnum 0; \0" +#else #define RKIMG_DET_BOOTDEV \ "rkimg_bootdev=" \ "if mmc dev 1 && rkimgtest mmc 1; then " \ @@ -132,6 +137,7 @@ "elif rksfc dev 1; then " \ "setenv devtype spinor; setenv devnum 1;" \ "fi; \0" +#endif #if defined(CONFIG_AVB_VBMETA_PUBLIC_KEY_VALIDATE) #define RKIMG_BOOTCOMMAND \ From a527a681cb0856f4995b35f5dbccb417da5278f7 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Sun, 26 Apr 2020 14:31:32 +0800 Subject: [PATCH 11/18] rk1808: remove rkimg_bootdev It's defined in rockchip-common.h now. Signed-off-by: Joseph Chen Change-Id: I9e29b309f22a0a8d97a6b6111b59f594708280f8 --- include/configs/rk1808_common.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/configs/rk1808_common.h b/include/configs/rk1808_common.h index d3007380bb..bb9f432f08 100644 --- a/include/configs/rk1808_common.h +++ b/include/configs/rk1808_common.h @@ -54,13 +54,6 @@ #include -#ifdef CONFIG_DM_RAMDISK -#undef RKIMG_DET_BOOTDEV -#define RKIMG_DET_BOOTDEV \ - "rkimg_bootdev=" \ - "setenv devtype ramdisk; setenv devnum 0; \0" -#endif - #define CONFIG_EXTRA_ENV_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ "partitions=" PARTS_DEFAULT \ From 9b31ae46e21d8ae0e65bce03fe96d0ad1dfa0c86 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Sun, 26 Apr 2020 15:12:55 +0800 Subject: [PATCH 12/18] rockchip: dts: rk3399pro-npu: remove ramdisk-ro node This device is decleared by U_BOOT_DEVICE(). Signed-off-by: Joseph Chen Change-Id: I3e4c64e8fa0baad7d3770b98a96d3c5c787ea6b2 --- arch/arm/dts/rk3399pro-npu-evb.dts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/arm/dts/rk3399pro-npu-evb.dts b/arch/arm/dts/rk3399pro-npu-evb.dts index 00e521c36b..2b66de12dc 100644 --- a/arch/arm/dts/rk3399pro-npu-evb.dts +++ b/arch/arm/dts/rk3399pro-npu-evb.dts @@ -16,12 +16,6 @@ chosen { stdout-path = &uart2; }; - - ramdisk-ro { - u-boot,dm-pre-reloc; - compatible = "ramdisk-ro"; - status = "okay"; - }; }; &dmc { From 85c83705f8567fdead5b0f3272bcf5cfcff87050 Mon Sep 17 00:00:00 2001 From: Jon Lin Date: Mon, 27 Apr 2020 11:11:35 +0800 Subject: [PATCH 13/18] mtd: nand: Fix nanddev_neraseblocks() nanddev_neraseblocks() currently returns the number pages per LUN instead of the total number of eraseblocks. Change-Id: Id5ec7cd7170dae28acbfa568941ffea8e8907361 Signed-off-by: Jon Lin --- include/linux/mtd/nand.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 13e8dd1103..a7595680d8 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -324,9 +324,8 @@ static inline unsigned int nanddev_ntargets(const struct nand_device *nand) */ static inline unsigned int nanddev_neraseblocks(const struct nand_device *nand) { - return (u64)nand->memorg.luns_per_target * - nand->memorg.eraseblocks_per_lun * - nand->memorg.pages_per_eraseblock; + return nand->memorg.ntargets * nand->memorg.luns_per_target * + nand->memorg.eraseblocks_per_lun; } /** From bdf7b34b6003baa838016cb08feb3a14092fdfd9 Mon Sep 17 00:00:00 2001 From: Jon Lin Date: Mon, 27 Apr 2020 11:20:01 +0800 Subject: [PATCH 14/18] mtd: nand: Fix memory allocation in nanddev_bbt_init() Fix the size of the buffer allocated to store the in-memory BBT. This bug was previously hidden by a different bug, that was fixed in commit e4fd10db8b8 ("mtd: nand: Fix nanddev_neraseblocks()"). Fixes: ed99f7731 ("mtd: nand: Add core infrastructure to deal with NAND devices") Change-Id: I365fdfe053ef352661a832b33a232cbb18e81be6 Signed-off-by: Jon Lin --- drivers/mtd/nand/bbt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/bbt.c b/drivers/mtd/nand/bbt.c index 7e0ad3190c..c6b16e411b 100644 --- a/drivers/mtd/nand/bbt.c +++ b/drivers/mtd/nand/bbt.c @@ -29,7 +29,8 @@ int nanddev_bbt_init(struct nand_device *nand) unsigned int nwords = DIV_ROUND_UP(nblocks * bits_per_block, BITS_PER_LONG); - nand->bbt.cache = kzalloc(nwords, GFP_KERNEL); + nand->bbt.cache = kcalloc(nwords, sizeof(*nand->bbt.cache), + GFP_KERNEL); if (!nand->bbt.cache) return -ENOMEM; From 4736384cd0c48cb793f0cf74b6849fad45e30d1f Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Sun, 26 Apr 2020 10:34:08 +0800 Subject: [PATCH 15/18] spl: Kconfig: add SPL_AB depends on SPL_EFI_PARTITION Signed-off-by: Jason Zhu Change-Id: Id4500ae748f965235aac278baee07f278d88d70a --- common/spl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 317d81d33a..bde63f4ae8 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -800,7 +800,7 @@ config SPL_OPTEE config SPL_AB bool "Support AB system boot" - depends on SPL + depends on SPL && SPL_EFI_PARTITION help Enable this config to support AB system boot. From f1419102787b9b890db98d7eaf9e3362129e592a Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Sun, 26 Apr 2020 11:05:56 +0800 Subject: [PATCH 16/18] common: android: fix compile error if only enable ab system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit error: ‘reset_cpu_if_android_ab’ defined but not used [-Werror=unused-function] Signed-off-by: Jason Zhu Change-Id: I724ea99df27f9f572aa0913491eddb2b5e248e38 --- common/android_bootloader.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/common/android_bootloader.c b/common/android_bootloader.c index f0999b5c0d..4ed65e8f76 100644 --- a/common/android_bootloader.c +++ b/common/android_bootloader.c @@ -122,18 +122,6 @@ static int get_partition_unique_uuid(char *partition, return 0; } -static void reset_cpu_if_android_ab(void) -{ - printf("Reset in AB system.\n"); - flushc(); - /* - * Since we use the retry-count in ab system, then can - * try reboot if verify fail until the retry-count is - * equal to zero. - */ - reset_cpu(0); -} - static void update_root_uuid_if_android_ab(void) { /* @@ -226,11 +214,26 @@ static int decrease_tries_if_android_ab(char *slot_suffix) return 0; } #else -static inline void reset_cpu_if_android_ab(void) {} static inline void update_root_uuid_if_android_ab(void) {} static inline int decrease_tries_if_android_ab(char *slot_suffix) { return 0; } #endif +#if defined(CONFIG_ANDROID_AB) && defined(CONFIG_ANDROID_AVB) +static void reset_cpu_if_android_ab(void) +{ + printf("Reset in AB system.\n"); + flushc(); + /* + * Since we use the retry-count in ab system, then can + * try reboot if verify fail until the retry-count is + * equal to zero. + */ + reset_cpu(0); +} +#else +static inline void reset_cpu_if_android_ab(void) {} +#endif + int android_bootloader_message_load( struct blk_desc *dev_desc, const disk_partition_t *part_info, From db7f180f861afeef3d428d4b05980f5189fa5b4b Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Sun, 26 Apr 2020 11:09:22 +0800 Subject: [PATCH 17/18] disk: part: fix compile error in spl undefined reference to `rk_avb_append_part_slot' Signed-off-by: Jason Zhu Change-Id: I21d44387affdc11708e4b091d51850eaaaa2d2dc --- disk/part.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disk/part.c b/disk/part.c index 6b8942fe68..e7ef19154e 100644 --- a/disk/part.c +++ b/disk/part.c @@ -688,11 +688,11 @@ int part_get_info_by_name(struct blk_desc *dev_desc, const char *name, part_drv = part_driver_lookup_type(dev_desc); if (!part_drv) return -1; - +#ifndef CONFIG_SPL_BUILD /* 1. Query partition with A/B slot suffix */ if (rk_avb_append_part_slot(name, name_slot)) return -1; - +#endif retry: debug("## Query partition(%d): %s\n", none_slot_try, name_slot); From 88ea3acb7b9f995be1ac2c409d130c9649b664db Mon Sep 17 00:00:00 2001 From: Jon Lin Date: Mon, 27 Apr 2020 09:23:46 +0800 Subject: [PATCH 18/18] spi: rockchip_sfc: Support setting SPI Nand write xbits address Change-Id: I09d746191323c1e14d8993e71df6d1d5fd621910 Signed-off-by: Jon Lin --- drivers/spi/rockchip_sfc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/spi/rockchip_sfc.c b/drivers/spi/rockchip_sfc.c index 6891b54d54..2ae5bb9674 100644 --- a/drivers/spi/rockchip_sfc.c +++ b/drivers/spi/rockchip_sfc.c @@ -127,6 +127,7 @@ struct rockchip_sfc { u32 cmd; u32 addr; u8 addr_bits; + u8 addr_xbits_ext; u8 dummy_bits; u8 rw; u32 trb; @@ -264,6 +265,9 @@ static void rockchip_sfc_setup_xfer(struct rockchip_sfc *sfc, u32 trb) sfc->addr_bits == SFC_ADDR_32BITS) data_width = rockchip_sfc_get_if_type(sfc); + if (sfc->addr_bits & SFC_ADDR_XBITS) + writel(sfc->addr_xbits_ext - 1, ®s->abit); + val |= (data_width << SFC_DATA_WIDTH_SHIFT); rockchip_sfc_wait_idle(sfc, 10); @@ -524,11 +528,13 @@ static int rockchip_sfc_xfer(struct udevice *dev, unsigned int bitlen, break; case 3: /* Nand prog, */ sfc->addr_bits = SFC_ADDR_XBITS; + sfc->addr_xbits_ext = 16; sfc->dummy_bits = 0; sfc->addr = pcmd[2] | pcmd[1] << 8; break; case 2: /* Nand read/write feature */ sfc->addr_bits = SFC_ADDR_XBITS; + sfc->addr_xbits_ext = 8; sfc->dummy_bits = 0; sfc->addr = pcmd[1]; break;