Commit Graph

486 Commits

Author SHA1 Message Date
christos
d84c286204 expose the kernel types for standalone code. 2016-01-23 22:31:19 +00:00
christos
4d497c90e6 Hide {p,v}{addr,size}_t and register_t (and a couple more types that
are machine-specific) from userland unless _KERNEL/_KMEMUSER and a
new _KERNTYPES variables is defined. The _KERNTYPES should be fixed
for many subsystems that should not be using it (rump)...
2016-01-23 21:22:13 +00:00
ozaki-r
01554394be Fix #endif; it should be after __END_DECLS
This unbreaks the build of sun2.
2016-01-05 00:47:08 +00:00
christos
d075aff38a disable code that does not work for sun2/coldfire 2015-12-29 16:02:37 +00:00
christos
3f78fc62e3 make this compile for c++ 2015-12-25 16:19:38 +00:00
christos
3feb613f34 get rid of dup fenv. 2015-12-25 06:03:06 +00:00
christos
d5137ecf34 fenv for m68k 2015-12-24 14:12:39 +00:00
christos
b88569ce68 For processors that have memory breakpoints, add macros for them to help
libproc
2015-09-25 16:05:17 +00:00
christos
5020ab68d5 Provide access to pc/sp/syscall-return registers like we have for mcontext 2015-09-15 15:49:02 +00:00
pooka
01d7ebdd80 Fix PTHREAD_FOO_INITIALIZER for C++ by not using volatile in the relevant
pthread types in C++ builds, attempt 2.

The problem with attempt 1 was making assumptions of what the MD
__cpu_simple_lock_t (declared volatile) looks like.  To get a same type
except non-volatile, we change the MD type to __cpu_simple_lock_nv_t
and typedef __cpu_simple_lock_t as a volatile __cpu_simple_lock_nv_t.
IMO, __cpu_simple_lock_t should not be volatile at all, but changing it
now is too risky.

Fixes at least Rumprun w/ gcc 5.1/5.2.  Furthermore, the mpd application
(and possibly others) will no longer require NetBSD-specific patches.

Tested: build.sh for i386, Rumprun for x86_64 w/ gcc 5.2.

Based on the patch from Christos in lib/49989.
2015-08-27 12:30:50 +00:00
martin
e7a3928268 Make clock_t unsigned int everywhere.
Ok: matt@, mrg@
2015-06-17 14:32:31 +00:00
martin
1e232ed083 Revert previous (SCN*FAST*) and make PRI*FAST* identical.
Should fix the default (gcc 4.5 based) build.
2014-08-17 20:22:41 +00:00
martin
b9e7c24bbc Fix the SCN*FAST* defines 2014-08-15 08:59:58 +00:00
martin
adeb9b3e44 Fix editor mishap 2014-08-15 07:53:37 +00:00
matt
82a12988ef Include <sys/common_int_types.h> if __UINTPTR_TYPE__ is defined. 2014-08-13 22:56:56 +00:00
matt
0b2cac531b Include <sys/common_int_const.h> if __INTMAX_C_SUFFIX__ is defined. 2014-08-13 22:51:58 +00:00
matt
7c5094c243 Include <sys/common_init_limits.h> if __SIG_ATOMIC_MAX__ is defined. 2014-08-13 22:31:06 +00:00
matt
2534797f07 include <sys/common_int_mwgwtypes.h> if __UINT_FAST64_TYPE__ is defined. 2014-08-13 22:25:39 +00:00
matt
efe99ca41d include <sys/common_int_fmtio.h> if __INTPTR_FMTd__ is defined 2014-08-13 19:48:17 +00:00
matt
8ed9a6d892 Since all our compilers support __DBL_* and __FLT_*, use them to define
{DBL,FLT}_{DIG,MIN,MAX}
2014-04-21 10:53:47 +00:00
riastradh
6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
dsl
95739e63cd Remove __HAVE_PROCESS_XFPREGS and add the extra parameter for the size
of the fp save area to all the process_read_fpregs() and
  process_write_fpregs() functions.
None of the functions have been modified to use the new parameters.
The size is set for all the writes, but some of the arch-specific reads
  just pass NULL.
The amd64 (and i386) need variable sized fp register save areas in order
  to support AVX and other enhanced register areas.
These functions are rarely called - so the extra argument won't matter.
2014-01-04 00:10:02 +00:00
joerg
4d12bfcd15 Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
2013-09-12 15:36:14 +00:00
matt
cc2211c874 pte and pmap files for the soft tlb on coldfire cpus.
(uncompiled and mostly probably wrong.)
2013-07-18 22:24:53 +00:00
matt
8f26ebd43e Adjust LEA_LCL, GOT_SETUP, INTERRUPT_{SAVE,RESTORE}REG for Coldfire 2013-07-18 22:21:31 +00:00
matt
a515bdc6b9 Teach to use coldfire isac byterev if available, otherwise let the compiler
figure it since there is rorw instruction to fall back on.
2013-07-18 22:20:48 +00:00
matt
76ed77addb Fix some definitions 2013-07-18 22:18:31 +00:00
matt
2b6e03e7ed Coldfire FPU looks like the 68010 FPU (no long double) 2013-07-18 22:17:57 +00:00
matt
68f3caa6de Export fpreg.h for libc 2013-07-17 05:42:02 +00:00
matt
7b231464eb Make INTERRUPT_{SAVE,RESTORE}REG visible to userland 2013-07-16 23:01:05 +00:00
matt
b3065f5358 Remove non __ELF__ clauses.
Add GOT_SETUP and LEA_LCL macros.
2013-07-16 22:23:15 +00:00
matt
b97b6cbaca Add an END macro. reorder EXTBL macro 2013-07-16 21:01:03 +00:00
christos
caafbf4e1b add missing SSIZE_MIN 2013-04-11 00:57:34 +00:00
matt
f96ef7b3c5 Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
2012-07-27 05:36:09 +00:00
christos
7484a2dbbe - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
2012-03-28 17:03:27 +00:00
he
b83eb5c056 Use c89 function declarations in MCOUNT definition. 2012-03-21 19:59:18 +00:00
rmind
ad12c77015 Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
2012-02-19 21:05:51 +00:00
mlelstv
780696aa56 Enable build of crash(8) for m86k platforms. 2012-01-31 21:17:57 +00:00
christos
dd23e71080 Use and define ALIGN() ALIGN_POINTER() and STACK_ALIGN() consistently,
and avoid definining them in 10 different places if not needed.
2012-01-24 20:03:36 +00:00
joerg
e8bec33be1 Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
2012-01-20 14:08:04 +00:00
tsutsui
71bf9b8ae5 Adjust for function merge and move. 2011-12-22 15:50:37 +00:00
tsutsui
a894edf538 Remove obsolete header. 2011-12-22 15:07:08 +00:00
joerg
6133e96c53 Add TLS support for m68k. 2011-11-22 15:25:28 +00:00
tsutsui
556c80110c Merge copy-and-pasted fpu_probe() function (to share it among more m68k ports).
Tested on TT030, Sun3/80, and X68030.
2011-11-15 12:23:21 +00:00
tsutsui
733d468b24 Use pool(9) for struct pv_entry allocations rather than
uvm_km_alloc(9)/uvm_km_free(9) and ancient homegrown pv_page_info structures.

Calling uvm_km_free(9) during pmap_remove(9) could cause rw_lock error
in uvm_unmap1() as noted in PR port-m68k/45519.

NetBSD/x68k (both real X68030 and XM6i emulator) still gets weird panic
(corrupted kernel stack pointer?) on some heavy load:
---
panic: MMU fault
Stopped in pid 363.1 (X68k) at  netbsd:cpu_Debugger+0x6:	unlk	a6
db> tr
cpu_Debugger(4012004,8,1cbb528,2a618e0,2a5b000) + 6
db>
---
but it also occurs without this change so there might be some more bugs
in m68k pmap...
2011-10-29 18:26:19 +00:00
rkujawa
3db9494741 Move CACHELINE_* from bus_dma.c to cpu.h (needed for PCI configuration on amiga port). 2011-09-19 19:17:05 +00:00
joerg
3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
wiz
4cbd24b23f dependant -> dependent 2011-06-30 20:09:15 +00:00
tsutsui
7eb0284e74 - remove simple_lock(9) and use atomic_ops(3) to account pmap reference count,
perrequest from rmind@
- while here no need to export struct pmap on sun2/sun3/sun3x

No particular problem for a week on hp300 and sun3x kernels with disabled
tcp_vtw which has been broken for a month on low memory machines.
2011-06-03 17:03:52 +00:00
joerg
a2bf8e5d19 Introduce DDB_EXPR_FMT and replace the logic around DB_EXPR_T_IS_QUAD. 2011-05-26 15:34:12 +00:00