Opened 9 years ago

Closed 9 years ago

#659 closed enhancement (fixed)

Get rid of the SYS_SET_TLS syscall

Reported by: Jakub Jermář Owned by: Jakub Jermář
Priority: major Milestone: 0.7.0
Component: helenos/kernel/amd64 Version: mainline
Keywords: fibrils, tls Cc:
Blocker for: Depends on:
See also:

Description

HelenOS needs the SYS_SET_TLS syscall to support fibril local storage on ia32 and amd64. Recent amd64 processors (starting from Ivy Bridge) support the WRFSBASE instruction for setting the FS base address from any (kernel/user) mode.

HelenOS on amd64 should detect the availability of this instruction and use it instead of the SYS_SET_TLS syscall. This would render the syscall necessary only for ia32 and older amd64 processors. We could get rid of it completely by pretending WRGSBASE/WRFSBASE is always supported (both on ia32 and amd64) and emulate its behaviour upon the #UD exception.

Change History (1)

comment:1 by Jakub Jermář, 9 years ago

Resolution: fixed
Status: newclosed

This ticket is fixed by mainline,2475 in a way that does not involve using/emulating WRFS/GSBASE.

Note: See TracTickets for help on using tickets.