|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCHv6 35/37] arch/arm64: Add function for stack pointer retrieval
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__ */
--
2.17.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |