Ghidra: Processor Manuals: where to get correct PDF?

Created on 6 Mar 2019  Â·  17Comments  Â·  Source: NationalSecurityAgency/ghidra

Ghidra gives the ability to lookup instructions in the specific processor's manual.
To this end, the correct PDF file of said processor manual must be placed in the ./Ghidra/Processors/<processorname>/data/manuals/ folders.

I tried to track down all the manuals referenced in the existing .idx files. A script to download them is as follows:

# download the processor manuals

# 6502: no .idx file for manual

# 68000
wget https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf -O Ghidra/Processors/68000/data/manuals/M68000PRM.pdf

# 6805: no .idx file

# 8051
wget https://www.keil.com/dd/docs/datashts/intel/8xc251sx_um.pdf -O Ghidra/Processors/8051/data/manuals/8xc251sx_um.pdf

# 8085: no .idx file

# AARCH64: no .idx file

# ARM
wget https://www.cs.utexas.edu/~simon/378/resources/ARMv7-AR_TRM.pdf -O Ghidra/Processors/ARM/data/manuals/Armv7AR_errata.pdf 

# Atmel
# wrong .idx: wget https://ww1.microchip.com/downloads/en/devicedoc/doc32000.pdf -O Ghidra/Processors/Atmel/data/manuals/doc32000.pdf

# CR16
wget ... -O Ghidra/Processors/CR16/data/manuals/prog16c.pdf

# JVM
wget https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf -O Ghidra/Processors/JVM/data/manuals/jvms8.pdf

# MIPS
# .idx doesn't align: wget https://www.ece.lsu.edu/ee4720/mips64v2.pdf -O Ghidra/Processors/MIPS/data/manuals/mips64v2.pdf
#wget ... -O Ghidra/Processors/MIPS/data/manuals/MD00087-2B-MIPS64BIS-AFP-06.03.pdf
wget https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MD00076-2B-MIPS1632-AFP-02.63.pdf -O Ghidra/Processors/MIPS/data/manuals/MD00076-2B-MIPS1632-AFP-02.63.pdf
# 404 not found: wget https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MD00087-2B-MIPS64BIS-AFP-6.03.pdf -O Ghidra/Processors/MIPS/data/manuals/MD00087-2B-MIPS64BIS-AFP-06.03.pdf
wget https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MD000594-2B-microMIPS64-AFP-06.02.pdf -O Ghidra/Processors/MIPS/data/manuals/MD000594-2B-microMIPS64-AFP-06.02.pdf
# .idx doesn't align: wget https://github.com/f47h3r/firmware_reversing/raw/master/docs/research/MD00582-2B-microMIPS32-AFP-05.03.pdf -O Ghidra/Processors/MIPS/data/manuals/MD00582-2B0microMIPS32-AFP-05.03.pdf
wget https://groups.csail.mit.edu/cag/raw/documents/R4400_Uman_book_Ed2.pdf -O Ghidra/Processors/MIPS/data/manuals/r4000.pdf


# PA-RISC
wget http://ftp.parisc-linux.org/docs/arch/pa11_acd.pdf -O Ghidra/Processors/PA-RISC/data/manuals/pa11_acd.pdf

# PIC
wget https://ww1.microchip.com/downloads/en/devicedoc/40139e.pdf -O Ghidra/Processors/PIC/data/manuals/PIC12_40139e.pdf
wget https://ww1.microchip.com/downloads/en/DeviceDoc/40001761E.pdf -O Ghidra/Processors/PIC/data/manuals/PIC16F_40001761E.pdf
wget https://ww1.microchip.com/downloads/en/devicedoc/33023a.pdf -O Ghidra/Processors/PIC/data/manuals/PIC16_33023a.pdf
wget https://ww1.microchip.com/downloads/en/devicedoc/30289b.pdf -O Ghidra/Processors/PIC/data/manuals/PIC17_30289b.pdf
# .idx doesn't align: wget https://www.farnell.com/datasheets/22241.pdf -O Ghidra/Processors/PIC/data/manuals/PIC18_14702.pdf
# .idx doesn't align: wget https://ww1.microchip.com/downloads/en/DeviceDoc/70157D.pdf -O Ghidra/Processors/PIC/data/manuals/PIC24_70157D.pdf

# PowerPC
wget http://kib.kiev.ua/x86docs/POWER/PowerISA_V2.06B_V2_PUBLIC.pdf -O Ghidra/Processors/PowerPC/data/manuals/PowerISA_V2.06_PUBLIC.pdf
wget http://kib.kiev.ua/x86docs/POWER/PowerISA_V2.07B.pdf -O Ghidra/Processors/PowerPC/data/manuals/PowerISA_V2.07B.pdf
wget http://kib.kiev.ua/x86docs/POWER/PowerISA_V3.0.pdf -O Ghidra/Processors/PowerPC/data/manuals/PowerISA_V3.0.pdf
wget https://wiki.alcf.anl.gov/images/f/fb/PowerPC_-_Assembly_-_IBM_Programming_Environment_2.3.pdf -O Ghidra/Processors/PowerPC/data/manuals/powerpc.pdf
wget http://dec8.info/Apple/macos8pdfs/CD_MacOS_8_9_X_4D_Omnis/Apple/MPC7450/ALTIVECPEM.pdf -O Ghidra/Processors/PowerPC/data/manuals/altivecpem.pdf

# Sparc
wget https://cr.yp.to/2005-590/sparcv9.pdf -O Ghidra/Processors/Sparc/data/manuals/SPARCV9.pdf

# TI_MSP430
wget https://e2echina.ti.com/cfs-file/__key/telligent-evolution-components-attachments/00-55-01-00-00-00-61-61/MSP430x2xx-Family-User_26002300_39_3B00_s-Guide-_2800_Rev.-E_2900_.pdf -O Ghidra/Processors/TI_MSP430/data/manuals/MSP430.pdf

# x86
wget http://kib.kiev.ua/x86docs/SDMs/253666-029.pdf -O Ghidra/Processors/x86/data/manuals/Intel64_IA32_SoftwareDevelopersManual_vol2a.pdf
wget http://kib.kiev.ua/x86docs/SDMs/253667-029.pdf -O Ghidra/Processors/x86/data/manuals/Intel64_IA32_SoftwareDevelopersManual_vol2b.pdf
# .idx doesn't align: wget https://www.amd.com/system/files/TechDocs/24594.pdf -O Ghidra/Processors/x86/data/manuals/AMD64_ProgrammersManual_vol3.pdf
# .idx doesn't align: wget https://www.amd.com/system/files/TechDocs/26568.pdf -O Ghidra/Processors/x86/data/manuals/AMD64_ProgrammersManual_vol4.pdf
# .idx doesn't align: wget https://www.amd.com/system/files/TechDocs/26569_APM_V5.pdf -O Ghidra/Processors/x86/data/manuals/AMD64_ProgrammersManual_vol5.pdf
# .idx doesn't align: wget https://www.amd.com/system/files/TechDocs/43479.pdf -O Ghidra/Processors/x86/data/manuals/AMD64_128-bit_SSE5_Instructions.pdf

# Z80
# .idx doesn't align: wget "https://www.zilog.com/force_download.php?filepath=YUhSMGNEb3ZMM2QzZHk1NmFXeHZaeTVqYjIwdlpHOWpjeTk2TVRnd0wzVnRNREExTUM1d1pHWT0=" -O Ghidra/Processors/Z80/data/manuals/um0050.pdf
wget "https://www.zilog.com/force_download.php?filepath=YUhSMGNEb3ZMM2QzZHk1NmFXeHZaeTVqYjIwdlpHOWpjeTk2T0RBdlZVMHdNRGd3TG5Ca1pnPT0=" -O Ghidra/Processors/Z80/data/manuals/UM0080.pdf

However, I can't find some of the processor manuals. Has anyone links to the correct version of the processor manuals? Or can someone that has all the correct manuals run:

$ find -name '*.pdf' -exec sha1sum {} \;

If the exact needed version can not be found it seems the .idx files in ./Ghidra/Processors/<processorname>/data/manuals/ would need to be updated to newer revisions of the manuals.

So has anyone either:

  • a link to the correct version of the missing manuals
  • the hash of the correct version of the PDFs, so we can download them?

Thank you.

Question

All 17 comments

68000: https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf (matches version M68000PRM/AD REV.1)
PowerPC:
POWERISA_V2.06_PUBLIC.pdf: http://kib.kiev.ua/x86docs/POWER/PowerISA_V2.06B_V2_PUBLIC.pdf (not exactly the same version but page numbers align)
http://kib.kiev.ua/x86docs/POWER/PowerISA_V2.07B.pdf (matched version)
http://kib.kiev.ua/x86docs/POWER/PowerISA_V3.0.pdf
powerpc.pdf: https://wiki.alcf.anl.gov/images/f/fb/PowerPC_-_Assembly_-_IBM_Programming_Environment_2.3.pdf
altivec.pdf: http://dec8.info/Apple/macos8pdfs/CD_MacOS_8_9_X_4D_Omnis/Apple/MPC7450/ALTIVECPEM.pdf

Thanks! I updated the script in my first post.

I need to see whether I can find a compatible MIPS and MSP430 manual. Then I guess the prevailing processors would be covered.

And here's a little script I wrote to grab all of 'em... https://gist.github.com/ckuethe/afdc091635b32ba1077d8470776942b8

Wow, nice. Are you checking that the page numbers roughly align with the
.idx files (or that the version/date info in the idx matches)? I found some
other documents for these architectures which don’t match the indexes.
On Wed, Mar 6, 2019 at 10:52 PM Chris Kuethe notifications@github.com
wrote:

CR16..
https://doc-0s-4s-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/tgcekhm1ilon5d6gp5v5c09mepm3b9fa/1551938400000/14157490643402214266/*/1QOkOiMNmoH_D0JEk62R4B4MdFhZR0il7?e=download

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/NationalSecurityAgency/ghidra/issues/38#issuecomment-470408056,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEmub1qR2zstMdnvx2h2sZ12XAzK9dSks5vULcYgaJpZM4bg2Dn
.

I've been working on finding the right document name and revision. Haven't tried to match up the content.

I don't know whether folks are also collecting files for additional CPUs, but I created a 6502 index file in #119. The files are available in https://github.com/Kreeblah/ghidra_files/commit/02983d0dc3334611b38be84cc4ce6286ce915d70 (the idx file and a diff for 6502.ldefs), with the PDF being available at http://archive.6502.org/books/mcs6500_family_programming_manual.pdf

Wow, nice. Are you checking that the page numbers roughly align with the .idx files (or that the version/date info in the idx matches)? I found some other documents for these architectures which don’t match the indexes.

Thanks for the reminder. I just checked all manuals posted by me and some didn't match up. I marked them as such in the original post. Sorry to anyone who now ended up having misaligned manuals.

Also some manuals posted by @ckuethe did unfortunately not match up.

I guess it will be inevitable to update the .idx files to reflect newer revisions of these manuals.

I updated x86.idx to reference current manual versions. The index I made is at https://github.com/Kreeblah/ghidra_files/commit/33843d75f5dff25956076712aa79d57ded8bcba9 and references:
Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2 (2A, 2B, 2C & 2D): Instruction Set Reference, A-Z, Sep 2016 (325383-060US), available at https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf
AMD64 Architecture Programmer's Manual Volume 3: General-Purpose and System Instructions, Rev 3.26 May 2018 (24594), available at https://www.amd.com/system/files/TechDocs/24594.pdf
AMD64 Architecture Programmer's Manual Volume 4: 128-Bit and 256-Bit Media Instructions, Rev 3.23 Feb 2019 (26568), available at https://www.amd.com/system/files/TechDocs/26568.pdf
AMD64 Architecture Programmer's Manual Volume 5: 64-Bit Media and x87 Floating-Point Instructions, Rev 3.15 May 2018 (26569), available at https://www.amd.com/system/files/TechDocs/26569_APM_v5.pdf
AMD64 Technology 128-Bit SSE5 Instruction Set, Rev 3.01 August 2007 (43479), which is unchanged from the provided .idx. I can't find a newer version of the publication (or a different publication) that lists the same instructions, so I left it as it was. The only copy of the actual publication that I can find is at http://www.cs.northwestern.edu/~pdinda/icsclass/doc/AMD_ARCH_MANUALS/AMD64_128_Bit_SSE5_Instrs.pdf but it looks to be incomplete since it stops at ROUNDSS.

Oh, and just as a warning . . . there could very well be typos in that index file. I went through it a couple of times to get it as correct as possible, but it went from 654 instructions in the original index to 1745 instructions in the one I just posted, and some of the mnemonics look like alphabet soup listed together (especially with some of the AVX instructions). If anybody sees any issues with it, I'd love to know about it.

Closing this out due to inactivity. It looks like a lot of good info was contributed...thanks!

I updated for AArch64 (ARM v8A 64bit isa) .
https://github.com/NationalSecurityAgency/ghidra/pull/724

https://gist.github.com/richinseattle/a80ebb7e2e4d4c8a815bc052b6c12210 (ghidra_processor_docs_downloader.py) is pretty nice.

The former was a bit outdated so i rewrote yet another one , only a few files have unaligned index , if somebody find them ping me : https://gist.github.com/alexmaloteaux/88a8aaa4c00c87e4532b4b2ff474d6e1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yifanlu picture yifanlu  Â·  24Comments

woachk picture woachk  Â·  33Comments

astrelsky picture astrelsky  Â·  16Comments

dalvarezperez picture dalvarezperez  Â·  19Comments

rszibele picture rszibele  Â·  35Comments