Commit 01f8cfe
committed
fix(zaparoo): shut down frontend before FPGA reconfig to stop launch freeze
Launching a core from the launcher frontend could hard-freeze the device
(silent black screen, reboot required) — reliably reproduced on atari5200
/atari800. The frontend process stays alive holding mmaps into /dev/fb0,
the HPS framebuffer the FPGA scans out over the f2sdram bridge. fpga_load_rbf
calls do_bridge(0) to reset that bridge while the frontend is still mapped to
it, deadlocking the AXI bus mid-reconfiguration. Upstream has no frontend, so
it never hits this.
Move the frontend teardown ahead of reconfiguration: call alt_launcher_shutdown()
at the top of fpga_load_rbf so the frontend (and its framebuffer) is gone before
do_bridge(0)/socfpga_load. The call is idempotent, so app_restart's existing
call is left untouched.
Also harden the frontend VT takeover: replace the unbounded video_chvt()
(VT_WAITACTIVE blocks forever if the frontend stalls bringing up video) with a
bounded VT_ACTIVATE + VT_GETSTATE poll, and defer the takeover until the FPGA
is ready. This fixes a separate poll-cothread wedge during menu+frontend
bring-up after a 15kHz core.1 parent 492b3bf commit 01f8cfe
2 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
430 | 434 | | |
431 | 435 | | |
432 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
472 | 473 | | |
473 | 474 | | |
474 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
475 | 495 | | |
476 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
477 | 501 | | |
478 | | - | |
| 502 | + | |
479 | 503 | | |
480 | 504 | | |
481 | 505 | | |
| |||
0 commit comments