Commit Graph

60176 Commits

Author SHA1 Message Date
fvdl 96d6d8d8ac No sense in trying to print arguments to functions, we can't reliably
determine them as they're passed in registers. The first 6, anyway,
but only printing arguments 7 and up (if present) makes no sense.
2002-11-29 22:46:26 +00:00
fvdl 6dbe6cdeb5 Initial DDB support, mostly a quick 'n dirty port of the i386 code.
No dissassembly yet.
2002-11-29 22:17:12 +00:00
fvdl 93048d8fba Make physseg attrs unsigned, just to be sure. 2002-11-29 22:14:58 +00:00
fvdl c08aef9c01 Make this a bit more like -current i386 pmap. Adjust some argument
types to avoid sign extension (although this is not a problem
currently).
2002-11-29 22:14:15 +00:00
fvdl 735931f6e4 Use DEFCOPTS, not COPTS, so that the latter may be overridden in a kernel
config file.
2002-11-29 19:52:02 +00:00
jdolecek a45e0497c5 selwakeup(): don't bother with pfind() in SI_COLL case; sel_pid is always zero
in this case, and even if not, the process would be already woken up by the
wakeup() call
change sent as part of kern/17517 by David Laight

XXX perhaps should KASSERT() sel_pid is zero in the SI_COLL case
2002-11-29 19:48:22 +00:00
jdolecek c9710a72e0 Get the dynamic interpreter location using emul_find_interp(), so that
it checks both the alternative/emul tree, and the non-emul tree.
This makes it possible to run chrooted emulated binaries without need
to setup shadow /emul tree within the chroot hierarchy.

XXX sligh code rearrangement was necessary, change not tested
2002-11-29 19:40:14 +00:00
fvdl 6da8034165 Think before committing.. previous wasn't actually needed, the values are
guaranteed to fit in 32 bits when loading the kernel into physmem,
and it avoids bootloader incompatibility.
2002-11-29 19:38:24 +00:00
jdolecek da2945cc37 add comment why this doesn't need to use emul_find_interp() 2002-11-29 19:35:25 +00:00
fvdl 6f923c1495 Use long for ssym and esym in btinfo_symtab, so that it works out for
both i386 and x86_64.
2002-11-29 19:33:26 +00:00
jdolecek 1bf46cc0f0 use emul_find_interp(), rathern than calling emul_find() second time
with prefix set to "/"
XXX not tested
2002-11-29 19:15:15 +00:00
jdolecek 47cd9b85d6 Get the dynamic interpreter location using emul_find_interp(), so that
it checks both the alternative/emul tree, and the non-emul tree.
This makes it possible to run chrooted emulated binaries without need
to setup shadow /emul tree within the chroot hierarchy.
Only tested for COMPAT_LINUX, changes to other compat modules were
mechanical.
Fixes kern/19161 by Christian Groessler.
2002-11-29 19:13:14 +00:00
jdolecek dd330529e7 add rename for emul_find_interp(), too 2002-11-29 17:11:21 +00:00
manu ae748e840c Implement timebase_info. We don't know exactly what it should do yet... 2002-11-29 17:08:16 +00:00
jdolecek 302af6f02e add emul_find_interp() function: the function looks for interpreter
in alternative emul tree first, and updates interpreter pathname
if found there; if not found in alternative emul tree, pathname
without the emul prefix is checked, and error returned if the file
doesn't exist
2002-11-29 17:08:06 +00:00
jdolecek b99fe89374 de-__P() 2002-11-29 16:32:50 +00:00
manu 39b522c107 back out the previous change, which is useless. Darwin loads the libraries
that are required by the binary, not the libraries required by the libraries
required by the binary.

Hopefully, binaries should load again on i386.
2002-11-29 15:49:09 +00:00
fvdl 6df30bca4f Patch that actually works for previous, from Jaromir Dolecek. 2002-11-29 14:32:27 +00:00
manu f47b85037b Added a few kern sysctl which are the same on Darwin and NetBSD. 2002-11-29 13:18:09 +00:00
manu 65adabf7aa Filter the flag bits we get from Darwin's sigaction when giving them to
our native sigaction beacause unknown bits cause sigaction to fail with EINVAL.
2002-11-29 13:17:22 +00:00
manu a9a3da8aca The recent mach trap support caused indirect system calls (a la syscall(2))
to be incorectly recorded as 'syscall'. Fix this.
2002-11-29 11:56:36 +00:00
manu b36d0c1bf6 Maitain a chainedlist of already loaded Mach-O objects, to avoid loading
the same file multiple times because of recursive loading (ie: libx require
liby and libz and liby require libz, so libz would be loaded twice)

This is probably suboptimal, but it enable /bin/sh to load on the PowerPC,
so it's a good interim solution until we figure precisely how things should
work.

I'm not sure whether this makes the excessive recursive check useless or not.
2002-11-29 11:31:11 +00:00
pk 59c9274871 Always get the `mid' cpu property. Whine if it's not set on an actual
multi-processor machine.
2002-11-29 08:29:57 +00:00
pk 03549142e0 Find the CPU architecture version early in the bootstrap phase, and switch
to the V8 specific .mul/.div/.rem routines while we still have a writable
.text section.
2002-11-29 08:02:05 +00:00
pk 565cedc81e Provide the V8 mul/div routines for SUN4D as well. 2002-11-29 07:56:50 +00:00
itojun 02185dab0f setsockopt(IPPROTO_IPV6, IPV6_V6ONLY, 0) for AF_INET6 sockets,
to meet with the default behavior of linux.
review: fvdl/christos
XXX interactions with net.inet6.ip6.v6only?
2002-11-29 01:34:55 +00:00
manu 508a5615a6 Build the beast again after siginfo changes 2002-11-29 00:04:03 +00:00
itojun e2a7bfda88 minor KNF (indent) 2002-11-28 23:46:15 +00:00
jdolecek 8ad945a36b add freebsd_fork.c 2002-11-28 21:55:48 +00:00
fvdl f91cba76ea Add ci_apicid field. 2002-11-28 21:43:55 +00:00
jdolecek b439ca6951 exit1(): make sure that, if orphaned child is being traced, it's
reparented back to original parent before it's killed.
This makes the original parent aware that the child has exited if
the debugger failed to wait() on the debugged zombie before exiting.
Since we clear tracing flags before killing the child, the reparenting
logic in wait4() wouldn't be triggered, so it's necessary to do it here.

Problem reported and fix provided in kern/14443 by David Sainty.
2002-11-28 21:41:29 +00:00
manu de5d0b9706 Remove __P 2002-11-28 21:23:54 +00:00
manu 0f239dc026 Check for alternate receive buffer for mach_msg_overwrite_trap
Check for target buffer length, and fail if it is too short
Move mach_msg_trap and mach_msg_overwrite_trap to their own file
Remove some useless debug messages now we have ktrace
Remove __P()
2002-11-28 21:21:32 +00:00
jdolecek dc55168cb6 issignal(): put apparently long-forgotten (at least since 4.4BSD)
debug printf inside #ifdef DEBUG_ISSIGNAL

This adresses kern/16760 by Love.
2002-11-28 21:00:27 +00:00
hamajima e59bf4f94d add midi and sequencer. 2002-11-28 16:56:26 +00:00
fvdl ca0469f229 Some changes to make single-CPU systems that have an ioapic (and
an MP BIOS table enabled) work. Some MULTIPROCESSOR defines to
make things compile, and a split of ci_cpuid into ci_cpuid and
ci_apicid. They're always equal for the MULTIPROCESSOR case,
but different otherwise (ci_cpuid will always be 0).
2002-11-28 16:37:35 +00:00
pk 6564749632 Move the installation of v8 specific .mul/.div functions into a separate
routine to be called when we're sure the CPU is actually sparc version 8.
2002-11-28 15:32:15 +00:00
pk 8d141cba88 Not all sun4m platforms have version 8 sparc CPUs. So go out to the PROM
and get the CPU architecture version from the PROM cpu node `sparc-version'
property.
2002-11-28 15:29:53 +00:00
hamajima 02e91ee75e add Sigmarion2. it is same keymap of Sigmarion. 2002-11-28 15:09:48 +00:00
jdolecek b3b1ed9f7d back previous off, it makes the probe function mistaken some linux
binaries as freebsd
problem reported in thread 'installing suse_base on current
i386 sets time to 1970' on current-users
2002-11-28 15:08:36 +00:00
pk f19c04e3ed Move timer{match,attach}_mainbus() back into timer.c, since the `timer at
mainbus' configuration declaration is orthogonal to the configured SUN4[CM]
platform options.
2002-11-28 14:18:31 +00:00
gehenna 1b8f0943e1 EasyDisk and Solid state disk like PQUIRK_NOMODESENSE. 2002-11-28 10:08:28 +00:00
gehenna b69718e434 Regen. 2002-11-28 10:05:58 +00:00
gehenna e2b8ef4c4e add OTI Solid state disk 2002-11-28 10:04:39 +00:00
junyoung 3bfa71c0c3 Fix compile error. 2002-11-28 07:02:20 +00:00
chs 8e1d2230d8 use explicitly-sized types for LIF structure fields and
make them all unsigned.
2002-11-28 06:06:13 +00:00
chs c456a3cd29 remove the goofy hack to have the target be the LIF file,
just build the boot program with this Makefile.
2002-11-28 06:03:25 +00:00
chs 371349a205 do the "hppa" symlink too. 2002-11-28 06:01:00 +00:00
chs 3c3d32aaea force useful values for MACHINE_ARCH and MACHINE.
remove the goofy hack to have the target be the LIF file,
just build the boot program with this Makefile.
just add to CFLAGS, don't override.
use NOMAN.
2002-11-28 06:00:28 +00:00
chs fe563d9169 the SIZEOF_HEADERS thing doesn't work with the current toolchain,
just use 1 page for now.
2002-11-28 05:56:51 +00:00