Commit Graph

190 Commits

Author SHA1 Message Date
thorpej
e33c2bb5d5 Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
2004-06-04 04:45:49 +00:00
kleink
7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
simonb
9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
drochner
80bded6289 To the rest of the kernel, pretend that hppa supports SIGINFO.
There are still only "sigcontext" stackframes passed to the user,
but at least we can clean up the MI sources now.
2004-03-26 14:11:01 +00:00
atatat
19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
bjh21
dff5222d3a Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it.  This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111.  The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers.  To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned.  Thy just use rather more function pointers than before.  Tested
on i386 and (with a new host driver) acorn32.  Compiled on several other
affected architectures.
2004-03-13 17:31:33 +00:00
jkunz
1917acaf35 Make new Intel i82596 Ethernet driver default for hp700. 2004-03-12 11:44:13 +00:00
jkunz
098a6e75bb Import hp700 MD part of new Intel i82596 Ethernet driver. 2004-03-12 11:41:39 +00:00
jkunz
7006f1c550 Import ipmlementations for _bus_dmamap_load_buffer(), mbus_dmamap_load(), mbus_dmamap_load_mbuf(), mbus_dmamap_load_uio() and mbus_dmamem_mmap(), from sys/arc/vax/vax/bus_dma.c and rework mbus_dmamap_sync() based on sys/arc/arm/arm32/bus_dma.c. 2004-02-20 20:22:10 +00:00
jkunz
c43db93399 hp700 has no PCI support yet. Enabling PCI devices breaks compilation, so disable all PCI devices for the moment. 2004-02-20 20:18:37 +00:00
wiz
d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
jonathan
abb59e6f0c Add support for opencrypto, PCI accelerators to sys/arch/*/conf/GENERIC
files for machines I know to have genuine PCI slots.  As sent to tech-kern
for feedback in December 2003. Based on feedback, opencrypto is commented
out in the macppc GENERIC (due to absense of GENERIC_SOFTINT support),
and added to the sparc64 config (sys/arch/sparc64/conf/GENERIC32).
2004-01-14 22:29:03 +00:00
jdolecek
d0210c07a4 update to recent changes - exit2() doesn't exist anymore and the
exit path always calls lwp_exit2()
pointed out Martin Husemann, change reviewed by Chuck Silvers

also update comment with switch_exit() prototype while here
2004-01-05 08:59:55 +00:00
chs
7e6508e29e add a PMAP_NC flag for pmap_kenter_pa() to specific a non-cached mapping.
use this in mbus_dmamem_map() to fix corruption of DMA memory.
note that this TLB bit is ignored on some CPUs (PA7100 and probably
others of that era), so this doesn't fix the problem in general,
but it does work on newer models and will make things easier later.
2004-01-05 02:25:32 +00:00
jdolecek
089abdad44 Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
2004-01-04 11:33:29 +00:00
pk
70f20a1217 Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
2003-12-30 12:33:13 +00:00
jmc
43bf89bfc6 Fixes from PR#23177. Various lint/logic fixes:
Fix some non-initialized variables
close the output files when done
Redo the printing for RCS strings so they don't expand in the awk script too
Do proper tests for variables existance before accessing

Verified output from all scripts is identical to original versions
2003-12-15 07:32:20 +00:00
agc
7db1d33cba Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
2003-12-10 12:06:25 +00:00
jmc
695a2a2f9f Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
2003-12-10 02:04:00 +00:00
chs
6ca2b78b74 enable com console. 2003-12-08 14:59:26 +00:00
chs
961d62cfa5 add console support, based on other platforms. from Jochen Kunz. 2003-12-07 02:17:22 +00:00
atatat
13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
chs
06abe054f9 bcopy -> memcpy 2003-11-28 19:03:03 +00:00
chs
8205afea7d de-__P, remove register, ansify. 2003-11-24 02:51:35 +00:00
chs
36ff370721 de-__P, remove register, ansify. 2003-11-23 17:09:29 +00:00
chs
6cca27ceb0 add cnmagic support to pdc console driver. 2003-11-21 00:25:36 +00:00
chs
0b0e802177 de-__P, remove register, ansify. 2003-11-20 03:58:47 +00:00
chs
5dcca2231a restructure autoconf for [ABCDJK]-class machines. add phantomas bus.
adapted from OpenBSD by Jochen Kunz.
2003-11-18 04:04:42 +00:00
chs
d277a48ec3 a stripped-down config to work around netboot problems. 2003-11-18 04:03:32 +00:00
chs
cfb436dcf3 remove link_set hack, new toolchain doesn't need it. 2003-11-18 03:25:48 +00:00
tsutsui
addcf5d254 #if defined(_KERNEL_OPT) is enough, #if !defined(_LKM) isn't needed
in that case. Pointed out by mrg.
2003-11-08 15:19:20 +00:00
tsutsui
7a6d021fe2 Include "opt_lockdebug.h" only #if !defined(_LKM) && defined(_KERNEL_OPT). 2003-11-08 12:06:20 +00:00
kleink
9acc1a6c3b Have the linker discard local labels' symbols. 2003-11-06 18:19:32 +00:00
matt
1dc67abbb1 Compile at -O2. Fix various GCC3-isms
XXX mem.c still fails to assemble.
2003-11-01 18:23:37 +00:00
lukem
f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
jdolecek
821f341675 add necessary majors for miscellaneous devices, such as missing
wscons/scsi/isdn devices
2003-10-24 08:18:36 +00:00
jdolecek
ee510816af add wsfont major to archs which have the other wscons devices 2003-10-22 16:53:22 +00:00
itohy
29baf4fd02 white space police 2003-10-21 13:10:42 +00:00
itohy
173218ef29 Slightly change the base address so GENERIC kernel may boot (but not confirmed). 2003-10-21 12:43:19 +00:00
itohy
87bcaf3acc 1.2: Support disklabel. 2003-10-21 12:40:15 +00:00
itohy
3fd01cc3f8 Add -D__daddr_t=int32_t so that the arguments of IODC are
not promoted to 64bit.

On 32bit PDC machines, IODC *requires* 32bit args and IODC
can handle only 2GB, and need not to use 64bit integer.
2003-10-21 12:35:23 +00:00
itohy
59f09ea752 Fix types of printf() args to match the format strings. 2003-10-21 12:26:27 +00:00
itohy
76595c213b Enable disklabel support. 2003-10-21 12:24:11 +00:00
itohy
d71dd6d1f4 #if 0 unused parts. 2003-10-21 12:22:37 +00:00
itohy
a57f5d5d08 Use ../common/libsa.h for prototype declarations of common functions.
Add tgets prototype (should be in some header file?).
2003-10-21 12:21:05 +00:00
itohy
1bb2ee7654 Add prototypes. 2003-10-21 12:19:24 +00:00
itohy
9833e639a8 Add a prototype.
Silence -Wshadow.
2003-10-21 12:18:02 +00:00
itohy
29f0f3babf Change the location of BSD disklabel not to overlap with LIF header.
LABELSECTOR:  0 -> 1
	LABELOFFSET: 64 -> 0

per discussion on NetBSD mailing lists: port-hp700 and tech-kern.
2003-10-18 23:45:30 +00:00
jdolecek
79ebb210fa add majors for ipfilter, lkm, vnd, tun, raid, cgd, ccd, and md
where missing
2003-10-15 18:20:19 +00:00
he
fe6ca02de9 Since the boot loader is a stand-alone program, stub out LIBCRT0,
LIBCRTBEGIN, LIBCRTEND, and LIBC -- these are being added to the
PROG target list by bsd.prog.mk.
2003-10-12 18:56:44 +00:00
matt
e291b36f05 Get hp700 boot tools to compile again. Patches from Jochen Knuz.
(with some modification from me).
2003-10-11 03:57:31 +00:00
jdolecek
ef5bb330f5 reassing majors for crypto and pf to use the newly defined MI major
range
2003-10-10 22:42:39 +00:00
jdolecek
4e915c9ccd update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
2003-10-10 21:21:25 +00:00
jdolecek
8af3527920 g/c USETOOLS?= no 2003-10-10 20:08:00 +00:00
chs
06332c88ef update for new gas syntax. from Jochen Kunz. 2003-10-10 15:07:43 +00:00
jdolecek
e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
matt
467632cd2a Install <machine/mcontext.h> 2003-09-20 22:25:07 +00:00
chs
ea3277f683 add a defflag for USELEDS. 2003-08-31 01:55:27 +00:00
chs
b5ed452510 just include the hppa version. 2003-08-31 01:28:22 +00:00
chs
e9303b36fc disable some things that don't build yet. 2003-08-31 01:27:18 +00:00
chs
a2ffedf11f add a hack for the link set stuff. 2003-08-31 01:27:00 +00:00
chs
cc0b88792e update for LWPs, and some lite cleanup. 2003-08-31 01:26:31 +00:00
itojun
4440262659 create /dev/crypto 2003-08-22 05:06:22 +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
itojun
3f14c71f75 reserve cdev major # for PF. ok'ed by technical-exec 2003-07-27 14:17:57 +00:00
lukem
0c82163c78 __KERNEL_RCSID() 2003-07-15 02:29:24 +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
thorpej
452a8fdae2 Rename IPL_IMP -> IPL_VM. 2003-06-16 20:00:56 +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
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
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
bjh21
4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
ragge
d8c8fa8111 Add pseudo-device ksyms. 2003-04-26 14:10:04 +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
bouyer
aec10dd80c Nake return values from bounds_check_with_label() conform to the man
page: -1 for error, 0 for EOF, 1 otherwise. Inspired by an OpenBSD commit
message, pointed out by Miod Vallat in private mail.
vax/mba/hp.c: check return value <= 0, not < 0 to be concistent with how
other places handle return values from bounds_check_with_label().
2003-04-16 15:00:59 +00:00
christos
b9f9db3ca2 Bye Bye UCONSOLE 2003-04-10 22:06:51 +00:00
tsutsui
953980bca4 - Add oosiop at gsc.
- Enable sync and disconnect/reselect for osiop.
  (which seems to work on 712/60)
2003-04-06 10:09:18 +00:00
tsutsui
aa2bec9565 Add MD attachment of the 53c700 SCSI on hp700 gsc.
XXX Tested only with pre-SA (1.6K) kernel on 735/125.
2003-04-06 10:06:14 +00:00
tsutsui
ceef79f4ab - Match only HPPA_FIO_GSCSI (i.e. 53c710) for osiop.
- KNF some lines.
2003-04-06 10:02:52 +00:00
thorpej
cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00
thorpej
b4fe782331 Use PAGE_SIZE rather than NBPG. 2003-04-01 20:48:27 +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
kent
cd7d9faeaf Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it. 2003-01-28 01:07:51 +00:00
simonb
276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +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
thorpej
72a2c87923 Use aprint_normal() for cfprint routines. 2003-01-01 01:34:45 +00:00
tsutsui
e0481a14c5 Change type of dumpmag from u_long to u_int32_t to sync with other ports. 2002-12-14 05:23:19 +00:00
chs
8e1d2230d8 use explicitly-sized types for LIF structure fields and
make them all unsigned.
2002-11-28 06:06:13 +00:00
chs
c456a3cd29 remove the goofy hack to have the target be the LIF file,
just build the boot program with this Makefile.
2002-11-28 06:03:25 +00:00
chs
371349a205 do the "hppa" symlink too. 2002-11-28 06:01:00 +00:00
chs
3c3d32aaea force useful values for MACHINE_ARCH and MACHINE.
remove the goofy hack to have the target be the LIF file,
just build the boot program with this Makefile.
just add to CFLAGS, don't override.
use NOMAN.
2002-11-28 06:00:28 +00:00
chs
fe563d9169 the SIZEOF_HEADERS thing doesn't work with the current toolchain,
just use 1 page for now.
2002-11-28 05:56:51 +00:00
chs
176b75763b Put interface attributes on the device, not another attribute with
the same name as the device.
2002-11-28 05:53:23 +00:00
chs
27f9e27d6a de-__P, remove register, ansify, KNF.
remove whacky compat stuff (our normal cross-compat stuff will handle it).
fix endian dependencies and type-size errors, it works on little-endian now.
terminate the LIF directory after the last entry we use.
just use the filename last component of the file we're given for its name
in the LIF directory (if the path has a slash).
truncate the century part of the year for the BCD date, like hp-ux does.
check error returns.
2002-11-28 05:51:02 +00:00
chs
2c73702df2 de-__P, remove register, ansify, KNF 2002-11-28 05:38:41 +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
wiz
e78e668887 Fix typo (responsiness -> responsiveness). 2002-11-22 12:20:58 +00:00