Commit Graph

36526 Commits

Author SHA1 Message Date
imp
7e20f49bf6 MFp4:
o Add support for bus_child_present call by implementing that method for cbb.
2002-11-14 05:20:39 +00:00
imp
7ed8f6e719 MFp4:
o Make this code a little easier to understand by using simpler if
  statements, but nesting them.
2002-11-14 05:18:53 +00:00
imp
01eae78096 MFp4:
o Use 32-bit unsigned types for things that really are 32-bit quantities,
  not bus_addr_t.  These are not the same as a bus_addr_t, so don't use
  that here.  Harmless on i386, introduced problems on sparc64.

Submitted by: jhb
2002-11-14 05:15:50 +00:00
imp
36d61097ba Remove an impossible condition. pf->dev is always non-null here. 2002-11-14 05:13:52 +00:00
imp
8eb26d8733 MFp4:
o Add a diagnostic for an 'impossible' condition.
o Collapse common code.
2002-11-14 05:12:02 +00:00
imp
c35b7acf66 minor correction to comment 2002-11-14 05:10:16 +00:00
imp
33cb79e0fa Add second and thrid bus-toaster IDs 2002-11-14 05:08:22 +00:00
imp
99afd075e5 regen to 1.37 2002-11-14 05:07:20 +00:00
imp
bd7ef5583b Add a third aic-based bustoaster. 2002-11-14 05:06:25 +00:00
imp
4ae1f7bf1d Panic message should end with \n.
Reviewed by: ken a while ago.
2002-11-14 05:03:11 +00:00
scottl
87416e10ed When parsing the CIS, if a BAR tuple is encountered, enable the corresponding
bit in the PCI command register for the device.  Otherwise, device drivers
that look at this register to see which types of BARs are usable will think
that none of them are.
This allows my Adaptec 1480A cardbus card to finally work.

Reviewed by:	imp
2002-11-13 22:53:48 +00:00
peter
51cb1ae47b Recognize the Serverworks CIOB30 host to pci bridge. 2002-11-13 21:30:44 +00:00
alc
9a2b5d5d20 Remove dead code that hasn't been needed since the demise of share maps
in various revisions of vm/vm_map.c between 1.148 and 1.153.
2002-11-13 19:50:06 +00:00
mux
f737ca00a4 Remove a commented out #include "opt_pci.h", it doesn't
exist anymore.
2002-11-13 17:50:59 +00:00
mux
c4c5e2af2a Remove opt_pci.h from SRCS, it doesn't exist anymore. 2002-11-13 17:45:42 +00:00
mux
fe704e4fdf Remove opt_pci.h from SRCS. 2002-11-13 17:43:37 +00:00
mux
4068f70fba Remove a bunch of #include "opt_pci.h". 2002-11-13 17:40:15 +00:00
mux
3c348eda15 Unbreak kernel build.
Submitted by:	Hiten Pandya <hiten@angelica.unixdaemons.com>
2002-11-13 17:34:12 +00:00
rwatson
9dde910437 Introduce a condition variable to avoid returning EBUSY when
the MAC policy list is busy during a load or unload attempt.
We assert no locks held during the cv wait, meaning we should
be fairly deadlock-safe.  Because of the cv model and busy
count, it's possible for a cv waiter waiting for exclusive
access to the policy list to be starved by active and
long-lived access control/labeling events.  For now, we
accept that as a necessary tradeoff.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-13 15:47:09 +00:00
mux
06657e3da6 Add support for the C99 %t format modifier. 2002-11-13 15:15:59 +00:00
mux
8541a1e43c Add the sys/stddef.h header, so that we can have ptrdiff_t
definition in the kernel.  It also includes the offsetof()
definition which, according to bde@ should be here and not
in sys/types.h, and the definition of NULL so that we're
closer to make it closer to standard C.

Reviewed by:	mike
2002-11-13 15:14:57 +00:00
mike
02c7d00fbd Fix a constant in the standard namespace not to depend on another
constant in the BSD namespace.
2002-11-13 11:49:24 +00:00
maxim
809d226228 Due to a memory alignment sizeof(struct ipfw_flow_id) is bigger than
ipfw_flow_id structure actual size and bcmp(3) may fail to compare
them properly. Compare members of these structures instead.

PR:		kern/44078
Submitted by:	Oleg Bulyzhin <oleg@rinet.ru>
Reviewed by:	luigi
MFC after:	2 weeks
2002-11-13 11:31:44 +00:00
mdodd
69fdcfb883 Document loader tunables hw.pci.enable_io_modes and
hw.pci.allow_unsupported_io_range.

Submitted by:	 Hiten Pandya <hiten@angelica.unixdaemons.com>
Approved by:	 re (murray)
2002-11-13 09:43:53 +00:00
mdodd
a119655a5e Convert kernel compile option PCI_ALLOW_UNSUPPORTED_IO_RANGE to
a loader tunable hw.pci.allow_unsupported_io_range.

Submitted by:	 Hiten Pandya <hiten@angelica.unixdaemons.com>
Approved by:	 re (murray)
2002-11-13 09:42:25 +00:00
mdodd
3a3ea4b9da Staticize local variable.
Submitted by:	 Hiten Pandya <hiten@angelica.unixdaemons.com>
Obtained from:	 re (murray)
2002-11-13 09:40:09 +00:00
mdodd
07a965e862 Loader tunable 'machdep.disable_mtrrs'.
Sysctl of same name to reflect status.

Submitted by:	 jhb
Approved by:	 re (murray)
MFC after:	 1 day
2002-11-13 09:37:43 +00:00
alc
c02d224c79 Move pmap_collect() out of the machine-dependent code, rename it
to reflect its new location, and add page queue and flag locking.

Notes: (1) alpha, i386, and ia64 had identical implementations
of pmap_collect() in terms of machine-independent interfaces;
(2) sparc64 doesn't require it; (3) powerpc had it as a TODO.
2002-11-13 05:39:58 +00:00
peter
1b75e8e7ed Major #46 was also MIA. 2002-11-13 01:42:59 +00:00
peter
04df5327c4 Note that 101 is unused, rather than leave it out of the file.
Add some historical information.  This can be removed as majors
are recycled.
2002-11-13 00:25:01 +00:00
hsu
da0bbc8eaf Turn off duplicate lock checking for inp locks because udp_input()
intentionally locks two inp records simultaneously.
2002-11-12 20:44:38 +00:00
simokawa
36297badba - Add fwmem_xfer_req() and use this in other functions. 2002-11-12 17:19:21 +00:00
simokawa
8595cb5b46 - Remove unused code.
- Fix style.
2002-11-12 17:16:20 +00:00
simokawa
86aed55239 fix wording. 2002-11-12 17:11:32 +00:00
simokawa
b445a4b51a Split userland services to fwdev.c. 2002-11-12 15:22:19 +00:00
simokawa
f4a7469d8f Use struct fw_device in fwmem.c
- specify fwmem target by EUI64.
- fw_noderesolve returns struct fw_device rather than dst.
- include struct firewire_comm in struct fw_device.
2002-11-12 13:49:17 +00:00
simokawa
6262082ff1 Add a prototype for suspend/resume. 2002-11-12 13:46:09 +00:00
simokawa
7c6dbbe64b Change interface of fwmem_read_*() functions to be usable from other part
of the module.
2002-11-12 11:15:01 +00:00
simokawa
664569e8ec Change interface of fwmem_read_*() functions to be usable from other part
of the module.
2002-11-12 11:08:50 +00:00
scottl
18271b238a Use better return types and a couple of casts to eliminate warnings on
alpha.  This will take the file out of sync with the private version
that we maintain, but alpha tinderbox has been broken for too long.

Tested on: i386, sparc64, alpha
2002-11-12 10:22:49 +00:00
simokawa
3b7ac3a4f9 - clean up 2002-11-12 10:02:50 +00:00
scottl
55d3589a83 Fix two typos from the previous commit. This code is definitely infectious. 2002-11-12 09:45:59 +00:00
scottl
57f021e104 Step one of cleaning and fixing cardbus:
- Fix some especially bad style in the CIS BAR tuple parsing code.
 - activate Option ROMS correctly.
 - de-obfuscate the Option ROM image selection code.
 - Fix mis-interpretation of the PCI spec that prevented Option ROMs whose
   CIS section wasn't in the first image from working.
 - Fix mis-interpretation of the PCI spec that prevented CIS's mapped into
   MEMIO space from working at all.
 - Reject invalid CIS pointers.

Reviewed by:	imp
2002-11-12 08:23:27 +00:00
simokawa
faf37223df - Remove unused code.
- Style fixes.
2002-11-12 05:52:01 +00:00
simokawa
af05a61150 Restrict process count in fwohci_arcv() and fwohci_ircv(). 2002-11-12 04:54:30 +00:00
rwatson
1e2f849511 Garbage collect mac_create_devfs_vnode() -- it hasn't been used since
we brought in the new cache and locking model for vnode labels.  We
now rely on mac_associate_devfs_vnode().

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-12 04:20:36 +00:00
jhb
2dfe09331e Correct an assertion in the code to traverse the list of locks to find an
earlier acquired lock with the same witness as the lock currently being
acquired.  If we had released several earlier acquired locks after
acquiring enough locks to require another lock_list_entry bucket in the
lock list, then subsequent lock_list_entry buckets could contain only one
lock instance in which case i would be zero.

Reported by:	Joel M. Baldwin <qumqats@outel.org>
2002-11-11 16:36:20 +00:00
mux
873c175b8f Capitalize the first letter of device descriptions
for consistency with the rest of the drivers.
2002-11-11 15:26:08 +00:00
rwatson
01cba722c4 Garbage collect definition of M_MACOPVEC -- we no longer perform a
dynamic mapping of an operation vector into an operation structure,
rather, we rely on C99 sparse structure initialization.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-11 14:15:58 +00:00
cognet
1404d98db6 Remove extra #include<sys/vmmeter.h>. 2002-11-11 13:57:50 +00:00
mjacob
a58a13572c atomic_set_8 isn't MI. Instead, follow Jake's suggestions about
ZONE_LOCK.
2002-11-11 11:50:03 +00:00
tmm
1d05c95940 Declare the snp ioctl()s to work on udev_t, since that is what they
really do and dev_t is defined differently in kernel and userland.
Return a correctly formed udev from SNPGTTY.

Reviewed by:	dd
2002-11-11 10:45:31 +00:00
mux
b45f2ba21c Warning fixes. 2002-11-11 10:28:44 +00:00
mux
cff6ce6fdb Warning fix. 2002-11-11 10:17:01 +00:00
mux
382d1b50fd Don't override CWARNFLAGS in these Makefiles. 2002-11-11 10:11:59 +00:00
mux
8822e76fe5 Don't override CWARNFLAGS in this Makefile. 2002-11-11 10:07:18 +00:00
marcel
0489f5e22b ia64 ABI breaker:
Don't force 16-byte alignment at run-time. Do it at compile-time.
This saves us the pointer fiddling by the setjmp functions and
reduces complexity. While here, increase the jmp_buf by 16 bytes
to an even 512 bytes. Coincidentally, due to the way alignment
was handled prior to this change, the jmp_buf has not changed in
size, but only in how the space is used. Prior to this change
the 16 bytes were reserved for enforcing alignment; now they are
reserved by us for future extensions.
Therefore, this ABI breaker is relatively save: the failure is
always an alignment trap.
2002-11-11 08:11:44 +00:00
alc
78766a7b7a - Clear the page's PG_WRITEABLE flag in the i386's pmap_changebit()
if we're removing write access from the page's PTEs.
 - Export pmap_remove_all() on alpha, i386, and ia64.  (It's already
   exported on sparc64.)
2002-11-11 05:17:34 +00:00
marcel
017042d4f5 Comment-out USB support. A kernel doesn't boot with it. Deal with it
later.
2002-11-11 01:50:10 +00:00
marcel
69bc439801 o Include <sys/uuid.h>. This avoids that applications such as
gpt(8) have to include both <sys/uuid.h> and <uuid.h> only
   because they include <sys/gpt.h> before <uuid.h>.
o  Drop the triple bang in the unicode comment in favor of
   adding '-16' to make it explicit that the unicode characters
   are 16-bit. The fact that we use short as the type of the
   array does give it away; but only to the careful reader.
2002-11-10 20:13:58 +00:00
jake
73d398d702 Change the device path representation in libofw to use the full firmware
path, instead of an internal i386 specific one.  Don't try to interpret
a disklabel in ofw_disk.c, open the partition's device node directly and
let the firmware do it.  This fixes booting from a partition other than 'a'
on sparc64, which is needed to support more installation methods.

No objection:	ppc
2002-11-10 19:17:36 +00:00
sam
1ff96af1ea a better solution to building FAST_IPSEC w/o INET6
Submitted by:	Jeffrey Hsu <hsu@FreeBSD.org>
2002-11-10 17:17:32 +00:00
mjacob
d00e94bfc6 Use atomic_set_8 on the us_freelist maps as they are not otherwise
protected. Furthermore, in some RISC architectures with no normal
byte operations, the surrounding 3 bytes are also affected by the
read-modify-write that has to occur.
2002-11-10 16:16:44 +00:00
alc
fc8a5bc419 When prot is VM_PROT_NONE, call pmap_page_protect() directly rather than
indirectly through vm_page_protect().  The one remaining page flag that
is updated by vm_page_protect() is already being updated by our various
pmap implementations.

Note: A later commit will similarly change the VM_PROT_READ case and
eliminate vm_page_protect().
2002-11-10 07:12:04 +00:00
mdodd
55c878faa1 Replace {disable,enable}_intr() with critical_{enter,exit}(). 2002-11-10 03:45:49 +00:00
alc
d577ab06c6 Fix an error case in vm_map_wire(): unwiring of an entry during cleanup
after a user wire error fails when the entry is already system wired.

Reported by:	tegge
2002-11-09 21:26:49 +00:00
iwasaki
eec4b9c40a Add a new loader tunable, hw.hasbrokenint12, to indicate that BIOS
has broken int 12H.
If hw.hasbrokenint12="1" in loader environment, kernel never use BIOS
INT 12 call to determine base memory size.
Otherwise, kernel use INT 12 in old behaviour.
This should fix kernel panic problem caused by 1.544 changes.

MFC after:	1 day
2002-11-09 21:17:41 +00:00
alfred
6adba48a65 Fix an unparenthasized macro argument. md5s differ but this is likely
to order of operations that are actually fixed by the proper parenthasizing.
2002-11-09 20:13:16 +00:00
des
4e2288959e Print real / avail memory in megabytes rather than kilobytes. 2002-11-09 16:19:14 +00:00
alfred
533541c47b Fix instances of macros with improperly parenthasized arguments.
Verified by: md5
2002-11-09 12:55:07 +00:00
alc
5f7be03df2 In vm_page_remove(), avoid calling vm_page_splay() if the object's memq
is empty.
2002-11-09 08:27:42 +00:00
sam
e5864cae6b temporarily disallow FAST_IPSEC and INET6 to avoid potential panics;
will correct this before 5.0 release
2002-11-08 23:50:32 +00:00
sam
ef62292833 FAST_IPSEC fixups:
o fix #ifdef typo
o must use "bounce functions" when dispatched from the protosw table

don't know how this stuff was missed in my testing; must've committed
the wrong bits

Pointy hat:	sam
Submitted by:	"Doug Ambrisko" <ambrisko@verniernetworks.com>
2002-11-08 23:37:50 +00:00
sam
6019e3c767 fixup FAST_IPSEC build w/o INET6 2002-11-08 23:33:59 +00:00
sam
f9821d8021 correct fast ipsec logic: compare destination ip address against the
contents of the SA, not the SP

Submitted by:	"Doug Ambrisko" <ambrisko@verniernetworks.com>
2002-11-08 23:11:02 +00:00
sam
e23e06eb6f correct minor # in make_dev call
Submitted by:	Doug Ambrisko" <ambrisko@verniernetworks.com>
2002-11-08 23:07:41 +00:00
sam
01475299d2 change load order so module is present before crypto drivers
Submitted by:	Doug Ambrisko" <ambrisko@verniernetworks.com>
2002-11-08 23:07:03 +00:00
jhb
66d9abef31 - Move netsmb entries over to MI files. netsmb appears to be MI code.
- Add 'nowerror' to pci/simos.c to help LINT builds.
2002-11-08 22:33:14 +00:00
jhb
b8daeabf59 Print daddr_t's with %j and intmax_t. 2002-11-08 22:28:35 +00:00
jhb
686416bfa5 Fix some sizeof(int) != sizeof(void *) warnings. 2002-11-08 21:30:26 +00:00
jhb
6c4366c376 - Change mb_copy_t to take a size_t as the length argument instead of an
int.
- Change the local variable in smb_copy_iconv() from an int to a size_t.

These make smb_copy_iconv() happy in a 64-bit world.
2002-11-08 21:26:32 +00:00
jhb
4481b3e997 Fix a sizeof(int) != sizeof(void *) warning. 2002-11-08 21:16:27 +00:00
jhb
5c9fa9d32a Use intptr_t to fix various sizeof(int) != sizeof(void *) warnings. 2002-11-08 21:13:18 +00:00
jhb
eb9c5b7d92 - Move opt_fb.h earlier so it covers included headers.
- Update cdevsw.  Block majors are out, kqfilters are in.
- No need to bzero softc's that we get from new-bus.  They come that way to
  begin with.
2002-11-08 21:10:53 +00:00
jhb
f47ce099d4 Move include of opt_fb.h earlier so that FB_INSTALL_CDEV is defined in
included headers.
2002-11-08 21:04:44 +00:00
jhb
7dbfeb6da1 Fix printf warnings with %j and uintmax_t. 2002-11-08 20:59:23 +00:00
jhb
40fae53b3b Fix warnings when compiled with SIMOS defined. 2002-11-08 20:52:21 +00:00
rwatson
a563c04c4a Assign value of NULL to imgp->execlabel when imgp is initialized
in the ELF code.  Missed in earlier merge from the MAC tree.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-08 20:49:50 +00:00
jhb
ba93b1c02a Cast pointers in mem*_io() compat macros to uintptr_t so that they can be
used as bus handles by the bus_space functions implementing these macros.
2002-11-08 20:49:43 +00:00
jhb
ad9e680296 Make 3dfx i386-only. The memrange API it uses may be defined in an MI
header, but it is only implemented on i386.
2002-11-08 20:04:38 +00:00
jhb
257ad7107b Move rc(4) over to MI notes and enable it as a MI module. 2002-11-08 19:34:26 +00:00
rwatson
551263d9d4 To reduce per-return overhead of userret(), call into
mac_thread_userret() only if PS_MACPEND is set in the process AST mask.
This avoids the cost of the entry point in the common case, but
requires policies interested in the userret event to set the flag
(protected by the scheduler lock) if they do want the event.  Since
all the policies that we're working with which use mac_thread_userret()
use the entry point only selectively to perform operations deferred
for locking reasons, this maintains the desired semantics.

Approved by:	re
Requested by:	bde
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-08 19:00:17 +00:00
jhb
32c37d4a13 Use critical_enter/exit instead of disable/enable_intr to make this
driver more portable.
2002-11-08 18:32:57 +00:00
jhb
b72917b520 - Change the ATM stack functions to use intptr_t instead of int for opaque
arguments.
- Fix a few other places that assumed that sizeof(int) == sizeof(void *).

Reviewed by:	mdodd
2002-11-08 18:27:30 +00:00
pdeuskar
9918575c8a - Set RS (Report Status) bit on all descriptors of a packet instead of just the last one.
- Set RDTR to zero by default instead of 28.
- Fixed a problem with TX hangs with jumbo frames when number of fragments in the mbuf chain
is large.
- Added support for 82540EP based cards.

MFC after:	3 days
2002-11-08 18:14:17 +00:00
rwatson
f3748b0c0b Update MAC modules for changes in arguments for exec MAC policy
entry points to include an explicit execlabel.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-08 18:04:36 +00:00
rwatson
95c4afbed0 Add an explicit execlabel argument to exec-related MAC policy entry
points, rather than relying on policies to grub around in the
image activator instance structure.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-08 18:04:00 +00:00
phk
38900b3ee3 Remove harmless but irritating printf. 2002-11-08 15:35:16 +00:00
phk
875ed4eea7 Always recalculate the SRM checksum if the label is at 64 bytes offset.
Tested by:	jhb
2002-11-08 15:31:34 +00:00
jhb
1027780c50 - Update the SIMOS fp-stealing code to KSE-II and beyond.
- Wrap a variable only used in !SIMOS case in #ifndef SIMOS.
2002-11-08 15:24:32 +00:00
jhb
8ff6cd442c Remove #ifdef DEBUG signal debugging code brought over from NetBSD with the
original signal handling code.  It doesn't compile and it seems the rest of
the infrastructure was never brought over from NetBSD.
2002-11-08 15:16:38 +00:00
jhb
2c9bc07b31 Make xrpu(4) i386-only. Consumers of i386_btop() are not MI. 2002-11-08 15:05:16 +00:00
jhb
bf90740990 Wrap a device_printf() that violates bus space abstractions to figure out
if it's IO port resource is IO or memory mapped for the sake of a printf
using i386-specific values in #ifdef __i386__.
2002-11-08 15:01:02 +00:00
jhb
d102d4721a Use %z to print a size_t value. 2002-11-08 14:58:35 +00:00
jhb
d39f72b79f Use %z to print size_t values. 2002-11-08 14:57:18 +00:00
jhb
980dea1922 Cast a ptrdiff_t to an int to printf. 2002-11-08 14:52:26 +00:00
jhb
4d0d9edb13 Use %z to print a size_t value. 2002-11-08 14:50:44 +00:00
tmm
6b29f7e140 Remove physmem from here, too, as it is defined in vm_init.c since
r1.35 (forgotten in my last commit due to a botched patch).

Pointy hat to:	tmm
2002-11-08 11:10:50 +00:00
mr
10ff71fdf9 Reviewed by: n_hibma
MFC after:	2 weeks
fix XPT_CALC_GEOMETRY to fill in some reasonable values.
Inspired by aic/sbp.
2002-11-08 07:57:42 +00:00
davidxu
8274c76b58 adjust critical section to only wrap around vm86_bioscall(). 2002-11-08 03:07:52 +00:00
davidxu
9ca980d0e7 use critical_enter/exit to add a critical section around BIOS call,
this unbreaks WITNESS.

Pointed out by: jhb
2002-11-08 01:09:16 +00:00
tmm
f740e3df9b Move the definitions of the hw.physmem, hw.usermem and hw.availpages
sysctls to MI code; this reduces code duplication and makes all of them
available on sparc64, and the latter two on powerpc.
The semantics by the i386 and pc98 hw.availpages is slightly changed:
previously, holes between ranges of available pages would be included,
while they are excluded now. The new behaviour should be more correct
and brings i386 in line with the other architectures.

Move physmem to vm/vm_init.c, where this variable is used in MI code.
2002-11-07 23:57:17 +00:00
mux
aae3d5b8b6 Better printf() formats. 2002-11-07 23:16:22 +00:00
mux
800d38e3eb Some more printf() format fixes. 2002-11-07 23:03:04 +00:00
jhb
1e5ba1ad0d Add a cast to quiet a warning. 2002-11-07 22:49:15 +00:00
mux
afab015685 Correctly print vm_offset_t types. 2002-11-07 22:49:07 +00:00
alfred
815055f65a Properly parenthesize the DBREG_DRX macro's variables to allow for
DBREG_DRX(&dbregs, n) usage.
2002-11-07 22:42:31 +00:00
jhb
602ba7d5eb - Use %j to print intmax_t values.
- Cast more daddr_t values to intmax_t when printing to quiet warnings.
2002-11-07 22:41:08 +00:00
jhb
47dd2d4a6b Use %z to quiet a warning. 2002-11-07 22:38:04 +00:00
jhb
27637bef6c Cast a pointer to a uintptr_t to quiet a warning. 2002-11-07 22:35:45 +00:00
jhb
1ca1a3af68 Third argument to copyinstr() is a pointer to a size_t, not a pointer to a
u_int.
2002-11-07 22:33:28 +00:00
jhb
6a62fdc1c9 - Use %p to print pointers instead of casting pointers to an int and using
0x%x.
- Add a cast to quiet a warning.
2002-11-07 22:25:13 +00:00
jhb
ddccbcba68 Use [u]intmax_t and %j instead of long long and %ll to better fix warnings
I fixed earlier.

Requested by:	mux, jake
2002-11-07 22:23:46 +00:00
jhb
4f451155dc Make 'rclk' a uintptr_t to quiet warnings. 2002-11-07 22:22:10 +00:00
jhb
c792b17a1a Use %z and %j to quiet warnings. 2002-11-07 22:21:38 +00:00
jhb
acd06c3cb3 Cast a pointer to a uintptr_t instead of a u_int. 2002-11-07 22:21:10 +00:00
jhb
8120d9e4ea Fix the rest of the 64-bit warnings for the sr(4) driver. 2002-11-07 22:20:22 +00:00
mux
ad09b5b153 - Fix a bunch of casts to long which were truncating off_t's.
- Remove the comments which were justifying this by the fact
that we don't have %q in the kernel, this was probably right
back in time, but we now have %q, and we even have better to
print those types (%j).
2002-11-07 21:56:05 +00:00
jhb
5195107f71 Explicitly cast daddr_t's to long long's when printing them since daddr_t
is not long long on all archs.  (They happen to be long's on 64-bit arch's
and gcc considers that significant enough to warn about it.)  These should
probably be uintmax_t but I didn't feel like adding all the extra includes.
2002-11-07 21:52:51 +00:00
mux
5499a6ab97 A bunch of style(9) fixes.
Obtained from:	bde
2002-11-07 21:45:28 +00:00
jhb
11dab05328 Cast a ptrdiff_t value to an int to quiet a warning since we don't support
%t in the kernel printf yet.
2002-11-07 21:34:21 +00:00
jhb
6675ed5b5a Quiet some DIAGNOSTIC printf warnings with band-aid casts. 2002-11-07 21:25:49 +00:00
jhb
03fe039475 Print pointers with %p instead of casting them to an unsigned int and
then printing them with 0x%x which doesn't work when sizeof(void *) >
sizeof(int).
2002-11-07 21:19:47 +00:00
jhb
3eba316228 Move sr(4) over to i386-only as it is yet another user of kvtop(). 2002-11-07 21:15:29 +00:00
mux
5c733089f3 - Use a better definition for MNAMELEN which doesn't require
to have one #ifdef per architecture.
- Change a space to a tab after a nearby #define.

Obtained from:	bde
2002-11-07 21:15:02 +00:00
jhb
b79b5c3b55 Fix lots of places that assume sizeof(int) == sizeof(void *). Most of
these were cosmetic.  However, at least two of these changes fix bugs
where a (fake) pointer to a RX descriptor was added to the physical
memory start address with the cast in the wrong place resulting in
rxdesc[pmem_start] instead of (uintptr_t)rxdesc + pmem_start.
2002-11-07 21:13:15 +00:00
rwatson
987979669b Do a bit more work in the aio code to simulate the credential environment
of the original AIO request: save and restore the active thread credential
as well as using the file credential, since MAC (and some other bits of
the system) rely on the thread credential instead of/as well as the
file credential.  In brief: cache td->td_ucred when the AIO operation
is queued, temporarily set and restore the kernel thread credential,
and release the credential when done.  Similar to ktrace credential
management.

Reviewed by:	alc
Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-07 20:46:37 +00:00
jhb
be0579f238 Cast a pointer to uintptr_t instead ot u_int. 2002-11-07 19:56:21 +00:00
alc
6e5122867a Simplify and optimize pmap_object_init_pt(). More specifically,
take advantage of the fact that the vm object's list of pages is
now ordered to reduce the overhead of finding the desired set of
pages to be mapped.  (See revision 1.215 of vm/vm_page.c.)
2002-11-07 18:33:55 +00:00
jhb
dc0f20a3d2 d_read_t functions return an int, not a ssize_t. (Considering the fact
that read(2) returns a ssize_t perhaps this is a bug in d_read_t?)
2002-11-07 17:26:38 +00:00
jhb
feb5060448 Warning fixes for sizeof(int) != sizeof(void *). 2002-11-07 17:25:33 +00:00
jhb
89f9d57a60 - Make 'irq' intptr_t instead of uintptr_t so it handles a value of -1
properly.
- Add a cast to quiet a printf warning.
2002-11-07 17:20:58 +00:00
nyan
bf0b83376e Fix to support pc98.
It is mostly merged from MBR specific part.

Reviewed by:	phk
2002-11-07 16:42:37 +00:00
jhb
d9b16f1b77 Move firewire back to being MI. 2002-11-07 16:19:43 +00:00
tmm
e5e9ae1dc2 Add two new workaround for firmware anomalies:
1. At least some Netra t1 models have PCI buses with no associated
   interrupt map, but obviously expect the PCI swizzle to be done with
   the interrupt number from the higher level as intpin. In this case,
   the mapping also needs to continue at parent bus nodes.
   To handle that, add a quirk table based on the "name" property of
   the root node to avoid breaking other boxen. This property is now
   retrieved and printed at boot.
2. On SPARCengine Ultra AX machines, interrupt numbers are not mapped
   at all, and full interrupt numbers (not just INOs) are given in
   the interrupt properties. This is more or less cosmetical; the
   PCI interrupt numbers would be wrong, but the psycho resource
   allocation method would pass the right numbers on anyway.

Tested by:	mux (1), Maxim Mazurok <maxim@km.ua> (2)
2002-11-07 16:07:46 +00:00
iedowse
92eb830a35 Properly fix the occassional random crash issue that revision 1.142
just limited to the DEVICE_POLLING case. This removes the FXP_RFA_RNRMARK
hack, and replaces it with a softc flag that is used to record when
the handling of a no-resource condition was deferred due to running
out of DEVICE_POLLING cycles. This was tested on -stable, but the
code is essentially the same as in -current. It should only affect
the case where DEVICE_POLLING is defined.

The details of the mechanism behind the crashes are still uncertain
but the most likely cause seems to be some kind of hardware confusion
when the no-resource recovery code is accidentally invoked while
the receiver is still active. This could have happened if the
hardware left the 0x4000 bit of the RFA status word set. The comments
in the commit log for revision 1.142 stating that the driver could
clash with the hardware writing to this status word were not correct.

Tested by:	Guy Helmer <ghelmer@palisadesys.com>
2002-11-07 16:04:07 +00:00
jhb
7f0b14cfc7 Merge over ar(4) and db(4) to files.pc98. 2002-11-07 15:52:34 +00:00
jhb
6b9a93cb80 Create a MACHINE_ARCH == i386 section that first lists modules common
to both i386 and pc98 and then uses MACHINE subsections to list modules
specific to i386/i386 and i386/pc98.
2002-11-07 15:01:12 +00:00
jhb
5b5c30694e Turn on GEOM. It works on Alpha and we are going to need it for installs. 2002-11-07 14:36:56 +00:00
simokawa
2d6271e925 - Fix printf warnings on 64bit plathome.
- Disable fw_vmaccess() because it's not used and unuseful 64bit plathome.
2002-11-07 02:13:40 +00:00