From 4b745a1c2c0534a1850b6efe6710536b2225c3f4 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 13 Sep 2026 19:07:41 -0400 Subject: Phase 1: Add GSP Emulation Engine (host-side) - New kernel/gsp_emulation.h: GSP emulation context and API - New kernel/gsp_emulation.c: Per-mdev emulation thread with: - Adaptive polling of doorbell at BAR0+0x110C00 - Shared memory RPC processing (4KB at BAR0+0x1000) - Dispatch for all 12 RPC types via firmware-decompiled handlers - MSI-X completion interrupt injection via eventfd - Statistics tracking (processed/failed RPCs, latency) - Modified kernel/main.c: Integrate gsp_emu_init/cleanup in device lifecycle - Modified kernel/Makefile: Add gsp_emulation.o to build - Modified kernel/gsp_rpc_client.h: Export gsp_rpc_emulation_set/is_enabled --- kernel/gsp_rpc_client.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kernel/gsp_rpc_client.h') diff --git a/kernel/gsp_rpc_client.h b/kernel/gsp_rpc_client.h index 8702b0f..64bfe5b 100644 --- a/kernel/gsp_rpc_client.h +++ b/kernel/gsp_rpc_client.h @@ -310,4 +310,8 @@ int gsp_wpr_write_mutex_release(struct gsp_client *client, u32 wpr_id); int gsp_wpr_scratch_mutex_acquire(struct gsp_client *client, u32 wpr_id); int gsp_wpr_scratch_mutex_release(struct gsp_client *client, u32 wpr_id); +/* Emulation control */ +void gsp_rpc_emulation_set(bool enable); +bool gsp_rpc_emulation_is_enabled(void); + #endif /* _GSP_RPC_CLIENT_H_ */ -- cgit v1.2.3