LOAD:FFFF253C
LOAD:FFFF253C ; =============== S U B R O U T I N E =======================================
LOAD:FFFF253C
LOAD:FFFF253C
LOAD:FFFF253C aes_wait                                ; CODE XREF: do_hash_comparison+74p
LOAD:FFFF253C                                         ; do_hash_comparison+9Ep
LOAD:FFFF253C                 PUSH    {LR}
LOAD:FFFF253E                 LDR     R2, =unk_D020000
LOAD:FFFF2540
LOAD:FFFF2540 loc_FFFF2540                            ; CODE XREF: aes_wait+8j
LOAD:FFFF2540                 LDR     R3, [R2]
LOAD:FFFF2542                 CMP     R3, #0
LOAD:FFFF2544                 BLT     loc_FFFF2540
LOAD:FFFF2546                 MOVS    R0, #4
LOAD:FFFF2548                 BL      flush_n_stuff
LOAD:FFFF254C                 MOVS    R0, #0
LOAD:FFFF254E                 BL      flush_n_stuff2
LOAD:FFFF2552                 POP     {R0}
LOAD:FFFF2554                 BX      R0
LOAD:FFFF2554 ; ---------------------------------------------------------------------------
LOAD:FFFF2556                 ALIGN 4
LOAD:FFFF2558 off_FFFF2558    DCD unk_D020000         ; DATA XREF: aes_wait+2r
LOAD:FFFF2558 ; End of function aes_wait
LOAD:FFFF2558
LOAD:FFFF255C
LOAD:FFFF255C ; =============== S U B R O U T I N E =======================================
LOAD:FFFF255C
LOAD:FFFF255C
LOAD:FFFF255C ; int __cdecl aes_setup(void *src, void *dest, unsigned int iv)
LOAD:FFFF255C aes_setup                               ; CODE XREF: do_hash_comparison+64p
LOAD:FFFF255C                                         ; do_hash_comparison+86p
LOAD:FFFF255C                 PUSH    {R4-R6,LR}
LOAD:FFFF255E                 ADDS    R5, R0, #0
LOAD:FFFF2560                 MOVS    R0, #0
LOAD:FFFF2562                 ADDS    R4, R2, #0
LOAD:FFFF2564                 ADDS    R6, R1, #0
LOAD:FFFF2566                 BL      flush_n_stuff
LOAD:FFFF256A                 MOVS    R0, #4
LOAD:FFFF256C                 BL      flush_n_stuff2
LOAD:FFFF2570                 LDR     R3, =unk_D020010
LOAD:FFFF2572                 LDR     R2, =unk_D020000
LOAD:FFFF2574                 STR     R4, [R3]
LOAD:FFFF2576                 STR     R4, [R3]
LOAD:FFFF2578                 STR     R4, [R3]
LOAD:FFFF257A                 STR     R4, [R3]
LOAD:FFFF257C                 MOVS    R3, #0
LOAD:FFFF257E                 STR     R3, [R2]
LOAD:FFFF2580                 LDR     R3, =unk_D020004
LOAD:FFFF2582                 STR     R5, [R3]
LOAD:FFFF2584                 ADDS    R3, #4
LOAD:FFFF2586                 STR     R6, [R3]
LOAD:FFFF2588                 LDR     R3, =0x90000FFF
LOAD:FFFF258A                 STR     R3, [R2]
LOAD:FFFF258C                 POP     {R4-R6}
LOAD:FFFF258E                 POP     {R0}
LOAD:FFFF2590                 BX      R0
LOAD:FFFF2590 ; ---------------------------------------------------------------------------
LOAD:FFFF2592                 ALIGN 4
LOAD:FFFF2594 off_FFFF2594    DCD unk_D020010         ; DATA XREF: aes_setup+14r
LOAD:FFFF2598 off_FFFF2598    DCD unk_D020000         ; DATA XREF: aes_setup+16r
LOAD:FFFF259C off_FFFF259C    DCD unk_D020004         ; DATA XREF: aes_setup+24r
LOAD:FFFF25A0 dword_FFFF25A0  DCD 0x90000FFF          ; DATA XREF: aes_setup+2Cr
LOAD:FFFF25A0 ; End of function aes_setup
LOAD:FFFF25A0
LOAD:FFFF25A4
LOAD:FFFF25A4 ; =============== S U B R O U T I N E =======================================
LOAD:FFFF25A4
LOAD:FFFF25A4
LOAD:FFFF25A4 sha_setup                               ; CODE XREF: do_hash_comparison+7Ap
LOAD:FFFF25A4                                         ; do_hash_comparison+96p
LOAD:FFFF25A4                 PUSH    {R4,LR}
LOAD:FFFF25A6                 ADDS    R4, R0, #0
LOAD:FFFF25A8                 MOVS    R0, #0
LOAD:FFFF25AA                 BL      flush_n_stuff
LOAD:FFFF25AE                 MOVS    R0, #5
LOAD:FFFF25B0                 BL      flush_n_stuff2
LOAD:FFFF25B4                 LDR     R2, =0xD030000
LOAD:FFFF25B6                 MOVS    R3, #0
LOAD:FFFF25B8                 STR     R3, [R2]
LOAD:FFFF25BA                 LDR     R3, =0xD030004
LOAD:FFFF25BC                 STR     R4, [R3]
LOAD:FFFF25BE                 LDR     R3, =0x800003FF
LOAD:FFFF25C0                 STR     R3, [R2]
LOAD:FFFF25C2                 POP     {R4}
LOAD:FFFF25C4                 POP     {R0}
LOAD:FFFF25C6                 BX      R0
LOAD:FFFF25C6 ; ---------------------------------------------------------------------------
LOAD:FFFF25C8 dword_FFFF25C8  DCD 0xD030000           ; DATA XREF: sha_setup+10r
LOAD:FFFF25CC dword_FFFF25CC  DCD 0xD030004           ; DATA XREF: sha_setup+16r
LOAD:FFFF25D0 dword_FFFF25D0  DCD 0x800003FF          ; DATA XREF: sha_setup+1Ar
LOAD:FFFF25D0 ; End of function sha_setup
LOAD:FFFF25D0
LOAD:FFFF25D4
LOAD:FFFF25D4 ; =============== S U B R O U T I N E =======================================
LOAD:FFFF25D4
LOAD:FFFF25D4
LOAD:FFFF25D4 sha_wait                                ; CODE XREF: do_hash_comparison+8Cp
LOAD:FFFF25D4                                         ; do_hash_comparison+9Ap
LOAD:FFFF25D4                 PUSH    {LR}
LOAD:FFFF25D6                 LDR     R2, =0xD030000
LOAD:FFFF25D8
LOAD:FFFF25D8 loc_FFFF25D8                            ; CODE XREF: sha_wait+8j
LOAD:FFFF25D8                 LDR     R3, [R2]
LOAD:FFFF25DA                 CMP     R3, #0
LOAD:FFFF25DC                 BLT     loc_FFFF25D8
LOAD:FFFF25DE                 POP     {R0}
LOAD:FFFF25E0                 BX      R0
LOAD:FFFF25E0 ; ---------------------------------------------------------------------------
LOAD:FFFF25E2                 ALIGN 4
LOAD:FFFF25E4 dword_FFFF25E4  DCD 0xD030000           ; DATA XREF: sha_wait+2r
LOAD:FFFF25E4 ; End of function sha_wait
LOAD:FFFF25E4
LOAD:FFFF25E8
LOAD:FFFF25E8 ; =============== S U B R O U T I N E =======================================
LOAD:FFFF25E8
LOAD:FFFF25E8
LOAD:FFFF25E8 do_hash_comparison                      ; CODE XREF: ppc_boot+10p
LOAD:FFFF25E8
LOAD:FFFF25E8 var_28          = -0x28
LOAD:FFFF25E8 var_24          = -0x24
LOAD:FFFF25E8 var_20          = -0x20
LOAD:FFFF25E8 var_1C          = -0x1C
LOAD:FFFF25E8
LOAD:FFFF25E8                 PUSH    {R4-R7,LR}
LOAD:FFFF25EA                 MOV     R7, R8
LOAD:FFFF25EC                 PUSH    {R7}
LOAD:FFFF25EE                 MOVS    R1, #0x80
LOAD:FFFF25F0                 SUB     SP, SP, #0x10
LOAD:FFFF25F2                 LDR     R0, =0xFFFF8000
LOAD:FFFF25F4                 LSLS    R1, R1, #8
LOAD:FFFF25F6                 LDR     R2, =0xCAFEBABE
LOAD:FFFF25F8                 BL      memfill
LOAD:FFFF25FC                 MOVS    R1, #0x80
LOAD:FFFF25FE                 LDR     R0, =0xFFFE0000
LOAD:FFFF2600                 LSLS    R1, R1, #8
LOAD:FFFF2602                 LDR     R2, =0xCAFEBABE
LOAD:FFFF2604                 BL      memfill
LOAD:FFFF2608                 LDR     R2, =hash1
LOAD:FFFF260A                 LDR     R3, =0x2B7E1516
LOAD:FFFF260C                 MOV     R8, R2
LOAD:FFFF260E                 LDR     R2, =aes_key_fifo
LOAD:FFFF2610                 STR     R3, [R2]
LOAD:FFFF2612                 LDR     R3, =0x28AED2A6
LOAD:FFFF2614                 STR     R3, [R2]
LOAD:FFFF2616                 LDR     R3, =0xABF71588
LOAD:FFFF2618                 STR     R3, [R2]
LOAD:FFFF261A                 LDR     R3, =0x9CF4F3C
LOAD:FFFF261C                 STR     R3, [R2]
LOAD:FFFF261E                 LDR     R3, =0xD030000
LOAD:FFFF2620                 MOVS    R2, #0
LOAD:FFFF2622                 STR     R2, [R3]
LOAD:FFFF2624                 LDR     R2, =0x67452301
LOAD:FFFF2626                 ADDS    R3, #8
LOAD:FFFF2628                 STR     R2, [R3]
LOAD:FFFF262A                 LDR     R2, =0xEFCDAB89
LOAD:FFFF262C                 ADDS    R3, #4
LOAD:FFFF262E                 STR     R2, [R3]
LOAD:FFFF2630                 LDR     R2, =0x98BADCFE
LOAD:FFFF2632                 ADDS    R3, #4
LOAD:FFFF2634                 STR     R2, [R3]
LOAD:FFFF2636                 LDR     R2, =0x10325476
LOAD:FFFF2638                 ADDS    R3, #4
LOAD:FFFF263A                 STR     R2, [R3]
LOAD:FFFF263C                 MOVS    R6, #0x80
LOAD:FFFF263E                 LDR     R2, =0xC3D2E1F0
LOAD:FFFF2640                 ADDS    R3, #4
LOAD:FFFF2642                 LSLS    R6, R6, #0x15   ; 0x10000000
LOAD:FFFF2644                 STR     R2, [R3]
LOAD:FFFF2646                 LDR     R0, =unk_D408000 ; src
LOAD:FFFF2648                 ADDS    R1, R6, #0      ; dest
LOAD:FFFF264A                 MOVS    R2, #0          ; iv
LOAD:FFFF264C                 BL      aes_setup
LOAD:FFFF2650                 MOVS    R7, #0x80
LOAD:FFFF2652                 MOVS    R5, #1
LOAD:FFFF2654                 LSLS    R7, R7, #3
LOAD:FFFF2656
LOAD:FFFF2656 loc_FFFF2656                            ; CODE XREF: do_hash_comparison+92j
LOAD:FFFF2656                 MOVLS   R3, 0x10000
LOAD:FFFF265A                 ADDS    R4, R6, R3      ; 0x10010000
LOAD:FFFF265C                 BL      aes_wait
LOAD:FFFF2660                 ADDS    R0, R6, #0
LOAD:FFFF2662                 BL      sha_setup
LOAD:FFFF2666                 ADDS    R2, R5, #0      ; iv
LOAD:FFFF2668                 LDR     R0, =unk_D408000 ; src
LOAD:FFFF266A                 ADDS    R1, R4, #0      ; dest
LOAD:FFFF266C                 ADDS    R5, #1
LOAD:FFFF266E                 BL      aes_setup
LOAD:FFFF2672                 ADDS    R6, R4, #0
LOAD:FFFF2674                 BL      sha_wait
LOAD:FFFF2678                 CMP     R7, R5
LOAD:FFFF267A                 BHI     loc_FFFF2656
LOAD:FFFF267C                 ADDS    R0, R4, #0
LOAD:FFFF267E                 BL      sha_setup
LOAD:FFFF2682                 BL      sha_wait
LOAD:FFFF2686                 BL      aes_wait
LOAD:FFFF268A                 LDR     R3, =0xD030008
LOAD:FFFF268C                 LDR     R3, [R3]
LOAD:FFFF268E                 MOV     R2, R8
LOAD:FFFF2690                 STR     R3, [R2]
LOAD:FFFF2692                 LDR     R3, =0xD03000C
LOAD:FFFF2694                 LDR     R3, [R3]
LOAD:FFFF2696                 STR     R3, [R2,#4]
LOAD:FFFF2698                 LDR     R3, =0xD030010
LOAD:FFFF269A                 LDR     R3, [R3]
LOAD:FFFF269C                 STR     R3, [R2,#8]
LOAD:FFFF269E                 LDR     R3, =0xD030014
LOAD:FFFF26A0                 LDR     R3, [R3]
LOAD:FFFF26A2                 STR     R3, [R2,#0xC]
LOAD:FFFF26A4                 LDR     R3, =0xD030018
LOAD:FFFF26A6                 LDR     R3, [R3]
LOAD:FFFF26A8                 LDR     R1, =hash2
LOAD:FFFF26AA                 STR     R3, [R2,#0x10]
LOAD:FFFF26AC                 LDR     R0, =hash1
LOAD:FFFF26AE                 LDR     R2, [R1]
LOAD:FFFF26B0                 LDR     R3, [R0]
LOAD:FFFF26B2                 CMP     R2, R3
LOAD:FFFF26B4                 BEQ     loc_FFFF26EE
LOAD:FFFF26B6
LOAD:FFFF26B6 error_1                                 ; CODE XREF: do_hash_comparison+10Cj
LOAD:FFFF26B6                                         ; do_hash_comparison+114j
LOAD:FFFF26B6                                         ; do_hash_comparison+11Cj ...
LOAD:FFFF26B6                 MOVS    R4, #1
LOAD:FFFF26B8                 NEGS    R4, R4
LOAD:FFFF26BA
LOAD:FFFF26BA loc_FFFF26BA                            ; CODE XREF: do_hash_comparison+128j
LOAD:FFFF26BA                 LDR     R1, [R0,#8]
LOAD:FFFF26BC                 LDR     R2, [R0]
LOAD:FFFF26BE                 LDR     R3, [R0,#4]
LOAD:FFFF26C0                 STR     R1, [SP,#0x28+var_28]
LOAD:FFFF26C2                 LDR     R1, [R0,#0xC]
LOAD:FFFF26C4                 STR     R1, [SP,#0x28+var_24]
LOAD:FFFF26C6                 LDR     R1, [R0,#0x10]
LOAD:FFFF26C8                 STR     R1, [SP,#0x28+var_20]
LOAD:FFFF26CA                 MOVS    R1, #0
LOAD:FFFF26CC                 STR     R1, [SP,#0x28+var_1C]
LOAD:FFFF26CE                 LDR     R0, =a_sshaHashxxxxxuticks
LOAD:FFFF26D0                 LDR     R1, =null
LOAD:FFFF26D2                 BL      do_log_message
LOAD:FFFF26D6                 CMP     R4, #0
LOAD:FFFF26D8                 BLT     hash_compare_fail
LOAD:FFFF26DA                 MOVS    R0, #1
LOAD:FFFF26DC                 BL      cc_ahbMemFlush
LOAD:FFFF26E0                 MOVS    R0, #0
LOAD:FFFF26E2
LOAD:FFFF26E2 loc_FFFF26E2                            ; CODE XREF: do_hash_comparison+134j
LOAD:FFFF26E2                 ADD     SP, SP, #0x10
LOAD:FFFF26E4                 POP     {R3}
LOAD:FFFF26E6                 MOV     R8, R3
LOAD:FFFF26E8                 POP     {R4-R7}
LOAD:FFFF26EA                 POP     {R1}
LOAD:FFFF26EC                 BX      R1
LOAD:FFFF26EE ; ---------------------------------------------------------------------------
LOAD:FFFF26EE
LOAD:FFFF26EE loc_FFFF26EE                            ; CODE XREF: do_hash_comparison+CCj
LOAD:FFFF26EE                 LDR     R2, [R1,#4]
LOAD:FFFF26F0                 LDR     R3, [R0,#4]
LOAD:FFFF26F2                 CMP     R2, R3
LOAD:FFFF26F4                 BNE     error_1
LOAD:FFFF26F6                 LDR     R2, [R1,#8]
LOAD:FFFF26F8                 LDR     R3, [R0,#8]
LOAD:FFFF26FA                 CMP     R2, R3
LOAD:FFFF26FC                 BNE     error_1
LOAD:FFFF26FE                 LDR     R2, [R1,#0xC]
LOAD:FFFF2700                 LDR     R3, [R0,#0xC]
LOAD:FFFF2702                 CMP     R2, R3
LOAD:FFFF2704                 BNE     error_1
LOAD:FFFF2706                 LDR     R2, [R1,#0x10]
LOAD:FFFF2708                 LDR     R3, [R0,#0x10]
LOAD:FFFF270A                 CMP     R2, R3
LOAD:FFFF270C                 BNE     error_1
LOAD:FFFF270E                 MOVS    R4, #0
LOAD:FFFF2710                 B       loc_FFFF26BA
LOAD:FFFF2712 ; ---------------------------------------------------------------------------
LOAD:FFFF2712
LOAD:FFFF2712 hash_compare_fail                       ; CODE XREF: do_hash_comparison+F0j
LOAD:FFFF2712                 LDR     R0, =a_Hashcomparisonfailed_Haltingboot
LOAD:FFFF2714                 BL      do_log_message
LOAD:FFFF2718                 MOVS    R0, #1
LOAD:FFFF271A                 NEGS    R0, R0
LOAD:FFFF271C                 B       loc_FFFF26E2
LOAD:FFFF271C ; ---------------------------------------------------------------------------
LOAD:FFFF271E                 ALIGN 0x10
LOAD:FFFF2720 dword_FFFF2720  DCD 0xFFFF8000          ; DATA XREF: do_hash_comparison+Ar
LOAD:FFFF2724 dword_FFFF2724  DCD 0xCAFEBABE          ; DATA XREF: do_hash_comparison+Er
LOAD:FFFF2724                                         ; do_hash_comparison+1Ar
LOAD:FFFF2728 dword_FFFF2728  DCD 0xFFFE0000          ; DATA XREF: do_hash_comparison+16r
LOAD:FFFF272C off_FFFF272C    DCD hash1               ; DATA XREF: do_hash_comparison+20r
LOAD:FFFF272C                                         ; do_hash_comparison+C4r
LOAD:FFFF2730 dword_FFFF2730  DCD 0x2B7E1516          ; DATA XREF: do_hash_comparison+22r
LOAD:FFFF2734 off_FFFF2734    DCD aes_key_fifo        ; DATA XREF: do_hash_comparison+26r
LOAD:FFFF2738 dword_FFFF2738  DCD 0x28AED2A6          ; DATA XREF: do_hash_comparison+2Ar
LOAD:FFFF273C dword_FFFF273C  DCD 0xABF71588          ; DATA XREF: do_hash_comparison+2Er
LOAD:FFFF2740 dword_FFFF2740  DCD 0x9CF4F3C           ; DATA XREF: do_hash_comparison+32r
LOAD:FFFF2744 dword_FFFF2744  DCD 0xD030000           ; DATA XREF: do_hash_comparison+36r
LOAD:FFFF2748 dword_FFFF2748  DCD 0x67452301          ; DATA XREF: do_hash_comparison+3Cr
LOAD:FFFF274C dword_FFFF274C  DCD 0xEFCDAB89          ; DATA XREF: do_hash_comparison+42r
LOAD:FFFF2750 dword_FFFF2750  DCD 0x98BADCFE          ; DATA XREF: do_hash_comparison+48r
LOAD:FFFF2754 dword_FFFF2754  DCD 0x10325476          ; DATA XREF: do_hash_comparison+4Er
LOAD:FFFF2758 dword_FFFF2758  DCD 0xC3D2E1F0          ; DATA XREF: do_hash_comparison+56r
LOAD:FFFF275C ; void *src
LOAD:FFFF275C src             DCD unk_D408000         ; DATA XREF: do_hash_comparison+5Er
LOAD:FFFF275C                                         ; do_hash_comparison+80r
LOAD:FFFF2760 dword_FFFF2760  DCD 0xD030008           ; DATA XREF: do_hash_comparison+A2r
LOAD:FFFF2764 dword_FFFF2764  DCD 0xD03000C           ; DATA XREF: do_hash_comparison+AAr
LOAD:FFFF2768 dword_FFFF2768  DCD 0xD030010           ; DATA XREF: do_hash_comparison+B0r
LOAD:FFFF276C dword_FFFF276C  DCD 0xD030014           ; DATA XREF: do_hash_comparison+B6r
LOAD:FFFF2770 dword_FFFF2770  DCD 0xD030018           ; DATA XREF: do_hash_comparison+BCr
LOAD:FFFF2774 off_FFFF2774    DCD hash2               ; DATA XREF: do_hash_comparison+C0r
LOAD:FFFF2778 off_FFFF2778    DCD a_sshaHashxxxxxuticks ; DATA XREF: do_hash_comparison+E6r
LOAD:FFFF2778                                         ; "%s shaHash: %x %x %x %x %x [%u ticks]\n"
LOAD:FFFF277C off_FFFF277C    DCD null                ; DATA XREF: do_hash_comparison+E8r
LOAD:FFFF2780 off_FFFF2780    DCD a_Hashcomparisonfailed_Haltingboot
LOAD:FFFF2780                                         ; DATA XREF: do_hash_comparison:hash_compare_failr
LOAD:FFFF2780 ; End of function do_hash_comparison    ; "Hash comparison failed. Halting boot!\n"
LOAD:FFFF2780