Commit Graph

32602 Commits

Author SHA1 Message Date
Benno Rice
25e2288dd7 Implement pmap_copy and pmap_copy_page. 2002-05-28 07:38:55 +00:00
Benno Rice
37d87c9ff8 Move the kcopy() function from trap.c to machdep.c. Add a prototype. 2002-05-28 07:36:36 +00:00
Dag-Erling Smørgrav
6c533ac713 Add NAI copyright. 2002-05-28 06:53:41 +00:00
Dag-Erling Smørgrav
b0405a2ad3 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 Moolenaar
52183d0145 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 Moolenaar
494eefd86b 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
Dag-Erling Smørgrav
1a149fcd67 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
Alan Cox
8f2ba19c90 o Remove unused #defines. 2002-05-27 22:10:28 +00:00
Benno Rice
31956eeb9e Print srr1 in printtrap()
Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-05-27 11:20:19 +00:00
Benno Rice
31c82d0332 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 Rice
7ed61facaa Use correct types in [sf]uword32. 2002-05-27 10:50:47 +00:00
Dima Dorfman
ad308c10c7 Don't tsleep() with an sb_mtx held. 2002-05-27 05:20:15 +00:00
Mike Barcroft
aa37be50ad 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
Josef Karthauser
ca3971124e Regen. 2002-05-27 00:01:21 +00:00
Josef Karthauser
b826a68b7f Add a couple of new aue ethernet adapters from NetBSD:
ELECOM LDUSBLTX
	IODATA USBETTXS
2002-05-27 00:00:48 +00:00
Josef Karthauser
12d2a2a729 Use aue_lookup for looking up devices. 2002-05-26 23:54:37 +00:00
Josef Karthauser
5908b50130 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
Josef Karthauser
cc12206976 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
Josef Karthauser
883d14d6c6 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
Poul-Henning Kamp
291daf5735 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
Poul-Henning Kamp
d4116af4f9 Give the closet-dev_t we hand to the diskdrivers a name. 2002-05-26 17:35:14 +00:00
Poul-Henning Kamp
855f8b26f2 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
Doug Rabson
396a429cfd 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 Burkholder
a6b82b31b1 Remove a hack for using an external compiler if cross compiling. 2002-05-26 15:55:28 +00:00
Dag-Erling Smørgrav
7b856994fd Make sure there's a statement after the out: label in clockattach(). 2002-05-26 11:23:00 +00:00
Nick Hibma
44b279e2f6 Cosmetic change (align with other boot blocks):
CONSPEED -> COMSPEED

Approved by:	nyan
2002-05-26 10:11:17 +00:00
Poul-Henning Kamp
fcf867e9f7 Mis-edit in last commit. 2002-05-26 09:57:59 +00:00
Poul-Henning Kamp
fde2a2e414 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
Poul-Henning Kamp
f43b2bac72 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
Alan Cox
4b9fdc2bce 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
Poul-Henning Kamp
c6517568df 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 Davis
c69b7ffe7d Make discard devices clonable and unloadable. Also, change the
interface name from ds# to disc#.
2002-05-25 20:20:35 +00:00
Brooks Davis
ae5a19be8e Move all unit number management cloned interfaces into the cloning
code.  The reverts the API change which made the <if>_clone_destory()
functions return an int instead of void bringing us into closer
alignment with NetBSD.

Reviewed by:	net (a long time ago)
2002-05-25 20:17:04 +00:00
Alan Cox
a739e09c6e o Remove some unnecessary casting from and add some necessary casting to
aio_suspend() and lio_listio().

Submitted by:	bde
2002-05-25 18:39:42 +00:00
Dag-Erling Smørgrav
4b4c18f861 ANSIfy (significant portions were already partly ANSIfied) 2002-05-25 15:52:53 +00:00
Dag-Erling Smørgrav
b7457aabf6 Remove register. 2002-05-25 15:44:38 +00:00
Dag-Erling Smørgrav
dedf14f521 Automated whitespace cleanup. 2002-05-25 15:43:06 +00:00
Bruce Evans
e788f79698 Fixed printf format errors which apparently crept in while -Wformat was
disabled for gcc-3.
2002-05-25 11:18:03 +00:00
Bruce Evans
ae4c33defa "Fixed" printf format errors (64-bit daddr_t casualties; should use %jx
instead of %llx when %j is available).

Changed nearby output formats from %x to %#x so that it is obvious that the
numbers are in hex (vinum mostly uses 0x%x elsewhere).

Didn't fix nearby format printf errors (long lines).
2002-05-25 11:12:30 +00:00
Bruce Evans
ff8cc2eb35 Fixed printf format errors. Most of them are 64-bit daddr_t casualties.
Printing daddr_t's using %d format was always an error, but gcc's
warning about it was ignored for supported 64-bit arches and not printed
for supported 32-bit arches.  Hundreds if not thousands thousands of
previously "fixed" daddr_t printings are now broken on 32-bit machines
by casting daddr_t's to longs.  daddr_t's should be printed using %jd
format, but this fix uses %lld since %j is not implemented in the
kernel yet.

Fixed some nearby format printf errors (style bugs).
2002-05-25 11:05:07 +00:00
Bruce Evans
5cc5b1d344 Fixed a printf format error. It was old and should have been detected by
gcc-2.9x, but somehow wasn't fixed already.
2002-05-25 10:48:03 +00:00
Jake Burkholder
4d574756ac Convert the interrupt queue from an array to a linked list. Implement
intr_dequeue in asm so that it can easily be modified to do light weight
context switching.
2002-05-25 02:39:28 +00:00
Jake Burkholder
0679dc5f91 Try to handle "double faults" occuring at more trap levels (ie 4 :)). 2002-05-25 01:45:11 +00:00
Jake Burkholder
597e13d8c5 Minor style. 2002-05-25 01:44:08 +00:00
Jake Burkholder
d2ac231616 Make the run queue parameters machine dependent. Optimize 64 bit
architectures by using a 64 bit word for the bit array which keeps
track of non-empty queues.

Reviewed by:	peter
2002-05-25 01:12:23 +00:00
Alfred Perlstein
fa09b4015d Backout 1.54 (restore definition for printf0 to actually do something). 2002-05-24 19:16:08 +00:00
Maxime Henrion
ad841cb9b2 Convert ext2fs to nmount(2). 2002-05-24 17:38:01 +00:00
Thomas Moestl
9bb711b95d Fully reset a gem on some error conditions; otherwise it would hang in
about 1 of 10 cases.

Proposed and tested by:	phk
2002-05-24 12:47:41 +00:00
Mark Murray
1422d23663 The previous ANSIfication did not take into account earlier,
non-compliant compilers. Revert to the compatible form to allow
upgrade-builds.
2002-05-24 09:40:51 +00:00
Mark Murray
f1f239b30d The previous ANSIfication did not take into account upgrade-builds
uing an earlier, non-compliant compiler. Revert to the compatible
form.
2002-05-24 09:37:10 +00:00