benno
a3a56ebeb3
Add BOOTP_NFSROOT support code.
2002-06-29 09:33:18 +00:00
benno
b3dcfcf0d7
- Use tmpstk exclusively in the init path.
...
- Remove redundant code.
Submitted by: Peter Grehan <peterg@ptree32.com.au>
2002-06-29 09:31:27 +00:00
benno
6c2607ad88
Many fixes to low-level trap and interrupt handling:
...
- Tidy up clock code. Don't repeatedly call hardclock().
- Remove intrnames, decrnest and intrcnt from locore.s
- Coalesce all trap handling into a single stub that then calls a dispatch
function.
Submitted by: Peter Grehan <peterg@ptree32.com.au>
2002-06-29 09:28:21 +00:00
benno
d7065a7a3b
Convert this from mostly inline assembler to mostly C.
...
Submitted by: Peter Grehan <peterg@ptree32.com.au>
2002-06-29 09:16:30 +00:00
jake
e102a9b6dd
Add an MD callout like cpu_exit, but which is called after sched_lock is
...
obtained, when all other scheduling activity is suspended. This is needed
on sparc64 to deactivate the vmspace of the exiting process on all cpus.
Otherwise if another unrelated process gets the exact same vmspace structure
allocated to it (same address), its address space will not be activated
properly. This seems to fix some spontaneous signal 11 problems with smp
on sparc64.
2002-06-24 15:48:02 +00:00
mini
ef6f2f567d
Remove unused diagnostic function cread_free_thread().
...
Approved by: alfred
2002-06-24 06:22:00 +00:00
iedowse
37d2aea25a
Make vm_pindex_t 64-bit on all platforms. This is necessary to avoid
...
overflows with the large file sizes that UFS2 permits.
Reviewed by: dillon, alc, tegge
2002-06-23 21:57:19 +00:00
peter
df4ec1a7b3
Deorbit suibyte(). It was only used for split address space systems
...
for supporting UIO_USERISPACE (ie: it wasn't used).
2002-06-20 07:13:35 +00:00
peter
4830c34648
Move the "- 1" into the RQB_FFS(mask) macro itself so that
...
implementations can provide a base zero ffs function if they wish.
This changes
#define RQB_FFS(mask) (ffs64(mask))
foo = RQB_FFS(mask) - 1;
to
#define RQB_FFS(mask) (ffs64(mask) - 1)
foo = RQB_FFS(mask);
On some platforms we can get the "- 1" for free, eg: those that use the
C code for ffs64().
Reviewed by: jake (in principle)
2002-06-20 06:21:20 +00:00
jhb
2aa855d8b1
- Fixup / remove obsolete comments.
...
- ktrace no longer requires Giant so do ktrace syscall events before and
after acquiring and releasing Giant, respectively.
- For i386, ia32 syscalls on ia64, powerpc, and sparc64, get rid of the
goto bad hack and instead use the model on ia64 and alpha were we
skip the actual syscall invocation if error != 0. This fixes a bug
where if we the copyin() of the arguments failed for a syscall that
was not marked MP safe, we would try to release Giant when we had
not acquired it.
2002-06-07 05:47:35 +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
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
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
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
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
88bdee3b2f
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
benno
665a4c992b
Make this more FreeBSD-ish.
...
Requested by: jhb
2002-05-19 08:16:25 +00:00
benno
cf06f4ab5a
- Do a quick style pass.
...
- Correct the implementation of fix_unaligned to use a thread, not a proc.
- GC some #if 0'd stuff.
2002-05-19 04:04:12 +00:00
benno
433f833787
Add the PSL_VEC flag for AltiVec (no, it's not here yet =))
2002-05-19 04:03:11 +00:00
benno
57da897c11
- Rename the _C_LABEL macro to CNAME.
...
- Rename the _ASM_LABEL macro to ASMNAME.
- Add the HIDENAME macro which is used in libc's syscall stuff.
2002-05-17 01:44:55 +00:00
benno
246870d424
Fix commenting around NetBSD version string.
2002-05-17 01:41:01 +00:00
obrien
017ad59105
An exact copy of i386/include/float.h will work here.
2002-05-15 20:54:35 +00:00
phk
f957e47fe3
Move MI stuff out of MD param.h files.
...
It can all still be overridden in the MD files should need suddenly arise.
2002-05-14 20:35:29 +00:00
phk
d81ed87e72
Remove the unused definitions of ctod() and dotc().
2002-05-14 20:01:34 +00:00
benno
6ef515f72a
FPU support.
...
Obtained from: NetBSD (portions)
2002-05-13 07:44:48 +00:00
benno
2c8451233a
More locking fixes.
2002-05-12 13:43:21 +00:00
benno
f9668ab485
Do the correct locking on processes for DSI and ISI traps.
...
Copied from: sparc64
2002-05-12 06:06:24 +00:00
benno
1e4d740de8
Implement the following functions:
...
- pmap_addr_hint
- pmap_change_wiring
- pmap_extract
- pmap_is_modified
2002-05-10 14:21:48 +00:00
benno
6950bc7f5b
Install the system call trap handler.
2002-05-10 14:19:44 +00:00
benno
bd96241d2b
Improve our detection of an attempted duplicate entry. We may be trying to
...
change the page protection bits.
2002-05-10 06:27:08 +00:00
benno
dbd3c3b30b
Remove a debugging printf that escaped.
2002-05-10 06:26:19 +00:00
benno
ffded50e96
Increase the size of the kstack.
2002-05-10 05:16:40 +00:00
obrien
d9b66c2f2f
Gcc 3.1 varargs support.
2002-05-10 02:12:04 +00:00
benno
4a32017512
Update to newer trap code from NetBSD.
...
Obtained from: NetBSD
2002-05-09 14:22:55 +00:00
benno
9598d03e9c
Add an assertion that we have a current pmap set before we try and return.
2002-05-09 14:15:51 +00:00
benno
2365994ce7
The per-cpu curpmap is now set by pmap_activate. We don't need to do it here
...
anymore.
2002-05-09 14:13:29 +00:00
benno
abb3e00580
- Add a prototype for the setfault() function.
...
- Remove some stray printf()s.
2002-05-09 14:11:17 +00:00
benno
bcda033a58
1. Better track the executable status of mappings.
...
2. Set a pcpu variable to the real address of the active pmap (used when
exiting from traps.
Obtained from: NetBSD (1)
2002-05-09 14:09:19 +00:00
benno
42edd9e9a2
Rename the constants for the contents of the PVR register so as not to
...
conflict with cpu names used in config files..
2002-05-09 14:04:43 +00:00
phk
26ffc19d1e
Don't export timecounter structures under debug. with sysctl, they
...
contain no truly interesting data anymore.
2002-04-30 19:34:31 +00:00
benno
7b2f527b76
Commit of stuff that's been sitting in my tree for a while.
...
Highlights include:
- New low-level trap code from NetBSD. The high level code still needs a lot
of work.
- Fixes for some pmap handling in thread switching.
- The kernel will now get to attempting to jump into init in user mode. There
are some pmap/trap issues which prevent it from actually getting there though.
Obtained from: NetBSD (parts)
2002-04-29 12:14:31 +00:00
benno
5ca178fbce
- Add back calls to setfault that were removed when these functions were moved.
2002-04-29 09:28:56 +00:00
peter
c0e3147cc6
Tidy up some loose ends.
...
i386/ia64/alpha - catch up to sparc64/ppc:
- replace pmap_kernel() with refs to kernel_pmap
- change kernel_pmap pointer to (&kernel_pmap_store)
(this is a speedup since ld can set these at compile/link time)
all platforms (as suggested by jake):
- gc unused pmap_reference
- gc unused pmap_destroy
- gc unused struct pmap.pm_count
(we never used pm_count - we track address space sharing at the vmspace)
2002-04-29 07:43:16 +00:00
alc
13bef9693d
MFi386 1.222: Remove vm_map_growstack() and acquisition and release of Giant
...
around vm_fault() in trap_pfault().
2002-04-27 17:00:28 +00:00