Commit Graph

642 Commits

Author SHA1 Message Date
mrg 0eeab9735f fix another warning. 2000-05-17 09:12:10 +00:00
eeh 3b90b5c5c4 Add support for bus_dma_load_raw() so the le driver will work again. 2000-05-17 02:31:12 +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
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
augustss 3a6e3a4670 Add (sometimes commented out) MIIVERBOSE option. 2000-05-08 13:49:44 +00:00
mrg 0ce52a2a08 implement U2P PCI support in psycho_init. this is completely untested. 2000-05-06 04:15:35 +00:00
hannken 0b2854eb6c Fix for lint during build of libc. 2000-05-05 20:12:00 +00:00
thorpej 855b79db92 Let each platform typedef the new __cpu_simple_lock_t, which should
be the most efficient type used for the atomic operations in the
simplelock structure, and should also be __volatile.
2000-05-02 04:41:04 +00:00
thorpej a2edf1690f Fix a declaration inside __ldstub(). 2000-05-01 00:46:29 +00:00
thorpej dc8f3d3b3f Oops, install <machine/lock.h> on these systems, too. 2000-04-29 03:45:42 +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
mrg dab52c26ad - add a note about streaming buffers and US IIi not having them.
- make some debugging messages in iommu_remove() saner and add some more.
- decrement 'len' in the no streaming buffer case, also.
- in iommu_dvmamem_map(), do not enter these mappings into the IOMMU,
  only into the CPU (the former is done at _load time).
- make a panic that shouldn't happen a DIAGNOSTIC.
2000-04-25 14:59:38 +00:00
eeh 5099c60132 If we trap due to a bad kernel stack, try to switch to the interrupt strack
before breaking into the debugger.
2000-04-22 22:06:06 +00:00
mrg 1013298c2a whole bunch of changes:
- merge IOMMU DVMA code from sbus/psycho into iommu.c.  this code was
  identical and a few minor inconsistencies had crept in.  this way
  keeps them all in sync.
- with this code gone from psycho, merge the psycho.c and psycho_bus.c
  files.  same with ebus/ebus_bus.c.  delete the _bus.c files.
- add a _ds_boundary member to the dma segment structure, so that later
  dma mappings can find this value.
- set _ds_boundary in machdep.c:_bus_dmamem_alloc().
- kill much dead code.
2000-04-22 17:05:59 +00:00
mrg db956d0701 s#\b#\n# so an error message appears correctly. 2000-04-22 16:42:25 +00:00
mrg 5aa4575432 - convert to DPRINTF() style debug messages.
- kill dead code.
- use the sbus dv_xname to construct a dvma map map, to pass to
  extent_alloc(), to help support multiple sbusses
2000-04-22 12:36:29 +00:00
mrg 6e576e3c03 clean up mdallocsys(). 2000-04-22 12:03:33 +00:00
pk e5ab0feccc Have prom_cngetc() wait until input has been typed. 2000-04-19 08:15:06 +00:00
itojun 3be41bae18 add stf pseudo interface (commented out due to possible security risks) 2000-04-19 06:50:27 +00:00
mrg 19a31e7b5e add a newline to this fake autoconfig line. 2000-04-19 02:26:08 +00:00
eeh c58f0ee9cd Prevent the system from getting watchdog reset by returning directly to user
mode if restoring the user window traps.  Also reduce the time we run with
%tl>0.
2000-04-18 02:12:25 +00:00
eeh 2aec15d3d3 Turn off traptrace before printing a panic message so we don't flush the useful
traces out with the printf guts, and wrap some lines at 80 columns.
2000-04-18 02:07:57 +00:00
mrg 2aba26f773 - auxio cleanup and sbus support.
- make GENERIC64 include GENERIC and set the 3 optoins it needs.  suggested
  by hubert feyrer.
- add a comment that we maybe should use the `bpp' driver, not the lpt, on
  the ebus because the `bpp' driver does DMA already.
- ebus_attach_args got a member renamed
2000-04-15 03:08:12 +00:00
mrg e4ca29ac00 kill dead code 2000-04-15 03:07:38 +00:00
tsutsui 7865e586d3 Typo in comments. (Zilog 8350 -> 8530) 2000-04-14 13:29:57 +00:00
mrg 01ff053e58 add bpt and lpt. fixes final gcc warnings for GENERIC. 2000-04-14 08:36:39 +00:00
mrg af6a8541e4 add some casts to (u_long) to shut up gcc. cleanup unused variables 2000-04-14 08:29:03 +00:00
mrg 726f5f3169 two more compiler warnings killed. 2000-04-14 04:08:26 +00:00
eeh 9b019404f8 Apparently gas 2.9.5 (don't ask) does not like to add values to %lo()
directives so move the additions inside %lo() to make it happy.
Hopefully this won't break older versions.
2000-04-13 18:40:27 +00:00
eeh 92aaaad1e1 Make /etc/mk.conf optional for kernel builds. 2000-04-13 16:57:51 +00:00
mrg fd85c1c4a2 avoid a potential memory leak. 2000-04-13 14:39:34 +00:00
mrg 5792df1cf9 - do the "options<space><tab>" thing everywhere.
- disable COMPAT_AOUT.
- enable hme at sbus/pci
- enable bpp at sbus
- clean up esp attachments
- enable all xxphy's
- sync GENERIC & GENERIC64.
2000-04-13 11:23:14 +00:00
mrg fa13d97855 this does not need auxreg.h 2000-04-13 09:54:43 +00:00
mrg b60fe7f45a store all the physical address bits. 2000-04-13 09:53:49 +00:00
mrg e7f3d69787 this does not need auxreg.h 2000-04-13 09:52:46 +00:00
mrg 542f08a422 add a version file. 2000-04-13 09:38:12 +00:00
mrg f2ab01bf42 copy the "sparc" clean/cleandir target code, so that "cleandir" actually does a "clean" 2000-04-13 09:23:38 +00:00
pk a388797ed5 Ignore unknown devices on mainbus. 2000-04-12 11:40:12 +00:00
chs 1f7a988bd2 unconditionalize "ifdef sparc". 2000-04-12 04:06:41 +00:00
mrg 1fdef1b204 deja vu: add "struct device *booted_device;" so raidframe links. 2000-04-12 00:47:10 +00:00
mrg b2d31a5cc9 - fix a speeling error
- rename some numbered labels to be a bit less confusing.
- remove dead code
- fix a debug error message (argh!)
2000-04-10 16:28:56 +00:00
mrg cb2b15a484 - UltraSPARC IIi does not have streaming buffers; don't try to find it's
diag regsiter to work out why the (non-existant) strbufs don't work.
- check for malloc failure in _all_ places.
- setup the PCI control register as recommended in the IIi users manual.
2000-04-10 16:11:23 +00:00
mrg 79f22c2c51 UltraSPARC IIi CPU has bits 6-10 of the INO hardwired to 1. when we
install an interrupt handler, make sure we set these bits to 1.  now,
interrupt_vector in locore can find our registered interrupt handlers
and at least try to setup a call to them.
2000-04-10 16:07:50 +00:00
mrg 304778e6c2 - IRSR_BUSY is bit 5 not bit 4.
- IRSR_MID(x) is &'d with 0x1f (5 bits) not 0xf.
2000-04-10 16:05:13 +00:00
mrg f7618dcb04 add 4 more bits for the PCI control register 2000-04-10 16:04:02 +00:00
pk cfadc0991a Get a kernel without DDB to build. 2000-04-10 13:34:18 +00:00
mrg e2ed27832e with these two, POWEROFSEVEN now compiles cleanly. 2000-04-08 15:15:41 +00:00
mrg 171d3a1576 don't use -Wuninitialized 2000-04-08 04:46:15 +00:00
mrg d0be8351d9 add casts to stop gcc complaining 2000-04-08 04:45:41 +00:00
mrg 4583d39d24 correct the pci ino->ipl table. shut up gcc once more. 2000-04-08 04:35:01 +00:00
mrg 5b5f175f38 - store the ebus's parent so we can find the IOMMU
- use generic iommu routines in the ebus code (uses the above)
- add some more comments.
2000-04-08 04:33:09 +00:00
mrg d360a37afd - remove unused variable.
- include <sparc64/sparc64/cache.h> to get cache_flush() prototype.
- remove an unnecessary cast.
2000-04-08 04:17:31 +00:00
mrg 34d04ff6db include <ddb/db_output.h> to get the db_printf() prototype. 2000-04-08 03:09:00 +00:00
mrg 748cfc6b99 rearrange a little to accommodate real SUNW,psycho support. 2000-04-08 03:08:20 +00:00
mrg 70e38e4034 actually, i wrote these in 2000 2000-04-08 03:07:07 +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
mrg 580ccd66ad make this work with years-old new-style mdsetimage, etc. 2000-04-06 13:39:26 +00:00
mrg 966add799c avoid some more compiler warnings, and fix a couple of errors. 2000-04-06 13:32:49 +00:00
mrg 6b64191106 add some more casts to shut up gcc. 2000-04-06 12:49:00 +00:00
mrg 736ce53ae5 - #include "opt_ddb.h" to get correct Debugger() prototype.
- add some (u_long) casts to shut up GCC.
2000-04-06 12:17:26 +00:00
mrg 2809e2c3c4 cast to u_int64_t before shifting by 32 bits; avoids compiler warning. 2000-04-06 12:08:34 +00:00
mrg c4436b3c73 add some comments, clean this up a bit. 2000-04-05 14:30:44 +00:00
mrg 410a32c515 enable auxio at ebus. 2000-04-05 14:28:55 +00:00
mrg 21adbdd7d0 after enabling the streaming buffer, check to see that it is actually
there and enabled.  if it appears to be missing or not enabled, do
not use it.
2000-04-05 14:26:51 +00:00
mrg ff95126059 add a couple of comments. 2000-04-05 14:23:45 +00:00
mrg b986c284fe correct a message 2000-04-05 14:23:27 +00:00
mrg cb71509569 be slightly more verbose when attaching ebus devices. 2000-04-05 12:30:42 +00:00
mrg add6dbf96c clean this up some. 2000-04-05 08:03:03 +00:00
mrg f4e31c4b14 attach auxio at ebus 2000-04-05 07:58:44 +00:00
mrg 9933bfdf9c driver for the PCI/ebus AUXIO registers. 2000-04-05 07:52:48 +00:00
mrg 508af4078f - go through a list of kernels like other ports do.
- don't drop off the partition from the boot device, so that we
  can boot from partitions that aren't the start of the disk...
2000-04-05 06:23:33 +00:00
mrg 66ca8568fe minor cleanup. 2000-04-05 06:21:14 +00:00
mrg f3468bd3d8 use DPRINTF() style debug messages; s/sbus/iommu/ in a few remaining places. 2000-04-05 05:59:03 +00:00
mrg fe2a55b12c include opt_ddb.h. use generic iommu enter/remove/flush routines 2000-04-05 03:08:03 +00:00
mrg ef18ba9083 include opt_ddb.h 2000-04-05 03:05:15 +00:00
mrg 7928eb6d98 add "hme at pci" support. also, add "nsphy at mii" and other mii stuff 2000-04-05 02:34:19 +00:00
minoura 78b105698a Move dl* function definitions to libc on ELF.
Based on the patch supplied by Takuya Shiozaki <tshiozak@astec.co.jp>.
See http://mail-index.netbsd.org/tech-userlevel/2000/02/23/0000.html.
2000-04-02 15:35:47 +00:00
tsutsui 58714261cc Remove register declarations. 2000-03-30 11:37:21 +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 7b918b4088 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:40:33 +00:00
cgd 7c35662066 add commented out option PCI_CONFIG_DUMP whever there's a PCIVERBOSE. 2000-03-22 00:58:16 +00:00
pk 3eb54fdef9 We need cons_attach_input(). 2000-03-21 10:56:23 +00:00
pk 436638ab3a Call rcons_ttyinit() on first open. 2000-03-20 11:27:16 +00:00
pk 2ca556b136 Nuke dead code. 2000-03-19 14:41:48 +00:00
pk f5839cdae8 Minimal changes to accomodate the console input channel attachment
changes in the keyboard driver (see /sys/dev/sun/kbd*)
2000-03-19 13:29:14 +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
mycroft 02905321b2 Foolish consistency. Mainly, always use underscores and sys/endian.h. 2000-03-16 15:09:34 +00:00
eeh 3b51289caa Revamp interrupts again:
Fix a bug causing interrmittent panics in interrupt dispatch.
	Use interrupt vectors for softints.
	Add a new send_softint interface.
	Improved D$ flushing.
	Improve traptrace and other debugging enhancements.
2000-03-16 02:36:56 +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 735236ed02 Fix doubled 'the the' in comment. 2000-03-14 00:04:19 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
kleink ad7dbd825c Define ISO C99 (unsigned) long long (min, max) symbols. 2000-03-07 19:33:00 +00:00
tsutsui d16c6f3272 Use DISKPART/DISKMINOR/DISKUNIT instead of dkpart/dkminor/dkunit. 2000-03-07 15:55:14 +00:00
thorpej a183d34f04 - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
2000-03-06 21:36:05 +00:00
eeh 4a8841ada2 Try to page align all segments up to 4MB pages. 2000-03-06 01:29:04 +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
thorpej fd8c03cf44 Allow arch-specific code to specify in4_cksum() like it can specify
in_cksum().
2000-02-14 21:42:50 +00:00
thorpej dded044fc2 Update for the NKMEMPAGES changes. 2000-02-11 19:25:12 +00:00
shin 7f5a7c00ac fix include file.
<netinet6/ip6.h>	->	<netinet/ip6.h>
2000-02-09 05:48:26 +00:00
thorpej fe551f0e64 Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
2000-02-07 20:16:47 +00:00
kleink 36e6bc645e Improve namespace test macros a bit. 2000-02-05 14:04:36 +00:00
cgd 7d16ac338c add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
2000-02-05 00:13:22 +00:00
kleink 82464e46d6 Add a C99-style va_copy macro. 2000-02-03 16:16:06 +00:00
danw f77befbc84 #define __HAVE_DEVICE_REGISTER on ports that have it, and check for
that, rather than a list of architecture defines, in config_attach
2000-02-01 04:01:19 +00:00
eeh 64f779675a Fix a couple more references to STRIPPROG. 2000-01-31 22:47:11 +00:00
eeh 906dd16a7b Use STRIP instead of STRIPPROG since install uses STRIP and I don't want to
define two different variables.
2000-01-26 22:04:18 +00:00
tsutsui b0fbaa33fb Remove obsoleted macros. 2000-01-26 09:44:10 +00:00
drochner 8eb798e603 define a "BUS_SPACE_MAP_PREFETCHABLE" flag which basically means that
device accesses are idempotent (but should not be cached by the CPU)
2000-01-25 22:13:17 +00:00
tron 04eb110431 Add "dependall" target for comfort. 2000-01-24 20:36:06 +00:00
hubertf 7e5ff67457 Add commented out "ident"-command 2000-01-23 23:46:04 +00:00
eeh c979dd8b7f Change this to use bsd.prog.mk properly. 2000-01-23 21:05:02 +00:00
mycroft 7b49d242ce Clean up the machine symlink stuff ever so slightly. Needs to be
standardized between files.
2000-01-23 17:04:03 +00:00
thorpej 52242fdf9f Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:28:59 +00:00
sommerfeld aa195e816f Fix PR9240: comment above cpu_fork() out of synch with reality on most ports.
(comment change only, but was wrong for more than just i386).
2000-01-20 22:18:54 +00:00
wrstuden 87e1b0f9b7 Add overlay to kernel configs. 2000-01-20 19:12:28 +00:00
thorpej a0397a2573 Move callout initialization to a single location; no need to duplicate
that code all over the place.
2000-01-19 20:05:30 +00:00
tsutsui e61f177ab1 STRIP -> STRIPPROG 2000-01-19 16:29:54 +00:00
tsutsui 644b514c39 Change STRIPFLAGS=-g for cross-toolchains. 2000-01-19 14:44:58 +00:00
thorpej 4f27a98702 Use b_cylinder as defined in sys/buf.h 2000-01-18 19:48:02 +00:00
eeh e73d544dec Interrupt handlers return zero if they didn't handle the interrupt. 2000-01-16 03:13:24 +00:00
eeh 0e1153bb9f The bootpath element must point to the appropriate bus node to work correctly. 2000-01-16 03:10:58 +00:00
pk 757264e2b1 Remove old-style boot device recognition.
Sync device_register() et. al. with sparc/sparc/autoconf.c
2000-01-14 14:57:27 +00:00
pk 77bd08a06b Remove old-style boot device recognition. 2000-01-14 14:38:37 +00:00
pk cd1f76b21b Remove old-style boot device recognition. 2000-01-14 14:27:14 +00:00
eeh 082d2d0074 Add debugger single-stepping and fix interrupt dispatch bugs. 2000-01-10 03:53:20 +00:00
kleink 693059feda const -> __const and include <sys/cdefs.h> earlier; fixes PR lib/9052
by Takahiro Kambe.
2000-01-04 14:20:05 +00:00
eeh e71251703c Revamp 32-bit syscall entry points.
Change in-kernel FPU usage conventions.
1999-12-30 16:57:27 +00:00
eeh 98e266aba9 Update COMPAT_NETBSD32 stuff. 1999-12-30 16:42:10 +00:00
eeh 54b99fdd8b Lots of changes:
remove ffs()
	add bzero that uses block store insns
	save %gsr to fpstate
	revert to physical accesses for pmap_zero_page so we don't
		have conflicting page mappings
	general cleanup.
1999-12-30 16:39:53 +00:00
eeh fe12b863f3 Add proc->md->fpstate and GSR to fpstate. 1999-12-30 16:35:25 +00:00
eeh 32834060c6 Fixup 64-bit type conversion issues. 1999-12-30 16:34:02 +00:00
eeh 724cd7eda1 Mark page table pages as wired rather than busy. 1999-12-30 16:31:18 +00:00
eeh f1985e61f9 Add bootblk directory and only compile things on sparc64 machines. 1999-12-30 16:27:54 +00:00
eeh 58379b85fa Make CLKF_INTR() more intelligent. 1999-12-30 16:26:18 +00:00
eeh 75402069b7 Use absolute size structures for H/W registers. 1999-12-30 16:25:17 +00:00
eeh 01dc4c4451 Update 32-bit sigcontext structures. 1999-12-30 16:24:33 +00:00
eeh 0e853e8d4a struct core32 is now in MI headers. 1999-12-30 16:22:12 +00:00
eeh 2c1410f883 Implement PMAP_PREFER(). 1999-12-30 16:21:25 +00:00
eeh 4558c5bfb7 Add the %gsr to our fpstate structure. 1999-12-30 16:20:43 +00:00
eeh 0e53075800 Switch libkern back to a library 'cause bzero's back in locore.s. 1999-12-30 16:19:00 +00:00
kleink 11e6c54cfc C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
1999-12-23 10:15:05 +00:00
ragge 26e1b45757 clrnd()/clbase() discarding. 1999-12-05 11:56:30 +00:00
ragge 0513268399 CL* discarding. 1999-12-04 21:13:19 +00:00
eeh c7f61c6f0e Apparently sys/sysctl.h includes vm/vm_map.h which makes use of vaddr_t, 1999-11-27 20:05:45 +00:00
mrg 9a6c8313f7 minor cosmetic merges; long way to go here. 1999-11-27 12:14:26 +00:00
mrg 264af07cff merge sparc64 types.h; these files are now identical. 1999-11-27 11:33:39 +00:00
mrg 9d1afb7522 merge cosmetic differences from sparc port. 1999-11-27 11:06:36 +00:00