Advertisement
Guest User

Untitled

a guest
Jul 17th, 2010
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.13 KB | None | 0 0
  1. ROM:87000A4A ; =============== S U B R O U T I N E =======================================
  2. ROM:87000A4A
  3. ROM:87000A4A
  4. ROM:87000A4A ; int __cdecl check_secure_version(int entry_number)
  5. ROM:87000A4A check_secure_version ; CODE XREF: check_mbm_secversion+Ep
  6. ROM:87000A4A ; check_mbm_secversion+8Cp ...
  7. ROM:87000A4A 000 2D E9 F0 47 PUSH.W {R4-R10,LR} ; Push registers
  8. ROM:87000A4E 020 04 46 MOV R4, R0 ; Rd = Op2
  9. ROM:87000A50 020 58 25 MOVS R5, #0x58 ; Rd = Op2
  10. ROM:87000A52 020 00 27 MOVS R7, #0 ; Rd = Op2
  11. ROM:87000A54 020 4F F0 00 08 MOV.W R8, #0 ; Rd = Op2
  12. ROM:87000A58 020 4F F0 00 09 MOV.W R9, #0 ; Rd = Op2
  13. ROM:87000A5C 020 20 46 MOV R0, R4 ; entry_number
  14. ROM:87000A5E 020 03 F0 37 FF BL fuse_read_SECVER ; Branch with Link
  15. ROM:87000A62 020 C6 B2 UXTB R6, R0 ; Unsigned extend byte to word
  16. ROM:87000A64 020 68 2C CMP R4, #0x68 ; Set cond. codes on Op1 - Op2
  17. ROM:87000A66 020 02 D0 BEQ entry_is_0x68 ; Branch
  18. ROM:87000A68 020 69 2C CMP R4, #0x69 ; Set cond. codes on Op1 - Op2
  19. ROM:87000A6A 020 1A D1 BNE entry_is_0x69 ; Branch
  20. ROM:87000A6C 020 0C E0 B entry_is_another ; Branch
  21. ROM:87000A6E ; ---------------------------------------------------------------------------
  22. ROM:87000A6E
  23. ROM:87000A6E entry_is_0x68 ; CODE XREF: check_secure_version+1Cj
  24. ROM:87000A6E 020 DF F8 FC 82 LDR.W R8, =mbmloader_header ; Load from Memory
  25. ROM:87000A72 020 B8 F1 00 0F CMP.W R8, #0 ; Set cond. codes on Op1 - Op2
  26. ROM:87000A76 020 06 D0 BEQ loc_87000A86 ; Branch
  27. ROM:87000A78 020 D8 F8 04 00 LDR.W R0, [R8,#4] ; Load from Memory
  28. ROM:87000A7C 020 B1 28 CMP R0, #0xB1 ; Set cond. codes on Op1 - Op2
  29. ROM:87000A7E 020 02 D1 BNE loc_87000A86 ; Branch
  30. ROM:87000A80 020 98 F8 24 70 LDRB.W R7, [R8,#0x24] ; Load from Memory
  31. ROM:87000A84 020 23 25 MOVS R5, #0x23 ; Rd = Op2
  32. ROM:87000A86
  33. ROM:87000A86 loc_87000A86 ; CODE XREF: check_secure_version+2Cj
  34. ROM:87000A86 ; check_secure_version+34j
  35. ROM:87000A86 020 0E E0 B compare_with_fuse ; Branch
  36. ROM:87000A88 ; ---------------------------------------------------------------------------
  37. ROM:87000A88
  38. ROM:87000A88 entry_is_another ; CODE XREF: check_secure_version+22j
  39. ROM:87000A88 020 DF F8 E4 92 LDR.W R9, =MBM_BASE ; Load from Memory
  40. ROM:87000A8C 020 B9 F1 00 0F CMP.W R9, #0 ; Set cond. codes on Op1 - Op2
  41. ROM:87000A90 020 06 D0 BEQ loc_87000AA0 ; Branch
  42. ROM:87000A92 020 D9 F8 04 00 LDR.W R0, [R9,#4] ; Load from Memory
  43. ROM:87000A96 020 B1 28 CMP R0, #0xB1 ; Set cond. codes on Op1 - Op2
  44. ROM:87000A98 020 02 D1 BNE loc_87000AA0 ; Branch
  45. ROM:87000A9A 020 99 F8 24 70 LDRB.W R7, [R9,#0x24] ; Load from Memory
  46. ROM:87000A9E 020 23 25 MOVS R5, #0x23 ; Rd = Op2
  47. ROM:87000AA0
  48. ROM:87000AA0 loc_87000AA0 ; CODE XREF: check_secure_version+46j
  49. ROM:87000AA0 ; check_secure_version+4Ej
  50. ROM:87000AA0 020 01 E0 B compare_with_fuse ; Branch
  51. ROM:87000AA2 ; ---------------------------------------------------------------------------
  52. ROM:87000AA2
  53. ROM:87000AA2 entry_is_0x69 ; CODE XREF: check_secure_version+20j
  54. ROM:87000AA2 020 58 25 MOVS R5, #0x58 ; Rd = Op2
  55. ROM:87000AA4 020 00 BF NOP ; No Operation
  56. ROM:87000AA6
  57. ROM:87000AA6 compare_with_fuse ; CODE XREF: check_secure_version:loc_87000A86j
  58. ROM:87000AA6 ; check_secure_version:loc_87000AA0j
  59. ROM:87000AA6 020 00 BF NOP ; No Operation
  60. ROM:87000AA8 020 23 2D CMP R5, #0x23 ; Set cond. codes on Op1 - Op2
  61. ROM:87000AAA 020 0B D1 BNE return ; Branch
  62. ROM:87000AAC 020 03 F0 9F FE BL hab_su_type ; 2 - HIGH SECURE, 1 - SECURE, 8 - INSECURE
  63. ROM:87000AB0 020 02 28 CMP R0, #2 ; Set cond. codes on Op1 - Op2
  64. ROM:87000AB2 020 07 D1 BNE return ; Branch
  65. ROM:87000AB4 020 03 F0 B2 FE BL check_SMID ; return 0 if SECURE_MODULE_ID or 1 if SECURE_MODULE_ID is null
  66. ROM:87000AB8 020 20 B9 CBNZ R0, return ; Compare and Branch on Non-Zero
  67. ROM:87000ABA 020 B7 42 CMP R7, R6 ; Set cond. codes on Op1 - Op2
  68. ROM:87000ABC 020 01 DB BLT return_0x58 ; Branch
  69. ROM:87000ABE 020 23 25 MOVS R5, #0x23 ; Rd = Op2
  70. ROM:87000AC0 020 00 E0 B return ; Branch
  71. ROM:87000AC2 ; ---------------------------------------------------------------------------
  72. ROM:87000AC2
  73. ROM:87000AC2 return_0x58 ; CODE XREF: check_secure_version+72j
  74. ROM:87000AC2 020 58 25 MOVS R5, #0x58 ; Rd = Op2
  75. ROM:87000AC4
  76. ROM:87000AC4 return ; CODE XREF: check_secure_version+60j
  77. ROM:87000AC4 ; check_secure_version+68j ...
  78. ROM:87000AC4 020 28 46 MOV R0, R5 ; Rd = Op2
  79. ROM:87000AC6 020 BD E8 F0 87 POP.W {R4-R10,PC} ; Pop registers
  80. ROM:87000AC6 020 ; End of function check_secure_version
  81. ROM:87000AC6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement