Commit Graph

665 Commits

Author SHA1 Message Date
matt f9be6bb495 Cleanup AltiVec data stream issues with context switching. Don't stop
data streams on execptions/interrupts since the processor will suspend
them for us.  Only stop them on 1) process exit, 2) another process gets
its address space loaded, and 3) (for completeness only) we save a process's
AltiVec context.
2002-07-25 23:46:47 +00:00
matt a660a9325f Set normal memory PTEs with PTE_M (memory coherent). Change how we
remember the "exec"ness of a page.  If a managed page is pmap_enter'ed
with VM_PROT_EXECUTE, remember that it's an "exec"page.  Such that when
additional mapping are performed, no synch'ing of the I-cache is needed.
Revoke "exec"ness when the page is mapped into the kernel with VM_PROT_WRITE
or the pmap_page_protect is called with VM_PROT_NONE.
2002-07-25 23:33:04 +00:00
chs 4e9f286b98 for MP builds, save and restore sprg0 (which contains the curcpu pointer)
around restoring OFW's sprg registers while calling into OFW.
2002-07-24 06:04:43 +00:00
chs 185a5bbcf0 rename the intr_depth field of struct intrframe to avoid a name conflict
in MULTIPROCESSOR builds.
2002-07-24 05:44:37 +00:00
chs 804e68d33a reimplement copy{in,out}str() similarly to copy{in,out}()
(instead of the old way of calling [fs]ubyte() in a loop).
2002-07-24 04:59:32 +00:00
matt cde20d8743 Make sure that pmap_zero_page and pmap_copy_page don't make calls or
reference while relocation is disabled since the stack will be inaccessible.
Add support for using AltiVec in pmap_zero_page and pmap_copy_page on
AltiVec capable processors.
2002-07-18 22:51:57 +00:00
matt 436f257283 Add a common file to do pmap_zero_page/pmap_copy_page/pmap_pageidlezero and
pmap_syncicache.  This file uses a ppc feature in a sick and twisted way
to avoid mapping the physical pages used by those routines.  It performs
the operations with the MMU disabled but PPC exception save and retstore
the machine state and are invoked with the MMU disabled, this doesn't have
an adverse effect on the system.

Currently only enable for MPC6xx and !OLDPMAP.
2002-07-17 03:11:07 +00:00
matt ece8b74130 Add machdep.powerpc sysctl. Change the default value of powersave to -1
(< 0 mean no powersave available).  Enable powersave by default for
750/7400/7410 but leave if off for 7450/7455.
2002-07-16 23:04:20 +00:00
matt 3dc1994d70 Don't install extintr handler if not supplied.
Make panic message more informative.
2002-07-16 16:39:12 +00:00
matt b35e786de2 Add a linux_syscall_intern entry (appropriately ifdef'ed COMPAT_LINUX).
When/if PPC ever supports LKMs, this should be moved to a separate file.
2002-07-11 19:32:43 +00:00
simonb 873edaed34 Clean up some white space niggles. 2002-07-11 01:38:48 +00:00
matt 6e81c6293f Bump VM kernel buffer space from 128MB to 192MB now that we have 512MB of
KVA space.
2002-07-10 05:25:12 +00:00
matt 7c3dbdc01d When allocate VA for the msgbuf, don't allocate pages too since we have
already done that in pmap_bootstrap.  (fixes a small page leak at startup).
2002-07-09 19:05:00 +00:00
matt e64bc5acc1 Allow USER_SR to be overriden on a per-port basis 2002-07-07 19:29:18 +00:00
matt 140a273f7a Use lvewx/stvewx for VSCR and save ourselves 12 bytes we don't need to load. 2002-07-07 00:46:20 +00:00
dbj 397ff5c82a protect Debugger() call with ifdef DDB 2002-07-07 00:43:11 +00:00
matt 263c3cd253 Merge macppc/ofppc locore OFW code and move it here. 2002-07-06 18:01:23 +00:00
matt 51f2834470 Bump max user address to 0xfffff000 (XXX maybe it should be -NBPG?). 2002-07-06 17:15:57 +00:00
matt 685778b53b Peform a rototill over the powerpc-based ports.
Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop.  Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
2002-07-05 18:45:15 +00:00
thorpej 011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
thorpej 00e59f25b7 Eliminate two unused sigframe members. 2002-07-04 21:33:43 +00:00
thorpej 625abcf84b Eliminate two unused sigframe members. 2002-07-04 20:22:50 +00:00
matt 25036f6b2d Properly compensate for rounding the start of a mem_region up. 2002-07-03 20:41:20 +00:00
matt af8dc59949 Add AltiVec routines for save_vec/enable_vec/init_vec. 2002-07-02 15:22:47 +00:00
matt 708f4c7b9b Add VRSAVE. 2002-07-01 20:11:05 +00:00
matt 3043c05326 Add common routines to do BAT initialization, trap vector setup,
interrupt vector installation, VM initialization, core-dumps (stubbed),
and network soft interrupts.  Also kvtop and mapiodev.
2002-06-28 02:32:16 +00:00
matt f7a6553147 Add common syscall dispatcher. Also put child_return in here. 2002-06-28 02:30:06 +00:00
matt 511223b674 If ALTIVEC is not defined, treat EXC_VEC|EXC_USER exceptions as PGM
exceptions.  [Note that we still can't trap these due to issues in
trap_subr.S which are (yet) fixed]
2002-06-27 21:15:35 +00:00
matt cd85109523 Make traps even smaller by noticing the checking of privilege mode and
use of curpcb/USPACE is common and move that into the common trap processing.
2002-06-26 20:00:17 +00:00
matt 1a5c0cf685 When not using the OLD pmap, bump kernel KVA space to 512MB (OLD pmap stays
at 256MB).
2002-06-26 01:16:22 +00:00
matt 7a12a9737c Revamp how SR(s) are loaded on the user/kernel boundary. We now load all
16 SR registers when transitioning between kernel and user.  Also, don't
reload the kernel SR(s) on every trap but only on traps from user space.
Instead of loading magic SRs for the kernel, load the kernel SRs from the
kernel_pmap_.  This makes trap_subr.S completely ignorant of SR uses and
so they can change with having to change trap_subr.S.  Also note that
since the user and kernel get complete SR sets, user VA space can now be
increased to 4GB if desired.
2002-06-26 01:14:45 +00:00
matt 7c77963b01 Set SR_PRKEY for user pmaps. For the kernel SR(s) set SR_SUKEY|SR_PRKEY.
Note that we never use a PTE PP of 0 or 1 (supervisor protection) so the
"key" is basically unused.  However, use SR_PRKEY for user space is
conceptionally the right thing to do.  Currently the kernel_pmap SR(s) are
ignored but that is going to be fixed shortly.
2002-06-26 01:10:20 +00:00
thorpej aaf6e7902d Add ENTRY_NOPROFILE(). 2002-06-23 17:26:58 +00:00
briggs 31d3b62eff Pick up support for a few more things for the IBM750FX: l2cache
configuration and temperature sensor support, for example.
2002-06-21 01:38:57 +00:00
matt 6fcbf3b943 Don't load the SR registers on a context switch. They get switched from
the user's SR registers to the kernel's SR registers on an exception or
interrupt from user level and restored with the user's SR register when the
exception or interrupt returns back to user level.
2002-06-21 00:46:18 +00:00
matt 365f1d6150 Add support for IBM750FX (used in latest iBooks). 2002-06-21 00:01:53 +00:00
matt da483421e8 Add IBM750FX (0x7000) 2002-06-20 23:51:22 +00:00
briggs 029a7e8e9a - The 8240 and 8245 have a 603 core -- add them to the 603 lists...
- Use atop(dcache_size / assoc) for uvm_page_recolor(ing) instead
  of  atop(dcache_line_size / assoc).
2002-06-19 17:43:30 +00:00
briggs d6cfd2cc8c Include the Processor ID for the MPC8245. 2002-06-19 17:39:26 +00:00
wrstuden 2eb3dc82d8 Fix recent bugs seen on Performa 4400 macppc's by
Makoto Fujiwara <makoto@ki.nu> and Manuel Bouyer <bouyer@netbsd.org>.
Help from Allen Briggs, Jason Thorpe, and Matt Thomas.

We need to call cpu_cache_probe() early in boot (machdep.c).
Add 603 info for completeness, and use NBPG not PAGESIZE, as the
latter relies on uvm being setup (cpu_subr.c).
Let uvm_page_recolor() be called before uvm has been set up; just
note the page coloring value (uvm_page.c).
2002-06-19 17:01:18 +00:00
matt c937154e18 Add a missing return; after print the 745x cache size(s). 2002-06-17 21:28:48 +00:00
christos 281c8c638b apply the fix from the powerpc port. this is almost a copy of powerpc/trap.c
and needs to be refactored.
2002-06-17 21:08:56 +00:00
christos eb5c1061a2 try to make this compile. 2002-06-17 21:07:40 +00:00
christos 3b50728cf4 MD systrace gluons. 2002-06-17 16:32:57 +00:00
kleink dd6cccb3f2 Add a case label for the 603ev cache (identical to 603e). 2002-06-11 22:24:35 +00:00
scw 9f2155138c Fix a botched pmap_vsid_bitmap[] index.
I'm surprised this worked as long as it did.
2002-06-05 15:55:51 +00:00
drochner d2b9876081 move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
2002-06-02 14:44:35 +00:00
lukem 06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
tsubai 5fcd112b3a Add gcc 3.x version. 2002-06-01 09:22:44 +00:00
kleink 0bf753ef67 Cosmetics: there are exceptions to the PVR major/minor rule. 2002-05-31 20:10:45 +00:00