summaryrefslogtreecommitdiffstats
path: root/lib/libkvm/kvm_arm.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix up pointer issues with lib/libkvmngie2016-04-221-1/+5
| | | | | | | | | | | | | | | | In particular, - avoid dereferencing NULL pointers - test pointers against NULL, not 0 - test for errout == NULL in the top-level functions (kvm_open, kvm_openfiles, kvm_open2, etc) - Replace a realloc and free on failure with reallocf Found with: devel/cocchinelle Differential Revision: https://reviews.freebsd.org/D5954 MFC after: 1 week Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division
* Remove redundant ARM_L2_ADDR_BITS and L2_ADDR_BITS definitions andskra2016-02-181-1/+1
| | | | replace them by primary ones where needed.
* Add support to libkvm for reading vmcores from other architectures.jhb2015-11-271-127/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a kvaddr_type to represent kernel virtual addresses instead of unsigned long. - Add a struct kvm_nlist which is a stripped down version of struct nlist that uses kvaddr_t for n_value. - Add a kvm_native() routine that returns true if an open kvm descriptor is for a native kernel and memory image. - Add a kvm_open2() function similar to kvm_openfiles(). It drops the unused 'swapfile' argument and adds a new function pointer argument for a symbol resolving function. Native kernels still use _fdnlist() from libc to resolve symbols if a resolver function is not supplied, but cross kernels require a resolver. - Add a kvm_nlist2() function similar to kvm_nlist() except that it uses struct kvm_nlist instead of struct nlist. - Add a kvm_read2() function similar to kvm_read() except that it uses kvaddr_t instead of unsigned long for the kernel virtual address. - Add a new kvm_arch switch of routines needed by a vmcore backend. Each backend is responsible for implementing kvm_read2() for a given vmcore format. - Use libelf to read headers from ELF kernels and cores (except for powerpc cores). - Add internal helper routines for the common page offset hash table used by the minidump backends. - Port all of the existing kvm backends to implement a kvm_arch switch and to be cross-friendly by using private constants instead of ones that vary by platform (e.g. PAGE_SIZE). Static assertions are present when a given backend is compiled natively to ensure the private constants match the real ones. - Enable all of the existing vmcore backends on all platforms. This means that libkvm on any platform should be able to perform KVA translation and read data from a vmcore of any platform. Tested on: amd64, i386, sparc64 (marius) Differential Revision: https://reviews.freebsd.org/D3341
* Allow libkvm to get the kernel va to pa delta without the need forandrew2014-10-191-10/+26
| | | | | | | | | | | | physaddr. This should allow for a kernel where PHYSADDR and KERNPHYSADDR are both undefined. For now libkvm will use the old method of reading physaddr and kernaddr to allow it to work with old kernels. This could be removed in the future when enough time has passed. Differential Revision: https://reviews.freebsd.org/D939 MFC after: 1 week
* Fix the type of pte_pa as when it is passed into _kvm_pa2off it is eitherandrew2014-10-161-2/+2
| | | | | a uint64_t or a pointer to an off_t. With it being a u_long can result in incorrect values being returned.
* add support for building a cross-gdb for ARM... This isn't hooked upjmg2014-02-121-1/+5
| | | | | | | to xdev yet as I don't know how to make it work properly... It also isn't heavily tested... Reviewed by: silence on -arm
* libkvm code janitoringuqs2011-01-231-17/+15
| | | | | | | | | | | | - make WARNS=6 clean for archs w/o strict alignment requirments - add const, ANSIfy, remove unused vars, cast types for comparison - thanks to differing definitions of VM_MIN_ADDRESS across our archs, we need to trick the compiler to not complain about signedness. We could either fix VM_MIN_ADDRESS to always be a simple integer or make the check conditional on $ARCH. Closes PRs: kern/42386, kern/83364 Reviewed by: bde
* Fix missing includes of <string.h>, to silence some compiler warnings.ed2009-06-141-0/+1
| | | | Submitted by: Pawel Worach
* Support kernel crash mini dumps on ARM architecture.raj2008-11-061-2/+22
| | | | Obtained from: Juniper Networks, Semihalf
* Per Olivier Houchard, use the proper license for this file. Heimp2007-01-081-10/+10
| | | | | | | bogusly used the kvm_powerpc.c file as a template for the license, but then either wrote the code himself, or cribbed it from the kvm_i386 file. The only thing from the kvm_powerpc.c file was the license. Correct this mistake with his blessing.
* libkvm bits for arm.cognet2005-10-031-18/+162
|
* Support crash dumps > 4GB in size on 32 bit platforms. _kvm_kvatop()peter2005-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | returned an lseek offset in a "u_long *" value, which can't express >4GB offsets on 32 bit machines (eg: PAE). Change to "off_t *" for all. Support ELF crashdumps on i386 and amd64. Support PAE crashdumps on i386. This is done by auto-detecting the presence of the IdlePDPT which means that PAE is active. I used Marcel's _kvm_pa2off strategy and ELF header reader for ELF support on amd64. Paul Saab ported the amd64 changes to i386 and we implemented the PAE support from there. Note that gdb6 in the src tree uses whatever libkvm supports. If you want to debug an old crash dump, you might want to keep an old libkvm.so handy and use LD_PRELOAD or the like. This does not detect the old raw dump format. Approved by: re
* Import libkvm MD file for arm.cognet2004-05-141-0/+103
OpenPOWER on IntegriCloud