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

Adding IAC5 to IAC8 which were missing from the PPC SPR list #48

Closed
wants to merge 384 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
384 commits
Select commit Hold shift + click to select a range
40884c7
bugfixes and clean-up/cosmetic changes
atlas0fd00m May 17, 2019
6742e76
unit test upgrades
atlas0fd00m May 17, 2019
1ec20a5
update mnems and ppc_tables to remove superfluous 'b', 'bl', 'ba', an…
atlas0fd00m May 20, 2019
180a9e4
minor cleanup
atlas0fd00m May 20, 2019
6671504
emu i_wrteei
atlas0fd00m May 20, 2019
038ad09
minor cleanup
atlas0fd00m May 20, 2019
0dc85e3
bugfix: remove second 'sp' register, which *should* be simply an alia…
atlas0fd00m May 20, 2019
01ae829
ppc symboliks updates
atlas0fd00m May 26, 2019
2b796bf
32- and 64-bit register contexts, and emulators.
atlas0fd00m May 30, 2019
34b7c85
bugfix: symboliks:ppc
atlas0fd00m May 31, 2019
50cef8e
32/64-bit register contexts dragged through the subclasses.
atlas0fd00m Jun 3, 2019
b3d9b3c
symbolik bugfixes and cleanup.
atlas0fd00m Jun 3, 2019
e6a2aec
change symbolik register-parts to reg.flag from reg_flag...
atlas0fd00m Aug 17, 2019
c8095b1
Merge branch 'master' into envi_ppc
atlas0fd00m Aug 17, 2019
220bdc4
wow, emulators are "fixed" again. ordering *does* matter for __init_…
atlas0fd00m Aug 17, 2019
9c5d4e3
bugfixes/tweaks
atlas0fd00m Aug 18, 2019
9912af1
Merge branch 'master' into envi_ppc
atlas0fd00m Aug 19, 2019
639c5c7
minor cosmetic updates and unit test updates.
atlas0fd00m Aug 20, 2019
e71779a
cleaned up PPC64 test cases
sprout42 Aug 29, 2019
88e4d5f
Merge remote-tracking branch 'upstream/envi_ppc' into ppc64_test_fixes
sprout42 Aug 29, 2019
81e6ba7
tweaks and bugfixes
atlas0fd00m Sep 5, 2019
d97f469
register rehash. still has 32-bit and 64-bit registers... which stil…
atlas0fd00m Oct 1, 2019
8fb063f
emu bugfix and cleanup
atlas0fd00m Oct 1, 2019
9479e08
minor dependency sequencing modification.
atlas0fd00m Oct 1, 2019
23512d9
refactor naming and groupings to the following:
atlas0fd00m Oct 1, 2019
0638d5f
unit test improvements
atlas0fd00m Oct 2, 2019
6b40019
Merge branch 'master' into envi_ppc
atlas0fd00m Jan 6, 2020
fb5e1d9
Merge pull request #31 from sprout42/ppc64_test_fixes
atlas0fd00m Feb 15, 2020
152d4b0
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 15, 2020
a1318bb
bug fixes for CR and XER emulation. lots more to come, with unit tests.
atlas0fd00m Feb 17, 2020
8566635
bugfixes (the folks responsible for the last commit have been sacked.)
atlas0fd00m Feb 17, 2020
1e5a568
a lot more linkage, breaking out Embedded/Server 32/64 (and VLE, whic…
atlas0fd00m Feb 18, 2020
2a4a83a
register bug-fixes, and unit tests for CR and XER
atlas0fd00m Feb 19, 2020
3324bd2
addco unit tests all appear to work, CR and XER calculations are happ…
atlas0fd00m Feb 19, 2020
78665f3
updated unit tests. tapped 'noisy' again
atlas0fd00m Feb 20, 2020
fedd634
savegame. got OV to work!
atlas0fd00m Feb 21, 2020
8655309
tests are good.
atlas0fd00m Feb 21, 2020
6ab5c89
keep chuggin along.
atlas0fd00m Feb 21, 2020
4beb1ff
cmpd unit tests (and surprise! cmpd flags are failing)
atlas0fd00m Feb 22, 2020
09b0abb
cmpd is now using signed integers
atlas0fd00m Feb 22, 2020
78bd562
ppc subfco unit testing
atlas0fd00m Feb 24, 2020
d6cf41d
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 24, 2020
1b647d3
naming things.
atlas0fd00m Feb 29, 2020
a63b0d0
smart addMemoryMap() - loader style "finder" of free memory maps, to …
atlas0fd00m Mar 5, 2020
f00e5e5
initial walkTree unittest
atlas0fd00m Mar 5, 2020
3885b06
getting the specific architecture right.
atlas0fd00m Mar 19, 2020
eaff488
symboliks tests... inching forward. WIP
atlas0fd00m Mar 19, 2020
1ce49cd
pretty sure this is the best way to handle Branch generation (mnems.py)
atlas0fd00m Apr 24, 2020
993917f
Merge branch 'master' into envi_ppc
atlas0fd00m Aug 4, 2020
ffa8539
initial VBF parser, and moving the default "archcalls" dict into vivi…
atlas0fd00m Aug 5, 2020
2d0b9d8
ok, how about including the vbf parser file!
atlas0fd00m Aug 5, 2020
68c4cd0
a couple minor bugfixes: wrong location for import statement, and map…
atlas0fd00m Aug 6, 2020
46eeea2
cleanup and additional ppc arch names support in analysis modules
atlas0fd00m Aug 6, 2020
7c18d25
bugfix in ppc bootstrap analysis modules, and adding ppc64-{embedded,…
atlas0fd00m Aug 6, 2020
305f5a2
blobs don't need relocations
atlas0fd00m Aug 6, 2020
6c26893
bootstrap error logging
atlas0fd00m Aug 6, 2020
c72e321
minor bugfixes for ppc workspace emulator and symboliks translator
atlas0fd00m Aug 6, 2020
47b0207
make vivbin take more than one -O option at a time!!!
atlas0fd00m Aug 6, 2020
20bd68d
Merge branch 'master' into envi_ppc
atlas0fd00m Aug 18, 2020
03ed94d
bugfix: CR bit calculations for PpcCBRegOper
atlas0fd00m Aug 7, 2020
81210a4
emulator cleanup and bugfixes
atlas0fd00m Aug 7, 2020
ac8d813
Merge branch 'master' into envi_ppc
atlas0fd00m Sep 8, 2020
d1f175a
Merge branch 'master' into envi_ppc
atlas0fd00m Sep 29, 2020
1fb270a
Merge branch 'master' into envi_ppc
atlas0fd00m Sep 30, 2020
229cafd
bugfixes and enhancements
atlas0fd00m Oct 18, 2020
2a98939
endianness enhancement for PPPC
atlas0fd00m Oct 25, 2020
6fe9bd5
PPC updates from rigorous testing and continued implementation.
atlas0fd00m Dec 28, 2020
f4dd6fd
ppc updates per @rakuyo (and a little cleanup0
atlas0fd00m Dec 28, 2020
25063ae
mnems creates an actual unittest based on the ppc tables. with initi…
atlas0fd00m Dec 28, 2020
d3698c1
improvements on mnems and test_ppc_by_cat
atlas0fd00m Dec 29, 2020
f76b75c
ppc disasm's now build workspace-specific `instr_dict` tables (rather…
atlas0fd00m Dec 29, 2020
3bc74d0
Merge branch 'master' into envi_ppc
atlas0fd00m Jan 21, 2021
ebddc2c
bugfixes and improvements from private repo.
atlas0fd00m Jan 21, 2021
7476e3f
mods per @rakuyo
atlas0fd00m Jan 21, 2021
9407db8
bss_temp name added to unittests
atlas0fd00m Jan 23, 2021
45cf062
same fix
atlas0fd00m Jan 23, 2021
493c3be
Merge branch 'master' into envi_ppc
atlas0fd00m Jan 28, 2021
3e21b34
work from other projects.
atlas0fd00m Feb 8, 2021
8f48c7d
broke out PPC emu testing into their own modules.
atlas0fd00m Feb 8, 2021
9034c7f
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 8, 2021
c0908dc
initial stab at Py3 for PPC
atlas0fd00m Feb 8, 2021
549d2a9
more Py3 work
atlas0fd00m Feb 8, 2021
2210993
unit tests are happy.
atlas0fd00m Feb 8, 2021
24e358e
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 13, 2021
7f5b6cf
py3 cleanup
atlas0fd00m Feb 17, 2021
eb717d5
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 19, 2021
c1230a1
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 20, 2021
f89afe5
some py3 division problems
atlas0fd00m Feb 20, 2021
a69b84f
bugfix: getFreeMem division
atlas0fd00m Feb 22, 2021
bc79e70
elf bss bugfix
atlas0fd00m Feb 22, 2021
b6a4b1f
updates for getNameParts to handle names outside a current file, and …
atlas0fd00m Feb 22, 2021
27123c6
bigend bugfix
atlas0fd00m Feb 22, 2021
f36a89c
elf/bss updates and unittest update for i386/libstd++
atlas0fd00m Feb 23, 2021
b318f66
kill loud noisy annoying pointer debug messages
atlas0fd00m Feb 23, 2021
bab9c32
ihex offset, srec bigend
atlas0fd00m Feb 23, 2021
e8ff6f5
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 23, 2021
9dca033
merge from separate project deltas.
atlas0fd00m Mar 6, 2021
0212fe9
Merge remote-tracking branch 'upstream/master' into envi_ppc
atlas0fd00m Mar 18, 2021
53dab7c
Merge branch 'master' into envi_ppc
atlas0fd00m Mar 25, 2021
326f24a
the one that got away in the merge...
atlas0fd00m Mar 25, 2021
c05fef9
fixing ppc emutests
atlas0fd00m Mar 28, 2021
971685b
bump
atlas0fd00m Mar 29, 2021
6c9d703
Merge branch 'master' into envi_ppc
atlas0fd00m Mar 29, 2021
35eb1e8
Merge branch 'master' into envi_ppc
atlas0fd00m Apr 3, 2021
e63e8b0
Merge branch 'master' into envi_ppc
atlas0fd00m Apr 8, 2021
ff91c70
changes per @rakuy0's comments
atlas0fd00m Jul 14, 2021
ded6607
ppc symboliks // bugfixes
atlas0fd00m Jul 14, 2021
fd83f7f
alternate findPointers implementation which checks for likelihood of …
atlas0fd00m Jul 14, 2021
2230749
minor mod to isLikelyPointer()
atlas0fd00m Jul 14, 2021
7f51340
Merge branch 'master' into envi_ppc
atlas0fd00m Jul 14, 2021
6224846
emulation bugfix
atlas0fd00m Jul 14, 2021
19d27bc
bugfix isLikelyPointer()
atlas0fd00m Jul 14, 2021
5458311
merge in AMP PPC updates (and a couple other fixes)
atlas0fd00m Jul 15, 2021
693e8b5
missed a couple
atlas0fd00m Jul 15, 2021
31a2fd7
unittest cleanup
atlas0fd00m Jul 15, 2021
5c21cc0
remove symboliks analysis context from unittest generation
atlas0fd00m Jul 23, 2021
2a55b25
Merge branch 'master' into envi_ppc
atlas0fd00m Sep 22, 2021
70878e0
merge from AMP project improvements (PowerPC-Architecture and GDBStub…
atlas0fd00m Sep 28, 2021
b770873
bugfixes and enhancements to GDBSTUB, support for feature files and t…
atlas0fd00m Oct 4, 2021
b87b2d9
lots of gdbstub improvements (more coming)
atlas0fd00m Nov 10, 2021
0d1f224
Merge branch 'master' into envi_ppc
atlas0fd00m Nov 10, 2021
7dd2592
merge from CM2350/AMP project
atlas0fd00m Nov 13, 2021
da31218
Merge branch 'master' into envi_ppc
atlas0fd00m Dec 3, 2021
c740e0e
Merge branch 'master' into envi_ppc
atlas0fd00m Dec 27, 2021
e128f30
Merge branch 'master' into envi_ppc
atlas0fd00m Dec 28, 2021
e175861
merge from downstream: DARPA AMP CM2350 emulator
atlas0fd00m Dec 29, 2021
79674a3
is this something we've missed for two years?
atlas0fd00m Dec 29, 2021
5b969f5
Merge branch 'master' into envi_ppc
atlas0fd00m Jan 4, 2022
ff73635
Merge branch 'master' into envi_ppc
atlas0fd00m Jan 5, 2022
4da2e12
merge from DARPA AMP
atlas0fd00m Jan 20, 2022
1a2b845
Merge branch 'master' into envi_ppc
atlas0fd00m Jan 20, 2022
808cc2a
updates from DARPA AMP code
atlas0fd00m Feb 1, 2022
6a719d7
unittest fixups due to improved Elf parsing.
atlas0fd00m Feb 2, 2022
fa1436b
updates based on register changes needed for GDB Remote Protocol
atlas0fd00m Apr 4, 2022
82346e3
reduce the number of registers that are considered "general" register…
atlas0fd00m Apr 29, 2022
e7c167b
Merge branch 'master' into envi_ppc
atlas0fd00m Apr 29, 2022
dd4c175
oops
atlas0fd00m Apr 29, 2022
d57aad8
Merge branch 'master' into envi_ppc
atlas0fd00m May 13, 2022
c0af1db
update all architectures for using dict-based RegisterGroup lookups
atlas0fd00m Jun 16, 2022
aa689ab
Merge branch 'master' into envi_ppc
atlas0fd00m Jun 24, 2022
1c6623a
i_not (alias for nor)
atlas0fd00m Jun 25, 2022
b186685
Merge branch 'master' into envi_ppc
atlas0fd00m Aug 3, 2022
c5e9c8d
h8 fix
atlas0fd00m Aug 3, 2022
f068bc7
errors in unittesting based on lower-casing the core registers XER, C…
atlas0fd00m Aug 3, 2022
bd0de0d
Merge branch 'master' into envi_ppc
atlas0fd00m Sep 9, 2022
8f80990
PPC elf consts
atlas0fd00m Sep 9, 2022
ea8f1c0
bugfix in elf parser introduced by merge fail.
atlas0fd00m Sep 14, 2022
d16269a
Merge branch 'master' into envi_ppc
atlas0fd00m Sep 25, 2022
aac022e
some gdb stub cleanup
sprout42 Nov 15, 2022
64203e3
LXML needed now for gdbstub
sprout42 Nov 15, 2022
933fcf5
Update vtrace/platforms/gdbstub.py
sprout42 Nov 29, 2022
bbf5122
merge in GDBSTUB code from 'gdbstub_cleanup_and_work_toward_higher_fu…
atlas0fd00m Nov 29, 2022
6d3dfa3
changes from PR review
sprout42 Nov 29, 2022
e0c9157
missing file gdb_exc.py
atlas0fd00m Nov 29, 2022
18ef0bc
missing raw_ppc_booke_vle_test_data from the cut-over from internal repo
atlas0fd00m Nov 29, 2022
8e34415
Merge branch 'envi_ppc' into gdbstub_improvements
atlas0fd00m Dec 6, 2022
294a46d
Merge pull request #40 from sprout42/gdbstub_improvements
atlas0fd00m Dec 6, 2022
c127fa7
merge fail: cleanup
atlas0fd00m Dec 6, 2022
7a5884f
making unittests of server work.
atlas0fd00m Dec 7, 2022
d69bcf2
a few more GDB things
atlas0fd00m Dec 13, 2022
9e226e7
kill off print (one of many)
atlas0fd00m Dec 14, 2022
5ca5bad
getTargetXml updates and register index fixing
atlas0fd00m Dec 14, 2022
d875a64
updates for writing to read-only maps
atlas0fd00m Dec 14, 2022
f0ca804
a couple more minor mods to get all supervisory-access working
atlas0fd00m Dec 14, 2022
3e6a677
making unittests work (somehow PPC has a bss creation failure that is…
atlas0fd00m Dec 14, 2022
acbb78f
Merge pull request #41 from atlas0fd00m/envi_ppc_more_gdb_improvements
atlas0fd00m Dec 14, 2022
27efb0c
just some comments in the unittest
atlas0fd00m Dec 17, 2022
5612656
Merge pull request #42 from atlas0fd00m/envi_ppc_more_gdb_improvements
atlas0fd00m Dec 17, 2022
524ff99
Merge branch 'master' into envi_ppc
atlas0fd00m Jan 10, 2023
2c020c8
Merge branch 'master' into envi_ppc
atlas0fd00m Jan 18, 2023
aeaa177
some small changes to the gdb server stub during emu integration
sprout42 Dec 17, 2022
a512338
last changes from gdb integration and testing
sprout42 Jan 5, 2023
e16da72
handle the gdb server stub handle detatch gracefully
sprout42 Jan 6, 2023
fdd845f
finished updating vivisect gdbstub unit tests
sprout42 Jan 10, 2023
5eb099a
fixed run-length encoding for chunks of 6 or 7 repeats
sprout42 Jan 10, 2023
86c2208
fixed FPSCR name for PPC to match gdb capitalization
sprout42 Jan 11, 2023
74d7f72
making the GdbBaseEmuServer more flexible as a generic base
sprout42 Jan 11, 2023
7898bef
finished integration with ppc emulator and ensured tests pass correctly
sprout42 Jan 19, 2023
d5b8d8a
fixed rebase artifact in elf parser
sprout42 Jan 19, 2023
6148e28
fixed name of PPC FPSCR regsiter
sprout42 Jan 19, 2023
a2fca38
normalized all PPC special registers to be uppercase except PC
sprout42 Jan 20, 2023
e618b7c
Merge branch 'master' into envi_ppc
atlas0fd00m Jan 23, 2023
18d734d
allow SPR names to be lower case for gdb exported registers and upper…
sprout42 Jan 24, 2023
a4ad905
fixed transmit of qSupported server msg
sprout42 Jan 24, 2023
cc01164
corrected SPR capitalization method in disassembly per review
sprout42 Feb 3, 2023
052ec93
made gdbstub unit tests more robust and work with qemu or gdbserver
sprout42 Feb 3, 2023
204b764
updated the generated ppc disassembly self-tests
sprout42 Feb 6, 2023
33019ef
somehow I keep accidentally changing the RIP value to test for in the…
sprout42 Feb 6, 2023
c2cd182
enabled multiple-file retreival in the gdbstub
sprout42 Feb 7, 2023
b6e7158
Merge pull request #43 from sprout42/emu_gdb_integration
atlas0fd00m Feb 7, 2023
201d0a7
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 22, 2023
83d9e66
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 23, 2023
35bbd42
Merge branch 'master' into envi_ppc
atlas0fd00m Feb 24, 2023
eedc7b8
merge fail fixes
atlas0fd00m Mar 9, 2023
2af5c4d
PPC emulation and analysis improvements
sprout42 Nov 15, 2022
f2fd4d7
wip changes from review
sprout42 Nov 29, 2022
5ea1a95
making changes based on review comments and fixing PPC tests to match…
sprout42 Jan 20, 2023
119f225
reverting arm test file accidentally touched by PR
sprout42 Jan 20, 2023
e246960
adjusting some log levels in ppc emu
sprout42 Jan 20, 2023
acdabef
addressing review comments from ppc emulation fixes
sprout42 Jan 24, 2023
e496bb5
fixed PPC reg definitions
sprout42 Feb 13, 2023
1c2d3dc
Updating the envi architecture modules list to accomedate unimplement…
sprout42 Feb 14, 2023
f81f79d
some PPC VLE disassembler cleanup after merge for more consistent set…
sprout42 Feb 14, 2023
7666a4f
normalized how PPC registers are printed in disassembly
sprout42 Feb 14, 2023
d472d15
updated generated PPC disassembly tests after rebase
sprout42 Feb 14, 2023
710a2ae
undid unnecessary space changes
sprout42 Feb 14, 2023
d733df8
fixed missing getPheaders() call after rebase
sprout42 Feb 14, 2023
03011a8
gdbserver subprocess RSP alternates between two values
sprout42 Feb 14, 2023
b6c95af
fixed errors in elf parsing tests after rebase
sprout42 Feb 14, 2023
ef418a5
updated setting workspace .arch attribute from rebase
sprout42 Feb 15, 2023
fe32f71
fixed elf parsing after rebase
sprout42 Feb 15, 2023
ffd58f8
discovered more possible valid RSP values for the gdbstub server test
sprout42 Feb 16, 2023
94c3b04
corrected adding data xref function API for non-PPC targets
sprout42 Feb 16, 2023
0f2eb26
reverting stability data back to envi_ppc
sprout42 Feb 22, 2023
87a6c94
fixed name of ppc mmu option to vle_pages
sprout42 Feb 22, 2023
1783b09
fixed error handling when setting architecture
sprout42 Feb 22, 2023
9b31f41
changed architecture module import work outside of vivisect base dire…
sprout42 Feb 22, 2023
398f46d
changed default implementation of system call type instructions to lo…
sprout42 Feb 23, 2023
013a8d8
fixed typo in PPC SPEFSCR meta register field
sprout42 Feb 23, 2023
ab70603
fixed using imputil after rebase
sprout42 Feb 23, 2023
a6acac3
fixed importing architecture modules
sprout42 Feb 23, 2023
5622cd8
fixed nofall detection for PPC
sprout42 Feb 24, 2023
0c639fb
changed custom PPC VLE pages to be set in the workspace emulator init…
sprout42 Mar 9, 2023
8d6c66f
made ppc stack analysis work for 32 and 64 bit
sprout42 Mar 9, 2023
d3138e4
renamed _get_args function and added clearer documentation
sprout42 Mar 9, 2023
44b3cf5
Update vivisect/analysis/ppc/emulation.py
sprout42 Mar 9, 2023
f8f5c03
fixed NOP sequences to be bytes instead of strings
sprout42 Mar 10, 2023
a6f1d24
removed unnecessary .path from os imports
sprout42 Mar 10, 2023
8c3e4d3
optimized simpleE_ORI VLE disassembly function
sprout42 Mar 10, 2023
dddbdd4
fixed stupid typo after optimizing simpleE_ORI
sprout42 Mar 10, 2023
2991827
removed unnecesasry pointerString() change for PPC
sprout42 Mar 10, 2023
bac0376
fixed typo in ppc stack log anomaly msg
sprout42 Mar 10, 2023
8801d75
normalized PPC function argument names
sprout42 Mar 10, 2023
dd965b1
Merge pull request #39 from sprout42/ppc_emulation_fixes
atlas0fd00m Mar 10, 2023
8e199fe
Merge branch 'master' into envi_ppc
atlas0fd00m Mar 14, 2023
99005bc
Merge branch 'master' into envi_ppc
atlas0fd00m Mar 29, 2023
258182c
Make ELF parser robust against imports defined at invalid addresses
sprout42 Apr 5, 2023
83a14c1
fixed fallback mask for PPC VLE memory mask checking
sprout42 Apr 5, 2023
604ef20
fixed sdabase memory unavailable correctly after discussion with atlas
sprout42 Apr 7, 2023
5d1bd0e
fixed PPC VLE memory segment LSB detection
sprout42 Apr 10, 2023
aec6d80
Merge pull request #45 from sprout42/fix_ppc_vle_page_mask
atlas0fd00m Apr 11, 2023
cc12636
Merge pull request #46 from sprout42/fix_ppc_elf_sdabase_missing
atlas0fd00m Apr 11, 2023
5426120
merge upstream master
atlas0fd00m May 4, 2023
4e7d029
Merge branch 'master' into envi_ppc
atlas0fd00m Jul 26, 2023
dde8ac1
sped up vsEmit() of ihex and srec file formats (#627)
sprout42 Sep 1, 2023
f97d854
Merge branch 'master' into envi_ppc
atlas0fd00m Sep 5, 2023
cca26f0
bringing PPC Symboliks up to speed with Master
atlas0fd00m Sep 5, 2023
1349cd2
Adding DBCR6 which was missing from the PPC SPR list
sprout42 Oct 6, 2023
49992a1
Merge pull request #47 from sprout42/missing_spr_dbcr6
atlas0fd00m Oct 6, 2023
43e7e2e
PPC arch missing IAC5-IAC8 SPRs
sprout42 Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ commands:
name: install deps
command: |
sudo apt-get update
sudo apt-get -qq install libfreetype6-dev liblcms2-dev ghostscript libffi-dev libjpeg-turbo-progs cmake imagemagick
sudo apt-get -qq install libfreetype6-dev liblcms2-dev ghostscript libffi-dev libjpeg-turbo-progs cmake imagemagick qemu-user-static
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get -qq install libc6:i386 libncurses5:i386 libstdc++6:i386
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
.idea
coverage_html_report*
*~
vivisect.egg-info/
_build
6 changes: 4 additions & 2 deletions Elf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def _parseDynLinkInfo(self):
self.dyns[dyn.d_tag] = dyn.d_value
logger.debug('dynamic: %r: 0x%x', dt_names.get(dyn.d_tag), dyn.d_value)

# DEPRECATED: storing info in both dyns{} and dynamics[].
# DEPRECATED: storing info in both dyns{} and dynamics[].
# 2019-10-21: dynamics will go away sometime in the future
self.dynamics.append(dyn)
if dyn.d_tag == DT_NULL: # Represents the end
Expand Down Expand Up @@ -718,7 +718,7 @@ def getNotes(self):
offset = 0
notebyteslen = len(notebytes)
while offset < notebyteslen:
note = vs_elf.ElfNote()
note = vs_elf.ElfNote(bigend=self.getEndian())
if notebyteslen - offset < len(note):
logger.warning("""\nNOTES section length mismatch!\n\t%s
\tSection Bytes: %s\n\tStranded bytes: %s\n""",
Expand All @@ -742,6 +742,8 @@ def getPlatform(self):
if note.name == b'GNU\x00' and note.ntype == 1:
desc0 = int(note.desc[0])
return osnotes.get(desc0, 'unknown')
elif note.name == b'OpenBSD\x00' and note.ntype == 1:
return 'openbsd'

if self.getSection('.comment'):
sec = self.getSection('.comment')
Expand Down
18 changes: 11 additions & 7 deletions envi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,46 +127,40 @@
'aliases': ('ppc32',),
'modpath': ('envi', 'archs', 'ppc'),
'clsname': 'Ppc32EmbeddedModule',
'disabled': True,
},

ARCH_PPC_E64: {
'name': 'ppc-embedded',
'aliases': ('ppc64-embedded','ppc-spe'),
'modpath': ('envi', 'archs', 'ppc'),
'clsname': 'Ppc64EmbeddedModule',
'disabled': True,
},

ARCH_PPC_S32: {
'name': 'ppc32-server',
'modpath': ('envi', 'archs', 'ppc32-server', 'Module'),
'modpath': ('envi', 'archs', 'ppc'),
'clsname': 'Ppc32ServerModule',
'disabled': True,
},

ARCH_PPC_S64: {
'name': 'ppc-server',
'aliases': ('ppc64-server','altivec', 'ppc-altivec'),
'modpath': ('envi', 'archs', 'ppc'),
'clsname': 'Ppc64ServerModule',
'disabled': True,
},

ARCH_PPCVLE: {
'name': 'ppc-vle',
'aliases': ('vle','ppc32-vle', 'ppcvle'),
'modpath': ('envi', 'archs', 'ppc'),
'clsname': 'PpcVleModule',
'disabled': True,
},

ARCH_PPC_D: {
'name': 'ppc-desktop',
'modpath': ('envi', 'archs', 'ppc'),
'clsname': 'PpcDesktopModule',
'disabled': True,
},

ARCH_RXV2: {
Expand Down Expand Up @@ -440,6 +434,13 @@ def getPlatDefaultCall(self, platform):
def archGetPointerAlignment(self):
return 1

def archMarkupVW(self, vw):
"""
Allow an architecture to make changes to the workspace based on it's
own needs. For example adding arch-specific VaSets.
"""
pass

def stealArchMethods(obj, archname):
'''
Used by objects which are expected to inherit from an
Expand Down Expand Up @@ -731,6 +732,9 @@ def __init__(self, archmod=None):
# by finding all methods starting with i_ and assume they
# implement an instruction by mnemonic
self.op_methods = {}
self._populateOpMethods()

def _populateOpMethods(self):
for name in dir(self):
if name.startswith("i_"):
self.op_methods[name[2:]] = getattr(self, name)
Expand Down Expand Up @@ -1016,7 +1020,7 @@ def integerAddition(self, op):
Do the core of integer addition but only *return* the
resulting value rather than assigning it.

Architectures shouldn't have to override this as operand order
Architectures shouldn't have to override this as operand order
doesn't matter
"""
src = self.getOperValue(op, 0)
Expand Down
2 changes: 2 additions & 0 deletions envi/archs/amd64/disasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ def disasm(self, bytez, offset, va, extra=None):

# handles tsize calculations including new REX prefixes
tsize = self._dis_calc_tsize(opertype, prefixes, operflags)

# If addrmeth is zero, we have operands embedded in the opcode
if addrmeth == 0:
osize = 0
Expand Down Expand Up @@ -574,6 +575,7 @@ def ameth_0(self, operflags, operval, tsize, prefixes):
operval = (operval & RMETA_NMASK) | META_SIZES[tsize]
else:
operval |= META_SIZES[tsize]

width = self._dis_regctx.getRegisterWidth(operval) >> 3
o = i386RegOper(operval, width)
elif operflags & opcode86.OP_IMM:
Expand Down
10 changes: 9 additions & 1 deletion envi/archs/h8/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""

import envi

from envi.archs.h8.regs import h8_regs

class H8Module(envi.ArchitectureModule):

Expand Down Expand Up @@ -42,6 +42,14 @@ def archParseOpcode(self, bytes, offset=0, va=0, extra=None):
"""
return self._arch_dis.disasm(bytes, offset, va)

def archGetRegisterGroups(self):
groups = envi.ArchitectureModule.archGetRegisterGroups(self)
groups['general'] = h8_regs

return groups

def archGetPointerAlignment(self):
return 4
def getEmulator(self):
import envi.archs.h8.emu as h8_emu
return h8_emu.H8Emulator()
Expand Down
7 changes: 4 additions & 3 deletions envi/archs/h8/regs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import envi.archs.h8.const as h8_const
import envi.registers as e_reg

h8_regs = (
h8_regs_tup = (
('er0', 32),
('er1', 32),
('er2', 32),
Expand All @@ -15,9 +15,10 @@
('exr', 8),
)

h8_regs = [r for r, sz in h8_regs_tup]

l = locals()
e_reg.addLocalEnums(l, h8_regs)
e_reg.addLocalEnums(l, h8_regs_tup)

REG_CCR_T = 7
REG_CCR_U1 = 6
Expand Down Expand Up @@ -134,6 +135,6 @@ def convertMeta(regidx, tsize):
class H8RegisterContext(e_reg.RegisterContext):
def __init__(self):
e_reg.RegisterContext.__init__(self)
self.loadRegDef(h8_regs)
self.loadRegDef(h8_regs_tup)
self.loadRegMetas(H8Meta, statmetas=H8StatMeta)
self.setRegisterIndexes(REG_PC, h8_const.REG_SP, REG_CCR)
Loading
Loading