Commit Graph

1933 Commits

Author SHA1 Message Date
cgd 39ea91226c move the boot/disk.* code to common/blkdev.*, and gut it. The previous
guts were actually functionally equivalent to the current guts, but were
much larger, filled with bugs, and indeed poked around at the disklabel
when some of those bugs prevented them from ever using the disklabel!
1999-04-02 03:17:28 +00:00
cgd 7c4cd2bb56 unrevert the changes made last night, now that 'installboot' has
had a few bugs fixed that let the problem slip in, and since bootxx's
Makefile now goes out of its way to satisfy installboot's undocumented
and totally unreasonable assumptions about the bootxx file it's operating
on.  No point in fixing the assumptions, because sooner rather than later
this incarnation of installboot is going to die.
1999-04-02 03:11:57 +00:00
cgd 701c007366 correctly calculate the space left for block addresses, and avoid
assuming that there's always going to be space for the whole boot
block info struct.  (the assumption would cause a malloc'd region
to be overrun, if it proved false.)
1999-04-02 02:47:45 +00:00
ross 9c323a2d8b Revert recent changes, which either don't work, or can't be built
successfully by ordinary mortals.
1999-04-01 11:08:39 +00:00
thorpej 967b8c433c Don't call configure() from cpu_startup(). 1999-04-01 00:17:45 +00:00
cgd bd44d9c286 as pointed out by simonb, since we've moved to ELF __main() calls
aren't emittid anymore.
1999-03-31 16:12:51 +00:00
mycroft 83cb600015 Enable rnd. 1999-03-31 14:29:33 +00:00
cgd 801906b363 GC; unused 1999-03-31 06:37:13 +00:00
cgd be6a1d529a separate defns for primary and unified boot blocks 1999-03-31 06:28:41 +00:00
cgd 77a9cb81ff implement NO_GETCHAR, to remove getchar(), and NO_PUTCHAR_HALT to remove
the check in putchar() for character input (specifically control-c, which
causes a halt).
1999-03-31 03:34:21 +00:00
cgd c5fa912232 no point in passing &ret to test_getchar(); nobody cares! also, no
point in doing the check-for-abort functionality twice in putchar()
(once with a call to test_getchar(), once open coded).
1999-03-31 03:22:57 +00:00
cgd 98f67b8238 In putchar(), don't open-code two calls to the prom puts routine. Instead,
call a helper function (putonechar()).  Savings: 64 bytes.  Cha-ching!
1999-03-31 03:10:00 +00:00
cgd 3665d82d1a GC cpu_number() and turn alpha_pal_imb() into inline assembler. 1999-03-31 03:04:21 +00:00
cgd 51a85dabbb rename the C main() function to main_(). this avoids gcc's implicit
call to __main(), and therefore saves the size of the call and the
  size of a stub implementation of __main().
in the primary boot block, don't bother saving/restoring the argument
  passed in from the caller.  There is no such argument (that we care
  about, at least) to the primary.  (for secondary, it's the firmware
  FD being used.)
1999-03-31 03:03:01 +00:00
cgd 4a209e30f8 Compile with -Os (optimize for size).
Clean up the "Region 1" related definitions, and define load addresses,
  max load size, and max total size for as many boot block types as we can.
  (types = unified, primary, secondary).  We can't always define all
  values for all boot blocks, though.
Make CPP flags selection less gross.
Use objcopy rather than headersize (yay, evil gets a stake to the heart!).
Use a little shell script to verify that the sizes of the boot blocks are OK.
Do not compile too much more of libsa than we actually have to.
1999-03-31 02:52:11 +00:00
mycroft d05df6042f Add mpu at isapnp, currently commented out. 1999-03-29 06:16:34 +00:00
mycroft e3c8daf920 Panic if access_type has bits not in prot. 1999-03-29 05:31:24 +00:00
drochner 31a77e61b3 Leave out display console related bits if wscons is not compiled in.
Should fix link error reported by Kevin <kev@drule.org>.
1999-03-28 13:48:40 +00:00
drochner a17279574e alpha uses the mi wscons; remove the old bits 1999-03-27 17:36:30 +00:00
ross 5bc91073ce Bug fix for the bug fix. Be sure to prom_close() in bootxx and boot, but not
in netboot, and not in diskclose(), but after trying all kernelnames[].
1999-03-27 09:01:27 +00:00
thorpej b69d0d9e89 Pay attention to "access_type" in pmap_enter(). 1999-03-27 02:48:32 +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
ross 6ee909b24f Fix bug found by Bernd "Veego" Ernesti: close the console disk channel. 1999-03-26 20:53:12 +00:00
thorpej 567cda0537 Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool
pages.  So, mb_map wasn't actually being used.  Saves around 4MB of
kernel virtual address space in a typical configuration.

Garbage-collect the related VM_MBUF_SIZE constant.
1999-03-26 00:15:04 +00:00
mrg ca5f9685bb clean up kernel/config files files for machVM lossage. 1999-03-24 06:06:09 +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
drochner 76fa1751fe Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
1999-03-23 21:29:03 +00:00
ross be177a7fd4 PCI: +bha
+en
	+ex
	+fxp
	+le
	+pcscp
MII:	+exphy
EISA:	+ahb
	+uha
1999-03-22 09:19:57 +00:00
ross 60fe60deaa Enable fuword(9), fuiword(9). 1999-03-22 09:17:11 +00:00
mycroft df7eadf2d6 More PnP/audio goo. Need an Alpha joystick driver. B-) 1999-03-22 07:55:14 +00:00
mycroft 8e621ce2ee Add MIDI and sequencer devices. They seem to work, even. 1999-03-22 07:52:56 +00:00
thorpej a77ccfe460 Garbage-collect. 1999-03-20 01:40:25 +00:00
cgd 10af862bf7 move isa/isa_machdep.h to include/isa_machdep.h. (can't do it via
repository copy because alpha already had an include/isa_machdep.h in
the attic.)
1999-03-19 05:04:42 +00:00
cgd 8e85aac1ce move pci/pci_machdep.h to include/pci_machdep.h. (can't do it via
repository copy because alpha already had an include/pci_machdep.h in
the attic.)
1999-03-19 03:40:46 +00:00
cgd 08eb14f874 Moved to arch/alpha/include/isapnp_machdep.h,v 1999-03-19 03:14:06 +00:00
cgd 0d0fd78b4e Moved from arch/alpha/isa/isapnp_machdep.h,v 1999-03-19 03:14:05 +00:00
cgd e962a59308 move tc/tc_machdep.h to include/tc_machdep.h. (can't do it via
repository copy because alpha already had an include/tc_machdep.h in
the attic.)
1999-03-19 03:12:31 +00:00
cgd 88590a9cd1 move eisa/eisa_machdep.h to include/eisa_machdep.h. (can't do it via
repository copy because alpha already had an include/eisa_machdep.h in
the attic.)
1999-03-19 02:59:49 +00:00
chs ab7269f62a if uvm_fault() fails with KERN_RESOURCE_SHORTAGE, send a SIGKILL
and print a message about it.  this will be used to recover from
out-of-swap conditions.
1999-03-18 04:56:01 +00:00
drochner 04df246f03 identify ST_DEC_6600 (EV6) - as unsupported :-( 1999-03-17 19:00:01 +00:00
sommerfe bc533621ed defopt MINIROOTSIZE 1999-03-17 18:59:21 +00:00
drochner 597bc445b1 add ST_DEC_6600, clean up some comments 1999-03-17 18:58:51 +00:00
ross 1ae12eef5a g/c proto 1999-03-17 18:28:11 +00:00
ross f10b320472 XXX rm ioasicprint() & ioasic_submatch() because of <dev/tc/ioasic_subr.c> XXX 1999-03-17 17:50:06 +00:00
nisimura 1990f5b094 - Make compilable with 32bit long integer system. 1999-03-15 05:28:07 +00:00
jonathan ef79649fc1 MI ioasic softc and child-device structs, gc duplicate struct definitions.
Add MI ioasic functions, but dont enable on alpha until tested.
1999-03-15 01:25:26 +00:00
drochner c0433847af make complaints about missing platform support match reality 1999-03-13 19:46:58 +00:00
perry 240d1ad927 remove ovbcopy references 1999-03-12 23:03:31 +00:00
perry 5b25cace4c ovbcopy -> memmove 1999-03-12 22:59:23 +00:00
perry 02a2323b29 ovbcopy->memmove 1999-03-12 22:56:21 +00:00
perry a92175a153 nuke ovbcopy 1999-03-12 22:54:58 +00:00
ross 0325be06dd New file, included if present for ${MACHINE_ARCH} by bsd.kmod.mk. 1999-03-10 06:41:48 +00:00
mycroft e7f1ddf4a1 Update for psm -> pms conversion. 1999-03-06 06:12:49 +00:00
mycroft 0d847118f6 XXX Disable PnP until pcic_isapnp works on this port. 1999-03-05 07:33:19 +00:00
chs ae4890afdf fix printf format types and other stale DEBUG code. 1999-03-04 06:47:21 +00:00
chs 6b8f2e95a4 fix printf format types. 1999-03-04 06:46:23 +00:00
mjacob 7c785b8a35 Well, sizeof needs to be printed with a %lu- I guess not many people build
debug kernels!
1999-03-04 02:16:56 +00:00
nisimura 370ab4d04e - Make compilable with DECstation. Looks running well on MI SCSI enabled
kernel.  Will be relocated to sys/dev/tc/ soon.
1999-03-02 01:44:30 +00:00
ross e47e3c9f45 schedclk() -> schedclock(), for consistency with hardclock(), statclock(), ...
update comments for recent scheduler mods
1999-02-28 18:14:57 +00:00
explorer 3ebb419571 Update to slightly altered rnd_attach_source() api 1999-02-28 17:08:05 +00:00
scottr d32ed292af defopt BUFCACHE and BUFPAGES. 1999-02-27 06:39:34 +00:00
thorpej 3dfa044911 Move declaration of prom_slock. 1999-02-26 03:59:14 +00:00
thorpej 2b5175cd53 Fix printf formats. 1999-02-26 03:57:10 +00:00
ross 321c6be8de Enable eap (Ensoniq AudioPCI), sb (SoundBlaster), and sv (S3 SonicVibes). 1999-02-25 12:37:39 +00:00
thorpej 07304bd858 On multiprocessor systems, it is possible that a lev1map might be in use
by two processors concurrently.  This means that we cannot modify the
lev1map in use by the processor which wishes to use the PROM.

Fix this by creating a separate lev1map for PROM users.  This lev1map
is a copy of the kernel_lev1map, with the exception of the necessary
PROM mapping.  When a processor wishes to use the PROM, it switches
its PTBR to point at the prom_lev1map, performs the PROM operation,
and switches back to its previous lev1map.

Note that kernels without multiprocessor support use the old method
of modifying the current lev1map.

Also, serialize access to the PROM via a spin lock.
1999-02-25 03:43:14 +00:00
thorpej 45a5ad4153 Fix an uninitialized variable. 1999-02-24 23:35:25 +00:00
thorpej 726091e400 Explicitly include opt_multiprocessor.h, rather then relying on its
implicit inclusion by pmap.h.
1999-02-24 19:36:04 +00:00
thorpej a65d3ba579 Note that the way the temporary PROM mapping is handled is completely
broken on multiprocessor systems.
1999-02-24 19:25:56 +00:00
thorpej 4cdbd84b63 First-cut at multiprocessor TLB shootdown. This simple implementation can
probably be improved somewhat, but an attempt to be efficient has been
made.

Note: TLB shootdowns are NOT YET ENABLED.
1999-02-24 19:22:16 +00:00
thorpej 911465b54c Restructure the IPI code a little, allowing multiple IPIs to be sent at
once.  Add a way to broadcast an IPI to all processors (except the sender,
obviously).  Add an IPI for TLB shootdown.
1999-02-24 19:17:09 +00:00
thorpej 76e4555f2c Now that we have the kthread mechanism, massively clean up the way
additional processors are spun up on multiprocessor Alpha systems.
Now, each processor gets its own idle thread (the primary processor
uses proc0).  This idle thread is used in switch_exit(), rather than
explicitly referencing proc0.

Also, make `curproc', `fpcurproc', and `curpcb' per-cpu values.  This
required some data structure rearrangement; cpu info is now statically
allocated in the BSS, rather than via malloc(), and cpu_softc is gone.
(Modeled somewhat after NetBSD/sparc's multiprocessor info structures.)
1999-02-23 03:20:00 +00:00
ross 16204c31ac Generate the new schedclk() call into the MI kernel. Set schedhz
here to indicate that.
1999-02-23 02:56:40 +00:00
ross b4a33c4e60 Scheduler bug fixes and reorganization
* fix the ancient nice(1) bug, where nice +20 processes incorrectly
  steal 10 - 20% of the CPU, (or even more depending on load average)
* provide a new schedclk() mechanism at a new clock at schedhz, so high
  platform hz values don't cause nice +0 processes to look like they are
  niced
* change the algorithm slightly, and reorganize the code a lot
* fix percent-CPU calculation bugs, and eliminate some no-op code

=== nice bug === Correctly divide the scheduler queues between niced and
compute-bound processes. The current nice weight of two (sort of, see
`algorithm change' below) neatly divides the USRPRI queues in half; this
should have been used to clip p_estcpu, instead of UCHAR_MAX.  Besides
being the wrong amount, clipping an unsigned char to UCHAR_MAX is a no-op,
and it was done after decay_cpu() which can only _reduce_ the value.  It
has to be kept <= NICE_WEIGHT * PRIO_MAX - PPQ or processes can
scheduler-penalize themselves onto the same queue as nice +20 processes.
(Or even a higher one.)

=== New schedclk() mechansism === Some platforms should be cutting down
stathz before hitting the scheduler, since the scheduler algorithm only
works right in the vicinity of 64 Hz. Rather than prescale hz, then scale
back and forth by 4 every time p_estcpu is touched (each occurance an
abstraction violation), use p_estcpu without scaling and require schedhz
to be generated directly at the right frequency. Use a default stathz (well,
actually, profhz) / 4, so nothing changes unless a platform defines schedhz
and a new clock.  Define these for alpha, where hz==1024, and nice was
totally broke.

=== Algorithm change === The nice value used to be added to the
exponentially-decayed scheduler history value p_estcpu, in _addition_ to
be incorporated directly (with greater wieght) into the priority calculation.
At first glance, it appears to be a pointless increase of 1/8 the nice
effect (pri = p_estcpu/4 + nice*2), but it's actually at least 3x that
because it will ramp up linearly but be decayed only exponentially, thus
converging to an additional .75 nice for a loadaverage of one. I killed
this, it makes the behavior hard to control, almost impossible to analyze,
and the effect (~~nothing at for the first second, then somewhat increased
niceness after three seconds or more, depending on load average) pointless.

=== Other bugs === hz -> profhz in the p_pctcpu = f(p_cpticks) calcuation.
Collect scheduler functionality. Try to put each abstraction in just one
place.
1999-02-23 02:56:03 +00:00
thorpej fbca0a78d7 Do all the fancy printf format checking. 1999-02-23 01:00:51 +00:00
thorpej ca42d26309 GENERIC already has DDB. 1999-02-22 19:14:46 +00:00
fvdl f927176889 Add internal 3com PHYs for the ex driver. 1999-02-22 07:44:50 +00:00
mycroft 0d22ee1396 Use DMAMODE_DEMAND. Tested on an AS200. 1999-02-22 02:52:24 +00:00
mycroft 4449a6ef39 Kill vestiges of isa_establish(). 1999-02-19 16:15:06 +00:00
mycroft e3dc7a4881 Okay; pcic_isapnp doesn't quite work yet. 1999-02-18 21:54:04 +00:00
mycroft 9bf7aaa65f Add pcic_isapnp. 1999-02-18 21:27:54 +00:00
thorpej bd72e4386f Add floppy controller and drives. 1999-02-18 20:39:04 +00:00
mycroft 3bf5fab3c0 Add a floppy drive. 1999-02-18 20:18:54 +00:00
thorpej 1df60a8989 Floppy driver for NetBSD/alpha, copied from i386 port, and munged to take
out the i386'isms (i.e. no NVRAM read for default floppy type; floppies
just default to 1.44MB).
1999-02-18 20:15:53 +00:00
mycroft 1445849c2f Add:
* PCI VGA (tested with Imagine-128)
* ISA SoundBlaster (tested with SB1!)
* AudioPCI (tested with ... AudioPCI!)
* PnP SoundBlaster (currently loses in 16-bit mode due to extent lossage)
* SonicVibes (currently loses; see sv.c commit log)
1999-02-18 16:42:31 +00:00
mycroft 579eeb8cf7 If we have to increase the boundary due to the spill pages, use the old
boundary as an alignment.  Otherwise we fail to enforce the old boundary,
causing massive lossage.
1999-02-18 08:55:16 +00:00
mjacob 1611b4799f Gronk. DWLPX comment in a MCPCIA file. 1999-02-17 03:17:17 +00:00
veego 8dcc2f0651 Add support to boot from ide hard disks. 1999-02-16 07:25:43 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
thorpej 22a5cb007f Fix printf format warnings on Alpha. 1999-02-13 02:41:40 +00:00
thorpej 02d221f94a Fix printf format problems on Alpha. 1999-02-12 06:25:13 +00:00
thorpej db631acd8a Fix printf format problems on Alpha. 1999-02-12 06:07:52 +00:00
thorpej 5194c207d0 Fix printf format problems on Alpha. (IRONIC?!) 1999-02-12 01:45:42 +00:00
thorpej c9f76153fa Add some missing newlines in printfs. 1999-02-08 19:37:29 +00:00
mycroft 5542a949cd Config for for an AS200 with TGA/WSS/PCMCIA (although the TGA and PCMCIA aren't
fully functional yet).
1999-02-06 20:22:43 +00:00
thorpej 8ef63cdb2c Print some more info in pmap_alloc_physpage() if no pages are available,
and enhance some DIAGNOSTIC messages.
1999-02-04 19:49:22 +00:00
thorpej 390864a7a5 Define a macro which has human readable strings corresponding to PGU_*
constants.
1999-02-04 19:48:21 +00:00
mycroft be1af660c0 Don't set DCD_IE in the frontends. KGDB doesn't even use DCD, and the tty
frontends get it from zsparam() anyway.
1999-02-03 20:25:05 +00:00
tron 899ac42bec Fix bug exposed by new "mkdep" program:
"${SFILES}" is empty so that "cc" will fail with "No input files"
during "mkdep".
1999-02-01 23:18:56 +00:00
ross a1b52a0723 Remove the original -g, as a duplicate was (accidently?) added in 1.108,
and comment it out like it used to be, at least for now.
1999-01-28 18:03:56 +00:00
thorpej 72a506557e Update. 1999-01-26 01:38:00 +00:00