Commit Graph

390 Commits

Author SHA1 Message Date
Doug Rabson
99bd783419 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 Rice
c05529221e The stack is not at the top of the user struct. 2002-05-28 12:31:34 +00:00
Benno Rice
3cdee89f99 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 Rice
60ead00ef8 - 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 Rice
8e36f0ec3f Remove the old prototype for kcopy. It's in cpu.h now. 2002-05-28 09:38:02 +00:00
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
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
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
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
Benno Rice
84b3ce6811 Make this more FreeBSD-ish.
Requested by:	jhb
2002-05-19 08:16:25 +00:00
Benno Rice
76a118f236 - 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 Rice
4ca98df6b2 Add the PSL_VEC flag for AltiVec (no, it's not here yet =)) 2002-05-19 04:03:11 +00:00
Benno Rice
96269f7e26 - 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 Rice
b635dacd57 Fix commenting around NetBSD version string. 2002-05-17 01:41:01 +00:00
David E. O'Brien
ae8f9dd13f An exact copy of i386/include/float.h will work here. 2002-05-15 20:54:35 +00:00
Poul-Henning Kamp
6380601f64 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
Poul-Henning Kamp
4c51ae2155 Remove the unused definitions of ctod() and dotc(). 2002-05-14 20:01:34 +00:00
Benno Rice
eeaa897915 FPU support.
Obtained from:	NetBSD (portions)
2002-05-13 07:44:48 +00:00
Benno Rice
608cd3ca29 More locking fixes. 2002-05-12 13:43:21 +00:00
Benno Rice
a397544c6b Do the correct locking on processes for DSI and ISI traps.
Copied from:	sparc64
2002-05-12 06:06:24 +00:00
Benno Rice
0f92104c14 Implement the following functions:
- pmap_addr_hint
- pmap_change_wiring
- pmap_extract
- pmap_is_modified
2002-05-10 14:21:48 +00:00
Benno Rice
e89482f7cb Install the system call trap handler. 2002-05-10 14:19:44 +00:00
Benno Rice
fafc736254 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 Rice
f2b85e7c82 Remove a debugging printf that escaped. 2002-05-10 06:26:19 +00:00
Benno Rice
a51eb7c321 Increase the size of the kstack. 2002-05-10 05:16:40 +00:00
David E. O'Brien
c7e401fbc3 Gcc 3.1 varargs support. 2002-05-10 02:12:04 +00:00
Benno Rice
3779a55671 Update to newer trap code from NetBSD.
Obtained from:	NetBSD
2002-05-09 14:22:55 +00:00
Benno Rice
afb7382655 Add an assertion that we have a current pmap set before we try and return. 2002-05-09 14:15:51 +00:00
Benno Rice
1d61c15b8a 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 Rice
8c2b091ea2 - Add a prototype for the setfault() function.
- Remove some stray printf()s.
2002-05-09 14:11:17 +00:00
Benno Rice
8207b3627b 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 Rice
3bc5121f01 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
Poul-Henning Kamp
2266fe776e 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 Rice
b57e802a85 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 Rice
d809b79220 - Add back calls to setfault that were removed when these functions were moved. 2002-04-29 09:28:56 +00:00
Peter Wemm
db17c6fc07 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
Alan Cox
72ba293d78 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
Marcel Moolenaar
d297ad160e Don't use the symbol name to lookup the symbol value when we can use
the symbol index defined by the relocation. The elf_lookup() support
function is to be used by elf_reloc() when symbol lookups need to be
done. The elf_lookup() function operates on the symbol index and
will do a symbol name based lookup when such is required, otherwise
it uses the symbol index directly. This solves the problem seen on
ia64 where the symbol hash table does not contain local symbols and
a symbol name based lookup would fail for those symbols.

Don't pass the symbol name to elf_reloc(), as it isn't used any more.
2002-04-25 01:22:16 +00:00
Benno Rice
f6310641b9 Replace inline asm with it's inline function wrapper. 2002-04-20 10:06:22 +00:00
Benno Rice
864bc5205b Correct a comment. 2002-04-16 12:15:17 +00:00
Benno Rice
e79f59e84c Implement the following functions:
- pmap_kextract
	- pmap_object_init_pt
	- pmap_protect
	- pmap_remove_pages

I'm pretty sure pmap_remove_pages is at least somewhat bogus.
2002-04-16 12:13:10 +00:00
Benno Rice
27dbf9d5e8 Remove some dead code. 2002-04-16 12:10:04 +00:00
Benno Rice
d080d5fd7c Use mtsrin() instead of inline asm. 2002-04-16 12:07:41 +00:00
Benno Rice
a8aaf02c3c Change the value of PMAP_BOOTSTRAP so we don't stomp on the PTE index value. 2002-04-16 12:00:43 +00:00
Benno Rice
b2df36e7d2 Add inlines for mtsrin and mfsrin. 2002-04-16 11:45:09 +00:00
Peter Wemm
1a87a0da66 Pass vm_page_t instead of physical addresses to pmap_zero_page[_area]()
and pmap_copy_page().  This gets rid of a couple more physical addresses
in upper layers, with the eventual aim of supporting PAE and dealing with
the physical addressing mostly within pmap.  (We will need either 64 bit
physical addresses or page indexes, possibly both depending on the
circumstances.  Leaving this to pmap itself gives more flexibilitly.)

Reviewed by:	jake
Tested on:	i386, ia64 and (I believe) sparc64. (my alpha was hosed)
2002-04-15 16:00:03 +00:00
Benno Rice
2819d0ade2 Add ofwd to the GENERIC config for powerpc. 2002-04-15 12:30:18 +00:00