Commit Graph

508 Commits

Author SHA1 Message Date
matt
f6b81171c1 Globalize trapexit. Improve db_trace.c so that you can trace thru traps!
Rework the output so that is also prints the frame address by default.
2001-06-15 08:09:33 +00:00
matt
0278444e19 Add a check to pvo_check which makes sure the pte is really in the
pteg_table.   In pte_to_va, take into account if the PTE_HID is set.
2001-06-15 08:08:04 +00:00
matt
ab92d9cd59 phys_map should use kenter/kremove 2001-06-15 08:07:03 +00:00
matt
816a5637cd When releasing the SR VSID, mask off the bits not related to the index
in the pmap vsid bitmap.
2001-06-15 06:27:07 +00:00
simonb
18b2f7e6a1 Add a port to IBM's PPC405GP Reference Board (the "walnut")
by Eduardo Horvath and Simon Burge of Wasabi Systems.

IBM 4xx series CPU features:
 - New pmap and revised trap handler.
 - Support on-chip timers, PCI controller, UARTs
 - Framework for on-chip ethernet and watchdog timer.
General PowerPC features:
 - Add in-kernel PPC floating point emulation
 - New in{,4}_cksum that is between 1.5 and 5 times faster than the
   old version depending on CPU type.
General changes:
 - Kernel support for generic dbsym-style symbols.
2001-06-13 06:01:44 +00:00
tsubai
713feac239 Include powerpc/mpc6xx/{bat.h,pte.h} if PPC_MPC6XX is defined. 2001-06-12 17:20:50 +00:00
simonb
0bdd2faeed Get the opcode mask right for almost all the Op_OE opcodes (only two were
correct).
2001-06-12 05:31:44 +00:00
tsubai
a3496ef8a8 When invoking the pcb_onfault mechanism, pass the return value of uvm_fault()
to the onfault routine.
2001-06-10 16:31:59 +00:00
tsubai
29d06d028c Fix printf format error. 2001-06-10 15:54:05 +00:00
tsubai
bedfcf904c libkern.h is included in systm.h. Not needed here. 2001-06-10 15:05:44 +00:00
tsubai
5a051092e4 Rename ofb_softc to ofbus_softc. (XXX Is this good name?) 2001-06-10 11:36:03 +00:00
tsubai
f6482742de pte_spill -> pmap_pte_spill. 2001-06-10 11:09:28 +00:00
tsubai
fafb5d4bc3 Make the new pmap optional. Use the old (stable!) pmap by default. 2001-06-10 11:01:26 +00:00
matt
66822e55be Fix a spl issues. Turn on PMAPCHECK until instability problems are found.
Add a pmap_pvo_verify call you call it from it ddb and verify the pmap
data structures are sound.  Fix warnings when DEBUG was turned on.
2001-06-10 07:56:36 +00:00
matt
b9ef9e99da Print a more informative is a uncatchabl DSI or ISI exeception happens in
kernel mode.
2001-06-10 07:49:13 +00:00
briggs
c97896cd4d Pull avail_start/avail_end logic for bus_dmamem_alloc() from macppc port,
as suggested by matt@netbsd.org--the vm_physmem array may not be in order.
2001-06-10 02:31:25 +00:00
briggs
a2b115fa4c Up the default # of NMBCLUSTERS to 2048 (GATEWAY) & 1024 (non-GATEWAY)
from 512/256.
2001-06-10 02:28:57 +00:00
matt
f6d422beb8 Fix warning about braces & if. Include libkern.h for strncpy prototype 2001-06-08 00:21:45 +00:00
matt
75a27eccff Rename pte_spill to pmap_pte_spill. Fix pmap_clear_{referenced,modify}
to return the previous state of the bit.  Make it compile under
-Wmissing-prototypes -Wall.  Change around some debug stuff.
2001-06-08 00:16:24 +00:00
matt
e38a49d835 Include a common bus.h and bus_dma.c that powerpc ports can use
if they so choose.
2001-06-06 17:37:37 +00:00
matt
938edd5b75 Introduce a new & faster pmap for the MPC6xx (60x, 7xx, 7xxx) PPC CPUs.
Move MPC6xx dependent header files to powerpc/include/mpc6xx/
2001-06-06 17:36:01 +00:00
chs
821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
tsubai
1a891f65d4 One more gcc-2.95 issue. 2001-05-31 09:19:25 +00:00
tsubai
ba87a6d444 Add gcc-2.95 version. 2001-05-30 20:37:48 +00:00
tsubai
2eae10adb5 Inline bswap{16,32} when the argument is constant. 2001-05-30 13:08:34 +00:00
mrg
67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
matt
0a3911863f Use structure assignment instead of bcopy. 2001-05-28 00:15:10 +00:00
matt
8fb5853698 Change the bcopy's to structure assignments. 2001-05-28 00:12:21 +00:00
matt
e2148768dc Change _MACHINE_PIO_H to _POWERPC_PIO_H 2001-05-27 20:59:15 +00:00
chs
11a9651c8f replace vm_page_t with struct vm_page *. 2001-05-26 21:27:10 +00:00
matt
b590763f79 Call __syncicache in db_write_bytes. (makes breakpoints work better). 2001-05-18 20:38:27 +00:00
simonb
96a430ba30 If _SOFT_FLOAT is defined, pull floating point va_args from the GPR
area and not the FPR area (by having the double argument type test
always fail).

Fixes problems using <stdarg.h> with -msoft-float.
2001-05-16 15:41:03 +00:00
simonb
b3a4957ee5 Fix spr and tbr register number extraction. tbr is untested, but is the
same format as spr and had the same mistake.
2001-05-06 16:40:22 +00:00
simonb
982e593742 Remove duplicate opcode. 2001-05-06 16:11:17 +00:00
simonb
ad336f45ee Fix a bunch of other typos. 2001-05-06 15:30:13 +00:00
simonb
2113399bb4 Fix typos in two instruction codes. 2001-05-06 14:25:09 +00:00
simonb
6a511e05e2 Be consistent with limit constants:
- use "U" suffix for unsigned constants
 - use "L" suffix for long constants
 - use "UL" suffix for unsigned long constants
 - use hexadecimal instead of decimal

Fixes build problems with vi (now that warnings/errors are enabled) on
mips, powerpc and arm platforms.
2001-05-04 15:12:32 +00:00
soren
945b972563 PPC machine type tags haven't been used for a while. 2001-05-03 13:11:24 +00:00
martin
77a926d775 Avoid nesting structure declarations, where the nested structur is used at
the global level later. Besides stylistic matters, this actually breaks C++
programs (indirectly) using this header.
2001-04-30 15:30:39 +00:00
kleink
fe3c9ceaf7 * Move definitions of exact-width integer types from <machine/types.h>
to <sys/types.h> and <sys/stdint.h>.
* Add a new C99 <stdint.h> header, which provides integer types of
  explicit width, related limits and integer constant macros.
* Extend <inttypes.h> to provide <stdint.h> definitions and format
  macros for printf() and scanf().
* Add C99 strtoimax() and strtoumax() functions.
* Use the latter within scanf().
* Add C99 %j, %t and %z printf()/scanf() conversions for
  intmax_t, pointer-type and size_t arguments.
2001-04-28 15:41:28 +00:00
kleink
99054d7a6c Add definitions for C99 fastest minimum-width integer types. 2001-04-26 16:25:19 +00:00
thorpej
1c3a62e066 Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.
2001-04-24 04:30:50 +00:00
thorpej
55044638aa Remove pmap_kenter_pgs(). It was never really adopted by
anything, and the interface itself wasn't as flexible as
callers would have probably liked.
2001-04-22 23:42:11 +00:00
thorpej
69abdbf60c Undo a misguided previous change to the pmap_update() API. 2001-04-22 23:19:26 +00:00
thorpej
4738622712 Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
2001-04-22 00:33:59 +00:00
thorpej
7f10ba88b1 #define away pmap_update() in <machine/pmap.h> so that no function
call overhead is incurred as we start sprinkling pmap_update() calls
throughout the source tree (no pmaps currently defer operations, but
we are adding the infrastructure to allow them to do so).
2001-04-21 23:51:14 +00:00
kleink
f06533a1ee Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 17:13:04 +00:00
kleink
739cb75837 Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-15 15:29:02 +00:00
kleink
cdcf9f46c5 Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
2001-04-14 22:46:19 +00:00
kleink
a7c20e5788 Add definitions of C99 integer constant macros. 2001-04-14 22:38:33 +00:00
kleink
7affdab52e Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-14 12:19:49 +00:00
kleink
9133b51cd8 Replace the 'unsigned __COMPILER_INT64__' construct with a new name,
__COMPILER_UINT64__, to be supplied - if such a case is made, it shouldn't
be assumed that the unsigned type-specifier may be applied to it.
2001-04-12 22:01:18 +00:00
manu
bb1594b20b Integrated security review for signal delivery by Wolfgang Solfrank 2001-04-11 19:41:02 +00:00
simonb
1c69191831 Fix typo - s/dbcst/dcbst/. 2001-04-06 16:48:11 +00:00
tsubai
eb4f61df19 Regenerate this file from cvs repository in order to get back original
copyright.
2001-04-05 09:58:05 +00:00
jdolecek
c84d3343d1 add standard NetBSD RCS Id on top 2001-04-03 13:10:26 +00:00
tsubai
c13ba16f2b Fix an uninitialized variable reference in cpu_fork().
Reported by Tad Hunt <tad@entrisphere.com>.
2001-03-31 07:50:59 +00:00
eeh
cc5ddb2b20 Make `trace' useful even w/o symbols and add /f option to dump parameters. 2001-03-29 14:58:08 +00:00
briggs
10e66b85b1 Ensure that my last change compiles with warnings enabled. 2001-03-26 19:56:32 +00:00
briggs
2ff606560c Do not save/restore the kernel SR since we are no longer trying to copy
it in pmap_activate().  Pointed out by ws in a private message.
2001-03-26 18:52:29 +00:00
briggs
132a113507 Do not hardcode the kernel segment register, and do not load the kernel
segment	register in pmap_activate().
2001-03-24 05:30:57 +00:00
tsubai
ce8902b7fe Merge my MP tree. At this point, Daystar dual 604 card (i.e. Power Macintosh
9500/180MP and 9600/200MP) runs at least into single-user mode, possibly
multi-user mode (not stable yet).
2001-03-22 04:11:46 +00:00
chs
ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
tsubai
83eac66533 Cosmetics. 2001-03-07 08:18:45 +00:00
tsubai
bf498eb12e Remove MULTIPROCESSOR part. (moved to separate file) 2001-03-07 08:10:44 +00:00
tsubai
90aabafdd1 MP version of trap routines. 2001-03-07 08:05:07 +00:00
matt
7e5ee89ff3 Nuke vm_offset_t, vm_size_t from powerpc. 2001-03-04 03:25:34 +00:00
tsubai
e6ae4943c2 Fix a bug in cpu_switch().
Reported by Tad Hunt <tad@entrisphere.com> on port-powerpc.
2001-02-28 20:44:41 +00:00
matt
cd7c0ee5c4 Get the ofppc/prep/macppc/sandpoint/bebox to share the process switch
/ setfault / fork_trampoline code.
2001-02-25 20:21:53 +00:00
matt
e7811ad9b6 Move cpu_sysct and dump{mag,lo,siz} & cpu_dumpconf to powerpc_machdep.c.
dumpsys is still port-specific for now.  XXX dumpsys is still a stub
on all powerpc ports.
2001-02-24 22:39:16 +00:00
matt
aba3f2655a Add powerpc/powerpc/powerpc_machdep.c 2001-02-24 04:30:42 +00:00
matt
559cea4b1c Since setregs is common among all the powerpc ports,
make a common version and put it in powerpc_machdep.c
2001-02-24 04:29:26 +00:00
manu
472596699d Removed a copyright for code I have removed in a previous commit 2001-02-12 21:20:32 +00:00
manu
16bc5b4004 Moved the fix for negative errno returned to userland on the PowerPC to a
more machine independent fashion
2001-02-11 20:24:49 +00:00
manu
d48e534f38 Fixed a bug in the way errno return was handled in linux emulation (we returned the opposite of the expected errno) 2001-02-09 17:48:01 +00:00
wiz
08ca85d04d De-lint. Reviewed by christos. 2001-02-09 15:54:18 +00:00
tsutsui
93a1c84cac Add pio.h to INCS. 2001-02-07 12:43:52 +00:00
briggs
2f624f78d6 Share a single pio.h instead of having 4 nearly-identical copies. 2001-02-05 19:33:54 +00:00
briggs
e96035c57c Tsubai has convinced me that openpic_init() should remain machine-dependant
as the details might differ between archs, and passing the various options
leads to some clutter.
2001-02-05 19:22:23 +00:00
briggs
522ec180e9 Build with -Wall -Wetc. 2001-02-04 17:38:10 +00:00
briggs
ace7a75bd5 Remove dependancy on ICU_LEN m.d. define. Thanks, Tsubai. 2001-02-04 17:35:28 +00:00
briggs
cbb39b8875 defopt openpic 2001-02-04 17:34:11 +00:00
briggs
044caccfff Split OpenPIC support into powerpc so ports only need minimal custom
configuration.  openpic_init() now takes a single argument that is the
base of the OpenPIC register space.
2001-02-02 06:11:52 +00:00
manu
5472427809 Added powerpc specific code for Linux compatibility on powerpc ports 2001-01-19 01:36:47 +00:00
jdolecek
d5d431e8ae make db_[e]regs[] const 2001-01-18 10:54:27 +00:00
thorpej
d74e432ed3 Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
2001-01-15 20:19:50 +00:00
thorpej
a3ec356d52 splimp() -> splvm() 2001-01-14 03:22:04 +00:00
takemura
c5fd828440 replace 'long long' with int64_t to compile stand alone program with
compiler other than GCC.
2001-01-03 10:08:55 +00:00
tsubai
26914e2bcf Make want_resched and astpending per-CPU.
Add some per-CPU variables to cpu_info.
2001-01-01 04:33:39 +00:00
itojun
efa2b7073c make mbstate_t bigger (32 -> 128 bytes).
XXX if you have libc after citrus locale import, please recompile libc,
and your applications that use mbstate_t (rather rare).  really sorry
for the mess.
2000-12-26 10:35:28 +00:00
jdolecek
e9e91a0fb5 split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.
2000-12-22 22:58:52 +00:00
itojun
823498203f populate _BSD_MBSTATE_T_. add warning regarding to rune_t. 2000-12-21 06:03:47 +00:00
mycroft
3418812d3c Partial syscall cleanup, as per other ports. 2000-12-14 10:33:42 +00:00
jdolecek
1683c206a4 provide dymmy symbol 'syscall' to make ppc kernels
linkable after recent emul changes - it's used in emul_netbsd and friends
XXX this is probably wrong solution; should powerpc have separate
XXX syscall() as other ports do ?
2000-12-10 12:49:54 +00:00
mycroft
e4ae5a1406 In mem_regions(), deal with the case of a run of consecutive holes.
Now the cube works with the memory in any order.
2000-12-05 05:16:00 +00:00
tsubai
1b4a9cb335 Move INTSTK and SPILLSTK definitions to locore.[Ss] to allow allocation of
them in early startup.
2000-12-04 17:05:50 +00:00
tsubai
2fb7179aaf Add KERNEL_LOCK (et al.) to run MULTIPROCESSOR kernel on a single cpu system. 2000-11-25 15:49:43 +00:00
matt
f80f1b8624 Preliminary AltiVec support. 2000-11-25 03:03:35 +00:00
matt
4c6aaf87d2 Add placeholder for AltiVec support file. 2000-11-25 03:01:40 +00:00
matt
6d256b4cca Preliminary AltiVec support 2000-11-25 03:00:48 +00:00
matt
6b0877113f Some preliminary ALTIVEC support. 2000-11-25 02:59:34 +00:00
tsubai
4e01e6de8b When fatal trap occurs, enter DDB with trapframe rather than just "Debugger()". 2000-11-24 21:49:06 +00:00
matt
1420862fba Add comments and AltiVec reg state. 2000-11-23 02:35:10 +00:00
wiz
b03725b863 Change OF_nextprop to match prototype change to void *
(Please don't change prototypes without changing the corresponding
functions!)
2000-11-22 18:18:32 +00:00
tsubai
1931e71852 Constify struct sysent. 2000-11-22 14:00:46 +00:00
tsubai
11b48d8a4d Thermal Management Interrupt is available on 750, too. 2000-11-20 15:16:04 +00:00
matt
95a8447ccf Add G4 specific exceptions (include AltiVec). 2000-11-19 20:48:20 +00:00
matt
bb71a6b332 Add AltiVec VSCR definitions. 2000-11-19 20:41:04 +00:00
matt
b1e1cfdb4a Add AltiVec VEC bit. 2000-11-19 19:52:37 +00:00
thorpej
216902b8d2 Trap routines from the macppc port, to be used by other PowerPC
ports (only amigappc's differs).
2000-11-16 05:33:04 +00:00
matt
dbe8de94a8 back out my change powerpc/conf/files.ofw. Enable the inclusion of
dev/ofw/files.ofw on macppc.  Add openfirm to ofppc/conf.c
2000-11-15 00:39:31 +00:00
matt
58645ba248 Add support for /dev/openfirm.
Add OF_nextprop support.
2000-11-14 21:22:43 +00:00
tsubai
b11322a19d powerpc HID registers definitions (only HID0 for now). 2000-11-09 11:49:13 +00:00
tsubai
4833accce2 In mem_regions(), remove zero sized entry returned from OF.
Since this function uses size == 0 to delimiter, valid entries must not
contain 0 in size field.

G4 Cube should boot now. :-)
2000-09-24 15:57:03 +00:00
tsubai
4317291e1a Make HTABSIZE calculation work with >1GB RAM. 2000-09-24 15:26:34 +00:00
thorpej
72a24b4eae Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
2000-09-13 15:00:15 +00:00
tsubai
365ec2aa42 Scheduler locking changes. 2000-08-21 18:46:03 +00:00
tshiozak
51a53de0d5 Preparation for the future introduction of multibyte locale.
- MB_LEN_MAX is increased to 32.
 - To ensure binary compatibility for old executables
   under multibyte locale, versioned setlocale is added.
 - __mb_len_cur definision is added in setlocale.c
   and enable it in stdlib.h .
   It is also important for multibyte locale stuffs,
   but I just forgot.
2000-08-08 22:31:13 +00:00
tsubai
2c691df1ec uvm/uvm_inherit.h was removed. 2000-08-02 09:06:56 +00:00
tsubai
7314c0eba6 Clear the reservation in __cpu_simple_lock_try even if it failed to lock.
(From ws@tools.de)
2000-07-08 04:36:56 +00:00
tsubai
9ad1103d98 Make it compile with "options MULTIPROCESSOR". 2000-07-06 22:56:22 +00:00
tsubai
212a0a08d2 Implement powerpc spin lock functions. 2000-07-06 03:52:25 +00:00
itojun
d738f90fd7 raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory.  MHLEN is too small
  already (less than 80) and there are chances for unwanted packet loss due
  to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
  (even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
  extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
2000-06-30 17:55:11 +00:00
mrg
fa00dc597a remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 07:44:02 +00:00
kleink
bb2ed0f487 G/c _BSD_INTPTR_T_ and _BSD_UINTPTR_T_. 2000-06-27 05:53:22 +00:00
kleink
47b5c5e3b1 Resolve some formatting nits; add __intptr_t and __uintptr_t. 2000-06-27 04:58:51 +00:00
kleink
e695f72a2e Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
2000-06-26 15:42:16 +00:00
mrg
4c698e84f6 <vm/vm_param.h> -> <uvm/uvm_param.h> 2000-06-26 14:58:58 +00:00
mrg
2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
simonb
889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
mrg
f5f84f80c5 <vm/vm_prot.h> becomes <uvm/uvm_prot.h> 2000-06-25 13:37:51 +00:00
kleink
133ea38323 Add a WEAK_ALIAS() macro. 2000-06-23 12:18:45 +00:00
tsubai
1bfa0fc6b6 Add cpu_counter(). 2000-06-11 16:32:42 +00:00
tsubai
abc5d88356 Make this compile again. 2000-06-11 10:02:15 +00:00
kleink
2a258cd5c8 Pull in missing DDB headers. 2000-06-09 14:09:45 +00:00
kleink
4d8e50f1ce Need <sys/syscallargs.h> for declaration of sys_sysarch(). 2000-06-09 14:08:45 +00:00
kleink
bcd7f512f5 Pull in missing headers for declarations, and add missing local function
declarations.
2000-06-09 14:07:13 +00:00
kleink
080f786189 Need <sys/systm.h> for declaration, and make argument declarations match. 2000-06-09 14:05:47 +00:00
kleink
4d6a384b1b Need <sys/ptrace.h> for declarations. 2000-06-09 14:05:04 +00:00
kleink
18495b9efa Need <sys/systm.h> for declaration of bzero(). 2000-06-08 07:30:47 +00:00
kleink
c2715f98ce Need <sys/systm.h> for declaration, and make argument declarations match. 2000-06-08 07:29:22 +00:00
kleink
78009a319f Need <netinet/in.h> for declaration. 2000-06-08 06:50:46 +00:00
kleink
149050ce7b Need <sys/systm.h> for panic() declaration. 2000-06-08 06:48:45 +00:00
kleink
186d2ccb7f Need <sys/systm.h> for declaration, and make argument declarations match. 2000-06-08 06:47:17 +00:00
tsubai
0552fd6de2 Dump fp regs into core file. 2000-06-04 12:12:13 +00:00
tsubai
5257d23759 Add fpreg area in struct md_coredump. 2000-06-04 11:57:17 +00:00
tsubai
86ac32df3d Add PT_GETFPREGS and PT_SETFPREGS support. 2000-06-04 09:30:43 +00:00
thorpej
e03e9e8086 Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1().  In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
2000-05-28 05:48:59 +00:00
sommerfeld
40339b39f9 Reduce use of curproc in several places:
- Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()
2000-05-27 00:40:29 +00:00
thorpej
a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00