Commit Graph

3405 Commits

Author SHA1 Message Date
martin ae7d5baab6 Fix pasto - make it compile for !MULTIPROCESSOR 2002-12-15 23:01:09 +00:00
pk 9313f9570d Disable `unimplemented flush' traps during boot. Keep it disabled on
non-MULTIPROCESSOR kernels.
2002-12-15 15:01:08 +00:00
christos cc079cff49 release the kernel lock if trace_enter fails.
XXX[1]: We need to fix all platforms that do this.
XXX[2]: x86 does not check for MPSAFE syscalls before grabbing the lock.
2002-12-14 14:52:24 +00:00
pk f4fe3fda21 dumpsys(): Use pmap_kremove() to unmap pages mapped pmap_kenter(). 2002-12-12 09:34:04 +00:00
pk 047870f66e softintr_establish(): append handler to the list for the actually choosen
processor interrupt level.
2002-12-11 13:21:19 +00:00
pk e675712f0d * loadfile() return a file descriptor that must be closed.
* check the kernel size before loading
2002-12-11 10:35:06 +00:00
thorpej e8cc3884de Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is. 2002-12-10 17:14:02 +00:00
pk 725a6aebf7 Remove the `flags' argument from bus_intr_establish(). 2002-12-10 13:44:47 +00:00
pk 5446e96bac bus_intr_establish() now takes an optional `fast trap' handler argument.
BUS_INTR_ESTABLISH_FASTTRAP and BUS_INTR_ESTABLISH_SOFTINTR are no longer used.
2002-12-10 12:16:25 +00:00
pk 45c45fca81 intr_establish() signature change: pass NULL for the `fast trap' argument. 2002-12-10 12:13:24 +00:00
pk fe233fdc10 The `fast trap' handlers are now pssed as an optional argument to
bus_intr_establish(). Allow fall-back on a regular interrupt handler if
the interrupt level must be shared with another device.
2002-12-10 12:11:21 +00:00
pk 4f62e0f7c8 * intr_establish() now takes an optional `fast trap' routine argument.
* also remove __P().
2002-12-10 12:04:51 +00:00
pk 6f945ab887 Allow a `fast trap' handler installation to be undone if an interrupt level
must be shared. This requires drivers that request the installation of
a `fast trap' handler to supply a regular interrupt handler as well to fall
back on.

The `fast trap' routine (if present) is now passed as an additional
argument to intr_establish().
2002-12-10 12:03:08 +00:00
thorpej 78ea2dd367 Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
2002-12-10 05:14:24 +00:00
pk 04e582df1b setsoftint() is no longer used. 2002-12-09 16:13:58 +00:00
pk 48a30a2e35 Soft interrupts use their own set of handlers lists. 2002-12-09 16:13:23 +00:00
pk c822c6bd84 Finish the switch to the softintr(9) framework.
To make this work, we now have to use separate handler lists for hardware
and software interrupts as the soft interrupt handlers do not return
an `interrupt handled' status.

Thanks to Matt Fredette for providing an initial set of patches on port-sparc.
2002-12-09 16:11:50 +00:00
pk 74a8332ee9 cpu_switch(): avoid raising the interrupt level and enabling traps at the
same time as this may cause a spurious interrupt in some implementations.
Pointed out by uwe.
2002-12-08 16:16:59 +00:00
uwe 38b8c5689a Use 0x07ffffff for LOADADDR mask. This still provides for 128MB (and
given that PROM maps just 4 or 16 this is not going to be a bottle
neck).  Doesn't really affect normal kernels, need it for the changed
kernel base address (uncommitted) hack for broken javastation OFW.
Ok by pk.
2002-12-08 14:36:55 +00:00
pk 6c8d3fba22 Use MI versions of {set,rem}runqueue(). 2002-12-07 10:27:03 +00:00
pk 9ebe0ee7a6 ienab_bi[cs] are never used in a context common to both sun4/4c and sun4m,
so there's no point in constructing common entry points for them in locore.s.
2002-12-06 17:45:39 +00:00
pk 1b719337bb Pass the `device class interrupt level' on to intr_establish() and use to
raise the ipl in the interrupt handlers to the appropriate level. This avoids
interrupt handler interference if one of the devices actually interrupts at
a lower hardware level than the maximum level assined to a device class.

Based on code from Art Grabowski in openbsd.
2002-12-06 16:04:11 +00:00
pk 721e534a25 Use IPL_SOFTFDC. 2002-12-06 15:37:55 +00:00
pk e093913db8 Use IPL_SOFTAUDIO. 2002-12-06 15:37:39 +00:00
pk 060fa93542 Start using IPL_* constants from intr.h; phase out PIL_* in psl.h 2002-12-06 15:36:45 +00:00
fredette 0fee3368c3 Fixed a null pointer passed to printf(). 2002-12-05 18:05:33 +00:00
uwe 6c05e7879f Fix an options<space><tab> nit. 2002-12-04 23:30:40 +00:00
uwe 23c0293ee7 The chip treats weekday 1 == Sunday, correct dt_wday adjustment logic
appropriately.  NB: the old code would never write weekday zero that,
I've been told, might cause the RTC to reset.
Pointed out by kenh.
2002-12-03 17:54:54 +00:00
pk 59c9274871 Always get the `mid' cpu property. Whine if it's not set on an actual
multi-processor machine.
2002-11-29 08:29:57 +00:00
pk 03549142e0 Find the CPU architecture version early in the bootstrap phase, and switch
to the V8 specific .mul/.div/.rem routines while we still have a writable
.text section.
2002-11-29 08:02:05 +00:00
pk 565cedc81e Provide the V8 mul/div routines for SUN4D as well. 2002-11-29 07:56:50 +00:00
pk 6564749632 Move the installation of v8 specific .mul/.div functions into a separate
routine to be called when we're sure the CPU is actually sparc version 8.
2002-11-28 15:32:15 +00:00
pk 8d141cba88 Not all sun4m platforms have version 8 sparc CPUs. So go out to the PROM
and get the CPU architecture version from the PROM cpu node `sparc-version'
property.
2002-11-28 15:29:53 +00:00
pk f19c04e3ed Move timer{match,attach}_mainbus() back into timer.c, since the `timer at
mainbus' configuration declaration is orthogonal to the configured SUN4[CM]
platform options.
2002-11-28 14:18:31 +00:00
pk ba4983b5db Provide sparc v8 multiply/divide routines which are copied over the base
v7 versions on sun4m and sun4d machines. Based on Chris Torek's BSD/OS
code.
2002-11-27 16:08:34 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
christos 729ccbc9cd si_ -> sel_ 2002-11-26 19:49:00 +00:00
thorpej 09dfaace39 The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
2002-11-26 18:51:12 +00:00
pk 007c037980 * pmap_destroy(): reset the region gap
* pmap_quiet_check(): add check for pmeg leaks on sun4/4c (this is DEBUG only).
2002-11-26 15:09:56 +00:00
pk 0fad562c7c The presence of the `timer at obio' attachment is independent of the
various CPU support settings.
2002-11-26 14:43:39 +00:00
pk ec667a0f51 Add `machdep.cpu_arch' sysctl to determine the CPU architecture version.
Currrently, cpu types `sun4' and `sun4c' produce version 7, all others
version 8.
2002-11-26 14:36:10 +00:00
martin 070e18f3f3 Assign a major number for "lpt* at ebus?". 2002-11-24 20:58:06 +00:00
wiz e78e668887 Fix typo (responsiness -> responsiveness). 2002-11-22 12:20:58 +00:00
manu d584ed9598 Add a realcode argument to trace_enter and ktrsyscall. realcode is the
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.
2002-11-15 20:06:00 +00:00
uwe 7e95293c56 Use BOOT_FLAG() macro to process flags. 2002-11-09 01:35:54 +00:00
uwe 7a7c188182 Oh, COPTS in config overrides optimizations again. 2002-11-08 22:51:53 +00:00
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
petrov 71614764a4 Compile with an ISO C preprocessor. 2002-10-30 01:46:09 +00:00
chs f921b6a46c make this compile with DEBUG (name changes missed in rev. 1.172). 2002-10-27 18:39:17 +00:00
jdolecek c82ab2eb79 now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
uwe af2a75546d Clean-up kbd driver layers a bit more. Lift common code into the upper layer.
Add some wskbd TODO remarks (hi, martin).
2002-10-21 15:36:35 +00:00
uwe 35ec23469c Correct zstty interface attribute (cf files.sparc64 1.69).
Comment out unused kbd_tty and ms_tty attachments.
2002-10-21 15:25:42 +00:00
martin f19a67c55f Allow hyphen in kernel names. Bump version.
Should fix PR 13429 and PR 18691.
2002-10-20 20:55:38 +00:00
junyoung e4b7588c28 Add NEW_BUFQ_STRATEGY (disabled by default). 2002-10-18 15:11:08 +00:00
martin 9b3cdc3ab5 Make 32bit sparc64 kernels with DEBUG and DIAGNOSTIC compile. 2002-10-16 11:05:10 +00:00
jdc 86fda61426 Uncomment audioamd0 at obio0. 2002-10-15 13:53:01 +00:00
jdc d1f466e658 Add audioamd at obio attachment. Now we have working audio on 4/600's :
audioamd0 at obio0 slot 0 offset 0x500000 level 13 softpri 4
  audio0 at audioamd0: full duplex
2002-10-15 13:49:52 +00:00
elric 5ab71e20b0 Added commented out cgd(4)s to GENERIC configs. 2002-10-14 18:39:22 +00:00
takemura 900b200c92 Moved MI APM definitions into dev/apm. 2002-10-14 02:08:37 +00:00
jdc 050645f10a Check only the physical address of serial ports on a Sun 4.
Reviewed by Uwe.
2002-10-09 08:56:25 +00:00
uwe a931c80c22 G/c unnecessary includes. 2002-10-08 18:00:46 +00:00
martin 44a2c6cb31 All sparc64 CPUs do __HAVE_CPU_COUNTER (aka %tick). 2002-10-07 13:26:56 +00:00
provos 2f7a0aaac8 add SYSTRACE; approved perry. 2002-10-06 02:11:54 +00:00
elric d19d268a95 assign majors for raw and cooked cgd's. 2002-10-04 18:28:24 +00:00
uwe fbcf88f171 Add wscons. Misc catch-up with GENERIC. 2002-10-03 17:45:20 +00:00
uwe fa76f154c6 Add majors for wscons devices.
And, no!  This does not mean that sparc switches to wscons.
Only Krups has experimental wscons support so far.
2002-10-03 17:06:18 +00:00
uwe 7235b5d479 First cut at PS/2 keyboard and mouse drivers that talk Sun firm events.
Console and Xsun for Mr.Coffee.
2002-10-03 16:27:04 +00:00
uwe fb2195ae8f Search children of the "8042" node to check if keyboard is the stdin. 2002-10-03 16:22:46 +00:00
uwe 191626f788 Refactor kbd and mouse drivers so that they can use different middle
layers.  Common middle layer shared by kbd_zs and sunkbd is moved into
the new file.  Move shared config directives to files.sun and adjust
ports' files.* accordingly.

Need this to support console/Xsun on Mr.Coffee JavaStation.

Tested on sparc, sparc64 (by martin) and sun3 (by jdc).
2002-10-03 16:13:24 +00:00
thorpej 4bf871a755 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:02:08 +00:00
thorpej c1077f220d Use CFATTACH_DECL(). 2002-10-01 18:57:48 +00:00
wiz b1c7ac0e6d "definitions" has lots of 'i's, but that's not reason to leave one out. 2002-09-29 23:23:56 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
thorpej 274c086b22 Remove <sys/map.h> 2002-09-26 18:54:30 +00:00
thorpej 71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
martti 81e8d78cd4 Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK" 2002-09-25 11:49:48 +00:00
thorpej 787cbc6921 Fix some const warnings. 2002-09-24 18:14:35 +00:00
simonb 63096043b3 Use "#define\t" instead of "#define ". 2002-09-22 08:30:56 +00:00
chs c081614ea2 it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not.  doh.
2002-09-22 07:53:39 +00:00
chs 55e1f79335 add pmap_remove_all() hook (empty on most platforms so far). 2002-09-22 07:17:08 +00:00
gmcgarry dca80f08fd Add __HAVE_MD_RUNQUEUE flag for MD code to override MI run queue primitives. 2002-09-22 04:11:32 +00:00
martti 3b553bac54 Added (commented out) IPFILTER_DEFAULT_BLOCK. 2002-09-20 10:39:48 +00:00
ragge b3abfee038 Do not include <sys/clist.h>, it's not used in NetBSD at all. 2002-09-19 10:37:59 +00:00
lukem 3ea2e21f82 enable USERCONF by default; it's small and extremely useful to have available. 2002-09-18 02:43:53 +00:00
uwe 917eac2212 RCSID should go to .ident section.
While here add __KERNEL_RCSID.
2002-09-17 15:28:28 +00:00
ad ca0ac2c78c Driver for the Sun ZX/Leo framebuffer. This would be called leo, but the
amiga port already has a driver by that name.
2002-09-13 14:03:52 +00:00
tsutsui be0f4cfb13 Rename some auto variables which might cause misleadings. 2002-09-08 05:35:42 +00:00
tsutsui bf49a76d3b Call setcontext{4,4m}() directly when we already know the CPU type.
(inspired by OpenBSD)
2002-09-07 18:51:05 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
thorpej c9dafdb84c Increase the default stack limit to 2M (from 512K on sparc and 1M
on sparc64).
2002-09-03 16:24:35 +00:00
thorpej d1523404bb Fix missing error check in sparc_bus_map(). Pointed out by uwe. 2002-08-30 20:38:31 +00:00
uwe 082c4cf032 Make sun ports use common keyboard/firm events related includes
from dev/sun.
2002-08-27 09:47:41 +00:00
thorpej 139cdc3125 Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
2002-08-25 20:21:33 +00:00
thorpej a9f285b0ac Put a bus's ranges in the bus space tag, and make sparc_bus_map()
perform the translation and recursion if t->ranges != NULL.  Make
sbus, cpuunit, and bootbus inherit the parent's map/mmap routines,
and delete the now-unused mapping functions.  Update all places where
bus space tags are statically allocated.
2002-08-25 17:54:57 +00:00
thorpej 067a64da4d Split the timer code up into Sun4/Sun4c, Sun4m, and MS-IIep bits, mostly
to make it more readable.
2002-08-25 16:10:35 +00:00
thorpej 0570742a0b Add a generic function to translate a device address using a
parent's "ranges" property, and use it.
2002-08-25 16:05:41 +00:00
thorpej 51b546d0bb Move the DMA tag and DVMA map into the iommu_softc, and pass the
iommu_softc in the DMA tag cookie.  This gives us a chance of supporting
systems (such as the Sun4d) which have multiple iommus.
2002-08-25 16:02:53 +00:00
thorpej d476292c05 Add Sun4d cpu-unit ASIs. 2002-08-24 17:27:21 +00:00
thorpej 41c25cb648 Add autoconfiguration support for the Sun4d "bootbus". Add a
zs @ bootbus attachment.
2002-08-24 05:26:56 +00:00
thorpej bb0558df3e Oops, don't need a DMA tag. 2002-08-23 21:49:13 +00:00
thorpej a71473b576 Add autoconfiguration glue for the Sun4d "cpu-unit". Each processor
board has 2 CPU units (one for each processor), one of which also has
a "bootbus", to which the serial ports, etc. are attached.

We can now probe/attach CPUs on a SPARCserver 1000.
2002-08-23 18:00:46 +00:00
thorpej 90817e313c Use the structures defined in bsd_openprom.h for "reg", "range",
and "intr" properties, rather than having identical-except-for-names
sbus_* and iommu_* versions.
2002-08-23 02:53:10 +00:00
thorpej de6a644cea * Refine the comment describing openprom_addr.
* Add openprom_range and openprom_intr structures.
2002-08-23 01:08:45 +00:00
uwe fdc57c1775 Add missing slash to /* notyet * 2002-08-17 02:23:18 +00:00
uwe e7bdddc025 Fix botch in previous. #ifdef DIAGNOSTIC was one instructions too early
in sparc_interrupt4m, thus breaking soft interrupts for normal 4m's.

Should fix port-sparc/17891 (thanks, Martin).
2002-08-14 14:45:37 +00:00
tsutsui 1031f6caa4 Fix cacheinfo.c_nlines for sun4 and sun4c machines.
(they are not used anyway..)
2002-08-09 14:46:04 +00:00
briggs 0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
hannken 80fb19da39 Convert to new device buffer queue interface.
Approved by: Paul Kranenburg <pk@netbsd.org>
2002-08-06 14:44:15 +00:00
uwe 5b89d2589b In DIAGNOSTIC kernels detect situation that on sun4m neither hardware
nor software interrupt pending bit is set for the current ipl.  Report
this as a "bogus" interrupt (better name anyone?).  This is a symptom
of a bug in interrupt handling in one of device drivers interrupting
at this ipl.  Reviewed by pk.
2002-08-04 14:57:34 +00:00
itojun 8dd04cdcd7 correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls.  from openbsd
2002-08-03 00:12:48 +00:00
mrg 3a0d60972a bump offset by RF_PROTECTED_SECTORS if FS_RAID 2002-07-29 14:34:12 +00:00
grant b26eca1528 "DVMA coherent" -> ": DVMA coherent"
noted by Matt Thomas on icb.
2002-07-29 06:39:41 +00:00
mrg 8543c0c2bc make sparc64 friendly. 2002-07-20 11:43:43 +00:00
mrg 44a3eec3a0 sync these with the sparc64 versions. 2002-07-20 08:37:30 +00:00
thorpej 3912e469dd Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device.  While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
2002-07-19 16:38:14 +00:00
thorpej 0c9b77712e Add Sun4d "special nodes". 2002-07-18 03:22:00 +00:00
thorpej 417877e5d7 Add checks for Sun4d. Use CPU_HAS_SRMMU as appropriate. 2002-07-18 02:32:35 +00:00
thorpej 8d23955168 Add sun4d cases for early bootstrap. This is good enough to
get as far as printing the copyright on an SPARCserver 1000.
2002-07-17 16:59:09 +00:00
thorpej b122660639 More sun4m/sun4d common stuff. 2002-07-17 15:57:12 +00:00
thorpej 45af102cdd More cache/cpu stuff common to sun4m and sun4d. Note the sun4d
machines always use the Viking CPU, and cache info is not available
from the PROM, so we have to hard-code it in that case.

Rearrange some stuff to make it easier to share.
2002-07-17 15:56:20 +00:00
thorpej d7722ad8a6 Remove an unnecessary "if defined(SUN4M)" 2002-07-17 15:53:21 +00:00
thorpej 11a856f8a6 Add SUN4D ifdef cases. Use CPU_HAS_SRMMU where appropriate. 2002-07-17 14:31:46 +00:00
thorpej d681f8b1d4 Add a macro to test if the system uses the SRMMU (Sun4M || Sun4D). 2002-07-17 06:19:45 +00:00
thorpej 7d6525e9b6 Handle the CPU_NTYPES == 0 case (as we would see in bootblocks)
in the CPU types predicates.
2002-07-17 06:17:20 +00:00
thorpej 477ba79eb9 Add a CPU_ISSUN4D predicate. 2002-07-17 06:07:29 +00:00
thorpej be0b3b8b70 Instead of using a matrix of configured CPU types, first count
how many CPU types are configured into the kernel.  Then, use this
information to define the CPU predicate macros according to the
following rules:

1. If support for a CPU type is not configured into the kernel,
   then the test is always false.

2. Otherwise, if only one CPU type is configured into the kernel,
   then the test is always true.

3. Otherwise, we have to reference the cputyp variable.

Use a similar strategy for short-cutting the page size related
definitions.
2002-07-17 05:57:47 +00:00
thorpej 36fb7ee740 Remote CPU_ISSUN4OR4C and CPU_ISSUN4COR4M, and instead express them
as (CPU_ISSUN4 || CPU_ISSUN4C) and (CPU_ISSUN4C || CPU_ISSUN4M),
respectively.  The compiler can still optimize as desired by expressing
them this way, and it simplifies adding new tests.

While here, just remove CPU_ISSUN4MOR4U; it's not used by anything.
2002-07-17 04:55:56 +00:00
thorpej aa54c756ac Print out a meaningful message on the sun4d if the kernel does
not support the sun4d, like we do with sun4c and sun4m.
2002-07-17 02:57:14 +00:00
thorpej acf4b72be5 Add CPU_SUN4D. 2002-07-17 02:43:43 +00:00
thorpej 5fd1700062 Add SUN4D to the list of arch's in opt_sparc_arch.h. 2002-07-17 02:23:15 +00:00
thorpej c2a0c6fe7c Add a missing ":" when printing the delay constant message. 2002-07-14 19:42:58 +00:00
abs eb73becae2 Ensure all INSTALL config files consistantly include PIPE_SOCKETPAIR,
MALLOC_NOINLINE, and VNODE_OP_NOINLINE. The exceptions are when they
include another config files that already defines the options, or if
they are for an embedded board, just define a few extra options, and
do not already define PIPE_SOCKETPAIR.
2002-07-05 13:40:10 +00:00
thorpej 011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
christos 61a86a83fe add a couple more dependencies so that we can build a kernel without
make depend.
2002-07-01 16:37:08 +00:00
pk cc3f5791ea Comments update: indicate which counters are being incremented. 2002-06-24 09:26:47 +00:00
pk 0e8ea4f752 `fdcio_intrcnt.ev_count' is a 64-bit variable. 2002-06-24 09:24:37 +00:00
thorpej f427b80c27 Add ENTRY_NOPROFILE(). 2002-06-24 01:13:34 +00:00
lukem e78903dcee add "SUNW,hme" as an an alias for "hme".
my ss5 that netboots off an sbus swift card now autodetects the root device.
2002-06-21 14:38:36 +00:00
christos c5ccbb71e5 remove syscall debugging code; thanks eduardo for fixing the code! looks
much nicer now.
2002-06-20 00:55:39 +00:00
agc 254fefb729 Fix a typo introduced in the last commit. 2002-06-19 10:13:43 +00:00
christos 3b50728cf4 MD systrace gluons. 2002-06-17 16:32:57 +00:00
lukem fde6ae6f04 Enable "pseudo-device clockctl" in all kernels, except
installation related kernels (INSTALL* and RAMDISK*).
This enables rc.conf(5) $ntpd_chroot to be used "out of the box"
2002-06-17 05:14:02 +00:00
gmcgarry a47cb57561 Fix for 64-bit event counters. Fixes PR17207. 2002-06-13 21:04:37 +00:00
gmcgarry 6c672d0196 Make this work with AUDIO_C_HANDLER. 2002-06-13 21:02:45 +00:00
gmcgarry 471fad1d4c Hasn't been used for years. 2002-06-13 20:57:03 +00:00
eeh bfc1e3973f Dynamically allocate the buffer we use for filesystem deblocking based on
the filesystem blocksize in the super block.  Allows us to read filesystems
with block sizes > 8KB.
2002-06-12 22:18:02 +00:00
uwe 222181a0e0 Fix typo in nmi_sun{4,4c}, use correct register. 2002-06-11 11:37:01 +00:00
uwe 49444f80fe Fill delay slot in previous to match normal microtime. 2002-06-10 01:58:52 +00:00
uwe 45f993a079 Do not use "std" in ms-IIep micortime, the argument is not guaranteed
to be double-word aligned and it is not when we are called from bpf.
Remove "should be able to std here" comment in generic microtime.
While here, simplify some asm mnemonics and fix a typo in comment.
2002-06-09 20:02:41 +00:00
martin 07cafe307b Follow changes in libsa/stand.h: exit(void) -> exit(int) (one in a #if
0 block), to make it compile again.
2002-06-06 05:04:28 +00:00
uwe cbb23a42ca Fix phys->pci memory pass-through mapping.
While here, correct wording in a comment.
2002-06-05 00:23:01 +00:00
thorpej d941ddfee0 Don't use -traditional-cpp if HAVE_GCC3. 2002-06-04 21:39:09 +00:00
drochner d2b9876081 move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
2002-06-02 14:44:35 +00:00
thorpej 9e383c402e Use C-style comments in a few places where ' appears in the comment,
so that this works with GCC 2.95.3's ISO C preprocessor.
2002-05-31 19:59:00 +00:00
thorpej 969c677abf Remove redundant (and incorrect) extern decl. 2002-05-31 19:49:42 +00:00
bjh21 07db2878a8 Use ${FGEN} rather than fgen. 2002-05-28 21:56:54 +00:00
uwe 1d33ded1ea Fix stupid typo in pci_decompose_tag(). 2002-05-16 01:33:53 +00:00
thorpej 204183c0fa * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set to
NULL for root PCI busses.  For busses behind a bridge, it points to
  a persistent copy of the bridge's pcitag_t.  This can be very useful
  for machine-dependent PCI bus enumeration code.
* Implement a machine-dependent pci_enumerate_bus() for sparc64 which
  uses OFW device nodes to enumerate the bus.  When a PCI bus that is
  behind a bridge is attached, pci_attach_hook() allocates a new PCI
  chipset tag for the new bus and sets it's "curnode" to the OFW node
  of the bridge.  This is used as a starting point when enumerating
  that bus.  Root busses get the OFW node of the host bridge (psycho).
* Garbage-collect "ofpci" and "ofppb" from the sparc64 port.
2002-05-16 01:01:28 +00:00
thorpej dada8613e1 Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
2002-05-15 19:23:51 +00:00
thorpej 11fa11094e Garbage-collect __PCI_DEV_FUNCORDER. 2002-05-15 18:37:54 +00:00
lukem 966b42a3e6 bootblock.h:
- unify sparc_bbinfo (1064 bytes, with 256 block entries)
  and sun68k_bbinfo (296 byte, with 64 block entries)
  into shared_bbinfo (512 bytes, with 118 block entries),
  which will be also shared by future bbinfo-using platforms
  (including macppc)
- add datestamp to *_BBINFO_MAGIC strings, to prevent installboot vs
  bootxx version skew.
- add macppc support

*/bootxx.c:
- migrate to new shared_bbinfo structure

installboot:
- add macppc support (still needs applepartmap support and testing)
- improve and add some more warnings & errors to installboot
- implement shared_bbinfo_clearboot() and shared_bbinfo_setboot(), which
  perform the majority of the work for bbinfo-using back-ends
  (rather than replicating that across multiple back-ends).
2002-05-15 09:44:54 +00:00
lukem aaa7dba035 - Enable NFS_BOOT_DHCP (as well as the existing NFS_BOOT_BOOTPARAM).
DHCP/Bootp is tried before bootparams in the MI nfs mountroot code.
- Change the order in boot.net from "bootparams then bootp" to
  "bootp then bootparams", to be consistent with the MI nfs mountroot code.

(Consistency with other NetBSD ports is good, and things still work
for sites that run bootparams but not dhcp/bootp, although I'd argue that
dhcp/bootp is much easier to setup and manage and is easier to debug
than our rpc.bootparamd...)

Per discussion with Paul Kranenburg and Matt Green.
2002-05-14 14:27:33 +00:00
matt 0a6d35b7ed Nuke local extern label_t *db_recover; it's now in <ddb/db_extern.h> 2002-05-13 20:30:07 +00:00
uwe afd360002d Oops, mspcic_bus_mmap was, effectively, adding offset twice.
While here, add __KERNEL_RCSID.
2002-05-08 16:51:39 +00:00
pk eb95178e15 Patch up to work with MI installboot(8). 2002-05-07 14:13:02 +00:00
lukem 37d1d9cf41 decommission old installboot; it doesn't work on bootxx anymore anyway. 2002-05-07 12:32:52 +00:00
lukem cea307e47c convert to <sys/bootblock.h> 2002-05-07 12:06:06 +00:00
pk db2a20d3fc Convert `bootxx' to raw binary format which is what the MI installboot(8)
program needs.
2002-05-07 11:32:44 +00:00
uwe 440409e641 Delint a bit. 2002-05-07 06:45:22 +00:00
uwe 2baa6f8e86 Drop SUN4_PGSHIFT and SUN4CM_PGSHIFT. They are already known to .S
files from sys/param.h.  The problem is that lint stubs are generated
with -C (keep comments) and gcc complains about macro redefinition,
since "assym.h" doesn't have the comments that "sys/param.h" has.
2002-05-07 02:38:44 +00:00
uwe 8107633e20 bus space methods should be "static __inline__", not "extern __inline__".
Otherwise an unoptimized kernel cannot be linked.  Reviewed by pk.
2002-05-07 00:37:47 +00:00
uwe 73843c4a73 Comment change only. Update the version of GENERIC this config is
synced with.
2002-05-06 02:04:14 +00:00
thorpej da9accb616 Don't define _LP64 here. 2002-05-03 18:27:41 +00:00
martin 9b693d4bca Remove a local declaration shadowing the global "int statint", thus
preventing the latter to be initialized properly.

Patch from adam@lebsack.com in PR 16608.
2002-05-02 13:01:45 +00:00
atatat d1b3852365 Add the INCLUDE_CONFIG_FILE option to all config files. In config
files that are generic (ie, GENERIC, GENERICSBC, GENERIC32, ALL, or
ALPHA), it is uncommented.
2002-04-25 15:06:20 +00:00
pk ebe575d3ca BUS_ADDR(): avoid signed conversions. 2002-04-23 07:17:29 +00:00
augustss 7f7ab48604 Rename the audio "bus" attribute audiobus to avoid confusion with audio
device.
2002-04-22 09:41:19 +00:00
thorpej eedd94475c * Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
  the magic "files include order" dance in N machine-dependent
  configuration definitions.
2002-04-16 20:50:16 +00:00
thorpej 4a0ee23b99 Set COM_HW_NO_TXPRELOAD. 2002-04-12 19:34:24 +00:00
gmcgarry 6e066ba77a Add commented-out USERCONF option. Mainly useful for install media
and can be optionally enabled based on miniroot and ramdisk size
requirements.
2002-04-12 08:10:45 +00:00
pk b7cae9b821 Pass fully encoded bus addresses in the attach arguments. 2002-04-11 11:11:23 +00:00
pk 24db2d2924 pmap_kremove4_4c(): correctly compute the maximum number of pages to be
unmapped within a segment.
2002-04-11 11:08:40 +00:00
simonb 2239aed3bd Fix a tyop in a comment. 2002-04-05 00:19:56 +00:00
uwe 213d441358 Instead of relying on numerology set up by PROM, actually implement
bus_space_map/mmap methods that do proper PCI to phys address translation.
2002-04-04 18:47:23 +00:00
uwe 118ae09c44 Fix error message. 2002-04-04 17:45:24 +00:00
darrenr ff961593ca apply patches from PR#10170 2002-04-03 16:34:11 +00:00
chs dbb8bddd9c make this compile with DEBUG. 2002-04-02 06:39:32 +00:00
lukem d213d804f7 Rename MEMORY_DISK_SIZE (formerly MINIROOTSIZE) to MEMORY_DISK_ROOT_SIZE,
which was suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> as
being more consistent with what it's controlling...
2002-04-02 05:30:34 +00:00
christos 83c2f7aaf5 compat signal array renaming. 2002-03-31 22:21:02 +00:00
uwe d5f7434c94 Oops, timermatch_msiiep() body now needs to be protected with #ifdef MSIIEP. 2002-03-28 20:04:27 +00:00
uwe 788d7bdd8f Move ms-IIep PCIC driver into mspcic0 at msiiep0. msiiep0 now serves
as a stub bus that knows how to attach drivers for various functions
of PCIC.

This change is a follow up to timer0 at msiiep0 change, since all
children must share same attach arguments and so we no longer can
attach pci0 directly under msiiep0.
2002-03-28 19:50:20 +00:00
pk fd87eee68e bootinfo_relocate(): don't forget to copy the terminating empty record
of the bootinfo[] array.
2002-03-28 16:03:41 +00:00
pk d6197003e5 Pass actual loaded kernel file in bootinfo[]. 2002-03-28 15:46:20 +00:00
pk 61c214b2fe sysctl(CPU_BOOTED_KERNEL): look for kernel path bootinfo[]. 2002-03-28 15:45:01 +00:00
pk 945536cf85 Define bootinfo record to pass the kernel file path from the boot program. 2002-03-28 15:43:23 +00:00
pk 6bcf43ea9c `intterupt' => `interrupt' 2002-03-28 11:59:56 +00:00