Commit Graph

1237 Commits

Author SHA1 Message Date
leo 2d38da2932 Initial MILAN generic config 2001-04-10 06:39:36 +00:00
leo e409b5d5df Regen. 2001-04-10 06:39:10 +00:00
leo 99047718f0 fdisa needs-flag... 2001-04-10 06:37:08 +00:00
leo 30f5357c6e Move dma.c away from the mainbus floppy and make it a separate entity with
tag 'mbdma'.
2001-04-10 06:36:08 +00:00
leo e159fdc910 files.atari:
Defopt motherboard type and make ym2149.c dependend on 'standard' atari
    boards.
Configfiles:
    Add pseudo device mouse. It got dropped in the moves by accident.
2001-04-10 06:28:38 +00:00
leo dfaa29355b Add a config file for the Milan. Note that you cannot build a working Milan
kernel yet. There are still quite some bits missing in the repository.
2001-04-10 05:56:25 +00:00
leo 1e08d983e3 Move GENERIC to GENERIC.in . This avoids confusion since GENERIC is not a
standalone config file anymore.
2001-04-10 05:52:14 +00:00
leo adc78de568 Regen. 2001-04-06 21:55:11 +00:00
leo 54d70d6eef Add a 'ser0' device to all. Add ne2000, 3Com 3c59x/3c90x and ESS Solo-1
support to the Hades.
2001-04-06 21:53:39 +00:00
leo 1324cab42e And commit the generated files. 2001-04-05 12:25:15 +00:00
leo 6b22a0776c Forgot this in previous commit. 2001-04-05 12:22:10 +00:00
leo fb0acfc293 Major overhaul in the config files. The idea is to have the major part of
the generic options in GENERIC instead of duplicated all over the place.
To generate a config file, run 'makeconf'. This script uses cpp to combine
a '.in' file and GENERIC to a real config file.
2001-04-05 12:21:30 +00:00
leo ad8c9f3a7e Wcd attacment code for the Milan. The Milan has the standard dual IDE port
hardware. A Milan specific attachment is needed to modify the iot so that
the streaming methods do a byteswap.
Configure like:
  wdcisa0 at isa? port 0x1f0 irq 14
  wdcisa1 at isa? port 0x170 irq 15
2001-03-31 20:24:10 +00:00
leo a054ccd1d4 Add a tag to the fdcisa.c and isa/fd.c files. So they won't be used
unnecessary (and cause trouble).
2001-03-31 20:13:19 +00:00
lukem 20ba07f2fe - add dev_noimpl(xxx,yyy) macro to replace "(dev_type_xxx((*))) yyy",
and use appropriately

- create more helper macros:
   . cdev__xyz_init(c,n), such as cdev__ocri_init() for
     /* open, close, read, ioctl */, etc.
   . cdev__xRy_init(c,n), where nullop is used instead of enodev to dummy out
     method `R' and the comments now read /* xxx (read) yyy */ instead
   . cdev__xyz_t_init(c,n,t) - as per cdev__xyz_init, but sets d_type = t
     as well

- use seltrue instead of dev_noimpl(poll,*), as (IIRC) cdevsw.d_poll should
  always DTRT WRT returning a valid result.  (a few devices previously
  incorrectly returned ENODEV)

- use dev_noimpl(stop,enodev) instead of dev_noimpl(stop,nullop) if tty
  == 0, because it doesn't matter if dev_type_stop isn't implemented in that
  case, and it allows the use of the cdev__xyz_init macros. certain ports
  (sparc,sparc64,x68k) used the nullop method for dev_type_stop in a few
  drivers, whereas everything else uses enodev

- ensure that the comments are accurate WRT the behaviour of a given entry
2001-03-26 12:33:22 +00:00
lukem 723cd818d8 move duplicate definitions for:
pc, lpt, joy, ocis, apm, satlink, i4bctl, i4brbch, i4btel, i4btrc, i4b
from the port-specific arch/*/*/conf.c files into sys/conf.h
2001-03-21 22:25:52 +00:00
soren 912c115675 s/vm_page_alloc_memory/uvm_pglistalloc/ in panic message. 2001-03-21 18:40:28 +00:00
leo 14d2d5706f Conditionalize inclusion of the interrupt handlers for 'kbd', 'zs' and
'ncrscsi' since they are not present on the Milan.
2001-03-17 20:56:31 +00:00
leo a5fdf3f1cf Atari specific stuff to implement the Milan floppy. The Milan uses standard
ISA floppy hardware. Configure as:
    fdcisa0 at isa? port 0x3f0 irq 6 drq 2
2001-03-16 21:31:55 +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
leo b44e732ff6 Expand bus_dma implementation. It will now handle the bounce buffer
extensions needed to make the isa floppy driver on the Milan work.
2001-03-09 20:55:46 +00:00
thorpej 2c4c690f14 Add the BUS_DMA_STREAMING flag. 2001-03-07 22:42:16 +00:00
jdc d22da292a6 Man page moved to share/man/man8/man8.atari. 2001-03-04 20:54:12 +00:00
jdc b8c15cce4e Man page is now in share/man/man8/man8.atari. 2001-03-04 20:51:51 +00:00
jdc df594988e2 Add enhancements :
boot sector and bad sector list are preserved by default, use 'z' to change
   type NNNm to make a partition size NNN megabytes
   type `-N' at `root' and `start' prompts to start after partition N
   type `-N' at `size' prompt to end before partition N
   type `-1' at `size' prompt to end at end of disk
   display pauses if 10 or more partitions to display
2001-03-04 20:49:27 +00:00
jdc 8a32449594 Make sure root sector checksum is invalid if we clear it.
Set size of XGM partitions on auxilliary roots correctly.
From Leo Weppelman.
2001-02-25 14:33:19 +00:00
jdc b2b6b2d9f7 Include <stdio.h> when built with -DDEBUG. 2001-02-25 14:32:59 +00:00
jdc 4a4d440928 Root sector checksums are not always valid, so ignore them.
From Leo Weppelman.
2001-02-25 14:32:20 +00:00
jdc 5c57e3ce2c Make it easier to build with -DDEBUG. 2001-02-25 14:31:53 +00:00
leo 8f10488c29 Prepare assembly parts for an eventual transition to ELF. Mostly from a
diff from Steve Woodford.
2001-02-09 21:47:45 +00:00
leo 50c553e643 Announce page-size to the VM-system. Thanks to Izumi Tsutsui for pointing
this out.
2001-02-01 21:22:55 +00:00
leo 3d1167e274 Fix fallout from lastest tty changes. 2001-02-01 08:59:45 +00:00
leo 9b569c3abe No longer update the PAGE_* variables. They have turned into compile time
constants.
2001-02-01 08:58:03 +00:00
leo dcee338286 Fix y2001 problem in the initial read of the RTC. 2001-01-29 08:32:23 +00:00
tv e58532a4bf No-op commit to force update to a non-"-kk" revision. 2001-01-18 17:47:58 +00:00
fvdl c7f1462f3e Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
2001-01-17 00:07:18 +00:00
thomas 16090efe76 Let lpmatch recognice the printer. 2001-01-16 21:13:09 +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
martin a261276f16 The i4b raw b-channel devices actually do have an ioctl routine,
so better add this to the cdevsw entry.
Noted by Bruno Achauer.
2001-01-14 11:17:28 +00:00
thorpej a3ec356d52 splimp() -> splvm() 2001-01-14 03:22:04 +00:00
thorpej d85a75f583 Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
2001-01-14 02:00:37 +00:00
martin f53c899649 Add isdn devices to all archs that seem to support at least one of the
necessary busses. Sync comments with reality for archs that already had
the devices.
2001-01-08 21:46:33 +00:00
leo 0aa3c2b02f Sync machine types with atari/include/cpu.h 2001-01-07 21:24:05 +00:00
leo 427a7dcda0 Kill a typo. 2001-01-07 21:19:05 +00:00
leo b9a7cb087a Nuke a cf_unit abuse. 2001-01-07 21:17:32 +00:00
leo fb19421ce8 Expand identify_cpu() for the Milan. 2001-01-07 21:12:31 +00:00
leo c21ca4d86a Add the Milan as a possible machine type. 2001-01-07 21:08:03 +00:00
leo 3c48826086 Make ahdi_part and ahdi_root 'packed' so I can use this include file on
an x86 machine to analyze my atari disk.
2001-01-07 21:05:16 +00:00
leo 6ad6e22efb Update the printf format in straymfpint() too. 2001-01-07 20:59:29 +00:00
leo d6ef667612 Fixes for straytrap():
- make it clear that we are printing hex-numbers
        - fix the loop protection.
2001-01-07 20:56:51 +00:00
martin 242656c78a Enable the imported ISDN4BSD based ISDN subsystem.
This is the kernel part (userland to follow soon) of the latest (and
very probably last) release (version 0.96) of ISDN4BSD. ISDN4BSD has a
homepage at http://www.freebsd-support.de/i4b/.

It gives the user various ways to use the isdn connection: raw data (via
the i4brbch "raw b-channel" device), ppp (via the isp "isdn PPP" device),
voice/answering machine (the i4btel "telephone" device) and ip over isdn
(the ipr device, "IP over raw ISDN").

Supported are a bunch of common and older cards, more to be added soon
after some cleanup. Currently only the european E-DSS1 variant of the
ISDN D channel protocol is supported.
2001-01-05 13:09:15 +00:00
sommerfeld 851de295eb Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
2000-12-28 22:59:06 +00:00
jdolecek de31133f1d 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.

XXX I wish m68k ports would share trap.c
2000-12-23 09:35:51 +00:00
scw 4350a7f2b7 Unification of the m68k syscall() function. 2000-12-19 21:09:54 +00:00
tsutsui cb7f7c7f3b Remove "rnd is EXPERIMENTAL" comments. 2000-12-19 15:51:47 +00:00
bouyer c71f40d166 Add pseudo-device vlan 2000-12-19 10:42:02 +00:00
jdolecek cacec11253 delete obsolete comment 2000-12-17 15:52:39 +00:00
jdolecek ca57e681bd g/c obsolete vtrace(2) stuff 2000-12-13 18:13:05 +00:00
chs aeda8d3b77 Initial integration of the Unified Buffer Cache project. 2000-11-27 08:39:39 +00:00
jdolecek 17a9fd0da5 split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate
2000-11-26 11:47:23 +00:00
tsutsui 2c7e91a09e Define proper macros for FP frame offsets rather than magic numbers. 2000-11-21 13:54:13 +00:00
tsutsui 20494c8f05 Pull in dev/i2o/files.i2o, which is required by files.pci. 2000-11-21 13:34:57 +00:00
jdolecek baae0324b9 restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures
2000-11-21 00:37:49 +00:00
chs c62d17a551 rationalize the use of b_flags for geteblk() buffers.
rather than assigning to the whole field, set or clear individual flags,
which implies that the B_BUSY and B_INVAL flags will remain set.
this allows us to make the assertion in brelse() that B_BUSY is set,
which is the purpose of all this.
2000-11-20 08:24:08 +00:00
thorpej e6da7eebba We use 8K pages on the Atari. Make PAGE_SIZE and friends into
compile-time constants.
2000-11-14 19:01:09 +00:00
eeh bc7363329c Adapt to new line discipline scheme. 2000-11-02 00:26:35 +00:00
leo 716d4c3866 Do not pull-in machine/intr.h when _KERNEL is not defined. This fixes
compilation problems in the regression tests.
2000-11-01 12:08:16 +00:00
jdc 9f329676c9 Correct `off by one' error when testing against size of disk. 2000-10-23 06:56:00 +00:00
leo c36cc80ceb Fix a typo that slipped in with the last round of scheduler changes. The
register numbers were exchanged.
2000-10-09 06:15:02 +00:00
itojun 9e47af8814 enable rnd device. they are now mandatory for ssh/sshd support,
so it makes more sense to enable it.
please disable them if there's any issues, but in that case, in-tree
ssh/sshd won't work.
2000-10-04 03:35:53 +00:00
leo d7e0d02e8b Add include of <machine/asm.h>. C_LABEL is defined there. 2000-09-30 20:40:34 +00:00
leo ec2e9cd4c8 Add PCB_REGS_* defines. This makes ddb compile again. 2000-09-30 20:36:40 +00:00
is 2c86369fc4 The Atari pmap does wired page accounting; advertize it to UVM. 2000-09-28 09:09:28 +00:00
leo 670b06c6e0 Move config_console() out of the grf-layer. This allows for more than just
grf-type consoles (wscons). Config_console() is now called from consinit(),
just after setting up the kernel msgbuf, so debugging is easy(er).
To further facilitate this move, the pcibus now allows for early-console
attaches by allocating static bus_space_tags (no mallocs possible at this
point).
2000-09-28 07:26:48 +00:00
leo 6cb04802f1 Nuke cf_unit abuse. 2000-09-28 06:39:52 +00:00
leo af27893736 Correct some typos. 2000-09-28 06:32:10 +00:00
leo a89f788198 Move the grfbus out of std.atari. You don't want a grfbus defined on headless
and wscons setups.
2000-09-28 06:19:06 +00:00
jdolecek b1f94e26ab don't specify number of ptys if >= 16 (current default initial number)
pty comments: normalize and g/c what is no longer relevant
2000-09-24 15:59:26 +00:00
jdolecek 49c105ffdb add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
2000-09-24 12:32:31 +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
jhawk a022cf9d37 Use
${MAKE}
instead of
  make
2000-08-30 23:51:46 +00:00
leo 6c521b3fcc Now that formatting works (Thanks Nathan!), it shows that spec_read() is
issueing a 'DIOCGPART' at every read. Avoid re-reading the label at
every format-verify (or read/write on the block-device) by fetching the label
at open-time and caching it until we close.
2000-08-29 20:00:16 +00:00
thorpej 4db6fc7542 Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
nathanw 5127aa189d In fdioctl(), allocate fd_formb dynamically when needed, rather than on
the stack, and remove the no-longer-necessary PHOLD()/PRELE() calls
in fdformat().

(This eliminates 1/3 of the instances of PHOLD()/PRELE() in the kernel code.)

XXX We still have too many mostly-redundant floppy drivers.
2000-08-24 20:04:28 +00:00
thorpej 58e7a6954b Add spllock(). See spl(9) for details. 2000-08-22 19:46:26 +00:00
leo 67f170f93c Need to specify BINDIR or the executable ends up in / 2000-08-22 14:26:04 +00:00
thorpej a86d1f4891 Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it).  Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.
2000-08-20 21:50:06 +00:00
itojun 85dda25e94 move "options PULLDOWN_TEST" into sys/sys/mbuf.h (in #ifdef _KERNEL),
as it is no wthe default setting for everyone.

the reason we still use the name "PULLDOWN_TEST" while it is now default:
kame code sharing.
2000-08-13 01:31:15 +00:00
leo a9d83b6c6f Add ahdilabel to SUBDIR. 2000-08-07 14:30:39 +00:00
leo 3f496a2588 AHDI label editor 2000-08-07 09:23:40 +00:00
tv 0505a9e28a Eliminate the other %:, using vsnprintf followed by printf. 2000-07-28 15:40:24 +00:00
tv ce9fd05593 Avoid a nonstandard %: format: printf("%:", fmt, ap) -> vprintf(fmt, ap) 2000-07-28 14:46:37 +00:00
mason 4a353b5330 Moving to a default of 64 PTYs. 2000-07-27 17:53:35 +00:00
jdc e98c241a12 Make these work with obj directories. 2000-07-23 20:40:44 +00:00
jdolecek 89ccc75157 use _C_LABEL() for bootversion, instead of hardcoding the reference as _bootversion 2000-07-08 14:41:04 +00:00
cgd 0b9c36b715 undef PS after inclusion of net/netisr.h to avoid conflict w/ machine/reg.h 2000-07-02 05:43:43 +00:00
cgd a5c13f9ad4 Kwality control:
* put #includes of opt headers and headers to get protos used by
  net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
  in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
  local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
  netisr_dispatch.h (pc532) to use it.
2000-07-02 04:40:33 +00:00
itojun d76ae83df8 add PULLDOWN_TEST for all the platforms.
XXX should be moved to somewhere else when stabilized
2000-06-30 17:10:15 +00:00
mrg ca5133d3fb remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 08:22:17 +00:00
leo 4f253c9e18 When mapping non-cacheable memory with bus_space_map, make sure we use the
precise (serialized) way.
2000-06-29 07:40:04 +00:00
leo ffa869113a Get 060 CacheCopyBack support in line with the amiga (and working ;-) 2000-06-29 07:36:16 +00:00
mhitch e87450fc4b Add cdev_decl() to declare mm*() routines. 2000-06-29 01:55:57 +00:00
mrg e185413725 remove redudant <vm/pmap.h> includes. <vm/pmap.h> -> <uvm/uvm_pmap.h> 2000-06-27 04:18:48 +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 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
fvdl 1ee7d22c0b Remove prefix construction for softdeps. Add SOFTDEP option to GENERIC. 2000-06-22 20:27:49 +00:00
veego 223d7455c7 Remove the obsolete config fragments for kernel crypto, because the IPsec
crypto code is now in the kernel source tree.
2000-06-14 22:02:13 +00:00
leo 3e4dbe0e25 Throw in a bunch of _C_LABEL macro's. (Hi Klaus ;-) 2000-06-13 14:48:44 +00:00
leo 30bae800ae Mark 'n' explicitely as output of the 'mulul' instruction. 2000-06-07 14:26:11 +00:00
soren a9aa2abf94 defopt SYSCALL_DEBUG. 2000-06-06 18:52:30 +00:00
leo 0118b9d71e _qs -> _sched_qs 2000-06-06 13:44:30 +00:00
leo 45c84d3f9c Fix prototype definition of findroot(). 2000-06-06 11:09:46 +00:00
jhawk c063b64a2b Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)
2000-06-05 23:44:55 +00:00
cgd cffb580806 Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
2000-06-04 19:14:14 +00:00
matt 9169d99f2a Don't pass booted_* to findroot/getdevice, access them via the globals.
Also, make findroot static.  This eliminates unneeded clearing of them
and make their use consistent among the ports.
2000-06-01 15:38:20 +00:00
matt c9aff328d9 Make booted_device global (and booted_parition for consitency).
Eliminate it from header files and other extern definitions.
2000-06-01 00:49:49 +00:00
cgd 47449a63d2 kill __P in these files. (I had to look at them anyway with an eye for
adding some protos... and adding them with __P seems wrong, but mixing
__P and not __P in the same file seems wrong too, so...)
2000-06-01 00:04:50 +00:00
leo 4b3b8618df Fix some bugs in clkread(). These bugs caused strange time leaps. 2000-05-31 12:27:30 +00:00
thorpej 8871d8563a Add a comment on single-processor systems about p_cpu being initialized
by fork1().
2000-05-31 05:06: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
thorpej 8964c35eca Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor.  Test against SONPROC as appropriate rather than
combinations of SRUN and curproc.  Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
2000-05-26 00:36:42 +00:00
thorpej 1140468205 Use preempt(), not an open-coded equivalent (which won't be
equivalent for long).
2000-05-24 16:48:33 +00:00
thorpej 463931b3ba Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
2000-05-16 05:45:44 +00:00
minoura 879e4dbe7c defopt FPSP. 2000-05-14 14:13:50 +00:00
leo eeecd4445a The console stuff might also be needed by 'ser'. Also update the names of
the serial ports in the comments.
2000-05-09 14:30:47 +00:00
leo 793cd652e3 Add some {u}vm includes for the sake of PHOLD(). 2000-05-09 10:29:01 +00:00
hubertf 9f48bba3ae Add "install" target, so "make install" after building the kernel
does something useful.  The target can be redefined by putting a
install-kernel-${MACHINE_NAME} target that fits your needs into
/etc/mk.conf.
2000-05-09 00:56:21 +00:00
thorpej 6a33c86623 HAVE_GCC28 -> HAVE_EGCS, and make it match gcc 2.9 as well. Also,
make the use of -Wno-uninitialized explicit, don't rely on a compiler
hack to do it for us.
2000-05-09 00:32:19 +00:00
thorpej f51470a514 Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED.  These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case).  Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
2000-04-29 03:31:45 +00:00
itojun 3be41bae18 add stf pseudo interface (commented out due to possible security risks) 2000-04-19 06:50:27 +00:00
leo 7d08f8e623 Add dummies for barrier methods (copied from i386). 2000-04-11 07:12:47 +00:00
leo 9b47c7431d Now what are we doing with the return value of splx()? (probably a pasto) 2000-04-11 07:08:45 +00:00
thorpej 4044b5a41c Use separate callouts for motor-on and motor-off. Fixes a condition
where the floppy driver would wedge because a motor-on timeout would
be cancelled by another I/O operation cancelling a motor-off timeout.

From enami tsugutomo <enami@sm.sony.co.jp>.
2000-04-07 16:58:53 +00:00
leo 469b432d2d Make this compile with -DDEBUG 2000-03-30 13:28:28 +00:00
leo 27d334cf76 Nuke a bunch of cf_unit abuses. 2000-03-29 14:19:22 +00:00
simonb 2f1fef39b3 Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
2000-03-28 23:57:24 +00:00
leo d4ff1a5f4e This file was forgotten in the commit with log message:
Move the ite_default_* variables to ite.c. They are generic ite.
2000-03-27 14:08:39 +00:00
kleink 230876cf26 Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
  make them type-generic, which is necessary i.e. to operate on file offsets
  without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
  integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
2000-03-26 20:42:21 +00:00
thorpej b667a5a357 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:30:07 +00:00
cgd 7c35662066 add commented out option PCI_CONFIG_DUMP whever there's a PCIVERBOSE. 2000-03-22 00:58:16 +00:00
tron e86957458a Install "machineendian_machdep.h". 2000-03-17 22:36:31 +00:00
mycroft 9e21b6555a In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
2000-03-17 00:09:18 +00:00
oster 1bad2e1909 Add the RAIDframe device major to the machine-dependent config files
so that the right entries get added to dev_name2blk[].  Needed for / on RAID.
(Whoops!  I missed checking these in when adding the RAID_AUTOCONFIG stuff.)
2000-03-14 15:56:51 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
simonb 4eb55e447c Do the "<space><tab>" thing with the RAID_AUTOCONFIG option. 2000-02-29 06:32:20 +00:00
oster d9c47013b2 Defopt 'RAID_AUTOCONFIG'. Adding 'options RAID_AUTOCONFIG' turns on
the component auto-detection and auto-configuration of RAID sets.
Also, add "#options RAID_AUTOCONFIG" to the GENERIC config files.
2000-02-26 17:35:33 +00:00
erh 8f03b9a04a Define the DONETISR macro and use netisr_dispatch.h. This is to cut down on code duplication and to standardize the available NETISRs across all ports. 2000-02-21 20:38:46 +00:00