Commit Graph

283 Commits

Author SHA1 Message Date
christos 62a2dac0d8 whitespace... 1999-05-04 13:57:19 +00:00
christos c596c324e3 Define __builtin_*() for lint 1999-05-03 16:30:31 +00:00
kleink d34d0ccf51 * Change multiple inclusion protection symbols to use the standard naming
convention (not that it should matter for assembly).
* Provide an additional set of _C_LABEL() macros for ELF.
* Provide a PIC_PLT() macro for the benefit of ELF.
1999-05-01 19:20:52 +00:00
kleink ed74932033 Add COMPAT_SVR4 for m68k. 1999-04-19 21:22:56 +00:00
kleink 36e329cd5b Define FP as a synonym for A6. 1999-04-19 21:19:08 +00:00
kleink 6a9c669828 Move linux_reenter_syscall() to a common location and rename it to
reenter_syscall() - it's going to be shared with COMPAT_SVR4 and soon be
used by native code.
1999-04-19 20:58:37 +00:00
kleink a3417847c3 * Declaration mismatch: len is a size_t, not a pointer to one.
* Userlevel header: remove argument names from declaration, use
__{BEGIN,END}_DECLS to ensure correct linkage.
1999-04-13 16:52:37 +00:00
thorpej a77ccfe460 Garbage-collect. 1999-03-20 01:40:25 +00:00
hubertf dcd5f59c0a RCS ID police 1999-02-15 04:14:54 +00:00
is b0f697496e Provide a minimal instruction/data cache synchronization C binding.
(The function has always been in the kernels as special trap #12).
In response to PR 4951 by Hauke Fath.
1999-02-09 22:32:33 +00:00
mycroft 897a8a7f29 Mark [hn]to[nh][ls]() with __const__, so they are subject to CSE. 1999-01-24 12:55:01 +00:00
mycroft ec253b6315 Use __builtin_next_arg(). Fixed PR 6862. 1999-01-22 14:14:32 +00:00
bouyer dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00
thorpej da572a137f Argh, fix the ANSI CPP version of the a.out WARN_REFERENCES(). 1998-12-02 21:16:46 +00:00
thorpej a6f7e0c05a Implement WARN_REFERENCES(). 1998-12-02 00:58:42 +00:00
thorpej aaec09ab91 Pull in <m68k/frame.h> if __M68K_SIGNAL_PRIVATE, for sigstate. 1998-09-30 21:52:45 +00:00
thorpej f6ea7521d7 Put the sigstate and sigframe definitions in signal.h, protected by
__M68K_SIGNAL_PRIVATE.
1998-09-30 21:04:48 +00:00
mycroft b7f86e40fa The smallest positive normalized number in extended precision is 2^-16383.
Underflow handling is different from i387.
1998-09-27 04:54:49 +00:00
thorpej 43f5b65e23 Define the new sigcontext structure. 1998-09-15 23:14:40 +00:00
thorpej a034a22862 Need 21 longs for jmp_buf now, due to 128-bit signal mask (and use
of the sigcontext structure in the jmp_buf).
1998-09-15 23:06:41 +00:00
leo a27ab73aae Nuke vm_offset_t/vm_size_t. 1998-09-02 11:16:31 +00:00
eeh a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
kleink 546365a27e _POSIX_SOURCE -> _POSIX_C_SOURCE 1998-08-06 11:25:04 +00:00
mycroft a24dbc8065 (Always) (practice) (safe) (macro expansion). 1998-07-31 15:07:41 +00:00
mycroft da2e61d160 Delint. 1998-07-27 13:55:32 +00:00
is 2a78f6986c no semicolon, please 1998-07-25 09:24:17 +00:00
veego 1b46ebe1d9 Add elf_machdep.h to the INCS list. 1998-07-12 17:53:29 +00:00
thorpej 2aaf359b9f Add m68k relocation types. 1998-07-12 01:39:06 +00:00
thorpej 639cc899cf Basic elf_machdep.h for m68k; doesn't include relocations, yet. 1998-07-12 01:17:58 +00:00
kleink 1fbd0b3749 GC the unused `physadr' type, which was not able to hold a complete physical
address on 2 architectures anyhow.  Also, move the definition of the `label_t'
type inside _KERNEL protection, since it is specific to the in-kernel
setjmp()/longjmp() implementations.
1998-06-14 20:09:22 +00:00
cgd 651b44e211 Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install.  (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.)  The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change.  Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
kleink a97fc2f180 If any of _ANSI_SOURCE, _POSIX_C_SOURCE or _XOPEN_SOURCE are defined, don't
provide any identifiers other than sig_atomic_t.
1998-05-25 20:59:01 +00:00
thorpej 1686aca01d Pull in opt_gateway.h as appropriate. 1998-04-29 23:11:00 +00:00
kleink a53c1863fe Provide definitions for intptr_t and uintptr_t, signed resp. unsigned integral
types large enough to hold any pointer.
1998-04-27 17:39:10 +00:00
veego b6ca941200 Sync it with the i386 version so lint doesn't complains about an syntax
error for __warn_references.
1998-02-28 12:20:25 +00:00
mycroft d47ec6f1ae Include correct information for long doubles (mc68881 extended precision). 1998-02-18 10:24:45 +00:00
mycroft b5c132e4d2 Prototype __flt_rounds() consistently. 1998-02-03 01:26:20 +00:00
perry 6f57e5c573 multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom) 1998-01-09 22:23:44 +00:00
thorpej 8cbc5caabb The user segment table pointer is no longer kept here. Change it to
a spare field.
1998-01-06 06:46:05 +00:00
perry 015e898c02 RCSID Police. 1998-01-05 07:02:46 +00:00
kleink 66c2794142 Add _BSD_SUSECONDS_T_ and _BSD_USECONDS_T_; do some space vs. tab formatting
cleanup
1997-11-23 20:20:53 +00:00
thorpej 0b04d28454 Mark uses of long long with /* LONGLONG */ for lint. From
Chris Demetriou <cgd@pa.dec.com>.
1997-11-05 04:36:08 +00:00
thorpej 53a8f81b2f inline -> __inline 1997-11-05 04:13:24 +00:00
thorpej b868a7c2ab asm -> __asm__, volatile -> __volatile 1997-11-05 03:57:52 +00:00
thorpej 4730a8cbec Bug fixes and cleanup from Chris Demetriou <cgd@pa.dec.com>:
- fix _C_LABEL so that it actually works.
- make __RENAME use _C_LABEL.
- fix __RENAME so that it expects an unquoted argument.
- fix __indr_reference and __warn_references so that they
  supply their own final semicolon.
- define __warn_references to nothing if not GNU C (required
  by the way it's used).

The __warn_references semicolon change has to be made
so that __warn_references can be defined into nothing.
(A ; all by itself isn't a great idea.)  The __indr_reference
change was made for consistency.
1997-11-04 23:09:23 +00:00
thorpej 665f7d1a6e Implement __RENAME() in <machine/cdefs.h> 1997-10-22 05:20:32 +00:00
gwr 5665df7a14 comments 1997-10-21 19:15:33 +00:00
gwr 0e5142a525 Move the (boiled down) interface declarations into m68k.h
Too late for the release, unfortunately...
1997-10-21 18:03:56 +00:00
gwr 9215c4253e Declarations for things exported by sources in this directory.
(i.e. stuff that does not belong in <machine/cpu.h>)
1997-10-21 17:23:23 +00:00
leo a1025a03cc Correct TBIS_20 parameters, add DCFA/DCPA defines for the 020/030 (From
Ignatios).
1997-10-13 11:21:12 +00:00
leo 49867b6097 Correct TBIS_20 parameters, add DCFA/DCPA defines for the 020/030 (From
Ignatios).
1997-10-13 11:21:09 +00:00
bouyer 6ab3092b11 Add byte-swapping functions (bswap16, bswap32, bswap64) to libkern.
Only assembly version for i386 bswap16 and bswap32 for now (bswap64 uses
bswap32). Contribution of assembly versions of these are welcome.
Add byte-swapping of ext2fs metadata for big-endian systems.
Tested on i386 and sparc.
1997-10-09 15:42:19 +00:00
thorpej 0e22d3b5a3 Copyright assigned to The NetBSD Foundation. 1997-10-04 17:34:08 +00:00
leo c5ba7a3102 Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
1997-09-20 12:06:37 +00:00
leo 00a1b6300f Add DCFA() definitions. 1997-09-15 11:12:13 +00:00
thorpej b88b183ab5 Don't have kernel vs. non-kernel versions of _ENTRY(); there's no
reason to omit the .type directive in the kernel case.
1997-07-14 07:44:56 +00:00
veego 78996821fa Move the defines of UPAGES and NPTEPG back to the MD param.h, execpt that
the sun3[x] doesn't use NPTEPG.
1997-07-10 08:22:09 +00:00
thorpej 0404c01c46 #define DB_AOUT_SYMBOLS 1997-06-26 01:26:56 +00:00
veego f7d1a9f167 Add the 'Mach derived conversion macros' from <arch>/include/param.h. 1997-06-10 18:21:23 +00:00
veego 451bfcbc85 New MI include file. Based on the param.h from all m68k ports. 1997-06-10 07:51:43 +00:00
leo 6793c446f0 An attempt to make a generic m68k implementation for cache control operations.
Not yet completely finished.
1997-06-02 20:26:37 +00:00
mycroft 90f17dd8ab Oops; put the __attribute__ in the right place. 1997-05-03 12:49:05 +00:00
mycroft a60739aacf Make sure struct trapframe is packed tightly. 1997-05-03 10:16:58 +00:00
gwr 7a80e420ed Remove unused part of sun3_kcore_hdr. 1997-05-01 22:48:09 +00:00
thorpej 658ce85446 Add several useful macros:
- ENTRY_NOPROFILE() and ASENTRY_NOPROFILE(), similar to ENTRY() and
  ASENTRY(), but without the profiling prologue.
- GLOBAL()/ASGLOBAL() and LOCAL()/ASLOCAL(), for defining global and
  local variables with C and ASM labels.
- BSS()/ASBSS(), for defining items in the BSS segment, with C or
  ASM labels.
- PANIC("panic message") - shorthand for calling panic() from assembly code.
- VECTOR(), ASVECTOR(), VECTOR_UNUSED - shorthand for defining entries
  in the vector table.
Also, change RCSID() to pad out the string to even boundary.
1997-04-24 22:49:39 +00:00
thorpej e59a1e5e15 Garbage-collect some things no longer needed since there are no longer
m68k4k ports.
1997-04-09 23:34:29 +00:00
thorpej c739bf6e79 New kcore.h for m68k, includes all possible m68k formats in a self-describing
layout, facilitating sharing libkvm on all m68ks.

NOTE: This changes the crash dump format of all m68k ports that use the
new libkvm!
1997-04-09 19:25:00 +00:00
thorpej 2f5b398ad4 Prototype regdump(). 1997-04-09 19:21:06 +00:00
leo 92b96871ea Turn the 'extern' definition of mcount() into a full prototype. 1997-04-08 20:39:01 +00:00
gwr b43ee24829 Need a common <m68k/pcb.h> for gdb. 1997-03-31 21:32:26 +00:00
gwr 0a928acbfc Remove some unnecessary <vm/*> headers. Have to keep <vm/vm_param.h>,
at least until boolean_t moves to <sys/types.h> or someplace...
Also make ddb_regs extern here.  Closes PR#3213
1997-02-18 22:29:58 +00:00
gwr 09cc42f318 Add kgdb_reg_t, KGDB_NUMREGS, KGDB_BUFLEN 1997-02-12 00:59:46 +00:00
gwr ea3925f508 FIXUP_PC_AFTER_BREAK now takes an arg of type db_regs_t * 1997-02-06 21:16:28 +00:00
scottr 6d39698236 db_expr_t is now a long. 1997-02-05 05:10:24 +00:00
thorpej de70c1051d prototype mappedcopy{in,out}(), {copy,zero}page(). 1997-02-02 06:56:57 +00:00
gwr b0f4781a3d Include <machine/frame.h> and typedef db_regs_t using struct trapframe
(instead of replicating trapframe here by a different name).  Update the
macros that refer to members of db_regs_t to use the trapframe members.
1997-01-27 23:02:55 +00:00
gwr 09fa19ebb5 Protect this agains multiple includes so it can be included by db_machdep.h 1997-01-27 22:58:45 +00:00
gwr 6e961cf5de Use db_regs_t instead of struct mc68020_saved_state 1997-01-15 23:11:46 +00:00
gwr 661c8f1ae0 CTL_MACHDEP definitions. (Common to all m68k ports.)
This should be included by each m68k port's cpu.h so
/usr/sbin/sysctl can be shared on all of them.
1996-12-17 19:26:51 +00:00
gwr a25e8be772 Add prototypes for process_read_regs, etc. (fix warnings) 1996-12-17 19:24:31 +00:00
jtc 9da5f60715 PROF -> GPROF 1996-11-30 02:48:57 +00:00
jtc 16b48272c4 Define _BSD_CLOCKID_T_ and _BSD_TIMER_T_ 1996-11-15 22:38:45 +00:00
christos cabe1f09ff use in_addr_t and in_port_t 1996-10-13 02:59:54 +00:00
cgd 472889f8e4 moved to aout_machdep.h (via repository copy) 1996-10-08 12:57:37 +00:00
ws 5804d3f648 PowerPC port 1996-09-30 16:34:14 +00:00
jtc d137b0e8ba Added new macro _PROF_PROLOG which contains the code sequence needed
to call mcount().  This is needed because the ``link a6,#0'' insn used
trips up gcc's ANSI preprocessor (A # in a function-type macro must be
followed by a macro argument).  _PROF_PROLOG is also used in the i386
asm.h.

Solaris' asm_linkage.h has a MCOUNT macro similar to _PROF_PROLOG
except it expands to different code sequences based on whether a
function is being compiled with "prof" or "gprof" instrumentation.

I also discovered that the m68k ALTENTRY is very different than the
implementation used by other NetBSD ports.  Usually ALTENTRY simply
provides an alternate function entry point.  The m68k version takes a
second argument and jumps inside the second function when profiling is
enabled.  The m68k behavior is similar to the ENTRY2 macro found in
solaris.

Providing ENTRY2 and changing all the code that uses ALTENTRY to use
it would be a desirable change.
1996-09-24 00:05:55 +00:00
leo 2eccad6548 Add macro's that do bclr/bset in a single instruction. 1996-09-16 06:03:58 +00:00
thorpej 22adc20819 Add an FPU_UNKNOWN constant; just a placeholder for any unknown FPU. 1996-09-12 02:52:34 +00:00
thorpej 521a717f6d Factor out common Motorola 68k CPU definitions from the m68k port
cpu.h header files.

Some more work could be done here, but it's a good start.
1996-09-11 00:08:52 +00:00
thorpej c5e5dec3b7 All of the m68k ports' exec.h's were essentially the same. Merge them.
Override the N_PAGSIZ() macro; this one checks the MID of the executable
and returns the appropriate page size.
1996-09-08 00:57:29 +00:00
thorpej f124a6aaa9 Back out previous; this is a bigger problem than I expected. 1996-08-14 00:32:53 +00:00
thorpej a05a1045f7 The htonl(), htons(), etc. functions return u_long and u_short. Add
casts to the big-endian versions of these calls so that the compiler
won't complain when they're passed as arguments to printf().
1996-08-14 00:07:35 +00:00
is d3ad3efef5 3 more constants for 68060 access error trap stack frames. 1996-05-16 16:51:30 +00:00
leo dc05f2d48c Prototype + -Wall fixes. 1996-04-29 20:50:08 +00:00
briggs efa0c4d683 Make NTOH[SL] and HTON[SL] (void) (x) instead of (x) to get around
compiler warnings.  Followed the lead set in the sparc port.
1996-03-29 01:40:31 +00:00
jtc 2ce5f1478b Add _BSD_WINT_T_ definition so we can handle wint_t type added in NA1. 1996-03-16 01:31:45 +00:00
is 905b10d4bc M68060 additional frame formats and bits. Closes PR 1174.
This shouldn't break anything; I find ... grep ... all the relevant
kernel sources subdirecotry trees I could think of for the defines
that don't use the new FSLW or FPF6 prefix. But in case it does anyway,
tell me immediately.
1996-03-12 22:21:51 +00:00
leo 2273338717 Add the include files and the atari kernel support for new format panic
dumps.
1996-03-10 21:54:44 +00:00
mycroft cd8fe86bcb Make the type of __builtin_va_list a long. 1995-12-26 01:16:24 +00:00
mycroft 0c00214737 Use __builtin_va_alist. 1995-12-26 00:19:09 +00:00
mycroft fa887628d8 Stylistic changes. 1995-12-25 23:15:31 +00:00
mycroft d1de691efb Stylistic changes. 1995-12-25 22:22:02 +00:00
mycroft 0199e002ad Update for GCC 2.7, and fix bugs. 1995-12-25 21:41:08 +00:00
jtc f269c3f49e Fix bug when the second argument of va_start was a char, short or float.
(ie. not promoted); fixes PR# 1193.  Thanks to Bernd Ernesti and Markus
Wild.
1995-09-07 01:20:15 +00:00
cgd 479fb9e45b add <sys/cdefs.h> inclusions. namsspace-protect physadr, label_t
def'ns against _POSIX_SOURCE and _ANSI_SOURCE.
1995-07-06 03:39:32 +00:00
jtc 55fbbc705d Wrap with #ifndef _XXX_FLOAT_H_/#define _XXX_FLOAT_H_/ ... /#endif. 1995-06-20 20:45:22 +00:00
jtc 1d65cdd4ab #include <sys/cdefs.h>.
Wrap __flt_rounds() declaration with __BEGIN_DECLS/__END_DECLS.
1995-06-20 20:32:22 +00:00
mycroft c52debae3f Redefine the first part of struct frame to be a struct trapframe, and add a
struct switchframe.
1995-05-12 12:45:24 +00:00
chopps 4567f74662 add stdframe (4-word frame) 1995-05-12 00:01:05 +00:00
mycroft 4b5c13c2c7 Shift the bit positions. 1995-04-09 23:29:22 +00:00
mycroft e957423a98 Move fp_except and fp_rnd definitions to machine/include. 1995-04-09 21:31:58 +00:00
jtc 7a5da7fda2 Changed FLT_ROUNDS from constant to a call to __flt_rounds(), so that the
current rounding mode is accurately reported.
1995-04-07 00:44:37 +00:00
briggs 71a63538b8 KERNEL -> _KERNEL 1995-03-26 17:08:36 +00:00
jtc f86410093b Changed name of __weak_reference() to __indr_reference(). They really
are indirect references, and I want to add a real __weak_reference()
macro to <machine/cdefs.h> soon.
1995-03-23 19:58:48 +00:00
jtc 830a53e394 ANSI says that <stdarg.h>'s va_end macro must expand to a void expression.
For consistancy, I'm changing <varargs.h> too.
1995-01-28 01:51:46 +00:00
mycroft 70442b438d Add struct fpreg. 1995-01-26 19:48:48 +00:00
mycroft e3a9f05f7d Add PT_[GS]ETFPREGS. 1995-01-26 19:47:10 +00:00
mycroft 1783c9f972 Rearrange struct reg to match what the rest of the world expects. 1995-01-26 18:26:01 +00:00
jtc 9540190d45 This file, which will be included by <sys/cdefs.h>, will contain macros
such as __warn_references() and __weak_reference() which are actually
machine dependant.  This will make it easier for ports that are being
bootstraped with ELF and ECOFF based toolchains.

This change also introduces a new macro, _C_LABEL(x).  _C_LABEL expands
its argument, an identifier, to a character string of the identifier
name as it is represented in an object file.

For most ports, _C_LABEL(x) will expand to "_x", for ELF based ports
_C_LABEL(x) will expand to "x".
1995-01-19 01:38:36 +00:00
jtc d7a8b2964f Only define sig_atomic_t when _ANSI_SOURCE is defined. 1995-01-10 19:01:00 +00:00
cgd 7b8535b554 do the right thing with strange-sized varargs objects. 1994-12-28 22:45:42 +00:00
cgd e5049f4d59 make the definition of _JBLEN mach. dep. header-dependent. 1994-12-20 10:36:27 +00:00
cgd 57fb77a14e new RCS ID format. 1994-10-26 07:48:18 +00:00
cgd 5aea0d3fd2 update for new syscall args description mechanism 1994-10-20 04:46:23 +00:00
cgd f501e4e128 make <stdarg.h> a symlink, and clean up ports' stdarg.h and varargs.h files. 1994-10-15 04:57:29 +00:00
mycroft cbe87dbb9c Remove BYTE_MSF. 1994-10-09 09:21:53 +00:00
jtc badcc17a6d Add constants required by XPG3 1994-10-05 17:16:29 +00:00
cgd 3fbc338a62 define __BIT_TYPES_DEFINED__ for compatibility with things like BIND and nvi 1994-07-20 05:44:19 +00:00
deraadt 50b13742e4 _MACHINE_VARGS_H_ 1994-06-29 00:45:01 +00:00
cgd 4d7a245049 can't use u_long 1994-05-23 07:41:24 +00:00
mycroft 87ffceb2c9 Add RCS ids. 1994-05-23 06:32:35 +00:00
mycroft d27eb7ac28 Merge with 4.4-Lite. 1994-05-23 06:29:07 +00:00
cgd cbfe06b441 update from lite 1994-05-21 06:49:14 +00:00
cgd 06e74952e7 new way of naming things 1994-05-21 06:49:08 +00:00
cgd c9d464003e USL copyright foo 1994-05-16 10:58:26 +00:00
mycroft 19ab195faf Needed for new profiling code. 1994-05-13 10:40:50 +00:00
chopps 896d6fdb2e Add SSIZE_MAX and SIZE_T_MAX, also fix other broken values. 1994-05-09 12:39:38 +00:00
chopps 86bc8153cd Add _SSIZE_T_. 1994-05-09 11:44:32 +00:00
briggs 7df08ffd59 vm/queue.h doesn't exist any more. 1994-04-18 21:25:22 +00:00
mycroft d2f28a1124 Someone made a typo. 1994-04-11 01:15:47 +00:00
chopps 8ae488d659 protect against multiple inclusion 1994-04-10 02:22:09 +00:00
brezak 39e3da4a69 Add RCSID macro; be sure ENTRY is in .text 1994-03-18 21:18:07 +00:00
cgd ff30e7db73 add basic integral types (a la sparc port) that new nvi wants. 1994-03-14 02:12:15 +00:00
glass 1bf91e4911 so you can compile a kernel w/o using our hacked gas 1994-03-01 07:50:49 +00:00
mycroft c70f4764d7 Specify the byte order. 1994-01-31 23:52:10 +00:00
mycroft 0317b97e04 Remove bogus \ that someone inserted. 1994-01-30 22:14:00 +00:00
mycroft b20e7826bb GPROF --> PROF 1994-01-30 21:56:15 +00:00
mycroft d510b6eb3a PT_[SG]ETFPREGS are not yet implemented. 1994-01-30 17:33:55 +00:00
mycroft b5f845fbef Forgot the .even... 1994-01-29 16:28:16 +00:00
mycroft dcfe932f65 Fix typo. 1994-01-29 10:14:01 +00:00