summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim
Commit message (Collapse)AuthorAgeFilesLines
* In order to better support flexible and extensible access control,rwatson2002-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make a series of modifications to the credential arguments relating to file read and write operations to cliarfy which credential is used for what: - Change fo_read() and fo_write() to accept "active_cred" instead of "cred", and change the semantics of consumers of fo_read() and fo_write() to pass the active credential of the thread requesting an operation rather than the cached file cred. The cached file cred is still available in fo_read() and fo_write() consumers via fp->f_cred. These changes largely in sys_generic.c. For each implementation of fo_read() and fo_write(), update cred usage to reflect this change and maintain current semantics: - badfo_readwrite() unchanged - kqueue_read/write() unchanged pipe_read/write() now authorize MAC using active_cred rather than td->td_ucred - soo_read/write() unchanged - vn_read/write() now authorize MAC using active_cred but VOP_READ/WRITE() with fp->f_cred Modify vn_rdwr() to accept two credential arguments instead of a single credential: active_cred and file_cred. Use active_cred for MAC authorization, and select a credential for use in VOP_READ/WRITE() based on whether file_cred is NULL or not. If file_cred is provided, authorize the VOP using that cred, otherwise the active credential, matching current semantics. Modify current vn_rdwr() consumers to pass a file_cred if used in the context of a struct file, and to always pass active_cred. When vn_rdwr() is used without a file_cred, pass NOCRED. These changes should maintain current semantics for read/write, but avoid a redundant passing of fp->f_cred, as well as making it more clear what the origin of each credential is in file descriptor read/write operations. Follow-up commits will make similar changes to other file descriptor operations, and modify the MAC framework to pass both credentials to MAC policy modules so they can implement either semantic for revocation. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* o Don't set PG_MAPPED or PG_WRITEABLE when a page is mappedalc2002-08-051-7/+2
| | | | | using pmap_kenter() or pmap_qenter(). o Use VM_ALLOC_WIRED in pmap_new_thread().
* Remove the statically allocated array that holds OpenFirmware memory mappingsbenno2002-07-181-4/+8
| | | | | during pmap_bootstrap. Instead, temporarily help ourselves to some memory from phys_avail since we won't need it post-boostrap.
* Add additional cred_free_thread() calls that I had missed the first time.mini2002-07-131-0/+3
| | | | Pointed out by: jhb
* Set the thread state of the newly chosen to run thread to TDS_RUNNING injhb2002-07-121-2/+0
| | | | | | | | choosethread() in MI C code instead of doing it in in assembly in all the various cpu_switch() functions. This fixes problems on ia64 and sparc64. Reviewed by: julian, peter, benno Tested on: i386, alpha, sparc64
* Add DDB support.benno2002-07-101-0/+4
|
* - Make sure we don't trample our metadata pointer in our initial bootstrap.benno2002-07-102-3/+38
| | | | - Load metadata parameters.
* Remove some diagnostic code that snuck in.benno2002-07-101-6/+0
|
* Add an implementation for pmap_zero_page_area.benno2002-07-091-1/+24
|
* Add the OF_getetheraddr function required by if_gem.benno2002-07-091-0/+12
|
* Tidy up trap vector and external interrupt setup.benno2002-07-091-33/+8
|
* Changes for KSE3.benno2002-07-092-0/+55
| | | | Submitted by: Peter Grehan <peterg@ptree32.com.au>
* - Add the "compatible" property to the list that we keep in ivars.benno2002-07-091-23/+196
| | | | | - Add interrupt alloc/setup/teardown/dealloc support, via whichever PIC OpenFirmware gives us.
* Add a special page zero entry point intended to be called via the singlepeter2002-07-081-0/+11
| | | | | | | | | | | | | | | threaded VM pagezero kthread outside of Giant. For some platforms, this is really easy since it can just use the direct mapped region. For others, IPI sending is involved or there are other issues, so grab Giant when needed. We still have preemption issues to deal with, but Alan Cox has an interesting suggestion on how to minimize the problem on x86. Use Luigi's hack for preserving the (lack of) priority. Turn the idle zeroing back on since it can now actually do something useful outside of Giant in many cases.
* Collect all the (now equivalent) pmap_new_proc/pmap_dispose_proc/peter2002-07-071-73/+0
| | | | | | | | | | | | | pmap_swapin_proc/pmap_swapout_proc functions from the MD pmap code and use a single equivalent MI version. There are other cleanups needed still. While here, use the UMA zone hooks to keep a cache of preinitialized proc structures handy, just like the thread system does. This eliminates one dependency on 'struct proc' being persistent even after being freed. There are some comments about things that can be factored out into ctor/dtor functions if it is worth it. For now they are mostly just doing statistics to get a feel of how it is working.
* Update for post-kse3 pmap kthread allocation changespeter2002-07-071-15/+9
|
* Add pmap_mapdev and pmap_unmapdev.benno2002-06-291-0/+43
|
* - Initialise battable to cover I/O spaces.benno2002-06-291-20/+56
| | | | | | | | | - Statically size the bpvo entries to avoid conflicts between bpvo allocation and the vm allocator. - Shift pmap_init2 code into pmap_init. - Add UMA_ZONE_VM flag to uma_zcreate. Submitted by: Peter Grehan <peterg@ptree32.com.au>
* To quote Peter:benno2002-06-291-10/+15
| | | | | | | | | | | | | | | | The case in cpu_switch() where there isn't a higher priority thread (choosethread() == curthread) uses r4 as the PCB context pointer. However, the use of r4 after the label L2 is incorrect, since it was probably trashed by the call to choosethread, and in any case was set up to curthread at the start of the routine. This condition will occur when an interrupt thread schedules a netisr, which is a lower priority thread. Another (probably unnecessary) difference is that I was paranoid about register trashing, so I decided to save r2 and r13 as well. Submitted by: Peter Grehan <peterg@ptree32.com.au>
* - Use tmpstk exclusively in the init path.benno2002-06-291-186/+0
| | | | | | - Remove redundant code. Submitted by: Peter Grehan <peterg@ptree32.com.au>
* Many fixes to low-level trap and interrupt handling:benno2002-06-294-241/+151
| | | | | | | | | - 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>
* Convert this from mostly inline assembler to mostly C.benno2002-06-291-57/+25
| | | | Submitted by: Peter Grehan <peterg@ptree32.com.au>
* Add an MD callout like cpu_exit, but which is called after sched_lock isjake2002-06-241-0/+6
| | | | | | | | | 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.
* Remove unused diagnostic function cread_free_thread().mini2002-06-241-3/+0
| | | | Approved by: alfred
* Deorbit suibyte(). It was only used for split address space systemspeter2002-06-201-7/+0
| | | | for supporting UIO_USERISPACE (ie: it wasn't used).
* - Fixup / remove obsolete comments.jhb2002-06-071-23/+17
| | | | | | | | | | | - 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.
* The stack is not at the top of the user struct.benno2002-05-281-3/+0
|
* Remove an assertion as to whether the current thread already had the FPU orbenno2002-05-281-2/+0
| | | | | not. It may be desirable to put something similar back, but it's getting in the way in it's current form.
* - Move macros that represent where syscall args are kept in a trapframe frombenno2002-05-282-6/+5
| | | | | | trap.c to frame.h - Use the macros in vm_machdep.c:cpu_fork() to set up the trap frame of the new thread.
* Remove the old prototype for kcopy. It's in cpu.h now.benno2002-05-281-1/+0
|
* Implement pmap_copy and pmap_copy_page.benno2002-05-281-3/+13
|
* Move the kcopy() function from trap.c to machdep.c. Add a prototype.benno2002-05-282-30/+30
|
* Print srr1 in printtrap()benno2002-05-271-1/+2
| | | | Submitted by: Peter Grehan <peterg@ptree32.com.au>
* Get the correct memory regions from OpenFirmware. We were getting thebenno2002-05-272-32/+34
| | | | | | | "available" ranges, not the "physical" ranges. Clean up some of the bootstrap code in the process. Submitted by: Peter Grehan <peterg@ptree32.com.au>
* Use correct types in [sf]uword32.benno2002-05-271-4/+4
|
* Add declarations of suword32 and suword64. Add implementations of one ordfr2002-05-261-0/+13
| | | | | the other (or both) to all the platforms. Similar for fuword32 and fuword64.
* Make this more FreeBSD-ish.benno2002-05-191-337/+413
| | | | Requested by: jhb
* - Do a quick style pass.benno2002-05-191-132/+72
| | | | | - Correct the implementation of fix_unaligned to use a thread, not a proc. - GC some #if 0'd stuff.
* - Rename the _C_LABEL macro to CNAME.benno2002-05-171-85/+85
| | | | | - Rename the _ASM_LABEL macro to ASMNAME. - Add the HIDENAME macro which is used in libc's syscall stuff.
* FPU support.benno2002-05-132-110/+16
| | | | Obtained from: NetBSD (portions)
* More locking fixes.benno2002-05-121-3/+13
|
* Do the correct locking on processes for DSI and ISI traps.benno2002-05-121-0/+10
| | | | Copied from: sparc64
* Implement the following functions:benno2002-05-101-8/+32
| | | | | | | - pmap_addr_hint - pmap_change_wiring - pmap_extract - pmap_is_modified
* Install the system call trap handler.benno2002-05-101-0/+1
|
* Improve our detection of an attempted duplicate entry. We may be trying tobenno2002-05-101-1/+4
| | | | change the page protection bits.
* Remove a debugging printf that escaped.benno2002-05-101-1/+0
|
* Update to newer trap code from NetBSD.benno2002-05-091-435/+433
| | | | Obtained from: NetBSD
* Add an assertion that we have a current pmap set before we try and return.benno2002-05-091-1/+8
|
* The per-cpu curpmap is now set by pmap_activate. We don't need to do it herebenno2002-05-091-12/+2
| | | | anymore.
* - Add a prototype for the setfault() function.benno2002-05-091-6/+2
| | | | - Remove some stray printf()s.
OpenPOWER on IntegriCloud