summaryrefslogtreecommitdiff
path: root/lib/libkvm
AgeCommit message (Collapse)Author
2010-09-20according to ingo, it isn;t a problem to have empty [BDS]q macros, soJason McIntyre
revert that part of yesterday's diffs;
2010-09-19more wacky macro fixing;Jason McIntyre
2010-07-26Correct the links between threads, processes, pgrps, and sessions,Philip Guenthe
so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
2010-07-17Move some macros in <msdosfs/denode.h> to outside the #ifdef _KERNELPhilip Guenthe
so that libkvm doesn't need to define that, thereby avoiding some warnings. ok miod@
2010-06-29Fail instead of lying if a process asks sysctl()'s KERN_PROC2 orPhilip Guenthe
KERN_FILE2 (or their libkvm wrappers) for more information than the running implementation knows how to provide. ok millert@ deraadt@
2010-02-03Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentMiod Vallat
files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
2010-01-12the comment is right, this can indeed go away.Jasper Lievisse Adriaanse
it's unused inside libkvm, and nothing else is allowed to use it. ok guenther@ "sure" deraadt@
2010-01-10Reimplement kvm_getproc2()'s support for reading crash dumps andPhilip Guenthe
/dev/mem to be direct instead of going through kvm_getprocs(), as that function is going to get more an more broken as we move stuff from struct proc to struct process for rthreads. To minimize the code copying, put the common logic of filling in a kinfo_proc2 structure into a macro FILL_KPROC2() in <sys/sysctl.h> for use from both the kernel and user-space. This also hides the KERN_PROC #define behind "#if defined(_KERNEL)||defined(_LIBKVM)", as it's deprecated. Positive feedback from millert and blambert; so committing to unblock further rthreads work.
2009-12-07Get page size information by reading the kernel image' struct uvmexp, insteadMiod Vallat
of the value of PAGE_SIZE found in the standard headers when compiling.
2009-11-22Oops, KSEG -> CKSEG.Miod Vallat
2009-11-22Allow mips ports to override VM_{MIN,MAX}_KERNEL_ADDRESS, and provide theMiod Vallat
address as a kernel variable for use by libkvm. On sgi IP27 and IP30 kernels, use XKSEG instead of CKSSEG; this will allow kernel KVM size to grow in the future if necessary.
2009-10-28Do not need -DLIBC_SCCS anymoreTheo de Raadt
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-07-28this is happier if it pulls in a few more includesTheo de Raadt
2009-07-21Support KERN_FILE_TEXT here tooTodd C. Miller
2009-07-21Handle the case where so_pcb is NULL.Todd C. Miller
2009-07-08correct kvm_getfile2 error stringTodd C. Miller
2009-06-24Install ntfs includes and add libkvm (fstat) support. ntfs bitsTodd C. Miller
adapted from NetBSD fstat. OK deraadt@
2009-06-20Move KREAD define to kvm_private.hTodd C. Miller
2009-06-20Split out cd9660 bits into their own .c file to avoid #define collisionsTodd C. Miller
with ufs and add also udf support. OK miod@
2009-06-20Add msdosfs support now that we have the headers.Todd C. Miller
2009-06-19Quiet a gcc warningTodd C. Miller
2009-06-11add missing headers needed by free(), memset(), getuid() and strlcpy().Charles Longeau
ok millert@
2009-06-07Define _KERNEL for the bare minimum. We can include sys/proc.hTodd C. Miller
normally as long as we define __need_process and use a local definition of struct proclist.
2009-06-07Avoid including machine/cpu.hTodd C. Miller
2009-06-07Add kvm_getfile2 which uses KERN_FILE2 when possible, fallingTodd C. Miller
back on kmem grovelling for non-live kernels. OK deraadt@
2009-03-30Mop up after oga@ and unbreak the tree. The direct uncached map is gone soMark Kettenis
remove the code from libkvm that dealt with it.
2009-01-21All operation on live kernels uses sysctl interface, there is no reason toMiod Vallat
access the swap area. Change kvm_open() to no longer require a swap area, and to not consider failure to open() it as fatal. Post-mortem analysis would need an image of the swap area at the time of the crash, anyway.
2009-01-02Sync _kvm_kvatop with existing pmap code: handle direct mappings andMiod Vallat
level 2 large pages.
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-03-30Unbreak build.Mark Kettenis
2007-10-18Get rid of the silly union for mips pte. No functional change exceptMiod Vallat
pmap.h now includes pte.h.
2007-10-10Make context switching much more MI:Artur Grabowski
- Move the functionality of choosing a process from cpu_switch into a much simpler function: cpu_switchto. Instead of having the locore code walk the run queues, let the MI code choose the process we want to run and only implement the context switching itself in MD code. - Let MD context switching run without worrying about spls or locks. - Instead of having the idle loop implemented with special contexts in MD code, implement one idle proc for each cpu. make the idle loop MI with MD hooks. - Change the proc lists from the old style vax queues to TAILQs. - Change the sleep queue from vax queues to TAILQs. This makes wakeup() go from O(n^2) to O(n) there will be some MD fallout, but it will be fixed shortly. There's also a few cleanups to be done after this. deraadt@, kettenis@ ok
2007-06-18Bring back Mickey's UVM anon change. Testing by thib@, beck@ andPedro Martelletto
ckuethe@ for a while. Okay beck@, "it is good timing" deraadt@.
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-19Kernel crash dump support for arm-based platform, with minimal support inMiod Vallat
libkvm, but all the necessary information for a complete _kvm_kvatop() is available in the crash dump.
2007-05-03Enable support for > 512MB of physical memory on mips64 systems, by usingMiod Vallat
XKPHYS instead of KSEG[01] for direct mappings. Then, detect memory above 256MB on O2 by poking at the CRIME registers (ARCbios will not report memory above 256MB, which is mapped above 1GB physical, to the system), and add it to the UVM managed memory. Tested on r5k, rm5200 and r10k with and without more than 256MB, matching hinv reports in all cases. CRIME memory decoding based on a diff from kettenis@ in december 2005.
2007-04-14hide struct process from userland, allow kvm_proc to see it.Marc Espie
okay miod@
2007-04-12move p_limit and p_cred into struct processTed Unangst
leave macros behind for now to keep the commit small ok art beck miod pedro
2007-03-03Kernel crash dumps and associated libkvm bits for landisk.Miod Vallat
2007-02-20Revert PAE pmap for now, until the strange bug is found. This stopsTom Cosgrove
the freezes many of us are seeing (especially on amd64 machines running OpenBSD/i386). Much testing by nick@ (as always - thanks!), hugh@, ian@, kettenis@ and Sam Smith (s (at) msmith (dot) net). Requested by, input from, and ok deraadt@ ok art@, kettenis@, miod@
2007-01-08the advertising clause on these can safely be removedTheo de Raadt
2006-11-29Fix cut'n'paste abuse in error message.Miod Vallat
2006-11-29Sync with struct proc change.Miod Vallat
2006-11-06Minimal lip service for savecore to be happy.Miod Vallat
2006-10-10Preliminary userland bits for OpenBSD/landisk, many things coming fromMiod Vallat
NetBSD.
2006-07-13Back out the anon change. Apparently it was tested by a few, but most ofTheo de Raadt
us did not see it or get a chance to test it before it was commited. It broke cvs, in the ami driver, making it not succeed at seeing it's devices.
2006-06-21from netbsd: make anons dynamically allocated from pool.Michael Shalayeff
this results in lesse kva waste due to static preallocation of those for every phys page and also every swap page. tested by beck krw miod
2006-06-19Real kvm routines for vax; allows ``target kvm'' to work in gdb for kernelMiod Vallat
crash dumps. ok kettenis@
2006-06-12Use the non-generic SEGSHIFT value in the 020/030 specific codepath.Miod Vallat