Skip to content

Commit af6ca83

Browse files
committed
proxy: Add EL0 SMP ops
Signed-off-by: Hector Martin <[email protected]>
1 parent 3b9a714 commit af6ca83

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

proxyclient/m1n1/proxy.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ class M1N1Proxy(Reloadable):
558558
P_SMP_STOP_SECONDARIES = 0x506
559559
P_SMP_CALL_EL1 = 0x507
560560
P_SMP_CALL_SYNC_EL1 = 0x508
561+
P_SMP_CALL_EL0 = 0x509
562+
P_SMP_CALL_SYNC_EL0 = 0x50a
561563

562564
P_HEAPBLOCK_ALLOC = 0x600
563565
P_MALLOC = 0x601
@@ -970,6 +972,14 @@ def smp_call_sync_el1(self, cpu, addr, *args):
970972
if len(args) > 3:
971973
raise ValueError("Too many arguments")
972974
return self.request(self.P_SMP_CALL_SYNC_EL1, cpu, addr, *args)
975+
def smp_call_el0(self, cpu, addr, *args):
976+
if len(args) > 3:
977+
raise ValueError("Too many arguments")
978+
self.request(self.P_SMP_CALL_EL0, cpu, addr, *args)
979+
def smp_call_sync_el0(self, cpu, addr, *args):
980+
if len(args) > 3:
981+
raise ValueError("Too many arguments")
982+
return self.request(self.P_SMP_CALL_SYNC_EL0, cpu, addr, *args)
973983

974984
def heapblock_alloc(self, size):
975985
return self.request(self.P_HEAPBLOCK_ALLOC, size)

src/proxy.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,15 @@ int proxy_process(ProxyRequest *request, ProxyReply *reply)
358358
request->args[3], request->args[4]);
359359
reply->retval = smp_wait(request->args[0]);
360360
break;
361+
case P_SMP_CALL_EL0:
362+
smp_call4(request->args[0], el0_call, request->args[1], request->args[2],
363+
request->args[3], request->args[4]);
364+
break;
365+
case P_SMP_CALL_EL0_SYNC:
366+
smp_call4(request->args[0], el0_call, request->args[1], request->args[2],
367+
request->args[3], request->args[4]);
368+
reply->retval = smp_wait(request->args[0]);
369+
break;
361370

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

src/proxy.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ typedef enum {
8888
P_SMP_STOP_SECONDARIES,
8989
P_SMP_CALL_EL1,
9090
P_SMP_CALL_EL1_SYNC,
91+
P_SMP_CALL_EL0,
92+
P_SMP_CALL_EL0_SYNC,
9193

9294
P_HEAPBLOCK_ALLOC = 0x600, // Heap and memory management ops
9395
P_MALLOC,

0 commit comments

Comments
 (0)