Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 28 additions & 0 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,34 @@ jobs:
mips64r5900el-ps2-elf-nm sample/testgdb.elf | grep -q 'gdb_hw_test_function'
sh tests/check_hw_direct_cache_flush.sh sample/testgdb.elf

preemptive-context-probe-build:
name: EE preemptive context observation (compile-only)
runs-on: ubuntu-latest
container: ghcr.io/ps2dev/ps2dev:latest
steps:
- uses: actions/checkout@v4
- name: Install build requirements
run: apk add build-base git
- name: Build VBlank context and branch-delay probes, never execute in CI
run: |
make preemptive-probe-build
mips64r5900el-ps2-elf-nm tests/preemptive/ee_interrupt_context_probe.elf | grep -q 'ps2gdb_probe_busy_begin'
mips64r5900el-ps2-elf-nm tests/preemptive/ee_interrupt_context_probe.elf | grep -q 'ps2gdb_probe_busy_end'
mips64r5900el-ps2-elf-nm tests/preemptive/ee_branch_delay_probe.elf | grep -q 'ps2gdb_branch_loop_dec'
mips64r5900el-ps2-elf-nm tests/preemptive/ee_branch_delay_probe.elf | grep -q 'ps2gdb_branch_loop_branch'
mips64r5900el-ps2-elf-nm tests/preemptive/ee_branch_delay_probe.elf | grep -q 'ps2gdb_branch_loop_delay'
mips64r5900el-ps2-elf-nm tests/preemptive/ee_context_candidate.o | grep -q 'ee_context_candidate_only'
mips64r5900el-ps2-elf-objdump -d tests/preemptive/ee_context_candidate.o > /tmp/ee_context_candidate.dis
test "$(grep -c -E '[[:space:]]sq[[:space:]].*\(k0\)' /tmp/ee_context_candidate.dis)" -eq 32
grep -q 'sq[[:space:]]*ra,496(k0)' /tmp/ee_context_candidate.dis
! mips64r5900el-ps2-elf-nm tests/preemptive/ee_interrupt_context_probe.elf | grep -q 'ee_context_candidate_only'
! mips64r5900el-ps2-elf-nm tests/preemptive/ee_branch_delay_probe.elf | grep -q 'ee_context_candidate_only'
# The standalone probes must be cleaned by the root clean target.
make -C tests/preemptive clean
test ! -e tests/preemptive/ee_interrupt_context_probe.elf
test ! -e tests/preemptive/ee_branch_delay_probe.elf
test ! -e tests/preemptive/ee_context_candidate.o

cooperative-ctrlc-build:
name: EE cooperative Ctrl-C compile-only
runs-on: ubuntu-latest
Expand Down
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ all:
$(MAKE) -C ee
$(MAKE) -C sample

check: tests/r5900_rsp_test tests/registers_test tests/mock_rsp_server tests/rsp_protocol_test tests/hw_breakpoint_state_test tests/ctrlc_rsp_client
check: tests/r5900_rsp_test tests/registers_test tests/ee_context_candidate_test tests/ee_bootstrap_vector_audit tests/mock_rsp_server tests/rsp_protocol_test tests/hw_breakpoint_state_test tests/ctrlc_rsp_client
./tests/r5900_rsp_test
./tests/registers_test
./tests/ee_context_candidate_test
./tests/ee_bootstrap_vector_audit --self-test
./tests/hw_breakpoint_state_test
sh tests/check_protocol.sh

# Builds the EE hardware exception probe but never runs it automatically.
hardware-probe-build:
$(MAKE) -C tests/hardware clean all

# Non-mutating VBlank interrupt-context research; compile only in CI.
# The binary itself runs exclusively by explicit ps2client command.
preemptive-probe-build:
$(MAKE) -C tests/preemptive clean all

# Diagnostic macros compile only; the script restores a non-triggering ELF.
hardware-probe-variants-build:
sh tests/hardware/check_variants.sh
Expand All @@ -45,6 +52,12 @@ tests/r5900_rsp_test: tests/r5900_rsp_test.c ee/r5900-rsp.h
tests/registers_test: tests/registers_test.c ee/r5900-registers.h ee/r5900-rsp.h
$(HOST_CC) $(HOST_CFLAGS) $< -o $@

tests/ee_context_candidate_test: tests/ee_context_candidate_test.c tests/preemptive/ee_context_candidate.h ee/gdb-stub.h
$(HOST_CC) $(HOST_CFLAGS) $< -o $@

tests/ee_bootstrap_vector_audit: tests/ee_bootstrap_vector_audit.c
$(HOST_CC) $(HOST_CFLAGS) $< -o $@

tests/hw_breakpoint_state_test: tests/hw_breakpoint_state_test.c ee/hw-breakpoint-state.h ee/r5900-rsp.h
$(HOST_CC) $(HOST_CFLAGS) $< -o $@

Expand All @@ -64,4 +77,5 @@ install:
clean:
$(MAKE) -C ee clean
$(MAKE) -C sample clean
rm -f tests/r5900_rsp_test tests/registers_test tests/mock_rsp_server tests/rsp_protocol_test tests/hw_breakpoint_state_test tests/ctrlc_rsp_client
$(MAKE) -C tests/preemptive clean
rm -f tests/r5900_rsp_test tests/registers_test tests/ee_context_candidate_test tests/ee_bootstrap_vector_audit tests/mock_rsp_server tests/rsp_protocol_test tests/hw_breakpoint_state_test tests/ctrlc_rsp_client
Loading
Loading