Annotated assembly output #2

Merged
DataHoarder merged 9 commits from tagged-asm into master 2020-12-29 12:18:05 +00:00
Owner

This code annotates assembly to include function calls and jump returns, and segment output into code areas. An example has been attached, plus this small excerpt:


; ================   FUNCTION    loc_080800   ================
080800  f8 00 00 04   SET DEVICE_CFG                             ; <loc_080800> XREF.CallFrom: 080008(Absolute), 
080804  00 00 00 00       VALUE 0x00000000                      
080808  00 00 00 0f       MASK 0x0000000f                       
08080c  00 00 00 09   WRITE MGMT_SCRATCH[1], 1                  
080810  00 08 08 18       MGMT_SCRATCH[1] = 0x00080818           ; RETURN location for load_bootCfg_pep0_mode
080814  e8 08 90 10   JUMP load_bootCfg_pep0_mode               
080818  d4 00 00 08   BRANCH MGMT_SCRATCH[0] ==                  ; <loc_080818> XREF.CallFrom: 08901c(Return), 0c901c(Return), 
08081c  00 00 00 00       VALUE 0x00000000                      
080820  00 00 00 01       MASK 0x00000001                       
080824  00 08 08 34       JUMP_ADDRESS loc_080834               
080828  f8 00 00 04   SET DEVICE_CFG                            
08082c  00 00 00 01       VALUE 0x00000001                      
080830  00 00 00 01       MASK 0x00000001                       
080834  00 00 00 09   WRITE MGMT_SCRATCH[1], 1                   ; <loc_080834> XREF.CallFrom: 080818(Branch), 
080838  00 08 08 40       MGMT_SCRATCH[1] = 0x00080840           ; RETURN location for load_bootCfg_pep2_mode
08083c  e8 08 90 20   JUMP load_bootCfg_pep2_mode               
080840  d4 00 00 08   BRANCH MGMT_SCRATCH[0] ==                  ; <loc_080840> XREF.CallFrom: 08902c(Return), 0c902c(Return), 
080844  00 00 00 00       VALUE 0x00000000                      
080848  00 00 00 01       MASK 0x00000001                       
08084c  00 08 08 5c       JUMP_ADDRESS loc_08085c               
080850  f8 00 00 04   SET DEVICE_CFG                            
080854  00 00 00 02       VALUE 0x00000002                      
080858  00 00 00 02       MASK 0x00000002                       
08085c  00 00 00 09   WRITE MGMT_SCRATCH[1], 1                   ; <loc_08085c> XREF.CallFrom: 080840(Branch), 
080860  00 08 08 68       MGMT_SCRATCH[1] = 0x00080868           ; RETURN location for load_bootCfg_pep4_mode
080864  e8 08 90 30   JUMP load_bootCfg_pep4_mode               
080868  d4 00 00 08   BRANCH MGMT_SCRATCH[0] ==                  ; <loc_080868> XREF.CallFrom: 08903c(Return), 0c903c(Return), 
08086c  00 00 00 00       VALUE 0x00000000                      
080870  00 00 00 01       MASK 0x00000001                       
080874  00 08 08 84       JUMP_ADDRESS loc_080884               
080878  f8 00 00 04   SET DEVICE_CFG                            
08087c  00 00 00 04       VALUE 0x00000004                      
080880  00 00 00 04       MASK 0x00000004                       
080884  00 00 00 09   WRITE MGMT_SCRATCH[1], 1                   ; <loc_080884> XREF.CallFrom: 080868(Branch), 
080888  00 08 08 90       MGMT_SCRATCH[1] = 0x00080890           ; RETURN location for load_bootCfg_pep6_mode
08088c  e8 08 90 40   JUMP load_bootCfg_pep6_mode               
080890  d4 00 00 08   BRANCH MGMT_SCRATCH[0] ==                  ; <loc_080890> XREF.CallFrom: 08904c(Return), 0c904c(Return), 
080894  00 00 00 00       VALUE 0x00000000                      
080898  00 00 00 01       MASK 0x00000001                       
08089c  00 08 08 ac       JUMP_ADDRESS loc_0808ac               
0808a0  f8 00 00 04   SET DEVICE_CFG                            
0808a4  00 00 00 08       VALUE 0x00000008                      
0808a8  00 00 00 08       MASK 0x00000008                       
0808ac  e8 08 00 0c   JUMP                                       ; <loc_0808ac> XREF.CallFrom: 080890(Branch), 
This code annotates assembly to include function calls and jump returns, and segment output into code areas. An example has been attached, plus this small excerpt: ``` ; ================ FUNCTION loc_080800 ================ 080800 f8 00 00 04 SET DEVICE_CFG ; <loc_080800> XREF.CallFrom: 080008(Absolute), 080804 00 00 00 00 VALUE 0x00000000 080808 00 00 00 0f MASK 0x0000000f 08080c 00 00 00 09 WRITE MGMT_SCRATCH[1], 1 080810 00 08 08 18 MGMT_SCRATCH[1] = 0x00080818 ; RETURN location for load_bootCfg_pep0_mode 080814 e8 08 90 10 JUMP load_bootCfg_pep0_mode 080818 d4 00 00 08 BRANCH MGMT_SCRATCH[0] == ; <loc_080818> XREF.CallFrom: 08901c(Return), 0c901c(Return), 08081c 00 00 00 00 VALUE 0x00000000 080820 00 00 00 01 MASK 0x00000001 080824 00 08 08 34 JUMP_ADDRESS loc_080834 080828 f8 00 00 04 SET DEVICE_CFG 08082c 00 00 00 01 VALUE 0x00000001 080830 00 00 00 01 MASK 0x00000001 080834 00 00 00 09 WRITE MGMT_SCRATCH[1], 1 ; <loc_080834> XREF.CallFrom: 080818(Branch), 080838 00 08 08 40 MGMT_SCRATCH[1] = 0x00080840 ; RETURN location for load_bootCfg_pep2_mode 08083c e8 08 90 20 JUMP load_bootCfg_pep2_mode 080840 d4 00 00 08 BRANCH MGMT_SCRATCH[0] == ; <loc_080840> XREF.CallFrom: 08902c(Return), 0c902c(Return), 080844 00 00 00 00 VALUE 0x00000000 080848 00 00 00 01 MASK 0x00000001 08084c 00 08 08 5c JUMP_ADDRESS loc_08085c 080850 f8 00 00 04 SET DEVICE_CFG 080854 00 00 00 02 VALUE 0x00000002 080858 00 00 00 02 MASK 0x00000002 08085c 00 00 00 09 WRITE MGMT_SCRATCH[1], 1 ; <loc_08085c> XREF.CallFrom: 080840(Branch), 080860 00 08 08 68 MGMT_SCRATCH[1] = 0x00080868 ; RETURN location for load_bootCfg_pep4_mode 080864 e8 08 90 30 JUMP load_bootCfg_pep4_mode 080868 d4 00 00 08 BRANCH MGMT_SCRATCH[0] == ; <loc_080868> XREF.CallFrom: 08903c(Return), 0c903c(Return), 08086c 00 00 00 00 VALUE 0x00000000 080870 00 00 00 01 MASK 0x00000001 080874 00 08 08 84 JUMP_ADDRESS loc_080884 080878 f8 00 00 04 SET DEVICE_CFG 08087c 00 00 00 04 VALUE 0x00000004 080880 00 00 00 04 MASK 0x00000004 080884 00 00 00 09 WRITE MGMT_SCRATCH[1], 1 ; <loc_080884> XREF.CallFrom: 080868(Branch), 080888 00 08 08 90 MGMT_SCRATCH[1] = 0x00080890 ; RETURN location for load_bootCfg_pep6_mode 08088c e8 08 90 40 JUMP load_bootCfg_pep6_mode 080890 d4 00 00 08 BRANCH MGMT_SCRATCH[0] == ; <loc_080890> XREF.CallFrom: 08904c(Return), 0c904c(Return), 080894 00 00 00 00 VALUE 0x00000000 080898 00 00 00 01 MASK 0x00000001 08089c 00 08 08 ac JUMP_ADDRESS loc_0808ac 0808a0 f8 00 00 04 SET DEVICE_CFG 0808a4 00 00 00 08 VALUE 0x00000008 0808a8 00 00 00 08 MASK 0x00000008 0808ac e8 08 00 0c JUMP ; <loc_0808ac> XREF.CallFrom: 080890(Branch), ```
1.4 MiB
DataHoarder added the
enhancement
label 2020-12-28 21:18:05 +00:00
DataHoarder force-pushed tagged-asm from 17411ff044 to 596aaabb6e 2020-12-28 21:20:57 +00:00 Compare
DataHoarder added 1 commit 2020-12-28 21:31:05 +00:00
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
76a55261ea
Fix COPY command operation
DataHoarder added 1 commit 2020-12-28 21:45:37 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
0135a5fa37
Add RETURN context same as JUMP for dynamic relative jumps
DataHoarder added 1 commit 2020-12-28 21:54:04 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
0823e1e78c
Added Poll AddressWithOffset
DataHoarder added 1 commit 2020-12-29 01:19:07 +00:00
DataHoarder added 1 commit 2020-12-29 01:32:34 +00:00
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
d6aac8ce1d
Apply formatting changes
DataHoarder added 1 commit 2020-12-29 11:23:09 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
aa6260ab91
Added more known registers defined in API
DataHoarder added 1 commit 2020-12-29 12:15:57 +00:00
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
f62766549e
Added extra generic register mappings
Author
Owner

This is now complete enough that it's quite useful for reverse engineering, will merge

This is now complete enough that it's quite useful for reverse engineering, will merge
DataHoarder changed title from WIP: Annotated assembly output to Annotated assembly output 2020-12-29 12:17:55 +00:00
DataHoarder merged commit fd36be8599 into master 2020-12-29 12:18:05 +00:00
DataHoarder deleted branch tagged-asm 2020-12-29 12:18:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: FM10K/rrcSmall#2
No description provided.