Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146551873
D6773.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
D6773.diff
View Options
Index: sys/arm/arm/trap-v6.c
===================================================================
--- sys/arm/arm/trap-v6.c
+++ sys/arm/arm/trap-v6.c
@@ -28,6 +28,7 @@
*/
#include "opt_ktrace.h"
+#include "opt_compat.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -58,6 +59,10 @@
#include <machine/machdep.h>
#include <machine/pcb.h>
+#ifdef COMPAT_LINUX
+#include <arm/linux/linux.h>
+#endif
+
#ifdef KDB
#include <sys/kdb.h>
#include <machine/db_machdep.h>
@@ -501,6 +506,16 @@
abort_fatal(tf, idx, fsr, far, prefetch, td, &ksig);
return;
}
+#ifdef COMPAT_LINUX
+ else
+ {
+ if (far == LINUX_GETTLS_HELPER) {
+ tf->tf_r0 = linux_get_tls(td);
+ tf->tf_pc = tf->tf_r14;
+ goto out;
+ }
+ }
+#endif /* COMPAT_LINUX */
ksig.sig = SIGSEGV;
ksig.code = (rv == KERN_PROTECTION_FAILURE) ? SEGV_ACCERR : SEGV_MAPERR;
Index: sys/arm/linux/linux.h
===================================================================
--- sys/arm/linux/linux.h
+++ sys/arm/linux/linux.h
@@ -588,4 +588,8 @@
struct linux_robust_list *pending_list;
};
+#define LINUX_GETTLS_HELPER 0xffff0fe0
+
+uint32_t linux_get_tls(struct thread *td);
+
#endif /* !_ARM_LINUX_H_ */
Index: sys/arm/linux/linux_machdep.c
===================================================================
--- sys/arm/linux/linux_machdep.c
+++ sys/arm/linux/linux_machdep.c
@@ -806,4 +806,11 @@
set_tls(args->tls);
return (0);
-}
\ No newline at end of file
+}
+
+uint32_t
+linux_get_tls(struct thread *td)
+{
+
+ return (td->td_md.md_tp);
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 4, 2:31 PM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29246287
Default Alt Text
D6773.diff (1 KB)
Attached To
Mode
D6773: Linux ARM 16/16
Attached
Detach File
Event Timeline
Log In to Comment