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

Re: [Minios-devel] [UNIKRAFT PATCHv6 35/37] arch/arm64: Add function for stack pointer retrieval



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 14.09.2018 09:57, Wei Chen wrote:
The ukdebug will print bottom address of stack in
debug messages. So we just implement this function
for Arm64 to retrieve stack pointer.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
  include/uk/arch/arm/arm64/lcpu.h | 9 +++++++++
  1 file changed, 9 insertions(+)

diff --git a/include/uk/arch/arm/arm64/lcpu.h b/include/uk/arch/arm/arm64/lcpu.h
index 3e1fd9b..2719313 100644
--- a/include/uk/arch/arm/arm64/lcpu.h
+++ b/include/uk/arch/arm/arm64/lcpu.h
@@ -100,4 +100,13 @@ struct __regs {
  #define wmb()   dsb(st) /* Full system memory barrier store */
  #endif
+static inline unsigned long ukarch_read_sp(void)
+{
+       unsigned long sp;
+
+       __asm__ __volatile("mov %0, sp": "=&r"(sp));
+
+       return sp;
+}
+
  #endif /* __ASSEMBLY__ */


_______________________________________________
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®.