Commit Graph

117437 Commits

Author SHA1 Message Date
evan c1fc905cf2 tcg/wasm32: narrow fallback to aliased qemu_ld TBs 2026-07-23 20:49:17 -04:00
evan ec4c6cc95a tcg/wasm32: refine TLB corruption diagnostics 2026-07-23 13:12:22 -04:00
evan 29cab65aff tcg/wasm32: compile pure store TBs, keep mixed store-helper TBs TCI 2026-07-23 11:53:57 -04:00
evan e4a6de07c6 tcg/wasm32: add tlbguard and store-PC window probes 2026-07-23 10:37:23 -04:00
evan cd3f083fb0 tcg/wasm32: trace compiled-store TLB corruption under ramrace 2026-07-23 07:50:54 -04:00
evan 346c789851 tcg/wasm32: add opt-in stateflush no-chain probe
?stateflush reuses the app-flash no-chain window without differential shadowing.
It shows that returning to C between TBs does not materialize CPUArchState; the
nostoretci reader-open corruption still reproduces.
2026-07-23 06:59:21 -04:00
evan ab9c5823ee tcg/wasm32: add opt-in ramrace guest-RAM/TLB probe
?ramrace logs off-vCPU guest DRAM reads/writes/maps and TLB flushes. The
open-window crash shows zero such accesses, ruling out IO-thread guest-RAM
access during inflate as the compiled-store corruption source.
2026-07-22 23:11:02 -04:00
evan b6d67a89bb tcg/wasm32: add opt-in ?noremove to leak TB functions
Skips removeFunction recycling of WASM table indices. nostoretci+noremove still
crashes 4/4, ruling out table-index reuse as the corruption source and leaving a
vCPU/IO-thread guest-RAM data race as the standing hypothesis.
2026-07-22 21:57:44 -04:00
evan 9e9184949d tcg/wasm32: add opt-in ?yieldtrace store-yield counter
Counts compiled-TB DONE_FLAG redispatch/resume re-entries. Three crashing
nostoretci runs showed zero such re-entries, ruling out the store
block-replay-via-redispatch path as the corruption trigger and pointing at a
guest-RAM data race with concurrent device/timer callbacks.
2026-07-22 21:43:06 -04:00
evan a18a2991c6 tcg/wasm32: add opt-in runtime store gating for race isolation
Add wasm_set_store_tci_hash and wasm_set_store_bisect so store compilation can
be split by pc hash (both widths) or bisected per width at runtime, no rebuild.
Used to show the compiled-store corruption is a nondeterministic race, not a
specific miscompiled TB: identity-independent, and a fixed config alternates
crash/pass across runs. Default path unchanged (blanket store-TCI).
2026-07-22 20:56:56 -04:00
evan f46ca3b386 tcg/wasm32: restore blanket store-TCI default after benchmark
The 32-bit-only store-TCI fallback passes reader-open when it works, but a
3-run benchmark hit an app-init watchdog once. Restore the upstream blanket
store-TCI fallback for reliability; keep ?nostoretci as the all-compiled repro.
2026-07-22 19:47:41 -04:00
evan 59a198dcf8 tcg/wasm32: narrow store-TCI fallback to 32-bit stores
The compiled-store corruption requires 8-bit and 32-bit store TB populations
compiled together. Interpreting either width breaks the interaction; keep only
32-bit qemu store TBs on TCI and allow the rest to compile. ?nostoretci remains
the all-compiled repro path.
2026-07-22 19:05:38 -04:00
evan b3ffe97fb3 tcg/wasm32: add normal-speed store-TCI bypass and windowed diff2 arming support
Add an opt-in wasm_disable_store_tci() probe so browser tests can run compiled
stores at normal speed without the differential harness. Also let E11 request
no-chain only for TBs inside its PC window, avoiding the global no-chain
watchdog artifact while preserving valid per-window comparisons.

This keeps production store-TCI unchanged unless explicitly disabled.
2026-07-22 18:16:01 -04:00
evan 4dd54253ab tcg/wasm32: add ?tcgdiff2 whole-execution differential (live compiled vs TCI shadow)
Mode 2 runs compiled LIVE and authoritative so corruption accumulates across
TBs as in the real crash, with a per-TB TCI shadow (restored from pre-snapshot)
as the known-good reference. Store-TCI disabled under this mode; compares
env/pc/DRAM per eligible store TB, now including slow-path completions.

Result: 153k+ live-compiled comparisons, zero divergence, confirming inline
store codegen is correct even under live accumulation. Cannot reach the reader
corruption in-browser: 2x-execution + full-state snapshot trips the guest
interrupt watchdog and is throughput-bound. Suspects narrowed to the store
slow-path (helper/unwind) and store-width interaction.
2026-07-22 16:45:01 -04:00
evan 1473b7ab10 tcg/wasm32: add opt-in compiled-vs-TCI per-TB differential checker
Runs authoritative TCI first, snapshots its result, rewinds guest state,
runs the compiled TB as a disposable shadow, compares GPRs/DRAM, then
restores TCI. Opt-in via wasm_diff_enable(); normal execution unchanged.

Valid comparison required restoring all state a single TB can touch:
- full CPUNegativeOffsetState (the env-8 interrupt check sits before env)
- deep CPUTLB.f[].table / d[].fulltlb per MMU mode
- and skipping async cpu_exit() force-exit races.

Only side-effect-safe candidates compared (store TB, no general helper).
Result: 160k+ store-TB comparisons during reader-open, zero divergence.
Per-TB store codegen is exonerated; corruption is emergent across TBs.
2026-07-22 16:05:41 -04:00
evan e45c1e2db1 wasm32: add node-only TB wasm dump tooling for static analysis (E9) 2026-07-22 08:00:39 -04:00
evan e80c3c7088 wasm32: E8 proves store bug is emergent (aggregate on 8-bit and 32-bit axes) 2026-07-22 07:25:17 -04:00
evan 3c064ae6c9 wasm32: add instantiated-TB counter; keep store-TCI (E4-E7 narrowed root cause) 2026-07-22 06:53:41 -04:00
evan 725845d0d8 docs(wasm32): record E3 bisection - store bug is aggregate, not one TB 2026-07-21 21:48:07 -04:00
evan b3ca9f1eb6 docs(wasm32): note per-op TCI needed to isolate store bug 2026-07-21 20:42:01 -04:00
evan 7cab93ede7 docs(wasm32): correct store-TCI comment to upstream root cause 2026-07-21 16:14:22 -04:00
evan 962fc6e71d feat(block): add ephemeral wasm vvfat writes 2026-07-21 15:36:39 -04:00
evan cbeba3fbe9 fix(display): classify X3 grayscale from loaded LUTs 2026-07-21 11:42:04 -04:00
evan e6ed78243d Ignore meson subprojects/.wraplock build artifact 2026-07-21 10:35:06 -04:00
evan ede6e5b9f3 Render X3 reader grayscale correctly (persistence + 4-level overlay)
The reader draws a crisp BW page, then a 4-level grayscale antialiasing
pass with inverted plane polarity (white = level 0 = both planes clear)
and near-empty planes. The old model replaced the whole frame with those
planes, wiping the page to an inverted muddle.

Model it as e-ink actually behaves: keep a persistent surface, detect
grayscale vs BW by DTM2's set-fraction (background is the white
majority), and in grayscale treat level 0 as no-drive (keep pixel) so
only the sparse antialiased edges repaint over the retained BW page. BW
refreshes still repaint every pixel. Reader text now renders sharp.
2026-07-21 10:27:17 -04:00
evan 1f76f73fee Work around wasm32 store-TB miscompile (reader font decompression)
A TB containing a guest store is miscompiled by the wasm backend: it
corrupts a pointer that a later load faults on. It reproduces in uzlib
inflate during the reader's font prewarm (browser panics with a rejected
Load access fault); native QEMU decompresses the same static flash font
fine, confirming a wasm32 codegen bug.

Force store-containing TBs onto the TCI interpreter as the working
workaround. Perf ceiling: those TBs no longer JIT-compile. Upgrade path:
localize the miscompiled op in tcg_wasm_out_qemu_st and drop this.
2026-07-21 09:16:31 -04:00
evan d2bb76e672 Ignore native build-native/ output dir 2026-07-21 08:34:50 -04:00
evan 3623a36693 Fix SPI-SD write-token timing and CMD13 response
ssi-sd now enters token mode as it returns the final R1 byte, so the
write-data token that immediately follows is not discarded. SPI CMD13
returns the internal sd_r1 response (upstream fix) instead of sd_r2_s,
which the adapter converts to the two-byte SPI R2 status; this stops the
repeated "Unexpected response to cmd 13" loop on guest status polls.

Drops the experimental store-TB TCI forcing and sd-watch OOB logging now
that the raw FAT32 image path is stable.
2026-07-21 07:42:41 -04:00
xteink 13b9231f6e Add xteink fork dev tooling (native flake devShell + README)
build / Vars (push) Successful in 2s
build / Build (aarch64-apple-darwin, ./.github/workflows/scripts/configure-macos.sh, ./.github/workflows/scripts/prerequisites-macos.sh, macos-14-xlarge, bash -e {0}, riscv32-softmmu) (push) Has been cancelled
build / Build (aarch64-apple-darwin, ./.github/workflows/scripts/configure-macos.sh, ./.github/workflows/scripts/prerequisites-macos.sh, macos-14-xlarge, bash -e {0}, xtensa-softmmu) (push) Has been cancelled
build / Build (debian:11.11, aarch64-linux-gnu, ./.github/workflows/scripts/configure-cross-linux-arm64.sh, ./.github/workflows/scripts/prerequisites-cross-linux-arm64.sh, ubuntu-22.04, bash -e {0}, riscv32-softmmu) (push) Has been cancelled
build / Build (debian:11.11, aarch64-linux-gnu, ./.github/workflows/scripts/configure-cross-linux-arm64.sh, ./.github/workflows/scripts/prerequisites-cross-linux-arm64.sh, ubuntu-22.04, bash -e {0}, xtensa-softmmu) (push) Has been cancelled
build / Build (debian:11.11, x86_64-linux-gnu, ./.github/workflows/scripts/configure-native.sh, ./.github/workflows/scripts/prerequisites-native.sh, ubuntu-22.04, bash -e {0}, riscv32-softmmu) (push) Has been cancelled
build / Build (debian:11.11, x86_64-linux-gnu, ./.github/workflows/scripts/configure-native.sh, ./.github/workflows/scripts/prerequisites-native.sh, ubuntu-22.04, bash -e {0}, xtensa-softmmu) (push) Has been cancelled
build / Build (x86_64-apple-darwin, ./.github/workflows/scripts/configure-macos.sh, ./.github/workflows/scripts/prerequisites-macos.sh, macos-14, bash -e {0}, riscv32-softmmu) (push) Has been cancelled
build / Build (x86_64-apple-darwin, ./.github/workflows/scripts/configure-macos.sh, ./.github/workflows/scripts/prerequisites-macos.sh, macos-14, bash -e {0}, xtensa-softmmu) (push) Has been cancelled
build / Build (x86_64-w64-mingw32, ./.github/workflows/scripts/configure-win.sh, windows-2022, msys2 {0}, riscv32-softmmu) (push) Has been cancelled
build / Build (x86_64-w64-mingw32, ./.github/workflows/scripts/configure-win.sh, windows-2022, msys2 {0}, xtensa-softmmu) (push) Has been cancelled
build / Upload (push) Has been cancelled
2026-07-20 17:51:18 -04:00
xteink 543cebcb3a WIP: SD write debugging (store-TB TCI + sd-watch) and vvfat/ssi-sd fixes
Diagnostic: routes store-containing TBs through TCI and logs out-of-bounds
guest stores to isolate the SdSpiCard corruption. Also carries the FAT32
vvfat root/cluster fixes and ssi-sd command framing. Squash/split before
upstreaming.
2026-07-20 17:48:33 -04:00
evan 64d7668b49 Fix browser TB compilation and ISSI flash commands 2026-07-20 10:17:58 -04:00
evan 2ab8860a24 Add SFDP data for IS25LP128 flash 2026-07-20 09:36:15 -04:00
evan c1ee841e58 Generalize m25p80 Read-ID 0x90/0xAB beyond SST chips 2026-07-20 09:00:24 -04:00
evan ce99303135 Fix esp_sha hash callback signature mismatch for emscripten 2026-07-20 07:45:14 -04:00
evan cddd964c57 Guard esp32c3 cache XTS-AES use when gcrypt absent 2026-07-20 07:25:59 -04:00
evan 1ff6c3a51e Fix GLib GCompareFunc type conflict for emscripten 2026-07-20 07:12:55 -04:00
evan a0adc5f6c0 Backport Emscripten RAM allocation fix 2026-07-20 06:50:58 -04:00
evan b0bce6c486 Add xteink browser bridge 2026-07-20 00:20:51 -04:00
evan d58495104a Declare minimal xteink device dependencies 2026-07-19 22:06:20 -04:00
evan d1d3f6e360 Limit wasm build to xteink devices 2026-07-19 21:57:52 -04:00
evan c4227568de Add xteink machine for wasm build 2026-07-19 21:56:40 -04:00
evan fa545a4ec1 Port qemu-wasm backend to Espressif QEMU 9.2 2026-07-19 21:40:41 -04:00
Kohei Tokunaga e712868ec5 Update wasm backend
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2026-07-19 21:08:45 -04:00
Kohei Tokunaga 2816a551ef TCG: add wasm backend
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2026-07-19 21:08:45 -04:00
Omar Chebib 40edccac41 hw/riscv: fix interrupts being lost or delayed when MIE=0 on the ESP32-C3 2026-04-17 10:15:24 +08:00
Ivan Grokhotkov 00b2b7500e ci: consolidate Jira sync workflows and update to sync-jira-actions@v1
Replace three separate Jira sync workflows (new_issues.yml,
issue_comment.yml, new_prs.yml) with a single sync-jira.yml following
the recommended pattern from espressif/sync-jira-actions.

Changes:
- Migrate from espressif/github-actions/sync_issues_to_jira@master
  to espressif/sync-jira-actions@v1
- Add missing GITHUB_TOKEN permissions (contents:read, issues:write,
  pull-requests:write)
- Add workflow_dispatch trigger for manual syncing
- Add dynamic run-name for better visibility in Actions UI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:21:20 +02:00
Ivan Grokhotkov e89262698c ci: update GitHub Actions to Node.js 24 compatible versions
Node.js 20 is deprecated on GitHub Actions runners and will be forced
to Node.js 24 starting June 2, 2026, with Node.js 20 removed entirely
on September 16, 2026.

Update all actions to versions that support Node.js 24:
- actions/checkout: v4/master -> v6
- actions/upload-artifact: v4 -> v7
- actions/download-artifact: v4 -> v8
- softprops/action-gh-release: v1 -> v2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 13:21:20 +02:00
John Snow cdb2bd0304 python: fix msys64 wheel directory specification
In python3.14, fixes were made to the file URI parsing [1] such that
file URIs that used to work but were technically out of spec are now
broken.

As a result, our msys2 GitLab CI tests began failing.

Stop using "file://" URI links in favor of simple paths (Thanks pbo) to
fix parsing errors under Python 3.14 and fix the msys2 GitLab CI tests.

[1] https://docs.python.org/3/whatsnew/3.14.html#urllib

Reported-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260130050518.517688-2-jsnow@redhat.com>
2026-04-15 15:01:26 +02:00
harshal.patil ba5950398f feat(xtensa/esp32s3): Extend the ESP32-S3's TIE instructions
1. Missing bare ee.vldbc.{8,16,32} instructions - Added 3 opcode table entries with addr_nop and updated translate_vldbc_s3 to handle addr_nop without erroring.
2. Missing ee.st.qacc_{h,l}.{h.32,l.128}.ip store instructions - Added 4 opcode table entries, 2 translate functions, and 2 helper functions (with declarations in helper.h) to implement the QACC store operations as mirrors of the existing load counterparts.
3. ee.src.q incorrect qs1->qs0 copy - The bare ee.src.q qa, qs0, qs1 was incorrectly copying qs1→qs0 after the funnel shift. Per the TRM, only the .qup variant does this copy. Fixed by making the copy conditional on op_type == vmul_qup.
4. Add ee.st.accx.ip to store 40-bit ACCX (zero-extended to 64-bit) to memory, 8-byte aligned.
5. Add ee.ld.ua_state.ip to load 128-bit UA_STATE from memory, 16-byte aligned.
6. Add ee.st.ua_state.ip to store 128-bit UA_STATE to memory, 16-byte aligned.
7. Add ee.ldxq.32: Indexed load: compute address from Q register s16 segment, load 32-bit into Q register segment.
8. Add ee.stxq.32: Indexed store: compute address from Q register s16 segment, store 32-bit from Q register segment.
2026-04-15 14:08:04 +02:00
Nguyen Dinh Phi a06102167d util: Move qemu_ftruncate64 from block/file-win32.c to oslib-win32.c
qemu_ftruncate64() is a general-purpose utility function that may be
used outside of the block layer. Move it to util/oslib-win32.c where
other Windows-specific utility functions reside.

Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20251218085446.462827-3-phind.uet@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2026-04-15 13:39:21 +02:00