Commit Graph

2958 Commits

Author SHA1 Message Date
lazymio
cd11aed350
Merge pull request #1837 from tunz/apt-update
Run apt update in nuget publishing workflow
2023-05-25 22:41:18 +02:00
Choongwoo Han
67f0386299
Add apt update 2023-05-23 13:18:57 -07:00
Takacs, Philipp
fa457a3a97 fix UC_MEM_WRITE_PROT callback
callbacks work on the physical address.
2023-05-22 15:38:37 +02:00
mio
994813a0e5
Also check cpu->stopped 2023-05-19 23:24:42 +02:00
mio
be2f092179
Merge remote-tracking branch 'phl/issuevtlb' into dev 2023-05-19 23:22:23 +02:00
mio
a24e53d794
Rebuild flags after writing to cp registers
This is buggy as this momemt per https://github.com/unicorn-engine/unicorn/issues/1789#issuecomment-1546807410

We need either doc this or save more information for a context
2023-05-14 13:35:31 +02:00
Takacs, Philipp
4a7b3b7a3a fixup! load_helper only call cpu_loop_exit() when emulation is running 2023-05-12 12:36:16 +02:00
lazymio
f65f8f8380
Merge pull request #1830 from nneonneo/fix-python-ctl
Fix sample_ctl.py
2023-05-11 13:10:01 +02:00
Robert Xiao
06a76e98c4 Add __repr__ to all ctypes.Structure subclasses 2023-05-10 12:58:25 -07:00
Takacs, Philipp
073c4b74ca load_helper only call cpu_loop_exit() when emulation is running
The load_helper is sometimes called from register writes. When the load
fails check if emulation is running before jump out of the emulated code.
2023-05-09 14:58:40 +02:00
lazymio
1d9c5c7653
Merge pull request #1832 from PhilippTakacs/cleanup
Some clean-up for the vtlb merge
2023-05-09 14:43:07 +02:00
Takacs, Philipp
227e578660 move typedef definition of enum uc_mem_type
forword references to enum types are forbidden in C. Also C++ will
not build if this is used
2023-05-08 15:38:43 +02:00
Takacs, Philipp
54870cca0e remove unused function cmp_vaddr 2023-05-08 15:32:58 +02:00
Robert Xiao
d27ca4530b Minor Python fixes.
- Match the types of UC_HOOK_CODE_CB and UC_HOOK_INSN_SYS_CB to C
- Avoid building a new namedtuple class in every call to _hook_insn_sys_cb
2023-05-07 09:08:20 -07:00
Robert Xiao
a998231a0e Fix sample_ctl.py.
Commit 640251e1aa added a size parameter to uc_hook_tcg_op_2, but this was not
reflected in the Python bindings.

Commit fbf4078d65 added a len parameter to ctl_remove_cache, but this was not
reflected in sample_ctl.py.
2023-05-07 09:08:20 -07:00
lazymio
bde3cd7dae
Merge pull request #1812 from ks0777/ctl_rust
add rust bindings for uc_ctl
2023-04-24 16:25:34 +02:00
lazymio
98b9373937
Merge pull request #1826 from PhilippTakacs/int128
use int128_get64 in memory_unmap
2023-04-19 13:50:43 +02:00
Takacs, Philipp
7bb1501bc2 use int128_get64 in memory_unmap
This fixes build errors introduced by bbbc7856ac
2023-04-17 17:48:58 +02:00
Mio
bbbc7856ac
Invalidate tb cache once mapping is removed 2023-04-12 20:56:54 +08:00
lazymio
2849bc010a
Merge pull request #1816 from kassane/clang-getpagesize
Clang/MinGW getpagesize
2023-04-10 17:49:55 +08:00
Philipp Takacs
a9f0dabc64 rust add tlb callback 2023-04-05 18:57:22 +02:00
Philipp Takacs
0729dc0312 rust update uc_ctl_flush_tlb and add uc_ctl_tlb_mode 2023-04-05 18:57:15 +02:00
Kevin Schneider
5ff654c77b add rust bindings for uc_ctl 2023-04-05 18:48:39 +02:00
Matheus C. França
2d94e30988 Fix clang/mingw - missing getpagesize
Based on msys2-packages patch:
https://github.com/msys2/MINGW-packages/pull/10543
2023-04-03 11:08:27 -03:00
lazymio
51a5b68b50
Merge pull request #1746 from PhilippTakacs/virtual_tlb
Virtual tlb
2023-03-28 21:17:24 +08:00
Mio
45f22085f5
Update comments 2023-03-28 21:17:01 +08:00
Mio
d403a0346e
Update FAQ 2023-03-28 21:16:19 +08:00
Mio
0ba69d6b2f Add tlb_mode for python 2023-03-28 14:20:55 +02:00
Mio
9c01d23ed3 Update bindings const 2023-03-28 14:20:55 +02:00
Takacs, Philipp
9f00bb2ed5 update faq
add How can I interact with MMU/TLB
2023-03-28 14:20:32 +02:00
Takacs, Philipp
8b2c477578 clear the TLB cache in uc_ctl_flush_tlb
uc_ctl_flush_tlb implies that the tlb is flushed. This change adds
UC_CTL_TLB_FLUSH which clears the TLB and set the uc_ctl_flush_tlb
alias to UC_CTL_TLB_FLUSH. Also adds a uc_ctl_flush_tb alias for
UC_CTL_TB_FLUSH.
2023-03-28 14:11:41 +02:00
Takacs, Philipp
e96ac42b2e Remove MMU hacks
Unicorn has included some ugly hacks to provide a envirement where vaddr == paddr.
These hacks where to use the full 64 bit mappings on x86 without init the mmu
and some memory redirect for MIPS.

The UC_TLB_CPU mode defaults to vaddr == paddr, therfor these hacks aren't
required anymore.
2023-03-28 14:02:17 +02:00
Takacs, Philipp
e25419bb2d add virtuall tlb
this virtuall tlb allows to use mmu indipendent of the architectur
2023-03-28 13:50:11 +02:00
Takacs, Philipp
759d694e24 sample to use the softmmu 2023-03-28 13:50:11 +02:00
Takacs, Philipp
901034577a i386 call internal helper on special porpese register write
Some registers writes have side effects. i.e. write to cr3 flush the tlb,
if the PG bit is set.
2023-03-28 13:50:11 +02:00
Takacs, Philipp
7f1eb4532d add basic mmu tests
Some simple tests for diffrent mmu.
Basicly add some tlb entries, enable the mmu try to read from virtual address

The aarm64 test was provided by imre-kis-arm in #1718
2023-03-28 13:50:11 +02:00
Takacs, Philipp
f2eb1f4711 i386 mmu hack: Allow emulate usermode without mmu
This basicaly mappes virtual addresses to physical addresses 1:1 when
the mmu is disabled in the cpu. So you can use the full 64 bit addressspace
without required to configure the mmu.
2023-03-28 13:50:11 +02:00
Takacs, Philipp
4b327baaf7 make unicorn use the physical addresses
This allows to emulate code witch fully uses the MMU. This is necesary
to allow full system emulation.
2023-03-28 13:50:11 +02:00
Xeonacid
f2a236126f
Add missing import const in python binding (#1807) 2023-03-27 01:15:56 +08:00
lazymio
2af821953d
Merge pull request #1809 from kassane/zig-bindgen
Zig bindings - Generator
2023-03-26 12:18:25 +08:00
lazymio
5e2074da6a
Merge pull request #1808 from kallisti5/haiku-fix-2023
build: Fixes for Haiku
2023-03-26 12:17:23 +08:00
Matheus C. França
e9e7e0b6cf
Merge branch 'dev' into zig-bindgen 2023-03-23 16:17:55 -03:00
Matheus C. França
81a8536841
Update Cargo.toml
exclude new binding on rust build
2023-03-23 16:16:18 -03:00
Matheus C. França
48ce4164b3
new binding 2023-03-23 16:15:33 -03:00
Matheus C. França
c6158b8628 zig consts 2023-03-23 10:09:41 -03:00
Alexander von Gluck IV
d504e3a004 build: Fixes for Haiku
* Haiku is fully posix, so can be lumped together with most unix cases
2023-03-22 13:58:10 -05:00
lazymio
d9dcfc1264
Merge pull request #1806 from tunz/tunz/cache
Cache index for find_memory_region
2023-03-21 19:20:50 +08:00
Choongwoo Han
0a38a0bf17 Fix test failure 2023-03-20 18:41:59 -07:00
Choongwoo Han
8f2841ecdb Cache index for find_memory_region 2023-03-20 17:07:15 -07:00
lazymio
a0ff413830
Merge pull request #1800 from PhilippTakacs/emu_stop
difference between stop_request and quit_request
2023-03-12 20:28:29 +01:00