Commit Graph

471 Commits

Author SHA1 Message Date
phk
6a5dc97620 Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the
struct cdevsw passed to it.  cdevsw_add_generic() is no longer
needed, cdevsw_add() does the same thing.

cdevsw_add() will print an message if the d_maj field looks bogus.

Remove nblkdev and nchrdev variables.  Most places they were used
bogusly.  Instead check a dev_t for validity by seeing if devsw()
or bdevsw() returns NULL.

Move bdevsw() and devsw() functions to kern/kern_conf.c

Bump __FreeBSD_version to 400006

This commit removes:
        72 bogus makedev() calls
        26 bogus SYSINIT functions

if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.

I4b and vinum not changed.  Patches emailed to authors.  LINT
probably broken until they catch up.
1999-05-31 11:29:30 +00:00
phk
7e4a9dced9 This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".

        Initialize the d_maj and d_bmaj fields.

        The d_reset field was not removed, although it is never used.

I used a program to do most of this, so all the files now use the
same consistent format.  Please keep it that way.

Vinum and i4b not modified, patches emailed to respective authors.
1999-05-30 16:53:49 +00:00
dfr
024249e17e Use resource allocation apis to get ports. 1999-05-30 10:49:25 +00:00
gallatin
58ba6a68ef When memory mapping a PCI device (like XFree86 does) on an XP1000, we must
use ALPHA_PHYS_TO_K0SEG(offset) rather than just plain offet.  I've verified
that this does not break other platforms (I've tested an AlphaStation 200
and a Personal Workstation 500au with this patch).

As to why this works, well.. Its black magic as far as I know.  I obtained
this hack from Myricom, who in turn, obtained it from Compaq engineers.
Without this hack, XFree86 cannot talk to a PCI graphics card.

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
Obtained from:  feldy@myri.com (Bob Felderman)
1999-05-29 19:47:51 +00:00
gallatin
ec6b8177b1 A small change to allow automatic detection of the boot
disk on Compaq XP1000's where Disk zero is dka0.0.0.6.1,
eg bus #1, slot #6.

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
1999-05-29 19:23:20 +00:00
alc
a9b474952d pmap_object_init_pt:
The size of vm_object::memq is vm_object::resident_page_count,
	not vm_object::size.
1999-05-28 05:38:56 +00:00
gallatin
4a9a12021d A forgotten bit of my ST6600 commit 1999-05-27 22:03:31 +00:00
gallatin
8d262eb793 Add support for the DEC_ST6600 family of alphas. This includes the
Compaq XP1000, AlphaServer DS20, AlphaServer DS10, and DP264

This has been tested *only* on XP1000's.  I'll be interested to hear from
owners of other types of DEC_ST6600 alphas.

I'd like to thank Don Rice of Compaq for providing the documentation required
to support this platform on FreeBSD.  I'd also like to thank Doug Rabson for newbus,
and for helping me get a multiple hoses working with newbus.

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
1999-05-26 23:22:14 +00:00
gallatin
b5afe950d0 Allow chipset drivers to specify the direct-mapped DMA window's mask in
preparation for tsunami support.  Previous chipsets' direct-mapped DMA
mask was always 1024*1024*1024.  The Tsunami chipset needs it to be
2*1024*1024*1024

These changes should not affect the i386 port

Reviewed by:	Doug Rabson <dfr@nlsystems.com>
1999-05-26 23:01:57 +00:00
dt
111142c39e From our i386 counterpart:
|revision 1.13
|date: 1995/09/15 23:49:23;  author: davidg;  state: Exp;  lines: +15 -2
|Check for page being resident when doing I/O with /dev/kmem and return
|EFAULT if it is not resident. This prevents the system from manufacturing
|a zero-fill page for unused but allocated areas of the kernel's VM.
1999-05-25 19:32:53 +00:00
jb
4454c28c9e Remove the mfs stuff now that mfs_init() does the MFS_ROOT initialisation. 1999-05-24 00:54:17 +00:00
dfr
6f9e5e8541 * Factor out the common code between the isa bus drivers for i386 and alpha.
* Re-work the resource allocation code to use helper functions in subr_bus.c.
* Add simple isa interface for manipulating the resource ranges which can be
  allocated and remove the code from isa_write_ivar() which was previously
  used for this purpose.
1999-05-22 15:18:28 +00:00
gallatin
f8d64a0d5d Add support for multiple PCI "hoses" used on various alpha platforms.
The specific intent of this commit is to pave the way for importing
Compaq XP1000 support.  These changes should not affect the i386 port.

Reviewed by: Doug Rabson <dfr@nlsystems.com>
(actually, he walked me through most of it & deserves more than reviewd-by
credit )
1999-05-20 15:33:33 +00:00
peter
5273339761 Nearly forgot, remove pci_cfgopen() - it's unused on the alpha and is no
longer exported on the i386.
1999-05-18 23:20:14 +00:00
dfr
01e0215b73 Add support for clock calibration. 1999-05-18 21:26:21 +00:00
dfr
a72b1925b4 Calibrate the processor cycle counter instead of believing what the
firmware says.
1999-05-18 21:24:16 +00:00
dfr
1cd9ffa448 Another minor fix from i386 to remember when the port is set to -1. 1999-05-18 20:43:49 +00:00
dfr
c9ba103c72 Update isa_print_child to match i386.
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-05-18 19:44:54 +00:00
dfr
e6e809650d Make sure sysctls use udev_t, not dev_t.
Submitted by: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu>
1999-05-15 18:14:03 +00:00
dfr
6c3f971989 Make sure sysctls use udev_t, not dev_t.
Submitted by: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu>
1999-05-15 17:56:34 +00:00
dfr
8a8a702dc2 * Define a new static method DEVICE_IDENTIFY which is called to add device
instances to a parent bus.
* Define a new method BUS_ADD_CHILD which can be called from DEVICE_IDENTIFY
  to add new instances.
* Add a generic implementation of DEVICE_PROBE which calls DEVICE_IDENTIFY
  for each driver attached to the parent's devclass.
* Move the hint-based isa probe from the isa driver to a new isahint driver
  which can be shared between i386 and alpha.
1999-05-14 11:22:47 +00:00
dfr
29cc579496 The previous log message should have read:
Use breakpoint() to start debugger to avoid crashing back to the firmware
when gdb tries to print the msg argument to Debugger().
1999-05-14 11:15:13 +00:00
dfr
56970da499 Make sure to pass a dev_t to dkunit. 1999-05-14 11:13:21 +00:00
msmith
200224a5c1 Include <sys/systm.h> earlier as required by include changes. 1999-05-14 00:41:02 +00:00
dt
6a949d0b09 Oops, back out previous, it is not quite ready for commit and has nothing
to do with the commit message.
1999-05-11 18:59:56 +00:00
dt
ea807be7d4 Initialize bootifo.envp, so that the kernel environment can be used.
Set kernelname. Get it as getenv("kernelname"), bootinfo.booted_kernel does
not contain path to the directory.
1999-05-11 18:55:18 +00:00
peter
8b9aff36cb Move the mfs_getimage() prototype to mfs_extern.h duplicating it
everywhere.
1999-05-10 17:12:45 +00:00
peter
74d7d37703 Serves me right for doing this by inspection and then a build afterwards
on a remote machine. Sigh..
1999-05-10 16:36:42 +00:00
peter
8ddb1cf981 Don't do a nested extern for mfs_getimage() 1999-05-10 16:04:52 +00:00
peter
64e45eb951 Explicit brace to avoid nested else warnings 1999-05-10 16:02:11 +00:00
peter
4db7e673e1 Explicit braces to avoid nested else warnings 1999-05-10 16:00:56 +00:00
peter
6b994ad743 Add some explicit parens to avoid && within || warnings 1999-05-10 16:00:01 +00:00
peter
da8fe7f50a Fix warnings (unused vars) 1999-05-10 15:54:58 +00:00
peter
4689c04c59 Fix warnings (unused vars, long != int in printf) 1999-05-10 15:53:33 +00:00
peter
4e2b663a13 Fix warnings (I hope) 1999-05-10 15:51:23 +00:00
peter
2b57f94733 Give 'i' a type (int). 1999-05-10 15:48:01 +00:00
peter
9c6402325d Unused variable 1999-05-10 15:46:38 +00:00
dfr
56809581f0 Adjust console stuff now that makedev is no longer a macro. 1999-05-10 14:01:35 +00:00
dfr
400f185dc4 Remove obsolete 'config kernel' line. 1999-05-10 13:30:51 +00:00
peter
50db322904 Make corresponding changes to match config update 1999-05-10 03:02:22 +00:00
peter
932a086d1a Apparently we need to define rootdev and dumpdev here now. This is
(obviously) not finished yet.
1999-05-10 02:56:38 +00:00
peter
f797dd3476 s/main/mi_startup/ 1999-05-09 19:03:55 +00:00
phk
e05bc3b49a Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference between
a major number for a dev_t.
1999-05-09 13:00:50 +00:00
dfr
7d04d62126 Remove DDB. 1999-05-09 11:42:19 +00:00
phk
bea63b9cdb Don't confuse dev_t and major numbers in DEV_MODULE() 1999-05-09 08:58:45 +00:00
yokota
143736b6b7 Reserve a major number for the frame buffer device. 1999-05-09 05:02:15 +00:00
dfr
e4989c23fe Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +00:00
peter
3f78b53e89 I'm sick of the automatic rename of /kernel to /kernel.old while doing
development that leads to lots of crashes during boot.

I have made a 'reinstall' target (like in ports, and reinstall.debug)
This is most useful if you want to keep /kernel.old as a known bootable
kernel.  If you test a new kernel and have to reboot for a fix, a
'make reinstall' will install the new kernel over the top of the old
non-viable one, leaving the old one untouched.  This is mainly meant
for development, not general users.
1999-05-08 20:04:39 +00:00
phk
500e41bd71 I got tired of seeing all the cdevsw[major(foo)] all over the place.
Made a new (inline) function devsw(dev_t dev) and substituted it.

Changed to the BDEV variant to this format as well: bdevsw(dev_t dev)

DEVFS will eventually benefit from this change too.
1999-05-08 06:40:31 +00:00
mjacob
cd92ca3d8e Propagate i386 change to alpha (bdevsw[] -> bdevsw()). 1999-05-07 17:48:44 +00:00