[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v4 6/9] plat/linuxu: Add linuxu (ARM) interrupts support



Hi Sharan,

On 08/30/2018 03:10 PM, Sharan Santhanam wrote:
Hello,

Please find my comment inline:

On 08/20/2018 01:21 PM, Florian Schmidt wrote:
From: Costin Lupu <costin.lupu@xxxxxxxxx>

Changes:
- ARM syscall numbers for SIGACTION and SIGPROCMASK
- ARM asm restorer

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
---
  plat/linuxu/include/linuxu/syscall-arm_32.h | 2 ++
  plat/linuxu/irq.c                           | 6 ++++++
  2 files changed, 8 insertions(+)

diff --git a/plat/linuxu/include/linuxu/syscall-arm_32.h b/plat/linuxu/include/linuxu/syscall-arm_32.h
index 10e0100..b393627 100644
--- a/plat/linuxu/include/linuxu/syscall-arm_32.h
+++ b/plat/linuxu/include/linuxu/syscall-arm_32.h
@@ -46,6 +46,8 @@
  #define __SC_MUNMAP    91
  #define __SC_EXIT       1
  #define __SC_IOCTL     54
+#define __SC_RT_SIGPROCMASK   126
+#define __SC_RT_SIGACTION     174
  #define __SC_TIMER_CREATE     257
  #define __SC_TIMER_SETTIME    258
  #define __SC_TIMER_GETTIME    259
diff --git a/plat/linuxu/irq.c b/plat/linuxu/irq.c
index 8a9546c..21c97fd 100644
--- a/plat/linuxu/irq.c
+++ b/plat/linuxu/irq.c
@@ -112,7 +112,13 @@ void ukplat_lcpu_irqs_handle_pending(void)
  }
  void __restorer(void);
+#if defined __X86_64__
  asm("__restorer:mov $15,%rax\nsyscall");
+#elif defined __ARM_32__


In the sigrestorer.S[1] in glibc implmentation sets up Call frame information in front of the restorer function. Should we also not do this?
+asm("__restorer:mov r7, #0x77\nsvc 0x0");
+#else
+#error "Unsupported architecture"
+#endif
  static void _irq_handle(int irq)
  {

[1] https://code.woboq.org/userspace/glibc/sysdeps/unix/sysv/linux/arm/sigrestorer.S.html
I honestly don't know. Maybe one of our ARM experts can shed some light on this? Why would it expect all registers to be on the stack?

However, the link you provide mentions "The CFA is not computed / used correctly here; this is neither trivial to do, nor is it needed.", so I will not hold back the series for this. If it's necessary, we can provide a fix later.

Cheers,
Florian

--
Dr. Florian Schmidt
フローリアン・シュミット
Research Scientist,
Systems and Machine Learning Group
NEC Laboratories Europe
Kurfürsten-Anlage 36, D-69115 Heidelberg
Tel.     +49 (0)6221 4342-265
Fax:     +49 (0)6221 4342-155
e-mail:  florian.schmidt@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.