Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ghidra decompile result #15

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

Yangff
Copy link
Contributor

@Yangff Yangff commented Nov 3, 2020

Please notice that currently ghidra's riscv plugin does not support floating

@Yangff Yangff mentioned this pull request Nov 3, 2020
@Yangff
Copy link
Contributor Author

Yangff commented Nov 3, 2020

will merge again after add memory maps

@Yangff Yangff closed this Nov 3, 2020
@WildCryptoFox
Copy link

@Yangff you can set the PR as a draft; then push new commits (or amend the previous commit).

@Yangff Yangff reopened this Nov 3, 2020
@Yangff Yangff marked this pull request as draft November 3, 2020 10:17
@mumbel
Copy link
Contributor

mumbel commented Nov 6, 2020

Please notice that currently ghidra's riscv plugin does not support floating

How so, because it most certainly has FP support? I am only aware that there were 2 broken FP instructions, c.fsw and c.fswsp, before you made this PR, can you open an issue on my repo with what you're seeing.

@Yangff
Copy link
Contributor Author

Yangff commented Nov 6, 2020

Please notice that currently ghidra's riscv plugin does not support floating

How so, because it most certainly has FP support? I am only aware that there were 2 broken FP instructions, c.fsw and c.fswsp, before you made this PR, can you open an issue on my repo with what you're seeing.

hmmm.. can you see what's in rfc_init function?

                             *************************************************************
                             *                           FUNCTION                          
                             *************************************************************
                             void  __stdcall  rfc_init (uint32_t  xtalfreq_hz )
             void              <VOID>         <RETURN>
             uint32_t          a0:4           xtalfreq_hz
             uint32_t          Stack[-0x50]:4 dg
             uint32_t          Stack[-0x54]:4 rfg_index
                             rfc_init                                        XREF[2]:     Entry Point (*) , 
                                                                                          wifi_main:230133bc (c)   
        2301503e 1d  71           c.addi16   sp,-0x60
        23015040 a6  ca           c.swsp     s1,0x54 (sp)
        23015042 86  ce           c.swsp     ra,0x5c (sp)
        23015044 a2  cc           c.swsp     s0,0x58 (sp)
        23015046 ca  c8           c.swsp     s2,0x50 (sp)
        23015048 ce  c6           c.swsp     s3,0x4c (sp)
        2301504a d2  c4           c.swsp     s4,0x48 (sp)
        2301504c d6  c2           c.swsp     s5,0x44 (sp)
        2301504e da  c0           c.swsp     s6,0x40 (sp)
        23015050 5e  de           c.swsp     s7,0x3c (sp)
        23015052 62  dc           c.swsp     s8,0x38 (sp)
        23015054 66  da           c.swsp     s9,0x34 (sp)
        23015056 6a  d8           c.swsp     s10 ,0x30 (sp)
        23015058 6e  d6           c.swsp     s11 ,0x2c (sp)
        2301505a 22              ??         22h    "
        2301505b ee              ??         EEh
        2301505c 26              ??         26h    &
        2301505d ec              ??         ECh
        2301505e 37              ??         37h    7

@stschake
Copy link
Contributor

stschake commented Nov 6, 2020

@Yangff this is fixed in the latest version of the RISCV plugin and the instruction starting at 2301505a correctly disassembled as c.fswsp

@mumbel
Copy link
Contributor

mumbel commented Nov 6, 2020

@stschake beat me to it, sorry should have been more specific, I had just fixed that when I posted in the other thread, and you would have needed to update. That will decode now into fsw instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants