Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146360057
D6763.id17410.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D6763.id17410.diff
View Options
Index: sys/arm/linux/linux_locore.s
===================================================================
--- /dev/null
+++ sys/arm/linux/linux_locore.s
@@ -0,0 +1,132 @@
+/* $FreeBSD$ */
+
+#include "linux_assym.h" /* system definitions */
+#include <machine/asmacros.h> /* miscellaneous asm macros */
+
+#include <arm/linux/linux_syscall.h> /* system call numbers */
+
+#include "assym.s"
+
+/*
+ * To avoid excess stack frame the signal trampoline code emulates
+ * the 'call' instruction.
+ */
+ASENTRY_NP(linux_sigcode)
+ bl .getip0
+.getip0:
+ mov lr, pc
+ add lr, $.startsigcode-.getip0 /* ret address */
+ ldr r1, [r0], #LINUX_SIGF_HANDLER
+ b [r1]
+.startsigcode:
+ mov r7, $LINUX_SYS_linux_sigreturn /* linux_sigreturn() */
+ swi 0
+.endsigcode:
+0: b 0b
+
+ASENTRY_NP(linux_rt_sigcode)
+ ldr r1, [r0], #LINUX_RT_SIGF_UC
+ ldr r0, [r1], #LINUX_RT_SIGF_SC
+ bl .getip1
+.getip1:
+ mov lr, pc
+ add lr, $.startrtsigcode-.getip1 /* ret address */
+ ldr r1, [r0], #LINUX_RT_SIGF_HANDLER
+ b [r1]
+.startrtsigcode:
+ mov r7, $LINUX_SYS_linux_rt_sigreturn /* linux_rt_sigreturn() */
+ swi 0
+.endrtsigcode:
+0: b 0b
+
+ASENTRY_NP(linux_vsyscall)
+.startvsyscall:
+ mov r7, r0
+ swi 0
+ mov pc, lr
+.endvsyscall:
+
+#define do_cfa_expr(offset) \
+ .byte 0x0f; /* DW_CFA_def_cfa_expression */ \
+ .uleb128 11f-10f; /* length */ \
+10: .byte 0x74; /* DW_OP_breg4 */ \
+ .sleb128 offset; /* offset */ \
+ .byte 0x06; /* DW_OP_deref */ \
+11:
+
+
+ /* CIE */
+ .section .eh_frame
+ /*.section .eh_frame,"a",@progbits*/
+.LSTARTFRAMEDLSI1:
+ .long .LENDCIEDLSI1-.LSTARTCIEDLSI1
+.LSTARTCIEDLSI1:
+ .long 0 /* CIE ID */
+ .byte 1 /* Version number */
+ .string "zRS" /* NULL-terminated
+ * augmentation string
+ */
+ .uleb128 1 /* Code alignment factor */
+ .sleb128 -4 /* Data alignment factor */
+ .byte 8 /* Return address
+ * register column
+ */
+ .uleb128 1 /* Augmentation value length */
+ .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */
+ .byte 0 /* DW_CFA_nop */
+ .align 4
+.LENDCIEDLSI1:
+
+ /* FDE */
+ .long .LENDFDEDLSI1-.LSTARTFDEDLSI1 /* Length FDE */
+.LSTARTFDEDLSI1:
+ .long .LSTARTFDEDLSI1-.LSTARTFRAMEDLSI1 /* CIE pointer */
+ .long .startsigcode-. /* PC-relative start address */
+ .long .endsigcode-.startsigcode
+ .uleb128 0 /* Augmentation */
+ do_cfa_expr(LINUX_SIGF_SC-8)
+ .align 4
+.LENDFDEDLSI1:
+
+ .long .LENDFDEDLSI2-.LSTARTFDEDLSI2 /* Length FDE */
+.LSTARTFDEDLSI2:
+ .long .LSTARTFDEDLSI2-.LSTARTFRAMEDLSI1 /* CIE pointer */
+ .long .startrtsigcode-. /* PC-relative start address */
+ .long .endrtsigcode-.startrtsigcode
+ .uleb128 0 /* Augmentation */
+ do_cfa_expr(LINUX_RT_SIGF_SC-4+LINUX_SC_ESP)
+ .align 4
+.LENDFDEDLSI2:
+ .previous
+
+ .section .eh_frame
+ /*.section .eh_frame,"a",@progbits*/
+.LSTARTFRAMEDLSI2:
+ .long .LENDCIEDLSI2-.LSTARTCIEDLSI2
+.LSTARTCIEDLSI2:
+ .long 0 /* CIE ID */
+ .byte 1 /* Version number */
+ .string "zR" /* NULL-terminated
+ * augmentation string
+ */
+ .uleb128 1 /* Code alignment factor */
+ .sleb128 -4 /* Data alignment factor */
+ .byte 8 /* Return address register column */
+ .uleb128 1 /* Augmentation value length */
+ .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */
+ .byte 0x0c /* DW_CFA_def_cfa */
+ .uleb128 4
+ .uleb128 4
+ .byte 0x88 /* DW_CFA_offset, column 0x8 */
+ .uleb128 1
+ .align 4
+.LENDCIEDLSI2:
+ .long .LENDFDEDLSI3-.LSTARTFDEDLSI3 /* Length FDE */
+.LSTARTFDEDLSI3:
+ .long .LSTARTFDEDLSI3-.LSTARTFRAMEDLSI2 /* CIE pointer */
+ .long .startvsyscall-. /* PC-relative start address */
+ .long .endvsyscall-.startvsyscall
+ .uleb128 0
+ .align 4
+.LENDFDEDLSI3:
+ .previous
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 3, 1:49 AM (9 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29177066
Default Alt Text
D6763.id17410.diff (3 KB)
Attached To
Mode
D6763: Linux ARM 6/16
Attached
Detach File
Event Timeline
Log In to Comment