History log of /seL4-camkes-master/kernel/src/arch/x86/32/kernel/thread.c
Revision Date Author Comments
# 79da0792 01-Mar-2020 Gerwin Klein <gerwin.klein@data61.csiro.au>

Convert license tags to SPDX identifiers

This commit also converts our own copyright headers to directly use
SPDX, but leaves all other copyright header intact, only adding the
SPDX ident. As far as possible this commit also merges multiple
Data61 copyright statements/headers into one for consistency.


# 3207abee 20-Mar-2019 Curtis Millar <curtis.millar@data61.csiro.au>

RFC-3: Update context for x86 to use FS and GS.

TLS_BASE virtual register is replaced with FS_BASE and GS_BASE virtual
registers.

The FS_BASE and GS_BASE virtual registers are moved to the end of the
context so they need not be considered in the kernel exit and entry
implementation.

Removed tracking of ES, DS, FS, and GS segment selectors on kernel entry
and exit.

ES and DS are clobbered on kernel entry with the RPL 3 selector for a
DPL 3 linear data segment.

FS is clobbered on exit with the RPL 3 selector for the DPL 3 segment
with FS_BASE as the base. This is done on exit to reload the value from
the GDT.

GS is clobbered on exit with the RPL 3 selector for the DPL 3 segment
with GS_BASE as the base. This is done on exit to reload the value from
the GDT.

Kernel entry and exit code is refactored, simplified, and improved in
light of the above changes.

x64: update verified config to use fsgsbase instr

The verification platform for x64 relies on the fsgsbase instruction.


# d0930f67 18-Mar-2019 Anna Lyons <Anna.Lyons@data61.csiro.au>

style: consistently attach return type

Add attach-return-type to astyle


# 761006e0 18-Mar-2019 Anna Lyons <Anna.Lyons@data61.csiro.au>

style: consistently align pointer with name

Run astyle with align-pointer=name


# b1e799a4 28-Jan-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

x86: Config option for RSB flush on context switch

This option can be enabled to prevent a user from performing a Spectre like attack on
another user through polluting the RSB.


# 2423c620 28-Jan-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

x86: Config option for branch prediction barrier on context switch

This option can be enabled to prevent a user from performing a Spectre like attack on
another user through polluting the indirect branch predictor.


# 8639dbca 06-Nov-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

Abstractly declare a threads registers have changed

This removes an #ifdef for x86-64 that was in generic code by declaring the generic
mechanism that is being used as an Arch_ function


# 57fa0e0f 07-Aug-2017 Hesham Almatary <hesham.almatary@data61.csiro.au>

Share linker.h between architectures


# d73d0e8f 24-Nov-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

x86: Write FS and GS base when restoring user context

This commit moves the write to FS and GS base, allowing for a much
more efficient write to GS base under x86-64 SMP. When writing
GS base was in Arch_switchToThread it was neccessary to write to
an MSR such that when swapgs was performed on kernel exit the new
value of GS base would be retrieved. Unfortunately writing to an
MSR is very expensive and we would much prefer to use the writegsbase
instructions instead. By moving this code to restore user context
we are able to call swapgs earlier and then use the normal
writegsbase instruction


# 8a6936ff 16-Nov-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

Remove incorrect CONST usage

This removes usages of CONST Arch_activateIdleThread. According to
gcc 'a function that has pointer arguments and examines the data
pointed to must not be declared const'. Whilst these functions do
not presently examine their tcb_t pointer argument, it seems
pointless to pass something that can never be safely looked at.

Further a function that returns void and is CONST is utterly meaningless


# 66dfc2e7 29-Jul-2016 Kent McLeod <kent.mcleod@nicta.com.au>

Change ia32 to use fs register for IPC buffer

gs register is used by gcc for TLS and the IPC buffer gets in the way


# 1887ae9d 13-Oct-2016 amrzar <azarrabi@nicta.com.au>

Update SMP idle thread handling


# 235a02ec 12-Oct-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

x86: Use FLAGS_* defines instead of magic numbers


# 6294225c 10-Oct-2016 Adrian Danis <Adrian.Danis@data61.csiro.au>

x86: Rename [ER]FLAGS to FLAGS

Having a different name for the FLAGS register creates an unnecessary difference
between ia32 and x86_64 code since regardless of the name/size the bits in the
register mean exactly the same thing


# be6b6be1 24-Nov-2015 Adrian Danis <Adrian.Danis@nicta.com.au>

x86: FS/GS base MSRs

when FS/GS_BASE_MSR are used to set the base addreses,
user applications should not touch FS/GS regiters; so
the kernel should load proper selectors once, establishing
limits and other attributes for the segments.


# 74f620d1 29-Jun-2015 Adrian Danis <Adrian.Danis@nicta.com.au>

x86: Rename FaultEIP and NextEIP to FaultIP and NextIP to allow for 32/64-bit independent code


# 4e81ed05 05-Nov-2015 Adrian Danis <Adrian.Danis@nicta.com.au>

x86: Extract 32-bit specific vspace functions in mode/vspace.c


# 198f6c84 01-Jun-2015 Adrian Danis <Adrian.Danis@nicta.com.au>

x86: Move 32-bit specific files into 'mode' directories, and only build if IA32