Commit Graph

504 Commits

Author SHA1 Message Date
minoura 4901b4afde Use of pointer to register variables. 1999-08-05 14:57:38 +00:00
thorpej b2781586c4 Normalize include paths. 1999-07-09 02:32:28 +00:00
thorpej 3ebbe095e0 Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
1999-07-08 18:05:21 +00:00
scottr 3c26ad58a1 Someone forgot to tell ddb that SWAP is not PEA. 1999-06-09 07:53:22 +00:00
briggs 59422960ea PR 7220 from Ken Nakata:
I've fixed most (not all) m68k FPE bugs that give bogus
calculation results, esp. fsqrt instruction.  Also, the internal FP
representation has been reduced from 115-bit mantissa to 67-bit
mantissa which reduced the required mantissa operation roughly by one
fourth.  I've done an extensive (though not exhaustive - it's
impossible!) test on the internal routines by feeding them randomly
generated FP numbers, and found that the new code is more precise than
MC68040 FPU (it seems to have a rounding bug).

[ Only change was to keep fpu_calcea.c's name instead of renaming to
  fpu_ea.c in Ken's patch.  --akb ]
1999-05-30 20:17:48 +00:00
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 69845becd3 Use _C_LABEL() for [fs]ubail symbols. 1999-05-01 19:17:06 +00:00
christos bd3e05dcd4 Add sunos_sigcode, sunos_esigcode trampoline that uses trap 1 1999-04-29 16:20:44 +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
minoura aae9b1588b Typo fix. 1999-04-18 00:36:36 +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
scw e20f288fe5 Add a check to my last 'fix' which ensures the fault really
did happen in kernel mode.
1999-04-05 17:17:04 +00:00
scw f7a019c61a Fix a problem I noticed a while back but had too many other things
in the air to deal with it.
Basically, following a kernel fault (eg. dereferencing a NULL pointer
in kernel mode) a DDB 'trace' did not show the function where the
fault occurred. For example:

	db> trace
	_Debugger()
	_panic()
	_trap()
	faultstkadj()
	_pool_drain()
	_uvm_pageout()
	_start_pagedaemon()
	_proc_trampoline()
	db>

The 'faultstkadj()' line here is bogus. It is shown because the return
address to 'trap()' happens to point there, and since faultstkadj() has
no stack frame, DDB assumes it was the faulting function. In this example,
the _real_ function was pool_reclaim(), but you would have to look at
the program counter at the time of the fault to figure that one out.

This fix makes the trace command do the dirty work for you by grubbing
around in 'trap()'s argument list to find the *real* PC value at the
time of the fault, replacing the 'faultstkadj()' line with the real
function's name.
1999-04-04 11:33:02 +00:00
minoura e58c614810 CADDR1 and CADDR2 should not be used here. 1999-03-31 14:18:49 +00:00
mycroft 9c6b797796 Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
  because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
  avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot.  Also, DO NOT use
  pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
  access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
  access_type = 0.  This should probably be revisited.
1999-03-26 23:41:25 +00:00
mrg 7b93dd1117 remove opt_uvm.h 1999-03-25 00:41:46 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
thorpej a77ccfe460 Garbage-collect. 1999-03-20 01:40:25 +00:00
perry d446fb449c exterminate ovbcopy. patches provided by Erik Bertelsen, pr-7145 1999-03-12 22:42:30 +00:00
is e6da344c31 Update. 1999-02-22 22:07:37 +00:00
is 74ad0ecb0d Generate the MIT-assembler-format files statically. They nearly never change,
and if so, should be generated via the new Makefile and committed, too.
1999-02-22 21:25:05 +00:00
is 2c7fa23c38 Fix Copyright dates 1999-02-16 23:34:10 +00:00
is dc068e0d1f Assign my files to The NetBSD Foundation, Inc. 1999-02-16 22:46:55 +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
is b85f4a5e4d Remove redundant code (leftover from editing). 1999-01-30 21:54:49 +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
thorpej cd3a2c5a2a Eliminate use of CPP symbol "mc68020". 1999-01-15 23:15:50 +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
itohy b50a4adc36 Eliminate `void *' arithmetic. 1999-01-09 19:23:26 +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
perry 0c20c72cf9 (mostly) fix kernel tags support. from Frederick Bruckman in pr-6445. 1998-11-15 20:36:30 +00:00
is c6457000db Fix obvious typo in DEBUG code 1998-10-25 21:58:25 +00:00
is 8caffffa3e Activate cleandir (and distclean), as suggested in PR 6244 by
Frederick Bruckman.
1998-10-14 20:45:43 +00:00
scottr 8c9bf4e881 Use the size field to distinguish between ADDX and ADDA. Fixes a problem
pointed out by Paul Goyette.
1998-10-07 06:08:47 +00:00
scottr 651280426e Fix a problem pointed out by Paul Goyette: print_reglist() forgets that
it had a range of registers to print if A7 is among them.
1998-10-07 05:27:13 +00:00
thorpej ec897ee047 Fix a problem reported by Michael Hitch. Basically, our libc relies on the
non-standard way of invoking sigreturn, specifically a side-effect that I
overlooked.  Thus, longjmp's return value was getting clobbered.

Sigh, so burn trap #3 just as sigreturn.

XXX We need an SVR4-style {get,set}context(2) to avoid wasting new
XXX trap vectors in the future.
1998-10-05 00:00:17 +00:00
thorpej c1e5866bbe Fix a typo in a comment. 1998-10-04 23:56:17 +00:00
scw acce9b3b1b Make this compile again when DEBUG is defined. 1998-10-03 21:58:52 +00:00
thorpej ab915f7483 Oops, missing immediate qualifier, pointed out by Chas Williams. 1998-10-02 02:02:46 +00:00
thorpej 9e2b536bef Update for signal changes. 1998-10-01 20:41:29 +00:00
thorpej 586b0b3d1b Implement compat_13_sys_sigreturn(). 1998-10-01 01:03:56 +00:00
thorpej ae2fcdc40a Oops, typo. 1998-10-01 00:22:02 +00:00
thorpej c227be8efc Expect the syscall number to push to be in register d0. 1998-10-01 00:11:11 +00:00
thorpej fa582abe7f Move trap #1 and trap #2 handlers here. Trap #1 handler now places
the cpmpat_13_sigreturn13 syscall number into d0 before calling the
sigreturn stub.
1998-09-30 23:52:32 +00:00
thorpej db9f3cbe30 Use the new special syscall entry point, and specify SYS___sigreturn14.
Makes the sigcode grow by 4 bytes.

Note that we are no longer able to use the HP-UX breakpoint "sigcodetrap"
hack here, as a result.  This means that BSD programs can no longer be
debugged by HP-UX debuggers.  *Sniff*  Don't break my heart...
1998-09-30 22:38:17 +00:00
thorpej f52431f2a3 Use the symbolic constant SYS_exit. 1998-09-30 22:26:28 +00:00
thorpej 1ce207046d Adapt to signal changes. 1998-09-30 21:55:02 +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
lukem c9db84ecc9 distclean is a synonym for cleandir 1998-09-05 15:15:14 +00:00
leo a27ab73aae Nuke vm_offset_t/vm_size_t. 1998-09-02 11:16:31 +00:00
mycroft 530fef3c8d Assign my copyrights to TNF. 1998-08-15 10:34:43 +00:00
mycroft df9baf2311 Assign copyrights to TNF. 1998-08-15 03:51:30 +00:00
mycroft 6d3d8a1350 Make copyright notices with my name consistent. 1998-08-15 03:02: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
jonathan 466e784ee1 defopt DDB. 1998-07-04 22:18:13 +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
is 7a0f63f982 Back out the defopt for M680?0. As pointed out to me, this breaks ports which
dont use the M680?0 the way Amiga, Atari, Mac68k, and X68k do. I must have
missed this in the past discussion about this project.
1998-05-24 19:32:34 +00:00
is 6a6812fd92 Move M680[2346]0 to opt_m68kcpu.h.
XXX Some explicit dependencies could be removed now from the individual
arch/$ARCH/conf/Makefile.$ARCH files, but this is still to be done.
1998-05-23 20:51:06 +00:00
dbj 4d7d7e4b9d Fixed stack trace address printing lossage when no symbols are available. 1998-05-14 10:15:44 +00:00
kleink 687ea7404c Fix some arithmetics lossage on typeless pointers. 1998-05-08 16:55:15 +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
scottr 0dfa8582c5 Make type explicit for egcs, from Erik Bertelsen in PR 5287.
Dump the register qualifier while we're here, as suggested in the PR.
1998-04-13 02:51:32 +00:00
thorpej f766e521be In kcopy(), make sure we save and restore the old fault handler; kcopy()
is called from uiomove(), which may be in the code path of servicing
a non-fatal page fault caused by a copyin() or copyout().

Originally suggested by Steve Woodford.
1998-03-04 06:39:14 +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
thorpej 11490942aa Nuke memcpy() from here; it's in libkern. 1998-02-27 21:38:31 +00:00
scw ef52501a4f Implement changes for UVM. 1998-02-22 11:33:10 +00:00
mycroft 065e369ab5 Remove random.s. 1998-02-22 08:35:33 +00:00
mycroft 8776736cea Move to libkern. 1998-02-22 08:34:35 +00:00
mycroft d47ec6f1ae Include correct information for long doubles (mc68881 extended precision). 1998-02-18 10:24:45 +00:00
thorpej 2b06ffd5f9 Add support for UVM. 1998-02-15 21:19:34 +00:00
thorpej 8559f25d47 Implement kcopy(), like bcopy(), but aborts if a fault is encountered.
Required for UVM.
1998-02-15 21:18:45 +00:00
mycroft b5c132e4d2 Prototype __flt_rounds() consistently. 1998-02-03 01:26:20 +00:00
is b3fa451227 Amiga uses the common m68k/sig_machdep.c now. Also moved its definition from
the other 68k ports' files.${port} to arch/m68k/conf/files.m68k.
1998-02-01 21:23:24 +00:00
perry 6f57e5c573 multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom) 1998-01-09 22:23:44 +00:00
is 5d5c1cd59e - avoid system stack underflow when calling sigreturn via trap #0
- make sure all sigreturn error conditions are reported to the caller,
  instead of the place jumped to.
This is the bugfix part of pr 4628 by ITOH Yasufumi.
The performance optimization part will be handled seperately, after evaluating
its implications.
Testing on 68040 and removing the performance change from the proposed patch
by scottr. Half of the Amiga machdep.c change had to be done manually by me,
as the patchfile didn't apply cleanly.
XXX Yes, Amiga should be changed to use the common sig_machdep.c instead.
XXX Really soon now. I promise.
1998-01-07 22:46:00 +00:00
is d002f566b3 Support 68060 (and, for the Amiga, even 68040 buserr frames) in the sendsig()
and, indirectly, sigreturn() functions.
XXX The Amiga should be switched to using sig_machdep.c instead.
1998-01-06 20:50:22 +00:00
thorpej c2768af3d4 Garbage-collect cpu_set_init_frame(); it hasn't been needed for some time
now.
1998-01-06 08:06:45 +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 b46484bb8a RCSID Police. 1998-01-05 20:51:25 +00:00