summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
AgeCommit message (Collapse)Author
2002-04-29Define placeholders for art's splassert() debugging stuff on all arches.Miod Vallat
Currently as no-ops everywhere. ok art@, deraadt@
2002-04-24Introduce a new file, machine/internal_types.h, to hold that specific archMarc Espie
type characteristics. internal_types.h will contain only settings invisible from standard C, e.g., in the __* or _[A-Z]* namespace, and be reused by files like limits.h. This allows us to shorten machine/limits.h greatly, as all the common defines are now in sys/limits.h, plus a small stub in internal_types.h. Tested on all arches as far as I know. Approved after discussion with art, millert, deraadt, and others.
2002-03-28do not use MID_ZERO! then file(1) does not workTheo de Raadt
2002-03-22Attribute table must be allocated 1-1 because it is accessed fromDale Rahn
pte_spill_r(). ok art@
2002-03-21Remove dead code, ifdef code which should be dead, KNF. Cleanup.Dale Rahn
2002-03-21Be more consistant about pted zeroing (the whole structure)Dale Rahn
Fix missing 'attr' initialization. Zero available memory. Raise available memory limit from 256MB to 1GB. This code has only been tested up to 512MB, but should be fine to 1GB. Ram modules are not avail to the developers to test out the machines up to their 1.5GB physical limit.
2002-03-21Swap the defines to be the ones we want to use, compat ones are definedDale Rahn
from the preferred.
2002-03-14Improved altivec support for powerpc/macppc.Dale Rahn
Fix bug where altivec context was not freed on process exit. Fix bug where vscr was not correctly saved/restored. replace asm statement was macros which expand to the same asm code or to .long XXX which evaluates to the same instruction since in-tree gas does not support altivec. Enable ALTIVEC support by default on macppc, still conditional for other powerpc ports.
2002-03-14Do not include headers twice. Pointed out by Dries Schellekens.Dale Rahn
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2002-03-14Turn the ptrace(2) syscall into a kernel compile option, option PTRACE inMiod Vallat
your kernel configuration file. By default, GENERIC will enable this. When PTRACE is not enabled, several ptrace-like features of the procfs filesystem will be disabled as well (namely, the ability to read and write any process' registers, as well as attching, single stepping and detaching to/from processes). This should help paranoid people build better sandboxens, and us to build smaller ramdisks.
2002-03-13Complete rewrite of the powerpc pmap handling, Instead of keepingDale Rahn
the spill list for each PTEG, the V->P translations are stored in trees for each pmap. All valid kernel mappings are preallocated in 1-1 memory so that tlb spill/loads for kernel accesses can be looked up while physical, user mappings are not guaranteed to be 1-1 mapped, thus the kernel must go virtual to look up user mappings. While this is more expensive, the tree search is much lower cost than the long linked list search. Also on each pmap_remove() it was necessary to search the linked lists for each possible mapping, now it just looks up the entry in the tree. This change gives a 25-36% speedup in 'make build' time. What was around 2:50 is now around 1:55 on a 733MHz G4. This change causes a likely existing bug to appear quite often, it deals with the segment register invalidation in kernel mode. Because of that problem, currently this change limits the physical memory used to 256MB. This limitation will be fixed soon, it is not an error in the pmap code. * Effort sponsored in part by the Defense Advanced Research Projects * Agency (DARPA) and Air Force Research Laboratory, Air Force * Materiel Command, USAF, under agreement number F30602-01-2-0537.
2002-03-08Move the message buffer out of low memory, Openfirmware clears the areaDale Rahn
on reboot. perhaps OF uses it at other times? Since OF always use the same memory addresses, this should always allocate the same ram to the msgbuf, and allow it to be preserved across reboot.
2002-02-19get rid of old if 0'ed code. add support for __weak_alias and fixDale Rahn
support for __warn_references (both from alpha/sparc4).
2002-01-26splclock() should block SPL_BIO - SPL_IMP.Dale Rahn
2002-01-25Instead of finding pages matching this physical page, match this specificDale Rahn
entry. Also terminate the search as soon as this entry is found.
2002-01-25How did this work? It used to attempt the tlb entry for a mapping it isDale Rahn
removing by using the va it is replacing it with, NO!. Calculate the va of the mapping by inverting the pte_hi calculation producing bits 4-19 of the address. This is enough to correctly invalidate the tlb entry for the mapping being removed.
2002-01-23Pool deals fairly well with physical memory shortage, but it doesn't dealArtur Grabowski
well (not at all) with shortages of the vm_map where the pages are mapped (usually kmem_map). Try to deal with it: - group all information the backend allocator for a pool in a separate struct. The pool will only have a pointer to that struct. - change the pool_init API to reflect that. - link all pools allocating from the same allocator on a linked list. - Since an allocator is responsible to wait for physical memory it will only fail (waitok) when it runs out of its backing vm_map, carefully drain pools using the same allocator so that va space is freed. (see comments in code for caveats and details). - change pool_reclaim to return if it actually succeeded to free some memory, use that information to make draining easier and more efficient. - get rid of PR_URGENT, noone uses it.
2002-01-21ARGH, fix it right...Dale Rahn
2002-01-21Better barrier protection. pefo found an instance where the previousDale Rahn
protection was not good enough. work from theo, pefo, toby.
2002-01-20fix quite appearent bug in cpu_swapin(), missing '&' can easily corruptDale Rahn
memory, pmap structure.
2002-01-13better accounting for 'soft' interrupts, before all exceptions wereDale Rahn
counted as soft interrupts.
2002-01-13Regress this one additional change, with this change more systemsDale Rahn
successfully ran 'make build'.
2002-01-06That was no fix, that broke things. If the pte entry is currently foundDale Rahn
in the po lists, it will NOT have the PTE_VALID bit set. Thus valid mappings could be ignored if enough mappings existed for that PTEG pair. This explains the bus_dma panics.
2002-01-06pte_spill() is executed on a special stack in real mode (vm not enabled).Dale Rahn
It is not valid to call pool_put() from that context. If called from that context, put the freed item on one of two lists (race safe), poalloc() will attempt to fetch from there, and pofree() will clean up if called from a normal context.
2001-12-17Move the process_read_reg prototype to the correct file, it is specifiedDale Rahn
in ptrace.h, not in md header files. Protect vector functions/variables with _KERNEL.
2001-12-13Fix for pmap extract from art.Dale Rahn
2001-12-08Sprinkle pmap_update calls where relevant and some otherArtur Grabowski
misc pmap usage fixes.
2001-12-05make nkmempages dynamic based on memory. okay art@ from netbsd:Niels Provos
date: 2000/02/11 19:22:52; author: thorpej; Add some very simple code to auto-size the kmem_map. We take the amount of physical memory, divide it by 4, and then allow machine dependent code to place upper and lower bounds on the size. Export the computed value to userspace via the new "vm.nkmempages" sysctl. NKMEMCLUSTERS is now deprecated and will generate an error if you attempt to use it. The new option, should you choose to use it, is called NKMEMPAGES, and two new options NKMEMPAGES_MIN and NKMEMPAGES_MAX allow the user to configure the bounds in the kernel config file.
2001-12-05Update pmap_update macro for arches Art missed. Still just a noop.Todd C. Miller
2001-11-29Kernel mappings (pmap_kenter_pa) should not be entered into the pv list.Dale Rahn
2001-11-29Fix for thinko that was caught in code review, error was found 3x, howeverDale Rahn
it was fixed 2x, leaving one instance of the error.
2001-11-28zap some typedefs.Artur Grabowski
vm_map_t -> struct vm_map * vm_map_entry_t -> struct vm_map_entry * simple_lock_data_t -> struct simplelock (uvm not done yet, coming in the next commit)
2001-11-28Make pmap_update functions into nops so that we can have a consistentArtur Grabowski
pmap_update API (right now it's nop).
2001-11-28pmap_kenter_pgs is not used and not really useful. remove.Artur Grabowski
2001-11-28Sync in more uvm changes from NetBSD.Artur Grabowski
This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
2001-11-19Remove pointless additional 'syncing' instructions in the powerpc spl*()Dale Rahn
functions. Seems to have no effect on system run time (it should have...) reduces GENERIC kernel size by 52k.
2001-11-13Add AltiVec support to powerpc/macppc. This is not currently enabled becauseDale Rahn
the 'as' in openbsd source tree does not yet support altivec instructions. The pieces to enable it have been put in macppc/conf/GENERIC and macppc/conf/Makefile.macppc in comments. Once 'as' is updated the kernel option should be removed.
2001-11-11Fix matching brace error. Fortunately PGM errors do not happen in theDale Rahn
kernel much. This has been there quite a while.
2001-11-07unbreak child_return.Artur Grabowski
2001-11-06Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.Miod Vallat
(Look ma, I might have broken the tree)
2001-11-06Let fork1, uvm_fork, and cpu_fork take a function/argument pair as argument,Artur Grabowski
instead of doing fork1, cpu_set_kpc. This lets us retire cpu_set_kpc and avoid a multiprocessor race. This commit breaks vax because it doesn't look like any other arch, someone working on vax might want to look at this and try to adapt the code to be more like the rest of the world. Idea and uvm parts from NetBSD.
2001-11-06Need to prototype pmap_pinit and pmap_release here.Artur Grabowski
(although they are leftovers from an earlier bad time, the macppc decided that it's a good idea to use them.)
2001-11-06No need for those prototypes here.Artur Grabowski
2001-11-05Workaround to prevent Altivec Unavilable problem.Dale Rahn
Why did Motorola put this exception misaligned with respect to all other exceptions? Altivec is not supported. This will cause any process executing altivec instructions to recieve an illegal instruction signal.
2001-09-21Correctly initialize variables in cpu_fork(). From NetBSD.Miod Vallat
2001-09-20Allow nesting of fault handlers by saving old onfault handler andDale Rahn
restoring it when the copying/copyout/badaddr functions finish.
2001-09-19merge vm/vm_kern.h into uvm/uvm_extern.h; art@ okMichael Shalayeff
2001-09-18Changing the way the pmap code works again.Dale Rahn
Changes to the pmap_enter code so that the pmap_kenter/pmap_kremove has a method to create mappings without adding them to the _pv lists (part of the point of pmap_k* functions). Also adds an interface so that device mappings can be created with cacheable attributes. So that devices such as display memory can be mapped writethru greatly increasing their speed.