Commit Graph

36243 Commits

Author SHA1 Message Date
Thomas Moestl
f7f33d6984 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
Michael Reifenberger
ad59e7ecbd 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
David Xu
4e0a2def06 adjust critical section to only wrap around vm86_bioscall(). 2002-11-08 03:07:52 +00:00
David Xu
b3925aab09 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
Thomas Moestl
0fca57b8b8 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
Maxime Henrion
bf1001fa0f Better printf() formats. 2002-11-07 23:16:22 +00:00
Maxime Henrion
e47cd172e0 Some more printf() format fixes. 2002-11-07 23:03:04 +00:00
John Baldwin
a92833983a Add a cast to quiet a warning. 2002-11-07 22:49:15 +00:00
Maxime Henrion
cd034a5be9 Correctly print vm_offset_t types. 2002-11-07 22:49:07 +00:00
Alfred Perlstein
4ef42f2b0f Properly parenthesize the DBREG_DRX macro's variables to allow for
DBREG_DRX(&dbregs, n) usage.
2002-11-07 22:42:31 +00:00
John Baldwin
6274bdda4c - 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
John Baldwin
d0e938f4f1 Use %z to quiet a warning. 2002-11-07 22:38:04 +00:00
John Baldwin
95c2dc84e5 Cast a pointer to a uintptr_t to quiet a warning. 2002-11-07 22:35:45 +00:00
John Baldwin
1c4df6ecd5 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
John Baldwin
f544691671 - 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
John Baldwin
482a5259ac 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
John Baldwin
7399a5ddd0 Make 'rclk' a uintptr_t to quiet warnings. 2002-11-07 22:22:10 +00:00
John Baldwin
d0ffe397df Use %z and %j to quiet warnings. 2002-11-07 22:21:38 +00:00
John Baldwin
2fc606e29c Cast a pointer to a uintptr_t instead of a u_int. 2002-11-07 22:21:10 +00:00
John Baldwin
148aade5cb Fix the rest of the 64-bit warnings for the sr(4) driver. 2002-11-07 22:20:22 +00:00
Maxime Henrion
a7a00d0546 - 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
John Baldwin
50be24a116 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
Maxime Henrion
b78beb6000 A bunch of style(9) fixes.
Obtained from:	bde
2002-11-07 21:45:28 +00:00
John Baldwin
9cbe11ea18 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
John Baldwin
34c7d76e45 Quiet some DIAGNOSTIC printf warnings with band-aid casts. 2002-11-07 21:25:49 +00:00
John Baldwin
40e8bd8c76 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
John Baldwin
1786a481d7 Move sr(4) over to i386-only as it is yet another user of kvtop(). 2002-11-07 21:15:29 +00:00
Maxime Henrion
b65d1ba9dd - 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
John Baldwin
1a8fc7d6a0 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
Robert Watson
f8f750c53e 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
John Baldwin
551d543a17 Cast a pointer to uintptr_t instead ot u_int. 2002-11-07 19:56:21 +00:00
Alan Cox
aa8e11b6c4 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
John Baldwin
8d667a42c4 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
John Baldwin
a885bb6007 Warning fixes for sizeof(int) != sizeof(void *). 2002-11-07 17:25:33 +00:00
John Baldwin
9e14a48a03 - 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
Yoshihiro Takahashi
962cf6f7bb Fix to support pc98.
It is mostly merged from MBR specific part.

Reviewed by:	phk
2002-11-07 16:42:37 +00:00
John Baldwin
7d2ba89bbf Move firewire back to being MI. 2002-11-07 16:19:43 +00:00
Thomas Moestl
8c8a1169df 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
Ian Dowse
947e381597 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
John Baldwin
8e302c5b17 Merge over ar(4) and db(4) to files.pc98. 2002-11-07 15:52:34 +00:00
John Baldwin
01c8945ca3 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
John Baldwin
7ea6c648f5 Turn on GEOM. It works on Alpha and we are going to need it for installs. 2002-11-07 14:36:56 +00:00
Hidetoshi Shimokawa
70ce30b573 - 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
David Xu
8c132e9fae 1.Fix smp race between kernel vm86 BIOS calling and userland vm86 mode code,
remove global variable in_vm86call, set vm86 calling flag in PCB flags.

2.Fix vm86 BIOS calling preempted problem by changing vm86_lock mutex type
  from MTX_DEF to MTX_SPIN. vm86pcb is not remembered in thread struct,
  when the thread calling vm86 BIOS is preempted by interrupt thread,
  and later switching back to the thread would cause incorrect context be
  loaded into CPU registers, this leads to kernel crash.
2002-11-07 01:34:23 +00:00
Maxime Henrion
f3595051aa s/HZ/Hz/ 2002-11-06 23:31:01 +00:00
John Baldwin
f77f866d28 Adjust some casts to quiet warnings.
Reviewed by:	mdodd
2002-11-06 22:58:55 +00:00
John Baldwin
246d578cba lnc(4) uses kvtop() and is thus i386-only for now. 2002-11-06 22:56:57 +00:00
John Baldwin
34fa34334e Use long long to print out a bus_addr_t again. 2002-11-06 22:42:45 +00:00
John Baldwin
b1e014fc3a Cast a bus_addr_t to a long long to make printf happy. 2002-11-06 22:40:01 +00:00
John Baldwin
c8341b3e2d Make firewire i386-only for now. It doesn't quite handle machines with
64-bit address spaces yet.  Pointy hat to myself for sticking it in the MI
NOTES file to begin with.
2002-11-06 22:30:33 +00:00