Commit Graph

379 Commits

Author SHA1 Message Date
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
marcel
56d625090e 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
fbb3ffd56a Replace inline asm with it's inline function wrapper. 2002-04-20 10:06:22 +00:00
benno
2a838a2aff Correct a comment. 2002-04-16 12:15:17 +00:00
benno
10462ad477 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
ed687f83ff Remove some dead code. 2002-04-16 12:10:04 +00:00
benno
f2d443a680 Use mtsrin() instead of inline asm. 2002-04-16 12:07:41 +00:00
benno
327177ba2e 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
6ea8f0587f Add inlines for mtsrin and mfsrin. 2002-04-16 11:45:09 +00:00
peter
3d8c7d4cab 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
813f104cc8 Add ofwd to the GENERIC config for powerpc. 2002-04-15 12:30:18 +00:00
benno
a7de23a1ad Add a nexus device.
Copied from:	sparc64
2002-04-15 12:29:18 +00:00
benno
3bc1e338fc Turn some CTR's into CTR0's. 2002-04-15 12:11:18 +00:00
benno
acd63b074d GC an extraneous prototype of delay(). 2002-04-15 12:02:43 +00:00
mike
c3c6b2e7be Include <sys/cdefs.h> for definition of __BSD_VISIBLE.
Pointy hat to:	mike
2002-04-12 15:56:45 +00:00
mike
24420c8af5 Remove the hack for segsz_t from <sys/types.h>; use the normal
_BSD_FOO_T_ method for defining segsz_t.
2002-04-10 15:58:13 +00:00
mike
7fb662578d Add manifest constants: _LITTLE_ENDIAN, _BIG_ENDIAN, _PDP_ENDIAN, and
_BYTE_ORDER.  These are far more useful than their non-underscored
equivalents as these can be used in restricted namespace environments.
Mark the non-underscored variants as deprecated.
2002-04-10 14:39:14 +00:00
phk
77e3582887 GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
phk
3234f33800 GC the "dumplo" variable, which is no longer used.
A lot of sys/*/*/machdep.c seems not to be.
2002-04-07 21:01:37 +00:00
jhb
9d3d63fcbc - Move the MI mutexes sched_lock and Giant from being declared in the
various machdep.c's to being declared in kern_mutex.c.
- Add a new function mutex_init() used to perform early initialization
  needed for mutexes such as setting up thread0's contested lock list
  and initializing MI mutexes.  Change the various MD startup routines
  to call this function instead of duplicating all the code themselves.

Tested on:	alpha, i386
2002-04-02 22:19:16 +00:00
dillon
3ad295d416 Stage-2 commit of the critical*() code. This re-inlines cpu_critical_enter()
and cpu_critical_exit() and moves associated critical prototypes into their
own header file, <arch>/<arch>/critical.h, which is only included by the
three MI source files that need it.

Backout and re-apply improperly comitted syntactical cleanups made to files
that were still under active development.  Backout improperly comitted program
structure changes that moved localized declarations to the top of two
procedures.  Partially re-apply one of the program structure changes to
move 'mask' into an intermediate block rather then in three separate
sub-blocks to make the code more readable.  Re-integrate bug fixes that Jake
made to the sparc64 code.

Note: In general, developers should not gratuitously move declarations out
of sub-blocks.  They are where they are for reasons of structure, grouping,
readability, compiler-localizability, and to avoid developer-introduced bugs
similar to several found in recent years in the VFS and VM code.

Reviewed by:	jake
2002-04-01 23:51:23 +00:00
phk
87273d930a Centralize the "bootdev" and "dumpdev" variables. They are still pretty
bogus all things considered, but at least now they don't camouflage as
being MD variables.
2002-03-31 07:15:28 +00:00