Commit Graph

32891 Commits

Author SHA1 Message Date
phk
6f8415eeca Indent this file more like style(9).
Sponsored by: DARPA & NAI Labs.
2002-06-05 11:20:37 +00:00
phk
7d924377ca Preparation for UFS2 commit:
Factor the ufs reading code out of the i386/boot2 loader so it can
be reused by for instance sparc64.

Sponsored by: DARPA and NAI Labs.
2002-06-05 11:10:38 +00:00
mike
b454ba8ad4 Remove the deprecated 4.2/4.3BSD wait union. 2002-06-05 02:21:01 +00:00
jhb
4a77bedabf Replace thread_runnable() with thread_running() as the latter is more
accurate.

Suggested by:	julian
2002-06-04 22:36:24 +00:00
jhb
408adb7287 Optimize the adaptive mutex spin a bit. Use a simple while loop with
simple reads (and on IA32, a "pause" instruction for each interation of the
loop) to spin until either the mutex owner field changes, or the lock owner
stops executing.

Suggested by:	tanimura
Tested on:	i386
2002-06-04 21:53:48 +00:00
jhb
1ba6786436 Add a private thread_runnable() macro to make the code more readable and
make the KSE diff easier to maintain.
2002-06-04 21:50:02 +00:00
jake
85904aa20b Bump TSB_PAGES_SHIFT to 4. Less sucks too much. 2002-06-04 19:40:45 +00:00
mjacob
845c7be0e8 Add REPORT LUNS basic infrastructure. 2002-06-04 17:41:47 +00:00
jmallett
d943c30f90 NODEV is defined the same in _KERNEL and !_KERNEL case, so move it out from
the preprocessor conditional, and remove the now-empty #else.

Reviewed by:	asmodai
2002-06-04 05:48:38 +00:00
jeff
d9ab0c8dbc Add a comment describing a resource leak that occurs during a failure case
in obj_alloc.
2002-06-03 22:59:19 +00:00
pdeuskar
6d55ec63aa Added support for 82545EM and 82546EB based adapters.
Added Vlan support.

MFC after:	1 week
2002-06-03 22:30:51 +00:00
iedowse
60f926334d Use a per-device worker thread to avoid blocking in mdstrategy()
until the I/O completes. This fixes some easily reproducable deadlocks
that occur when using md(4) with GEOM.

Reviewed by:	phk
2002-06-03 22:09:04 +00:00
mdodd
6791283485 Quick and dirty convert to newbus. (Eventually 'eni.c' should go away.)
Module loads and unloads properly.

Thanks to Richard Hodges <rh@matriplex.com> for donating the hardware
to allow me to work on this driver.
2002-06-03 09:16:52 +00:00
mdodd
50437cfa68 Add new 'hea' driver files. 2002-06-03 09:14:12 +00:00
mdodd
cf74b6b577 Build a 'hea_pci' driver module. 2002-06-03 09:13:53 +00:00
mdodd
ff7e1ba7e5 - Add 'hea'.
- Compile 'hfa' only on i386 (for now).
2002-06-03 09:13:22 +00:00
alc
d75c291207 o Migrate vm_map_split() from vm_map.c to vm_object.c, renaming it
to vm_object_split().  Its interface should still be changed
   to resemble vm_object_shadow().
2002-06-02 23:54:09 +00:00
des
7464466a40 ANSIfy the one remaining K&R function. 2002-06-02 21:57:28 +00:00
des
f58932ded5 Whitespace nits. 2002-06-02 21:55:58 +00:00
des
a79d7499e2 Add support for 'j' flag. Simplify the size modifier code and reduce code
duplication.  Also add support for 'n' specifier.

Reviewed by:	bde
2002-06-02 21:54:55 +00:00
schweikh
28bcbfe85d Fix typo in the BSD copyright: s/withough/without/
Spotted and suggested by:	des
MFC after:	3 weeks
2002-06-02 20:05:59 +00:00
alc
02c58f2a49 o Style fixes to vm_map_split(), including the elimination of one variable
declaration that shadows another.

Note: This function should really be vm_object_split(), not vm_map_split().

Reviewed by:	md5
2002-06-02 19:32:05 +00:00
alc
6c9e59ad00 o Condition vm_object_pmap_copy_1()'s compilation on the kernel
option ENABLE_VFS_IOOPT.  Unless this option is in effect,
   vm_object_pmap_copy_1() is not used.
2002-06-02 06:31:41 +00:00
alfred
3ff28a5819 bde noticed that SOMAXCONN breaks pretty badly as an option for LINT.
so back it out.
2002-06-02 04:32:52 +00:00
alc
2abbbe7b8a o Remove GIANT_REQUIRED from vm_map_zfini(), vm_map_zinit(),
vm_map_create(), and vm_map_submap().
 o Make further use of a local variable in vm_map_entry_splay()
   that caches a reference to one of a vm_map_entry's children.
   (This reduces code size somewhat.)
 o Revert a part of revision 1.66, deinlining vmspace_pmap().
   (This function is MPSAFE.)
2002-06-01 22:41:43 +00:00
mike
fad7fa316a Be more strict about namespaces.
Submitted by:	wollman (mostly)
2002-06-01 21:07:10 +00:00
alfred
28ce0e9ae5 Backout/modify previous revision:
"empty default cases shouldn't be removed, they should have a break;
  statement added to them."

Requested by: billf
2002-06-01 20:54:21 +00:00
alfred
04d357d9e8 Silence warnings, remove some empty 'default' switch cases. 2002-06-01 20:40:42 +00:00
alfred
d7abc0aeaa Declare a variable sized array within a structure using [] rather than [0]
to silence warnings.
2002-06-01 20:40:05 +00:00
alfred
0ac0431441 Silence preprocessor warning, No need to use CONCAT with "," and "word". 2002-06-01 20:22:33 +00:00
alfred
3e1c335bb9 Unbreak LINT by compensating for the
ng_parse_struct_info -> ng_parse_struct_field change.
2002-06-01 19:54:21 +00:00
mike
12e7fe56ee Fix some, but not all style bugs. 2002-06-01 18:58:02 +00:00
alfred
db0dbae1d8 Fix warnings.
There's no need to use concatination when you have 'something.macro_arg'.
Comment out comment following #endif.
2002-06-01 18:50:35 +00:00
alfred
15e61a8561 Get rid of warnings, there's no need to do preprocessor concatination of
things with commas and equal signs.
2002-06-01 18:45:33 +00:00
mike
1b681bdeaa Add POSIX.1-2001 WCONTINUED option for waitpid(2). A proc flag
(P_CONTINUED) is set when a stopped process receives a SIGCONT and
cleared after it has notified a parent process that has requested
notification via waitpid(2) with WCONTINUED specified in its options
operand.  The status value can be checked with the new WIFCONTINUED()
macro.

Reviewed by:	jake
2002-06-01 18:37:46 +00:00
bde
dee070ee6e Fixed the return value of fpsetmask(). The API requires inversion of the
mask on both input and output to fpsetmask(), but this was only done for
input, so fpsetmask() returned the complement of the old mask (ANDed with
the mask bitfield).

PR:		38170
MFC after:	4 weeks
2002-06-01 17:39:46 +00:00
bde
36c56b3ddf Fixed style bugs in rev.1.9. 2002-06-01 17:27:16 +00:00
alc
b55171a0a3 o Revert a part of revision 1.66, contrary to what that commit message says,
deinlining vm_map_entry_behavior() and vm_map_entry_set_behavior()
   actually increases the kernel's size.
 o Make vm_map_entry_set_behavior() static and add a comment describing
   its purpose.
 o Remove an unnecessary initialization statement from vm_map_entry_splay().
2002-06-01 16:59:30 +00:00
alfred
abcdbeb52e Fix a couple of places where preprocessor concatination was misused and
something wound up grafted to a comma.
2002-06-01 16:21:26 +00:00
alfred
4b914e7656 Silence warning.
When casting a "const void *" to a "struct foo **" you want to actually
cast it to "struct foo * const *" not simply "const struct foo **".
2002-06-01 16:20:27 +00:00
semenu
c7fb877f7f Make devfs to give honour to PDIRUNLOCK flag.
Reviewed by:	jeff
MFC after:	1 week
2002-06-01 09:17:43 +00:00
ru
d2b5d45e1a Quick, low impact band-aide to unbreak the build. Added && 0 so we
ifdef out what appears to be a bogus call to softintr using data
elements that aren't in the softc.

Forgotten by:	imp
2002-06-01 08:29:12 +00:00
alfred
b5fffbc615 Should have been part of recent commit:
Fix GCC warnings caused by initializing a zero length array. In the process,
  simply things a bit by getting rid of 'struct ng_parse_struct_info' which
  was useless because it only contained one field.
But now I'm unbreaking compilation by adjusting these files to the recent
netgraph change.
2002-06-01 07:18:32 +00:00
alfred
0ef59d0f18 Call destroy_dev in detach routine to cleanup properly otherwise we
panic because of a repeat make_dev if/when the device is reattached
to the system.

Remove an "#if __FreeBSD__" in code that's nested under a "#if __NetBSD__"
(*sigh*)

Reported by: Seth Hettich <sjh@whiskey.ucf.ics.uci.edu>
Tested by: Seth Hettich <sjh@whiskey.ucf.ics.uci.edu>
2002-06-01 06:23:47 +00:00
imp
2af74b69ca Use PCI_INTERRUPT_VALI in stead of hard coded 255 2002-06-01 05:48:58 +00:00
imp
4c17f59069 More style(9) nits 2002-06-01 05:44:45 +00:00
imp
0a897fdf59 Define a PCI_INVALID_IRQ to augment PCI_INTERRUPT_VALID 2002-06-01 05:40:33 +00:00
imp
f4fa57817e Use a common function to map the bogus intlines.
Don't require pin be non-zero before we map bogus intlines, always do it.
This fixes a number of problems on HP Omnibook computers.

Tested/Reviewed by: Brooks Davis
2002-06-01 05:14:11 +00:00
bsd
bd53393ae5 Make a structure definition slightly more style(9) compliant (makes
the structure definition easier to find using grep).
2002-06-01 03:55:16 +00:00
imp
119f7813e3 Make this file mostly conform to style(9).
Approved by: msmith in principle before walkabout
2002-06-01 03:41:02 +00:00
archie
b10887dc2b Fix GCC warnings caused by initializing a zero length array. In the process,
simply things a bit by getting rid of 'struct ng_parse_struct_info' which
was useless because it only contained one field.

MFC after:	2 weeks
2002-05-31 23:48:03 +00:00
imp
5f569c908a Quick, low impact band-aide to unbreak the build. Added && 0 so we
ifdef out what appears to be a bogus call to softintr using data
elements that aren't in the softc.
2002-05-31 23:39:04 +00:00
anholt
b1848cc8d2 Warnings cleanup for gcc3. Also __FUNCTION__ -> __func__
Approved by:	des
2002-05-31 23:19:50 +00:00
archie
f138a74bc8 Fix a bug in m_split(): the "m->m_ext.ext_size" field of an mbuf was being
set to zero. This field indicates the total space in the external buffer
and therefore should not be modified after the external buffer is added.

Add a comment warning that the mbufs returned by m_split() might be read-only.

Fix M_TRAILINGSPACE() to return zero if !M_WRITABLE(m).

Reviewed by:	freebsd-net
Obtained from:	Vernier Networks, Inc.
MFC after:	1 week
2002-05-31 22:09:57 +00:00
ume
21239aacf9 __FreeBSD__ is not a compiler constant. We must use
__FreeBSD_version here.

Submitted by:	rwatson
2002-05-31 17:56:45 +00:00
des
ad1dca67b1 Nit: kern.ttys is of type S,xtty, not S,tty. 2002-05-31 16:11:49 +00:00
tanimura
e6fa9b9e92 Back out my lats commit of locking down a socket, it conflicts with hsu's work.
Requested by:	hsu
2002-05-31 11:52:35 +00:00
robert
c2b2e9b3bc - Replace the bandaid introduced in revision 1.110 with
a better solution.
 - Add braces for a ``for'' statement containing a single
   multi-line statement.
2002-05-31 09:41:09 +00:00
des
ca02bcf7fc Export nswapdev through sysctl(8).
Sponsored by:	DARPA, NAI Labs
2002-05-31 08:17:58 +00:00
brooks
bef0aeddb0 The loop back device hasn't been a count device for a while so remove
the number of interfaces.
2002-05-31 06:28:13 +00:00
silby
1f97abe190 Ensure that packet counts are always reset to 0 when
a route is cloned.  Previously, they took on the count
of their parent route (which was sometimes nonzero.)

Submitted by:	Andre Oppermann <oppermann@pipeline.ch>
MFC after:	5 days
2002-05-31 04:27:51 +00:00
alc
0b8e31ba85 Further work on pushing Giant out of the vm_map layer and down
into the vm_object layer:
 o Acquire and release Giant in vm_object_shadow() and
   vm_object_page_remove().
 o Remove the GIANT_REQUIRED assertion preceding vm_map_delete()'s call
   to vm_object_page_remove().
 o Remove the acquisition and release of Giant around vm_map_lookup()'s
   call to vm_object_shadow().
2002-05-31 03:48:55 +00:00
imp
cf0d37c01c Use __FreeBSD_version to test what things to use 2002-05-31 03:27:34 +00:00
takawata
94f9a3d5a8 Fix build breakage on my pccard related commit. 2002-05-31 01:08:49 +00:00
marcel
8d5d2e362e Don't use an incomplete array type to mark the start of the padding
because the padding should be inserted before the array and not after
it, as is done by GCC 3.1. Instead use an explicit uint32_t field
to get what was intended and on top of that make the size of the
padding explicit. This also doesn't depend on a C99 feature.
While here, expand the comment. Just to make a point.

Pointed out by: fanf
2002-05-31 01:07:13 +00:00
julian
3de740d4f6 Add missing unlock
Submitted by: dirkx@covalent.net
2002-05-30 23:41:51 +00:00
semenu
b9960bece1 Remove lock from ffs_vget introduced by v1.24. Instead of locking the
vnode creation globaly, we allow processes to create vnodes concurently.
In case of concurent creation of vnode for the one ino, we allow processes
to race and then check who wins.

Assuming that concurent creation of vnode for same ino is really rare case,
this is belived to be an improvement, as it just allows concurent creation
of vnodes.

Idea by:	bp
Reviewed by:	dillon
MFC after:	1 month
2002-05-30 22:04:17 +00:00
wollman
5f28f6025e Avoid unintentional trigraph. 2002-05-30 20:53:45 +00:00
takawata
b4f860ec9b Forget to change lookup function for oldcard side. 2002-05-30 18:48:44 +00:00
takawata
d19ac116d6 Make oldcard and newcard kernel module work. 2002-05-30 17:38:00 +00:00
phk
53143bb2c1 Mistyped and lost a '&' in previous commit. 2002-05-30 16:26:39 +00:00
phk
559ad51949 Don't forget to factor in the boottime when we calculate PPS timestamps.
Submitted by:	Akira Watanabe <akira@myaw.ei.meisei-u.ac.jp>
2002-05-30 10:34:01 +00:00
schweikh
f7a7d725b1 Fix a handful of typos and grammar bogons. No content changes.
Translators can ignore this commit.

MFC after:	2 weeks
2002-05-30 09:24:01 +00:00
dfr
a3b8e6c9c7 Move the definition of ElfN_Hashelt to common headers. The only platform
which has a different definition for this is alpha.
2002-05-30 08:32:18 +00:00
alfred
26c9c27f03 Check for defined(__i386__) instead of just defined(i386) since the compiler
will be updated to only define(__i386__) for ANSI cleanliness.
2002-05-30 07:32:58 +00:00
alfred
4320d2c0b9 correct commented out preprocessor test for i386 to __i386__ 2002-05-30 07:28:43 +00:00
alfred
cf295fd4a0 Check for defined(__i386__) instead of just defined(i386) since the compiler
will be updated to only define(__i386__) for ANSI cleanliness.
2002-05-30 07:13:40 +00:00
marcel
05e39ee52e Add compile time asserts for the size of struct gpt_hdr and struct
gpt_ent. Use offsetof() for struct gpt_hdr to exclude padding.
2002-05-30 06:33:07 +00:00
jeff
feec324370 Record the file, line, and pid of the last successful shared lock holder. This
is useful as a last effort in debugging file system deadlocks.  This is enabled
via 'options DEBUG_LOCKS'
2002-05-30 05:55:22 +00:00
marcel
90f98510f5 o Remove GCC specific attribute packed.
o  Add incomplete array padding.
2002-05-30 05:44:23 +00:00
julian
304195369e CURSIG() is not a macro so rename it cursig().
Obtained from:	KSE tree
2002-05-29 23:44:32 +00:00
schweikh
2c79ab496a Fix a handful of typos and grammar bogons. No content changes.
Translators can ignore this commit.

MFC after:	2 weeks
2002-05-29 22:57:18 +00:00
obrien
4c50817e02 PHK claims there is a crc32.c now. 2002-05-29 21:58:56 +00:00
phk
19d7b8fa4e For some reason this didn't get added in my previous commit. 2002-05-29 21:58:12 +00:00
obrien
4654593fd8 Back out revision 1.639. PHK filed to commit the libkern file. 2002-05-29 21:57:27 +00:00
wollman
1133906884 Version bump for addition of dlfunc(3). 2002-05-29 21:04:25 +00:00
julian
200eddc848 diff reduction from KSE to keep WW-III from happenning on -current 2002-05-29 20:40:50 +00:00
dillon
d3e6471535 PR: kern/38208
X-MFC after:	immediate w/ release eng approval.
2002-05-29 20:25:59 +00:00
phk
4383144a9a Add one copy of crc32() and crc32_tab[] in libkern, and remove it two other
places.

Comment out crc32 related definitions in zlib.h, we don't seem to have the
corresponding code in our kernel.
2002-05-29 20:24:09 +00:00
jake
ace1c1caeb Forgot to commit this file. Catch up to loader->kernel abi changes. 2002-05-29 19:48:03 +00:00
jake
8511f99ef3 Add needed include of queue.h. Remove unneeded include of smp.h. 2002-05-29 19:38:49 +00:00
jake
7dff1045f4 Forward declare struct trapframe. 2002-05-29 19:25:14 +00:00
jake
63364b9f7b Remove BOOTP_WIRED_TO= since I keep forgetting to take this out and screwing
over people with gems.
2002-05-29 19:22:17 +00:00
obrien
e59a166a79 Do not refer to the Intel PRO/1000 by its internal name.
Requested by:	pdeuskar
2002-05-29 18:42:26 +00:00
brooks
4432c323fd Restore the irq=0 => irq=255 hack to pci_cfgintr_search(). Just having
it in pci_cfgregread() wasn't sufficent on at least the HP Omnibook 500.

Reviewed by:	imp
2002-05-29 16:16:16 +00:00
peter
929921851c The kernel printf does not have %i 2002-05-29 08:25:13 +00:00
jake
f9b60edf3c Don't try to flush illegal alises from the data cache in vmapbuf and
vunmapbuf, this is handled by pmap now.
2002-05-29 06:16:47 +00:00
jake
8bf6eba7b8 Add an MD page flag for tracking if a page is cacheable or not, so that
we don't flush all mappings of a physical page in order to make it
virtually cachable again, if it is already cachable.
2002-05-29 06:12:13 +00:00
jake
c5525858aa Remove an unused variable. 2002-05-29 06:10:37 +00:00
jake
580d1a81b5 Merge the code in pv.c into pmap.c directly. Place all page mappings onto
the pv lists in the vm_page, even unmanaged kernel mappings.  This is so
that the virtual cachability of these mappings can be tracked when a page
is mapped to more than one virtual address.  All virtually cachable
mappings of a physical page must have the same virtual colour, or illegal
alises can be created in the data cache.  This is a bit tricky because we
still have to recognize managed and unmanaged mappings, even though they
are all on the pv lists.
2002-05-29 06:08:45 +00:00
jake
a601bb5324 Add pv list linkage and a pmap pointer to struct tte. Remove separately
allocated pv entries and use the linkage in the tte for pv operations.
2002-05-29 05:56:05 +00:00
jake
2a45651b25 Use a contrived 'tlb_entry' structure for passing the mappings for the
kernel text and data from the loader to the kernel, so that the tte format
is not part of the loader->kernel ABI.
2002-05-29 05:49:59 +00:00
jake
980c076c0c Remove pmap.pm_pvlist and make the functions that use it no-ops. These are
all optimizations for architectures which have large sparse page tables,
and/or can't put the pv linkage inside of the page table entries.
2002-05-29 05:24:16 +00:00
marcel
fec847a66d Remove the definition of struct mca_guid and use the generic
struct uuid defined in <sys/uuid.h>.

Use uuid/UUID instead of guid/GUID to emphasize that the
identifiers are DCE version 1 identifiers and also to avoid
inconsistencies as much a possible.
2002-05-29 05:19:07 +00:00
marcel
1cae9c65b1 Remove bktr for ia64. Same problem as vinum. See PR 38678. 2002-05-29 05:09:51 +00:00
marcel
cf7ff227df Vinum doesn't build on ia64.
See PR: 38678
2002-05-29 04:51:14 +00:00
marcel
d3f01d6a67 Add attribute packed to struct gpt_hdr to avoid unwanted padding at
the end of the struct to make it an integral number of "longs" on
64-bit architectures. The size of the struct must be 92, not 96.
2002-05-29 02:58:41 +00:00
jake
d314b7908f Sync with i386. The loader was being installed before the beforeinstall
target, which conventiently moved it to loader.old, leaving no loader.
2002-05-28 23:09:59 +00:00
joe
b02de3a56c NetBSD have adopted our usage of the DMAADDR macro:
date: 2002/05/28 12:42:39;  author: augustss;
    Change DMAADDR macro slightly.

Update the $NetBSD$ tags to reflect this and make slight changes to
usb_mem.h so that we're in sync with each other.
2002-05-28 20:51:43 +00:00
sos
d6fede3824 Use %02d in track numbers, so that 1 is 01, much easier for scripts 2002-05-28 17:39:17 +00:00
bde
7fb82bad76 Fixed some style bugs in recent commits. 2002-05-28 15:24:13 +00:00
des
577e468b90 Add some checks to prevent NULL dereferences.
Submitted by:	jhay
2002-05-28 14:29:56 +00:00
mux
8ba975c439 Remove a duplicated vfs_freeopts() that I introduced in last
revision.
2002-05-28 13:27:55 +00:00
benno
b3ff7bedf7 The stack is not at the top of the user struct. 2002-05-28 12:31:34 +00:00
benno
ae97f0c60a Remove an assertion as to whether the current thread already had the FPU or
not.  It may be desirable to put something similar back, but it's getting in
the way in it's current form.
2002-05-28 12:28:22 +00:00
benno
4fc9c21665 - Move macros that represent where syscall args are kept in a trapframe from
trap.c to frame.h
- Use the macros in vm_machdep.c:cpu_fork() to set up the trap frame of the
  new thread.
2002-05-28 12:24:29 +00:00
benno
ef9686f87e Remove the old prototype for kcopy. It's in cpu.h now. 2002-05-28 09:38:02 +00:00
marcel
5fe0fdb432 Add support to GEOM for GUID Partition Tables (GPTs). The support
is currently conditional on both the GEOM and GEOM_GPT options to
avoid getting GPT by default and having the MBR and GPT classes
clash.
The correct behaviour of the MBR class would be to back-off (reject)
a MBR if it's a Protective MBR (a MBR with a single partition of type
0xEE that spans the whole disk (as far as the MBR is concerned).
The correct behaviour if the GPT class would be to back-off (reject)
a GPT if there's a MBR that's not a Protective MBR.

At this stage it's inconvenient to destroy a good MBR when working
with GPTs that it's more convenient to have the MBR class back-off
when it detects the GPT signature on disk and have the GPT class
ignore the MBR.

In sys/gpt.h UUIDs (GUIDs) for the following FreeBSD partitions
have been defined:

GPT_ENT_TYPE_FREEBSD
	FreeBSD slice with disklabel. This is the equivalent of
	the well-known FreeBSD MBR partition type.
GPT_ENT_TYPE_FREEBSD_{SWAP|UFS|UFS2|VINUM}
	FreeBSD partitions in the context of disklabel. This is
	speculating on the idea to use the GPT to hold partitions
	instead if slices and removing the fixed (and low) limits
	we have on the number of partitions.

This commit lacks a GPT image for the regression suite.
2002-05-28 09:04:48 +00:00
benno
ebe993f5ea Implement pmap_copy and pmap_copy_page. 2002-05-28 07:38:55 +00:00
benno
56b6a77a90 Move the kcopy() function from trap.c to machdep.c. Add a prototype. 2002-05-28 07:36:36 +00:00
des
35f5a040c8 Add NAI copyright. 2002-05-28 06:53:41 +00:00
des
2f98561bef Back out part of previous commit; the dev_t union trick is still useful in
the kvm case.
2002-05-28 06:34:28 +00:00
marcel
58435e6cb7 Add uuidgen(2) and uuidgen(1).
The uuidgen command, by means of the uuidgen syscall, generates one
or more Universally Unique Identifiers compatible with OSF/DCE 1.1
version 1 UUIDs.

From the Perforce logs (change 11995):

Round of cleanups:
o  Give uuidgen() the correct prototype in syscalls.master
o  Define struct uuid according to DCE 1.1 in sys/uuid.h
o  Use struct uuid instead of uuid_t. The latter is defined
   in sys/uuid.h but should not be used in kernel land.
o  Add snprintf_uuid(), printf_uuid() and sbuf_printf_uuid()
   to kern_uuid.c for use in the kernel (currently geom_gpt.c).
o  Rename the non-standard struct uuid in kern/kern_uuid.c
   to struct uuid_private and give it a slightly better definition
   for better byte-order handling. See below.
o  In sys/gpt.h, fix the broken uuid definitions to match the now
   compliant struct uuid definition. See below.
o  In usr.bin/uuidgen/uuidgen.c catch up with struct uuid change.

A note about byte-order:
        The standard failed to provide a non-conflicting and
unambiguous definition for the binary representation. My initial
implementation always wrote the timestamp as a 64-bit little-endian
(2s-complement) integral. The clock sequence was always written
as a 16-bit big-endian (2s-complement) integral. After a good
nights sleep and couple of Pan Galactic Gargle Blasters (not
necessarily in that order :-) I reread the spec and came to the
conclusion that the time fields are always written in the native
by order, provided the the low, mid and hi chopping still occurs.
The spec mentions that you "might need to swap bytes if you talk
to a machine that has a different byte-order". The clock sequence
is always written in big-endian order (as is the IEEE 802 address)
because its division is resulting in bytes, making the ordering
unambiguous.
2002-05-28 06:16:08 +00:00
marcel
e2eeb62542 Add syscall uuidgen() for generating Univerally Unique Identifiers
(UUIDs). On ia64 UUIDs, aka GUIDs, are used by EFI and the firmware
among others. To create GUID Partition Tables (GPTs), we need to
be able to generate UUIDs.
2002-05-28 05:58:06 +00:00
des
e332aae785 Introduce struct xtty, used when exporting tty information to userland.
Make kern.ttys export a struct xtty rather than struct tty.  Since struct
tty is no longer exposed to userland, remove the dev_t / udev_t hack.

Sponsored by:	DARPA, NAI Labs
2002-05-28 05:40:53 +00:00
alc
06c3939cfb o Remove unused #defines. 2002-05-27 22:10:28 +00:00
benno
556157d84a Print srr1 in printtrap()
Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-05-27 11:20:19 +00:00
benno
d7323955b4 Get the correct memory regions from OpenFirmware. We were getting the
"available" ranges, not the "physical" ranges.  Clean up some of the
bootstrap code in the process.

Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-05-27 11:18:12 +00:00
benno
496e86d41b Use correct types in [sf]uword32. 2002-05-27 10:50:47 +00:00
dd
90158e3b68 Don't tsleep() with an sb_mtx held. 2002-05-27 05:20:15 +00:00
mike
e24a2ccd6a Use underscored variant of BYTE_ORDER and friends to allow this to
work in a !__BSD_VISIBLE environment.
2002-05-27 00:55:17 +00:00
joe
708a20ee7b Regen. 2002-05-27 00:01:21 +00:00
joe
a65e356625 Add a couple of new aue ethernet adapters from NetBSD:
ELECOM LDUSBLTX
	IODATA USBETTXS
2002-05-27 00:00:48 +00:00
joe
831cd78c74 Use aue_lookup for looking up devices. 2002-05-26 23:54:37 +00:00
joe
334090e937 Correct the usage of DMAADDR in a piece of '#if 0'd code. (The compiler
didn't pick it up.)
2002-05-26 22:13:09 +00:00
joe
514cd97aa3 MFNetBSD:
revision 1.124
    date: 2002/05/26 03:10:02;  author: minoura;  state: Exp;  lines: +3 -3
    Clear done_head in the HCCA *before* acknoledging the interrupt.
    Driver lost some completed transfers under heavy loads.
2002-05-26 22:11:34 +00:00
joe
7a6410c018 MFNetBSD: ohci.c (1.124), uhci.c (1.159), usbdi.c (1.100)
date: 2002/05/19 06:24:31;  author: augustss;  state: Exp;
    Update dma memory access API a little.

NetBSD have adopted our way of using the KERNADDR macro.  Update
the revision tags to show that we're in sync, and remove the casts
that they did in their adaptation.
2002-05-26 22:00:06 +00:00
phk
d41562720e Add a proof-of-concept encryption class.
"The only hard problem in cryptography is key-management."

All sectors are encrypted with AES in CBC mode using a constant key,
currently compiled in and all zero.

To activate this module, write the magic header on the partition:

	echo "<<FreeBSD-GEOM-AES>>" | dd conv=sync of=/dev/md98

The encrypted device will be one sector shorter and have ".aes"
appended to its name.

Sponsored by: DARPA & NAI Labs.
2002-05-26 18:14:38 +00:00
phk
571d9aa442 Give the closet-dev_t we hand to the diskdrivers a name. 2002-05-26 17:35:14 +00:00
phk
8bb89b7b0c Only clear the spoiled flag if the class had no spoiled method, the spoiled
method may have deallocated the consumer already and modifying free()'ed
memory is bad style.

Sponsored by: DARPA & NAI Labs.
2002-05-26 17:17:25 +00:00
dfr
e8d149b2f7 Add declarations of suword32 and suword64. Add implementations of one or
the other (or both) to all the platforms. Similar for fuword32 and
fuword64.
2002-05-26 16:03:13 +00:00
jake
82d31a36d4 Remove a hack for using an external compiler if cross compiling. 2002-05-26 15:55:28 +00:00
des
9471e31450 Make sure there's a statement after the out: label in clockattach(). 2002-05-26 11:23:00 +00:00
n_hibma
6029daa1e0 Cosmetic change (align with other boot blocks):
CONSPEED -> COMSPEED

Approved by:	nyan
2002-05-26 10:11:17 +00:00
phk
cd78b1f556 Mis-edit in last commit. 2002-05-26 09:57:59 +00:00
phk
3a79eba71d Be a bit smarter about rewriting data so we don't loose too much performance.
Sponsored by: DARPA & NAI Labs.
2002-05-26 09:38:51 +00:00
phk
bf00330394 Use an umazone per unit for allocating the sectors for malloc backing.
Clean up things properly when we unconfigure malloc backed units.

Sponsored by:	DARPA & NAI Labs.
2002-05-26 06:48:55 +00:00
alc
642723e24c o Acquire and release Giant around pmap operations in vm_fault_unwire()
and vm_map_delete().  Assert GIANT_REQUIRED in vm_map_delete()
   only if operating on the kernel_object or the kmem_object.
 o Remove GIANT_REQUIRED from vm_map_remove().
 o Remove the acquisition and release of Giant from munmap().
2002-05-26 04:54:56 +00:00
phk
45b9277876 Give the "malloc" backing of md(4) an adaptive multilevel index tree to
remove the need for a contiguous array with pointers to all the sectors.

Try to make failure to malloc(9) memory a non-hang situation.

Eventually this will allow us to test the 64bit cleanness of the disk
I/O patch, but more work is outstanding here and elsewhere.

Sponsored by:	DARPA & NAI Labs.
2002-05-25 20:44:20 +00:00
brooks
9380aef83f Make discard devices clonable and unloadable. Also, change the
interface name from ds# to disc#.
2002-05-25 20:20:35 +00:00