Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148493182
D34711.id104363.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34711.id104363.diff
View Options
Index: sys/arm64/arm64/exception.S
===================================================================
--- sys/arm64/arm64/exception.S
+++ sys/arm64/arm64/exception.S
@@ -25,6 +25,9 @@
*
*/
+#include "opt_ddb.h"
+#include "opt_stack.h"
+
#include <machine/asm.h>
#include <machine/armreg.h>
__FBSDID("$FreeBSD$");
@@ -33,6 +36,13 @@
.text
+#if defined(DDB) || defined(KDTRACE_HOOKS) || defined(STACK)
+#define EXTRA_FRAME_SPACE (8 * 2)
+#define SAVE_FP
+#else
+#define EXTRA_FRAME_SPACE 0
+#endif
+
/*
* This is limited to 28 instructions as it's placed in the exception vector
* slot that is 32 instructions long. We need one for the branch, and three
@@ -43,7 +53,10 @@
mov x18, sp
sub sp, sp, #128
.endif
- sub sp, sp, #(TF_SIZE)
+ sub sp, sp, #(TF_SIZE + EXTRA_FRAME_SPACE)
+#if defined(SAVE_FP)
+ stp x29, lr, [sp, #(TF_SIZE)]
+#endif
stp x28, x29, [sp, #(TF_X + 28 * 8)]
stp x26, x27, [sp, #(TF_X + 26 * 8)]
stp x24, x25, [sp, #(TF_X + 24 * 8)]
@@ -69,7 +82,9 @@
stp w11, w12, [sp, #(TF_SPSR)]
stp x18, lr, [sp, #(TF_SP)]
mrs x18, tpidr_el1
+#if defined(SAVE_FP)
add x29, sp, #(TF_SIZE)
+#endif
.endm
.macro save_registers el
@@ -158,7 +173,7 @@
ldr x29, [sp, #(TF_X + 29 * 8)]
.endif
.if \el == 0
- add sp, sp, #(TF_SIZE)
+ add sp, sp, #(TF_SIZE + EXTRA_FRAME_SPACE)
.else
mov sp, x18
mrs x18, tpidr_el1
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 19, 6:01 AM (19 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29950638
Default Alt Text
D34711.id104363.diff (1 KB)
Attached To
Mode
D34711: Allow the kernel to unwind past the stack frame
Attached
Detach File
Event Timeline
Log In to Comment