History log of /openbsd-current/sys/arch/mips64/include/_types.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.25 02-Jul-2023 cheloha

all platforms, kernel: remove __HAVE_CLOCKINTR symbol

Every platform made the clockintr switch at least six months ago.
The __HAVE_CLOCKINTR symbol is now redundant. Remove it.

Prompted by claudio@.

Link: https://marc.info/?l=openbsd-tech&m=168826181015032&w=2

"makes sense" mlarkin@


Revision tags: OPENBSD_7_3_BASE
# 1.24 19-Nov-2022 cheloha

mips64, loongson, octeon: switch to clockintr

- Remove mips64-specific clock interrupt scheduling bits from cpu_info.
- Add missing tick_nsec initialization to cpu_initclocks().
- Disable the glxclk interrupt clock on loongson. visa@/miod@ say it
can be removed later if it isn't useful for anything else.
- Wire up cp0_intrclock.

Notes:

- The loongson apm_suspend() changes are untested, but deraadt@ claims
APM suspend/resume on loongson doesn't work anyway.
- loongson and octeon now have a randomized statclock(), stathz = hz.

With input from miod@, visa@. Tested by miod@, visa@.

Link: https://marc.info/?l=openbsd-tech&m=166776379603497&w=2

ok visa@ mlarkin@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.23 05-Mar-2018 deraadt

#define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an arch
needs (looking at you sgi, but others required this before). This is for
the circumstances we need pagesize known at compile time, not getpagesize()
runtime. Use it for malloc storage sizes, for shm, and to set pthread stack
default sizes. The stack sizes were a mess, and pushing them towards
page-aligned is healthy move (which will also be needed by the coming
stack register checker)
ok guenther kettenis, discussion with stefan


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.22 21-Jan-2017 visa

Add _MIPS_ISA_MIPS32 and _MIPS_ISA_MIPS64 defines for clang.

OK deraadt@ phessler@ mpi@


# 1.21 03-Jan-2017 visa

Remove #define __SWAP_BROKEN from mips64. The architecture now
has a proper pmap_collect() implementation, and the current
uvm_swapout_threads() code does not need other MD interfaces.

OK miod@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.20 26-Sep-2015 guenther

lint is dead and C99 may be old enough to drive a car: delete LONGLONG
comments

ok millert@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.19 19-Mar-2014 guenther

It's safe to assumed 'signed' exists


Revision tags: OPENBSD_5_5_BASE
# 1.18 22-Feb-2014 miod

Increase _STACKALIGNBYTES to 15 (was 7), and make sure the stack is aligned
to a 16 byte boundary in csu (similar to what the other arches where
_STACKALIGNBYTES != _ALIGNBYTES do).
This is necessary for long double variables on the stack to be correctly
aligned.


# 1.17 18-Dec-2013 deraadt

Provide MI symbol _STACKALIGNBYTES


Revision tags: OPENBSD_5_4_BASE
# 1.16 13-Jul-2013 deraadt

unify register_t to long on all platforms
ok miod kettenis


# 1.15 05-Jul-2013 guenther

Take II, this time without flubbing off_t: : move several internal
type definitions that are the same across all archs from
<machine/_types.h> to <sys/_types.h>

ok deraadt@ kettenis@ otto@


# 1.14 04-Jul-2013 otto

backout previous; off_t must be signed and there might be other C++ API
breakage lurking; ok kettenis@


# 1.13 04-Jul-2013 guenther

To ease future changes, move several internal type definitions that are
the same across all archs from <machine/_types.h> to <sys/_types.h>

ok deraadt@


Revision tags: OPENBSD_5_3_BASE
# 1.12 05-Nov-2012 miod

unifdef -D __HAVE_TIMECOUNTER


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.11 15-Nov-2011 deraadt

label_t is the kernel setjmp buffer. It should simply be an array of
the right type, noone will ever fiddle with the internals.
discussed with jsing


# 1.10 08-Sep-2011 guenther

Provide namespace-safe alignment macros in <machine/_types.h>, with
compat names kept in <machine/param.h>. In <sys/socket.h>, pull
in <sys/_types.h> instead of the namespace polluting <machine/param.h>
and completely eliminate __CMSG_ALIGN, replaced by _ALIGN

ok deraadt@


# 1.9 08-Sep-2011 guenther

Make the INT_FAST*_{MIN,MAX} macros match the types they're defined to.
Since the underlying types of the int_fast types are set by machine/_types.h,
put internal macros in that same file and define the exposed
INT_FAST*_{MIN,MAX} macros from those.

ok millert@, kettenis@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.8 24-Nov-2010 miod

Floating-point emulation code for systems lacking proper FPU (i.e. Octeon),
enabled by option FPUEMUL.

This is pretty straightforward, except for conditional branch on FPU condition
codes emulation (bc1f/bc1fl/bc1t/bc1tl instructions): unlike most
RISC-with-delay-slots designs (m88k, sparc), the branch pipeline is not exposed
to the kernel on Mips, therefore we can not resume a branch without losing the
delay slot instruction.

Some other operating systems work around this issue by emulating the delay
slot instruction, but this is error-prone (and requires the kernel code to
be aware of all supported instructions of the processor it is currently running
on), some use dedicated breakpoints to single-step through the delay slot and
then resume the branch as expected, but this causes a lot of copy-on-write
allocations.

This code chooses a third path, of copying the delay slot instructions to run toa special `magic' page, followed by a special trap instruction to give control
back to the kernel. This makes sure the instruction will actually be run by the
processor, and that no more than one page per process is wasted, regardless of
the number of branches to emulate.

Tested on octeon (big-endian) by syuu@ and on loongson (little-endian) by me.
Note that enabling option FPUEMUL in the kernel will completely disable the
hardware FPU, if there is one; there is currently no way to build a kernel
supporting both hardware and software FPU, and there is no reason to change
this until there is a strong need to support both.


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.7 04-Nov-2009 kettenis

Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.

ok jsing@, miod@


Revision tags: OPENBSD_4_6_BASE
# 1.6 20-Mar-2009 miod

Switch sgi to __HAVE_GENERIC_SOFT_INTERRUPTS.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.5 21-Jul-2008 martynas

- add proper double_t and float_t definitions for each arch
- math.h shouldn't define FLT_EVAL_METHOD, but float.h should (per
C99). remove from math.h, and add proper definitions in float.h
ok millert@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 16-May-2007 art

The world of __HAVEs and __HAVE_NOTs is reducing. All architectures
have cpu_info now, so kill the option.

eyeballed by jsg@ and grange@


# 1.3 07-May-2007 kettenis

Move sgo to __HAVE_CPUINFO.

ok miod@


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.2 13-Jan-2006 millert

Make size_t, ssize_t, intptr_t and uintptr_t consistent amongst our
architectures. They are now defined as unsigned long, long, long
and unsigned long respectively.


# 1.1 06-Jan-2006 millert

Merge machine/ansi.h and machine/types.h into machine/_types.h and
rename the types using the __ protected namespace (e.g. __size_t).
Idea from FreeBSD.


# 1.24 19-Nov-2022 cheloha

mips64, loongson, octeon: switch to clockintr

- Remove mips64-specific clock interrupt scheduling bits from cpu_info.
- Add missing tick_nsec initialization to cpu_initclocks().
- Disable the glxclk interrupt clock on loongson. visa@/miod@ say it
can be removed later if it isn't useful for anything else.
- Wire up cp0_intrclock.

Notes:

- The loongson apm_suspend() changes are untested, but deraadt@ claims
APM suspend/resume on loongson doesn't work anyway.
- loongson and octeon now have a randomized statclock(), stathz = hz.

With input from miod@, visa@. Tested by miod@, visa@.

Link: https://marc.info/?l=openbsd-tech&m=166776379603497&w=2

ok visa@ mlarkin@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.23 05-Mar-2018 deraadt

#define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an arch
needs (looking at you sgi, but others required this before). This is for
the circumstances we need pagesize known at compile time, not getpagesize()
runtime. Use it for malloc storage sizes, for shm, and to set pthread stack
default sizes. The stack sizes were a mess, and pushing them towards
page-aligned is healthy move (which will also be needed by the coming
stack register checker)
ok guenther kettenis, discussion with stefan


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.22 21-Jan-2017 visa

Add _MIPS_ISA_MIPS32 and _MIPS_ISA_MIPS64 defines for clang.

OK deraadt@ phessler@ mpi@


# 1.21 03-Jan-2017 visa

Remove #define __SWAP_BROKEN from mips64. The architecture now
has a proper pmap_collect() implementation, and the current
uvm_swapout_threads() code does not need other MD interfaces.

OK miod@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.20 26-Sep-2015 guenther

lint is dead and C99 may be old enough to drive a car: delete LONGLONG
comments

ok millert@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.19 19-Mar-2014 guenther

It's safe to assumed 'signed' exists


Revision tags: OPENBSD_5_5_BASE
# 1.18 22-Feb-2014 miod

Increase _STACKALIGNBYTES to 15 (was 7), and make sure the stack is aligned
to a 16 byte boundary in csu (similar to what the other arches where
_STACKALIGNBYTES != _ALIGNBYTES do).
This is necessary for long double variables on the stack to be correctly
aligned.


# 1.17 18-Dec-2013 deraadt

Provide MI symbol _STACKALIGNBYTES


Revision tags: OPENBSD_5_4_BASE
# 1.16 13-Jul-2013 deraadt

unify register_t to long on all platforms
ok miod kettenis


# 1.15 05-Jul-2013 guenther

Take II, this time without flubbing off_t: : move several internal
type definitions that are the same across all archs from
<machine/_types.h> to <sys/_types.h>

ok deraadt@ kettenis@ otto@


# 1.14 04-Jul-2013 otto

backout previous; off_t must be signed and there might be other C++ API
breakage lurking; ok kettenis@


# 1.13 04-Jul-2013 guenther

To ease future changes, move several internal type definitions that are
the same across all archs from <machine/_types.h> to <sys/_types.h>

ok deraadt@


Revision tags: OPENBSD_5_3_BASE
# 1.12 05-Nov-2012 miod

unifdef -D __HAVE_TIMECOUNTER


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.11 15-Nov-2011 deraadt

label_t is the kernel setjmp buffer. It should simply be an array of
the right type, noone will ever fiddle with the internals.
discussed with jsing


# 1.10 08-Sep-2011 guenther

Provide namespace-safe alignment macros in <machine/_types.h>, with
compat names kept in <machine/param.h>. In <sys/socket.h>, pull
in <sys/_types.h> instead of the namespace polluting <machine/param.h>
and completely eliminate __CMSG_ALIGN, replaced by _ALIGN

ok deraadt@


# 1.9 08-Sep-2011 guenther

Make the INT_FAST*_{MIN,MAX} macros match the types they're defined to.
Since the underlying types of the int_fast types are set by machine/_types.h,
put internal macros in that same file and define the exposed
INT_FAST*_{MIN,MAX} macros from those.

ok millert@, kettenis@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.8 24-Nov-2010 miod

Floating-point emulation code for systems lacking proper FPU (i.e. Octeon),
enabled by option FPUEMUL.

This is pretty straightforward, except for conditional branch on FPU condition
codes emulation (bc1f/bc1fl/bc1t/bc1tl instructions): unlike most
RISC-with-delay-slots designs (m88k, sparc), the branch pipeline is not exposed
to the kernel on Mips, therefore we can not resume a branch without losing the
delay slot instruction.

Some other operating systems work around this issue by emulating the delay
slot instruction, but this is error-prone (and requires the kernel code to
be aware of all supported instructions of the processor it is currently running
on), some use dedicated breakpoints to single-step through the delay slot and
then resume the branch as expected, but this causes a lot of copy-on-write
allocations.

This code chooses a third path, of copying the delay slot instructions to run toa special `magic' page, followed by a special trap instruction to give control
back to the kernel. This makes sure the instruction will actually be run by the
processor, and that no more than one page per process is wasted, regardless of
the number of branches to emulate.

Tested on octeon (big-endian) by syuu@ and on loongson (little-endian) by me.
Note that enabling option FPUEMUL in the kernel will completely disable the
hardware FPU, if there is one; there is currently no way to build a kernel
supporting both hardware and software FPU, and there is no reason to change
this until there is a strong need to support both.


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.7 04-Nov-2009 kettenis

Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.

ok jsing@, miod@


Revision tags: OPENBSD_4_6_BASE
# 1.6 20-Mar-2009 miod

Switch sgi to __HAVE_GENERIC_SOFT_INTERRUPTS.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.5 21-Jul-2008 martynas

- add proper double_t and float_t definitions for each arch
- math.h shouldn't define FLT_EVAL_METHOD, but float.h should (per
C99). remove from math.h, and add proper definitions in float.h
ok millert@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 16-May-2007 art

The world of __HAVEs and __HAVE_NOTs is reducing. All architectures
have cpu_info now, so kill the option.

eyeballed by jsg@ and grange@


# 1.3 07-May-2007 kettenis

Move sgo to __HAVE_CPUINFO.

ok miod@


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.2 13-Jan-2006 millert

Make size_t, ssize_t, intptr_t and uintptr_t consistent amongst our
architectures. They are now defined as unsigned long, long, long
and unsigned long respectively.


# 1.1 06-Jan-2006 millert

Merge machine/ansi.h and machine/types.h into machine/_types.h and
rename the types using the __ protected namespace (e.g. __size_t).
Idea from FreeBSD.


# 1.23 05-Mar-2018 deraadt

#define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an arch
needs (looking at you sgi, but others required this before). This is for
the circumstances we need pagesize known at compile time, not getpagesize()
runtime. Use it for malloc storage sizes, for shm, and to set pthread stack
default sizes. The stack sizes were a mess, and pushing them towards
page-aligned is healthy move (which will also be needed by the coming
stack register checker)
ok guenther kettenis, discussion with stefan


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.22 21-Jan-2017 visa

Add _MIPS_ISA_MIPS32 and _MIPS_ISA_MIPS64 defines for clang.

OK deraadt@ phessler@ mpi@


# 1.21 03-Jan-2017 visa

Remove #define __SWAP_BROKEN from mips64. The architecture now
has a proper pmap_collect() implementation, and the current
uvm_swapout_threads() code does not need other MD interfaces.

OK miod@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.20 26-Sep-2015 guenther

lint is dead and C99 may be old enough to drive a car: delete LONGLONG
comments

ok millert@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.19 19-Mar-2014 guenther

It's safe to assumed 'signed' exists


Revision tags: OPENBSD_5_5_BASE
# 1.18 22-Feb-2014 miod

Increase _STACKALIGNBYTES to 15 (was 7), and make sure the stack is aligned
to a 16 byte boundary in csu (similar to what the other arches where
_STACKALIGNBYTES != _ALIGNBYTES do).
This is necessary for long double variables on the stack to be correctly
aligned.


# 1.17 18-Dec-2013 deraadt

Provide MI symbol _STACKALIGNBYTES


Revision tags: OPENBSD_5_4_BASE
# 1.16 13-Jul-2013 deraadt

unify register_t to long on all platforms
ok miod kettenis


# 1.15 05-Jul-2013 guenther

Take II, this time without flubbing off_t: : move several internal
type definitions that are the same across all archs from
<machine/_types.h> to <sys/_types.h>

ok deraadt@ kettenis@ otto@


# 1.14 04-Jul-2013 otto

backout previous; off_t must be signed and there might be other C++ API
breakage lurking; ok kettenis@


# 1.13 04-Jul-2013 guenther

To ease future changes, move several internal type definitions that are
the same across all archs from <machine/_types.h> to <sys/_types.h>

ok deraadt@


Revision tags: OPENBSD_5_3_BASE
# 1.12 05-Nov-2012 miod

unifdef -D __HAVE_TIMECOUNTER


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.11 15-Nov-2011 deraadt

label_t is the kernel setjmp buffer. It should simply be an array of
the right type, noone will ever fiddle with the internals.
discussed with jsing


# 1.10 08-Sep-2011 guenther

Provide namespace-safe alignment macros in <machine/_types.h>, with
compat names kept in <machine/param.h>. In <sys/socket.h>, pull
in <sys/_types.h> instead of the namespace polluting <machine/param.h>
and completely eliminate __CMSG_ALIGN, replaced by _ALIGN

ok deraadt@


# 1.9 08-Sep-2011 guenther

Make the INT_FAST*_{MIN,MAX} macros match the types they're defined to.
Since the underlying types of the int_fast types are set by machine/_types.h,
put internal macros in that same file and define the exposed
INT_FAST*_{MIN,MAX} macros from those.

ok millert@, kettenis@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.8 24-Nov-2010 miod

Floating-point emulation code for systems lacking proper FPU (i.e. Octeon),
enabled by option FPUEMUL.

This is pretty straightforward, except for conditional branch on FPU condition
codes emulation (bc1f/bc1fl/bc1t/bc1tl instructions): unlike most
RISC-with-delay-slots designs (m88k, sparc), the branch pipeline is not exposed
to the kernel on Mips, therefore we can not resume a branch without losing the
delay slot instruction.

Some other operating systems work around this issue by emulating the delay
slot instruction, but this is error-prone (and requires the kernel code to
be aware of all supported instructions of the processor it is currently running
on), some use dedicated breakpoints to single-step through the delay slot and
then resume the branch as expected, but this causes a lot of copy-on-write
allocations.

This code chooses a third path, of copying the delay slot instructions to run toa special `magic' page, followed by a special trap instruction to give control
back to the kernel. This makes sure the instruction will actually be run by the
processor, and that no more than one page per process is wasted, regardless of
the number of branches to emulate.

Tested on octeon (big-endian) by syuu@ and on loongson (little-endian) by me.
Note that enabling option FPUEMUL in the kernel will completely disable the
hardware FPU, if there is one; there is currently no way to build a kernel
supporting both hardware and software FPU, and there is no reason to change
this until there is a strong need to support both.


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.7 04-Nov-2009 kettenis

Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.

ok jsing@, miod@


Revision tags: OPENBSD_4_6_BASE
# 1.6 20-Mar-2009 miod

Switch sgi to __HAVE_GENERIC_SOFT_INTERRUPTS.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.5 21-Jul-2008 martynas

- add proper double_t and float_t definitions for each arch
- math.h shouldn't define FLT_EVAL_METHOD, but float.h should (per
C99). remove from math.h, and add proper definitions in float.h
ok millert@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 16-May-2007 art

The world of __HAVEs and __HAVE_NOTs is reducing. All architectures
have cpu_info now, so kill the option.

eyeballed by jsg@ and grange@


# 1.3 07-May-2007 kettenis

Move sgo to __HAVE_CPUINFO.

ok miod@


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.2 13-Jan-2006 millert

Make size_t, ssize_t, intptr_t and uintptr_t consistent amongst our
architectures. They are now defined as unsigned long, long, long
and unsigned long respectively.


# 1.1 06-Jan-2006 millert

Merge machine/ansi.h and machine/types.h into machine/_types.h and
rename the types using the __ protected namespace (e.g. __size_t).
Idea from FreeBSD.


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.22 21-Jan-2017 visa

Add _MIPS_ISA_MIPS32 and _MIPS_ISA_MIPS64 defines for clang.

OK deraadt@ phessler@ mpi@


# 1.21 03-Jan-2017 visa

Remove #define __SWAP_BROKEN from mips64. The architecture now
has a proper pmap_collect() implementation, and the current
uvm_swapout_threads() code does not need other MD interfaces.

OK miod@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.20 26-Sep-2015 guenther

lint is dead and C99 may be old enough to drive a car: delete LONGLONG
comments

ok millert@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.19 19-Mar-2014 guenther

It's safe to assumed 'signed' exists


Revision tags: OPENBSD_5_5_BASE
# 1.18 22-Feb-2014 miod

Increase _STACKALIGNBYTES to 15 (was 7), and make sure the stack is aligned
to a 16 byte boundary in csu (similar to what the other arches where
_STACKALIGNBYTES != _ALIGNBYTES do).
This is necessary for long double variables on the stack to be correctly
aligned.


# 1.17 18-Dec-2013 deraadt

Provide MI symbol _STACKALIGNBYTES


Revision tags: OPENBSD_5_4_BASE
# 1.16 13-Jul-2013 deraadt

unify register_t to long on all platforms
ok miod kettenis


# 1.15 05-Jul-2013 guenther

Take II, this time without flubbing off_t: : move several internal
type definitions that are the same across all archs from
<machine/_types.h> to <sys/_types.h>

ok deraadt@ kettenis@ otto@


# 1.14 04-Jul-2013 otto

backout previous; off_t must be signed and there might be other C++ API
breakage lurking; ok kettenis@


# 1.13 04-Jul-2013 guenther

To ease future changes, move several internal type definitions that are
the same across all archs from <machine/_types.h> to <sys/_types.h>

ok deraadt@


Revision tags: OPENBSD_5_3_BASE
# 1.12 05-Nov-2012 miod

unifdef -D __HAVE_TIMECOUNTER


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.11 15-Nov-2011 deraadt

label_t is the kernel setjmp buffer. It should simply be an array of
the right type, noone will ever fiddle with the internals.
discussed with jsing


# 1.10 08-Sep-2011 guenther

Provide namespace-safe alignment macros in <machine/_types.h>, with
compat names kept in <machine/param.h>. In <sys/socket.h>, pull
in <sys/_types.h> instead of the namespace polluting <machine/param.h>
and completely eliminate __CMSG_ALIGN, replaced by _ALIGN

ok deraadt@


# 1.9 08-Sep-2011 guenther

Make the INT_FAST*_{MIN,MAX} macros match the types they're defined to.
Since the underlying types of the int_fast types are set by machine/_types.h,
put internal macros in that same file and define the exposed
INT_FAST*_{MIN,MAX} macros from those.

ok millert@, kettenis@


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.8 24-Nov-2010 miod

Floating-point emulation code for systems lacking proper FPU (i.e. Octeon),
enabled by option FPUEMUL.

This is pretty straightforward, except for conditional branch on FPU condition
codes emulation (bc1f/bc1fl/bc1t/bc1tl instructions): unlike most
RISC-with-delay-slots designs (m88k, sparc), the branch pipeline is not exposed
to the kernel on Mips, therefore we can not resume a branch without losing the
delay slot instruction.

Some other operating systems work around this issue by emulating the delay
slot instruction, but this is error-prone (and requires the kernel code to
be aware of all supported instructions of the processor it is currently running
on), some use dedicated breakpoints to single-step through the delay slot and
then resume the branch as expected, but this causes a lot of copy-on-write
allocations.

This code chooses a third path, of copying the delay slot instructions to run toa special `magic' page, followed by a special trap instruction to give control
back to the kernel. This makes sure the instruction will actually be run by the
processor, and that no more than one page per process is wasted, regardless of
the number of branches to emulate.

Tested on octeon (big-endian) by syuu@ and on loongson (little-endian) by me.
Note that enabling option FPUEMUL in the kernel will completely disable the
hardware FPU, if there is one; there is currently no way to build a kernel
supporting both hardware and software FPU, and there is no reason to change
this until there is a strong need to support both.


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.7 04-Nov-2009 kettenis

Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.

ok jsing@, miod@


Revision tags: OPENBSD_4_6_BASE
# 1.6 20-Mar-2009 miod

Switch sgi to __HAVE_GENERIC_SOFT_INTERRUPTS.


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.5 21-Jul-2008 martynas

- add proper double_t and float_t definitions for each arch
- math.h shouldn't define FLT_EVAL_METHOD, but float.h should (per
C99). remove from math.h, and add proper definitions in float.h
ok millert@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 16-May-2007 art

The world of __HAVEs and __HAVE_NOTs is reducing. All architectures
have cpu_info now, so kill the option.

eyeballed by jsg@ and grange@


# 1.3 07-May-2007 kettenis

Move sgo to __HAVE_CPUINFO.

ok miod@


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.2 13-Jan-2006 millert

Make size_t, ssize_t, intptr_t and uintptr_t consistent amongst our
architectures. They are now defined as unsigned long, long, long
and unsigned long respectively.


# 1.1 06-Jan-2006 millert

Merge machine/ansi.h and machine/types.h into machine/_types.h and
rename the types using the __ protected namespace (e.g. __size_t).
Idea from FreeBSD.