Commit Graph

1888 Commits

Author SHA1 Message Date
itojun
fc918f8713 add rnd(4) device to installation media.
necessary for many purposes, including password seeding, tcp sequence number,
and more.  see tech-security
2003-09-06 03:25:23 +00:00
nakayama
68369c646a Wrap diag message with #ifdef DIAGNOSTIC. 2003-08-30 04:07:56 +00:00
nakayama
fd41cea78c Use proper bus number from pci_attach_args instead of (unused) var. 2003-08-29 12:36:44 +00:00
mrg
9e599bdb11 change PROM_getprop() from taking a "void **" for the storage, to a
"void *", and do the extra de-reference directly in the function.  this
avoids having to cast dozens of different types to "void **", which sets
of GCC3's strict-aliasing.  testing by martin@
2003-08-27 15:59:49 +00:00
uwe
5c666394c9 Drop fbvar.h from INCS now that it's been cvs rm'ed here. 2003-08-26 11:51:13 +00:00
uwe
5efaa48bea Framebuffer code common to sparc and sparc64 was merged and moved to
dev/sun 3 years ago.  Remove these redundant and out-of-date copies.
All code now uses dev/sun/fbvar.h
2003-08-25 19:24:49 +00:00
uwe
86b9436205 Use dev/sun/fbvar.h instead of machine/fbvar.h (which is just an out
of date copy of the former).

Compile tested with GENERIC32.
Ok by Martin Husemann <martin@netbsd>.
2003-08-25 19:03:41 +00:00
uwe
bb09aff859 Undo previous as it broke things.
There are some scattered implicit RASTERCONSOLE dependencies,
so there should be a better way.
2003-08-25 17:50:22 +00:00
chs
939df36e55 add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.
2003-08-24 17:52:28 +00:00
uwe
65aeb1d742 #include "opt_rcons.h" 2003-08-24 17:31:59 +00:00
mrg
b5076a98db 64 bit number literals need a "ULL" suffix 2003-08-24 00:41:43 +00:00
itojun
4440262659 create /dev/crypto 2003-08-22 05:06:22 +00:00
petrov
53514f157f Don't set and check absent interrupts on sabre. 2003-08-22 00:46:25 +00:00
petrov
051f6b8a9a Cosmetic: move DEBUG defines. 2003-08-22 00:45:40 +00:00
martin
965abb5c4c Avoid intermediate (void*) casts.
Replace aliased pointer magic with shift/mask arithmetic.
2003-08-10 15:17:55 +00:00
chs
792f9a7f05 remove some leftover cruft. 2003-08-10 02:30:51 +00:00
rafal
fc27d910c0 To make keeping these two in sync easier, add commented-out entries for
device-majors used on the other port to each of the sparc{,64} majors
files.
2003-08-08 17:03:14 +00:00
rafal
e552920482 Add major 85 for radio(4). 2003-08-08 16:40:31 +00:00
martin
a8f065cf19 Add "esiop" driver to PCI bus table, so mapping OF boot device pathes
to autoconfig device nodes works when booting from a esiop attached drive
(instead of the old siop)
2003-08-07 22:24:34 +00:00
bouyer
1f2944e8e5 Add esiop at pci to GENERIC which already have siop at pci.
esiop has been tested enouth now.
esiop not added to INSTALL kernels because of possible space constraint.
siop should be able to drive all adapters supported by esiop.
2003-08-07 17:17:58 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
petrov
1da0fc9112 It's 2003 now, print newline in attach. 2003-07-30 07:00:32 +00:00
petrov
81e5980814 Remove autoconf_nzs, seems no-one uses it now. 2003-07-29 23:31:32 +00:00
itojun
3f14c71f75 reserve cdev major # for PF. ok'ed by technical-exec 2003-07-27 14:17:57 +00:00
thorpej
063033a023 Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
2003-07-27 01:17:37 +00:00
petrov
965244ee25 ansify. 2003-07-24 09:10:43 +00:00
petrov
120c8bbd3f Driver for CP1500/1400 watchdog timer. 2003-07-17 21:02:03 +00:00
petrov
fd3a71be25 Driver for CP1500/1400 watchdog timer. 2003-07-17 20:54:41 +00:00
nakayama
0f9cf6ed8d Fix typo in comment. 2003-07-17 07:56:46 +00:00
lukem
ed51729135 __KERNEL_RCSID() 2003-07-15 02:54:31 +00:00
cdi
684b6d6499 traceit: don't use %g7 as it is to become curcpu() register. Add comments. 2003-07-08 22:09:26 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
martin
69cd0c4a54 struct proc * -> struct lwp * 2003-06-29 13:33:51 +00:00
martin
2edcbf6bb2 struct proc * -> struct lwp * 2003-06-29 10:37:45 +00:00
martin
c101c976d0 Passing struct lwp * instead of struct proc * to device functions. 2003-06-29 10:29:33 +00:00
martin
84a6dd7e55 Passing struct lwp * instead of struct proc * to device functions,
replace a homegrown check with proper suser() call.
2003-06-29 10:29:17 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
martin
d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
nakayama
64dc0184cc s/options\t/options \t/ 2003-06-20 03:15:05 +00:00
martin
e0b0d04377 Ooops, I didn't intend to enable kgdb by default here.
(Since the related changes are not yet commited, it doesn't even compile)
2003-06-19 14:39:52 +00:00
agc
7ebe0b8c4b Make this compile. 2003-06-19 14:08:54 +00:00
martin
dbe43da717 Add missing COMPAT_ options. 2003-06-18 09:38:56 +00:00
drochner
1a03e79900 don't #include <sys/dkstat.h> where it is (appearently) unused 2003-06-18 08:58:34 +00:00
thorpej
452a8fdae2 Rename IPL_IMP -> IPL_VM. 2003-06-16 20:00:56 +00:00
heas
d00e9c2510 Define option BLINK in option file opt_auxio.h and include it in auxio.c.
approved by martin@
2003-06-16 19:24:51 +00:00
fvdl
7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
thorpej
0eff671820 Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
2003-06-14 17:01:06 +00:00
petrov
49d4047a8f Pick up from OpenBSD:
The sab driver sometimes gets out of sync with the hardware.  This can
cause the serial console to hang.
2003-06-13 01:33:32 +00:00
petrov
7c89964036 Use cdevsw_lookup_major. 2003-06-11 22:51:03 +00:00
petrov
175f7ab29d Comment out debug output. 2003-06-11 22:50:12 +00:00
martin
b812b130a9 Remove commented out and nowadays incorrect KGDB declarations. 2003-05-26 21:12:07 +00:00
petrov
f52795a415 ffb added. 2003-05-23 06:57:58 +00:00
petrov
49f3f8ccaf Port of OpenBSD ffb driver written by Jason L. Wright. 2003-05-23 06:51:15 +00:00
martin
a47f54c6b8 Make kernels with options KGDB at least compile.
Still needs some work to make it working.
2003-05-18 22:11:31 +00:00
martin
ce380782ec My reading of the gdb code seems to indicate it expects 125 registers
from sparc64, not 72 (sparc value). Bump kgdb buffer size a bit too.
2003-05-18 21:00:57 +00:00
martin
6b8eb7fd4f Remove reference to non-existing file 2003-05-18 20:56:54 +00:00
nakayama
a8c34ddce5 Avoid comparison is always false warnings in gcc 3.3 w/ 32-bit kernels. 2003-05-17 01:49:59 +00:00
nakayama
67e3486872 Avoid integer constant is too large warnings in gcc 3.3. 2003-05-17 01:48:22 +00:00
nakayama
d0f6668f6d Avoid strict-alias warnings in gcc 3.3. 2003-05-17 01:38:39 +00:00
dsl
88b103687c ktrace rval[1] - in order to get both fd numbers for pipe() 2003-05-15 12:56:16 +00:00
martin
2bfee7cbe0 Backout previous, it was apparently ovelooked when backing out the
change in other places.
2003-05-13 08:39:25 +00:00
kleink
776138ea69 Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc's
convention for these.
2003-05-12 15:22:53 +00:00
thorpej
e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
martin
87c22b8198 Convert a few home-grown if()... Debugger() sequences into real panics. 2003-05-10 14:10:54 +00:00
martin
c1a485bec1 Remove a spurious Debugger() call. 2003-05-10 14:03:19 +00:00
martin
9ce1071f1c We are always using ELF on sparc64, so nuke bogus test for DB_ELF_SYMBOLS. 2003-05-10 13:35:10 +00:00
thorpej
b77900c3c2 Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM.  Machine-dependent code is
responsible for initializing them before main() is called.  Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
2003-05-08 18:13:12 +00:00
martin
ae2073f3d8 Make all non-trivial bus space functions "static __inline" (consistently)
and turn all macros with local blocks and declarations into functions.
This fixes PR 19975.
2003-05-05 09:36:51 +00:00
martin
57482255bc When overwriting the cache line size configuration, do not use the magic
value 0x10, but instead calculate a line size that is properly aligned
to the IOMMU strbuf cache and our external cache line size.
From FreeBSD.
2003-05-05 07:51:26 +00:00
martin
d22ec31292 Move the bus speed query code into it's own function and make it default
to 33 MHz. Cosmetics, no functional change.
2003-05-04 21:36:26 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
dsl
d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
scw
8c5c893bf7 Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
2003-04-29 17:06:03 +00:00
nakayama
1af3731706 - Add ehci at pci.
- Correct locator names for fwnode, and add sbpscsi at fwnode.
2003-04-29 16:17:12 +00:00
nakayama
4a9dc3167f Use device attributes, atapi, audiobus and midibus,
instead of each devices.
2003-04-29 15:59:08 +00:00
nakayama
7949ab62e7 Wrap a 64-bit mode case with #ifdef __arch64__ for 32-bit kernels,
and fix typo in comment.
2003-04-29 05:59:16 +00:00
nakayama
9ab502701d Use BLOCK_ALIGN rather than BLOCK_SIZE for aligning a pointer. 2003-04-29 05:53:11 +00:00
ragge
1989d659bb Preserve the symbol table in the LKM || KSYMS cases also. 2003-04-27 10:42:48 +00:00
ragge
4a0e449b1e Add pseudo-device ksyms. 2003-04-26 14:34:16 +00:00
ragge
69a66687f8 Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
2003-04-26 11:05:05 +00:00
ragge
766d04f56a Add ksyms device major. 2003-04-25 21:10:46 +00:00
martin
d65cbab3ff Connect the front panel power button on psycho based machines to sysmon's
/dev/power.

XXX - due to the way interrupt handling is structured we have no easy
way to defer clearing the button interrupt until the sysmon callback
has  happened and the event is dispatched. We clear it imediately on
return from the interrupt handler. This means we get an interrupt storm
until the button is released, and then start to handle it.
This needs to be fixed! (But with the default application for the power
button does not make a user visible difference.)
2003-04-21 12:14:19 +00:00
martin
d313e6d92e Add sysmon device. 2003-04-20 16:53:46 +00:00
nakayama
625feacd44 Change a fixup of interrupt number a bit. 2003-04-20 00:29:37 +00:00
christos
a2dfb1b570 PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
2003-04-19 23:05:28 +00:00
nakayama
72911290d9 Comment fixes from OpenBSD. 2003-04-17 12:58:18 +00:00
dsl
f1a857b8af change 'data' arg of fo_ioctl to void * to match file.h 2003-04-16 08:56:42 +00:00
petrov
488c2452ee clean-up unused definition. 2003-04-14 01:44:06 +00:00
christos
b9f9db3ca2 Bye Bye UCONSOLE 2003-04-10 22:06:51 +00:00
tsutsui
cd1fab2323 Comment out le at pci that doesn't work. (device timeout)
Probably bus_dmamap_sync() calls are required in
copy{from,to}{buf,desc}() functions..
2003-04-05 14:21:57 +00:00
tsutsui
be164a7ff6 - remove "UT" (untested) from some working devices (ahc, pcscp, ex and epic)
- comment out sip which causes uncorrectable DMA error on TX.
- add commented out pcn which also causes DMA error.
2003-04-05 13:36:15 +00:00
petrov
7facff52bd use branch slot in pmap_copy_page. 2003-04-04 21:35:39 +00:00
martin
67c767ede2 Provide PAGE_SIZE to assembler source. 2003-04-03 22:19:16 +00:00
thorpej
cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej
747aa1e024 Use PAGE_SIZE rather than NBPG. 2003-04-01 16:34:58 +00:00
thorpej
d3f30fc625 We use 8K VM pages on Sun4U, so make PAGE_SIZE, PAGE_SHIFT, and PAGE_MASK
into compile-time constants.
2003-04-01 16:05:30 +00:00
thorpej
7f9b4b1a1c Add some braces to make a block of code a bit easier to read. 2003-03-30 00:28:19 +00:00
nakayama
f73433c6f6 Divide `set' instruction in delay slot (from OpenBSD change to rev 1.30). 2003-03-24 13:27:44 +00:00
nakayama
7bb8250096 PCI-CardBus bridge support for sparc64:
- add CardBus and PCMCIA devices configrations.
- add workaround for internal compiler error on dev/ic/elink3.c.
2003-03-22 06:39:43 +00:00
nakayama
b1a9940dae PCI-CardBus bridge support for sparc64:
- add MD part of cardbus support.
2003-03-22 06:36:18 +00:00
nakayama
11529a0609 PCI-CardBus bridge support for sparc64:
- add splsoftserial.
2003-03-22 06:34:28 +00:00
nakayama
aad45dd3ad PCI-CardBus bridge support for sparc64:
- handle devices which has no OBP node.
- move PCI latency-timer initialization from pci_intr_map to
  pci_enumerate_bus.
- make PCI bus free space extents for cardbus devices.
- fix PCI config space map size.
- some code integrations.
2003-03-22 06:33:09 +00:00
martin
717651ac94 Band aid - the infamous dcache_flush_page change independently suggested
by Andrey Petrov and Jason Thorpje (AFAIK).

This is a hack that covers some symptoms while we have no idea where
the real problem is. Anyway, since this avoids random data corruption
we better be safe and have this in-tree until the problem is solved the
right way.
2003-03-11 21:28:23 +00:00
tshiozak
31e2cbf0b5 add some ISO C 1995 I18N functions and types:
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.
2003-03-02 22:18:11 +00:00
perseant
eab869e1c0 Make BRIDGE_IPF an option, and document it. Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.
2003-02-27 19:22:36 +00:00
seb
3cd76da95a Add vlan(4) pseudo device. Approved by martin@ 2003-02-20 13:30:44 +00:00
martin
c3ed92df3e Add a few new devices. 2003-02-20 12:02:31 +00:00
augustss
519f8f3d30 Add uax(4) (and url(4) in some cases). 2003-02-16 17:35:13 +00:00
martin
df839081ab Remove DEBUG and -g.
Output with DEBUG enabled is anoying these days and we don't want to
scare away users of the INSTALL kernel.
2003-02-12 08:19:02 +00:00
martin
504b72aeba Remove some #if 0 code and a few XXX marked membars w/o proper
justification for their existence.
2003-02-10 18:23:26 +00:00
grant
67c2d7c242 add wi at pci. 2003-02-10 09:26:54 +00:00
martin
57765e72ac Remove left over pieces from reusing the signal trampoline for upcalls.
This should fix signal delivery for 32bit kernels.
2003-02-09 19:44:19 +00:00
nakayama
e3e4805068 Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
2003-02-05 13:57:50 +00:00
nakayama
8920acd333 Switch to use cycle counter (%tick) based microtime().
This is derived from alpha/microtime.c and i386/tsc_microtime.c,
and will share with both ports.

This should fix PR port-sparc64/18452.
(approved by martin)
2003-02-05 12:06:51 +00:00
perry
1f4ad37fe3 "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-05 00:02:24 +00:00
martin
060b3ab19e Fix return value of pseg_set, which I accidently broke in rev. 1.164.
Fix register names in comment and shave off another register (hint
from uwe).
2003-02-04 15:58:27 +00:00
martin
4fdab6305d Rearrange register usage in pseg_set a bit and shave off %g4. 2003-02-01 22:43:04 +00:00
martin
5cbc65eab2 Remove a few #ifdef _LP64 by using STPTR/LDPTR macros.
Thanks to Matthew Green for the pointer.
2003-02-01 09:31:23 +00:00
martin
3b0f844b5d Apply leaf procedure optimization to pseg_set (again). 2003-01-31 22:19:33 +00:00
martin
1ecf66db9f Make the pmap count resident/wired mappings on the fly instead of
walking the page tables whenever this information is needed.

Add an option PMAP_COUNT_DEBUG to assert the new counts and the
page table walk agree.

The old solution had very bad performance impact, for example
by the high CPU load when running top(1).

Thanks to Simon Burge for pointing at the cause of the problem and
to Valeriy E. Ushakov for optimizing my simple minded assembler code.
2003-01-31 19:05:55 +00:00
martin
dc63778c66 Sparc64 already had a BUS_DMA_NOCACHE - remove one of the two definitions.
Fortunately the old (local) one had the same semantics as the new one.
2003-01-30 13:32:25 +00:00
pk
be1188e00d Provide locking required by the interrupt handlers running at IPL_SERIAL. 2003-01-28 12:35:31 +00:00
kent
cd7d9faeaf Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it. 2003-01-28 01:07:51 +00:00
martin
25d624c843 Remove #if 0'd pmap_zero_page and pmap_copy_page, which are now
implemented in assembler in locore.s.
2003-01-27 14:53:08 +00:00
martin
309ada6129 Remove unused function pseg_find (which looked quite similar to
pseg_get anyway).
2003-01-27 14:51:30 +00:00
martin
5070488327 More old cruft to nuke from orbit. This has been replaced by genassym.cf
a long time ago.
2003-01-27 09:52:27 +00:00
fvdl
a3ff3a3038 Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
nakayama
54e4cb1a6c fix kernel build error, such a configs w/o kbd, ms.
(approved by martin)
2003-01-24 16:54:34 +00:00
matt
66a5aac4a5 Fix a missing p to l change. 2003-01-23 23:18:04 +00:00
martin
fbc8c025c2 Rename the DIV0 traps to avoid confusion with the usage on the sparc
port: T_IDIV0 is the hardware trap generated on integer division by
zero, T_DIV0 is the software trap used to signal the same event.

This makes 32 bit kernels able to run sparc code with the v7 multiply/
divide library, as well as with the v8 one.
2003-01-21 20:42:02 +00:00
martin
8772c68807 Rename the DIV0 traps to avoid confusion with the usage on the sparc
port: T_IDIV0 is the hardware trap generated on integer division by
zero, T_DIV0 is the software trap used to signal the same event.

This makes 32 bit kernels able to run sparc code with the v7 multiply/
divide library.

Spotted by Valeriy E. Ushakov.
2003-01-21 19:46:49 +00:00
thorpej
d2275d51e1 Merge the nathanw_sa branch. 2003-01-18 06:55:21 +00:00
petrov
6383ae6ccb Don't do anything if there are no streaming buffer cache. 2003-01-16 21:55:52 +00:00
petrov
b5be66abcd Move dump_dtlb back under DDB. 2003-01-16 03:01:23 +00:00
chs
0d8f526f58 fix two bugs in my last pmap rework:
- in tlb_flush_all(), don't skip TLB entries with the high bit on,
   I was confused about which MMU register it was using.  it's also fine
   to use the last hardware context.
 - in pmap_create(), don't allocate a hardware context for the new pmap.
   it's unnecessary, and when this would cause us to recycle all the contexts,
   it would result in the current process's context being set to 0
   (ie. the kernel's context).  the current process could then return to
   userspace without going through the context-switch code (and thus without
   having a hardware context reallocated).  this would lead to user mappings
   being entered in the kernel's context later, causing all sorts of trouble.
   add some assertions to catch this kind of thing.
2003-01-15 06:15:05 +00:00
thorpej
b346ea724a Merge sparc and sparc64 <machine/signal.h>. 2003-01-09 23:25:24 +00:00
wiz
1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
lukem
4bb41ae2f2 Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile.  Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
2003-01-06 17:40:18 +00:00
wiz
c053751628 compatibility, not compatiblity. 2003-01-06 13:26:24 +00:00
mrg
a8699889af use "booted_device" when calling setroot(), so that raidframe autoconfigured
root works...  now with a "/boot" partition holding /ofwboot & /netbsd i can
have a raidframe root without hard coding root at in my kernel.
2003-01-04 17:00:27 +00:00
mrg
79037114d8 this file is really no longer used 2003-01-01 08:41:17 +00:00
mrg
62a9b2484d this is no longer used. 2003-01-01 07:45:41 +00:00
mrg
aa9a4f85dd enable sab & sabtty 2003-01-01 07:45:21 +00:00
thorpej
9c1214153c Use aprint_normal() for cfprint routines. 2003-01-01 02:20:47 +00:00
petrov
89143201f7 add db_dump_itlb. 2002-12-25 22:24:56 +00:00
petrov
70bd8bf51e new function dump_itlb. 2002-12-25 22:05:10 +00:00
jdolecek
fa3da541f9 update for added ktrsyscall() argument
XXX this should probably be converted to use trace_enter()/trace_exit(),
XXX the current code doesn't support systrace
2002-12-23 16:26:13 +00:00
mrg
6ee482ef5b change what 'hw.model' reports to be more inline with other netbsd ports, as
well as reporting the actual machine model & cpu, rather than first configured
CPU.  changes for two machines are:

old:
	hw.model = TMS390Z50 v0 or TMS390Z55 @ 75 MHz, on-chip FPU
	hw.model = SUNW,UltraSPARC @ 143.002 MHz, version 0 FPU

new:
	hw.model = SUNW,SPARCstation-20 (TMS390Z50 v0 or TMS390Z55 @ 75 MHz, on-chip FPU)
	hw.model = SUNW,Ultra-1 (SUNW,UltraSPARC @ 143.002 MHz, version 0 FPU)

as per discussion on port-sparc & port-sparc64.
2002-12-22 02:17:24 +00:00
pk
725a6aebf7 Remove the `flags' argument from bus_intr_establish(). 2002-12-10 13:44:47 +00:00
pk
68817a2024 bus_intr_establish() signature change.
The additional `fast trap' argument is ignored in these drivers.
BUS_INTR_ESTABLISH_FASTTRAP and BUS_INTR_ESTABLISH_SOFTINTR are no longer used.
2002-12-10 12:24:05 +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
martin
92fb024e28 Follow the sparc port and use the MI versions of setrunqueue and
remrunqueue.
2002-12-08 22:30:53 +00:00
pk
4cd21bc0aa Sync machdep sysctls with sparc. 2002-11-27 18:00:27 +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
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
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
uebayasi
c041971257 Fix compilation errors introduced by recent trace_enter()/ktrsyscall() changes.
Provided by FUKAUMI Naoki <naoki at fukaumi dot org> in kern/19070.
2002-11-16 07:40:38 +00:00
chs
725002971f remove some leftover debug code. 2002-11-11 10:15:46 +00:00
mrg
34113a54bc redo the previous: it seems that the 2nd prom address value is ignored/useless
(it seems to be always zero), and that the channel & drive are encoded into the
first value as "channel * 2 + drive", so, look for this.
2002-11-03 01:54:45 +00:00
mrg
8cc4a98ea3 make compat_13_netbsd32_sigreturn() and netbsd32___sigreturn14() almost identical. 2002-11-02 13:51:18 +00:00
mrg
106c6ad374 match channel & disk when trying to determine if this IDE disk is the boot device.
now we can boot from any IDE disk on the system.
2002-11-02 13:49:15 +00:00
martin
f22bd286db Oops, forgot to commit this: include files.wscons instead of files.rcons. 2002-10-27 14:42:58 +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
petrov
45a2f80742 Remove duplicate code in iommu_dvmamap_sync. 2002-10-24 23:24:01 +00:00
scw
cb52115837 In preparation for COMPAT_NETBSD32 on SH-5:
- The MD netbsd32_machdep.h header now defines the 32-bit pointer type
   instead of using u_int32_t everywhere,
 - The MD netbsd32_machdep.h header now defines a macro (at least on
   current implementations) which converts a 32-bit pointer to its 64-bit
   equivalent,
 - Change the MI code to utilise the above two items in all the right places,
 - Implement netbsd32___sigaction_sigtramp().

Tested on Sparc64 by Matt Green.
2002-10-23 13:16:38 +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
martin
fdeb300692 We are not going to get a "upa at mainbus" autoconfig entity, since
UPA is just a physical incarnation of our mainbus0.

Evidence:

 - There can only be one!
 - The firmware node coresponding to it is the root of the OF tree

So: remove the unused (and uncompilable) upa.c, remove upavar.h after
moving the only declaration used from it to autoconf.h.
2002-10-20 15:53:16 +00:00
junyoung
e4b7588c28 Add NEW_BUFQ_STRATEGY (disabled by default). 2002-10-18 15:11:08 +00:00
grant
f525c02fbe remove 'UT' from fxp and rtk, as these have been tested and known
to work. some whitespace cleanup.
2002-10-18 01:59:27 +00:00
grant
c571e22b48 add comment about pciide and wd flags (from i386 GENERIC). 2002-10-18 01:54:15 +00:00
petrov
d7612810f1 Add wscons devices, sync with sparc. 2002-10-16 17:52:09 +00:00
martin
f47b939a22 Since we now use pmap_kenter_pa, which ignores PMAP_LITTLE, don't bother
to pass that as flags. We've already changed the ASIs used to access the
mapped pages acordingly.
2002-10-16 16:11:41 +00:00
martin
9b3cdc3ab5 Make 32bit sparc64 kernels with DEBUG and DIAGNOSTIC compile. 2002-10-16 11:05:10 +00:00
thorpej
dbdee1d904 The zstty device must have an interface attribute in order for
children to attach; it is not sufficient to have an interface
atttribute which only happens to have the same name.

Fix the same mistake with the sabtty declaration.
2002-10-15 15:11:07 +00:00
elric
5ab71e20b0 Added commented out cgd(4)s to GENERIC configs. 2002-10-14 18:39:22 +00:00
petrov
86b5bbfddd rearrange streming cache flushes in iommu_dvmamap_sync 2002-10-13 20:17:55 +00:00
provos
9f18d528d5 add SYSTRACE 2002-10-12 19:57:44 +00:00
jdolecek
a3e314bfcb tag the cdevsw as D_TTY 2002-10-10 10:12:00 +00:00
martin
57801e8fb7 Pass a struct cons_channel * to cc_iclose, not a struct kbd_softc *.
This argument has been previously unused, thus undetected due to void*
typing. Mmm, copy & paste. Note that sparc got it right though.

Many thanks to Valeriy E. Ushakov <uwe@netbsd.org> for debugging support.
2002-10-10 00:22:19 +00:00
martin
e91fcc8060 Remove obsolete and unused file (there still is ../include/asm.h, which is
shared with sparc)
2002-10-07 20:01:46 +00:00
martin
bbdf4c9e6d Remove unused file, superseeded by syssrc/dev/sun/fb.c. 2002-10-07 14:57:53 +00:00
martin
44a2c6cb31 All sparc64 CPUs do __HAVE_CPU_COUNTER (aka %tick). 2002-10-07 13:26:56 +00:00
martin
76b8216ed6 Disable tagged queuing for the esp driver, with a comment describing
why and how to re-enable it. The driver is broken, and can currently
cause data corruption.

Since this file is included by the INSTALL config, enabling tagged queueing
could prevent first time installation (and creation of a custom kernel
with these settings changed)
2002-10-04 21:11:27 +00:00
elric
d19d268a95 assign majors for raw and cooked cgd's. 2002-10-04 18:28:24 +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
provos
d94186ee91 more trailing \r cleanup; pointed out by wiz 2002-10-01 20:41:22 +00:00
thorpej
34c3944c08 Use CFATTACH_DECL(). 2002-10-01 18:40:06 +00:00
abs
ae80876d99 #include "kbd.h" for NKBD and only override cn_isconsole to check cn_hw if set.
Fixes compilation without kbd.
2002-09-30 09:43:13 +00:00
martin
f0d8fa7f7d Fix typo: set _asi depending on requested endianess, not _sasi (the streaming
accessors take care of this themselfs). Fixes 32-bit kernels on PCI machines.

Problem found by Takeshi Nakayama in PR port-sparc64/18459, fix from
Mathew Green.
2002-09-29 20:56:40 +00:00
martin
7c1bc900ef Indentation nit. 2002-09-29 09:07:45 +00:00
chs
50403f5ce2 remove some vestigial FPU and cache code that's not need on ultrasparcs.
misc tidiness.
2002-09-29 04:12:02 +00:00
chs
70d1ddac15 avoid reading %pil in splx() if !SPLDEBUG.
misc tidiness.
2002-09-29 04:06:20 +00:00
chs
bbbc558e52 enable DHCP netbooting support. 2002-09-29 04:03:37 +00:00
martin
f525cb862b Fix broken timeval comparison.
Reported by Takeshi Nakayama in PR sparc64/18453, but fixed a bit
differently.
2002-09-28 20:56:05 +00:00
martin
7965adf3bb Set the PCI latency timer for bus master devices.
Slightly different to the patch suggested by Takeshi Nakayama in PR 18451
(idea from FreeBSD).

Additional input from Jason Thorpe: do not hard code the bus frequency,
instead get it from OpenFirmware.
2002-09-28 20:23:53 +00:00
martin
cf4564afb0 Add entries for various USB character devices.
From Takeshi Nakayama in PR 18450.
2002-09-28 19:46:46 +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
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
eaaed308cf Compare driver name, don't check against zstty_cd. 2002-09-26 20:51:44 +00:00
martin
8b125f54cb Remove include of <sys/map.h>, since it's gone now (and wasn't used
here anyway).
2002-09-26 08:49:34 +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
c4058929fe Fix some const warnings. 2002-09-24 17:18:45 +00:00
chs
f54a093e81 many improvements:
- use struct vm_page_md for attaching pv entries to struct vm_page
 - change pseg_set()'s return value to indicate whether the spare page
   was used as an L2 or L3 PTP.
 - use a pool for pv entries instead of malloc().
 - put PTPs on a list attached to the pmap so we can free them
   more efficiently (by just walking the list) in pmap_destroy().
 - use the new pmap_remove_all() interface to avoid flushing the cache and TLB
   for each pmap_remove() that's done as we are tearing down an address space.
 - in pmap_enter(), handle replacing an existing mapping more efficiently
   than just calling pmap_remove() on it.  also, skip flushing the
   TSB and TLB if there was no previous mapping, since there can't be
   anything we need to flush.  also, preload the TSB if we're pre-setting
   the mod/ref bits.
 - allocate hardware contexts like the MIPS pmap:
   allocate them all sequentially without reuse, then once we run out
   just invalidate all user TLB entries and flush the entire L1 dcache.
 - fix pmap_extract() for the case where the va is not page-aligned and
   nothing is mapped there.
 - fix calculation of TSB size.  it was comparing physmem (which is
   in units of pages) to constants that only make sense if they are
   in units of bytes.
 - avoid sleeping in pmap_enter(), instead let the caller do it.
 - use pmap_kenter_pa() instead of pmap_enter() where appropriate.
 - remove code to handle impossible cases in various functions.
 - tweak asm code to pipeline a little better.
 - remove many unnecessary spls and membars.
 - lots of code cleanup.
 - no doubt other stuff that I've forgotten.

the result of all this is that a fork+exit microbenchmark is 34% faster
and a fork+exec+exit microbenchmark is 28% faster.
2002-09-22 07:19:43 +00:00
petrov
e2107815a0 Use /options instead of /chosen to find out where console is.
(found by Rafal Boni).
2002-09-21 09:29:33 +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
grant
1bc4761baa remove USERCONF, as it is already in GENERIC32. 2002-09-19 08:10:44 +00:00
grant
8ec07beba4 remove USERCONF and PIPE_SOCKETPAIR, as these are already in GENERIC32. 2002-09-19 07:13:58 +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
abs
4bebaafe44 Protect extern zstty_cd with (NKBD > 0) || (NMS > 0) 2002-09-12 12:51:37 +00:00
martin
000826593a Make kernels without KTRACE work. 2002-09-11 20:19:45 +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
jdolecek
8b77a9070a put an explicit .MAIN target before the .if make() condition; apparently
.MAIN must be defined for the implicit target rule to kick in
this fixes compilation with call like 'make', i.e. without specified target

another option would be to move the .if make() condition after config(8)
generated goo, since config(8) implicitly generates a .MAIN: directive too,
but the MD .if make() really belongs into (7) misc settings section IMHO
2002-09-06 06:16:57 +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
chs
5a29cadda3 add back some cache flushes that are actually necessary.
any time we remove all access to a given virtual page,
we must invalidate the (write-through) L1 dcache.
pmap_remove() still had it, but pmap_kremove(), pmap_clear_reference()
and pmap_page_protect(VM_PROT_NONE) didn't and needed it.
fixes PR 18040.
2002-09-03 05:08:21 +00:00
chs
d6988a7eb6 Add `audio* at uaudio?' so that uaudio is actually useful. PR 15610. 2002-08-29 04:54:47 +00:00
chs
d8a392f619 wrap Debugger() in #ifdef DDB. fixes PR 15881. 2002-08-29 04:43:43 +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
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
e92b96b3c4 CPU_ISSUN4OR4C -> CPU_ISSUN4 || CPU_ISSUN4C 2002-08-23 02:46:37 +00:00
thorpej
8b7cc1c1d2 Protect against multiple inclusion. 2002-08-23 02:45:44 +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
petrov
4f9cdf2197 Enable sab. 2002-08-16 09:03:36 +00:00
petrov
560e50e242 Add sab. 2002-08-16 08:56:44 +00:00
petrov
e879a86b97 Add sab. 2002-08-16 08:52:48 +00:00
petrov
0e426c8d8b Port Jason L. Wright's sab82532 driver. From OpenBSD. 2002-08-16 08:47:13 +00:00
petrov
e36bdc8829 cpu_fork: clear PSTATE_PEF for a child process, reviewed by thorpej 2002-08-13 05:08:19 +00:00
mrg
828c2ebb9f general clean up. should not affect anything. (this is part of a patch
from eeh to reduce frivolous cache flushes.)
2002-08-12 12:04:31 +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
mrg
117d4dd965 clean up esp & isp attachment lines. 2002-07-29 14:35:44 +00:00
mrg
321856e31b merge with sparc. 2002-07-29 07:07:15 +00:00
mrg
154a2d2a42 use <sparc/foo.h> where appropriate. now these files become very
very difficult to get out of sync.  add bootinfo.h and promlib.h
(using the same method) so that sparc64 headers can build sparc
stand (not yet finished.)
2002-07-20 11:52:21 +00:00
mrg
e723e36e79 create a "sparc" symlink as well. sync kernels. 2002-07-20 11:48:17 +00:00
mrg
950cb7a7a6 install "sparc" includes for sparc64 as well 2002-07-20 11:46:14 +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
wiz
e00173a7f2 Spell 'should' correctly. 2002-07-18 11:59:06 +00:00
thorpej
29b1d0613b Remove CPU_ISSUN4MOR4U, CPU_ISSUN4OR4C, and CPU_ISSUN4COR4M. 2002-07-17 04:56:49 +00:00
fvdl
b0ba7094b2 netbsd32_sysarch moved here. 2002-07-07 23:28:04 +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
eeh
c05c5884e6 Turn on parity checking for the PCI bus. 2002-06-29 02:35:22 +00:00
eeh
debc8b26aa Fix ktrace call for 32-bit kernels. 2002-06-25 17:37:03 +00:00
eeh
691c4d1179 Fix compilation problems in DEBUG code. 2002-06-24 18:48:13 +00:00
thorpej
f427b80c27 Add ENTRY_NOPROFILE(). 2002-06-24 01:13:34 +00:00
eeh
73fd336386 Use paddr_t for avail_start and avail_end so we can handle machines with
RAM above the 2GB mark.
2002-06-21 02:57:29 +00:00