Skip to content

Commit 0a05a01

Browse files
hoshinolinamarcan
authored andcommitted
proxy: Add smp_is_alive() thunk
Signed-off-by: Asahi Lina <[email protected]>
1 parent 4a679b1 commit 0a05a01

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

proxyclient/m1n1/proxy.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ class M1N1Proxy(Reloadable):
548548
P_SMP_CALL_SYNC = 0x502
549549
P_SMP_WAIT = 0x503
550550
P_SMP_SET_WFE_MODE = 0x504
551+
P_SMP_IS_ALIVE = 0x505
551552

552553
P_HEAPBLOCK_ALLOC = 0x600
553554
P_MALLOC = 0x601
@@ -940,6 +941,8 @@ def smp_wait(self, cpu):
940941
return self.request(self.P_SMP_WAIT, cpu)
941942
def smp_set_wfe_mode(self, mode):
942943
return self.request(self.P_SMP_SET_WFE_MODE, mode)
944+
def smp_is_alive(self, cpu):
945+
return self.request(self.P_SMP_IS_ALIVE, cpu)
943946

944947
def heapblock_alloc(self, size):
945948
return self.request(self.P_HEAPBLOCK_ALLOC, size)

src/proxy.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@ int proxy_process(ProxyRequest *request, ProxyReply *reply)
339339
case P_SMP_SET_WFE_MODE:
340340
smp_set_wfe_mode(request->args[0]);
341341
break;
342+
case P_SMP_IS_ALIVE:
343+
reply->retval = smp_is_alive(request->args[0]);
344+
break;
342345

343346
case P_HEAPBLOCK_ALLOC:
344347
reply->retval = (u64)heapblock_alloc(request->args[0]);

src/proxy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ typedef enum {
8383
P_SMP_CALL_SYNC,
8484
P_SMP_WAIT,
8585
P_SMP_SET_WFE_MODE,
86+
P_SMP_IS_ALIVE,
8687

8788
P_HEAPBLOCK_ALLOC = 0x600, // Heap and memory management ops
8889
P_MALLOC,

0 commit comments

Comments
 (0)