summaryrefslogtreecommitdiffstats
path: root/lib/libkvm/kvm_ia64.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC 259910, 260023, 260028, 260600 & 260701:marcel2014-08-021-75/+158
| | | | | | | | o Fix "kptdir is itself virtual" error, caused by having the kptdir in PBVM. o Allow building a cross libkvm for ia64. o Add support for virtual cores (aka minidumps). o We don't have to worry about page sizes when working on virtual cores. o Handle truncation of the size returned by _kvm_kvatop().
* Add support for PBVM addresses. In a nutshell this means:marcel2011-08-061-7/+81
| | | | | | | | | | | | | | | o get the physical address and size of the PBVM page table. This can be found in the bootinfo structure, of which the physical address is recorded as the ELF entry point. o translate region 4 virtual addresses to physical addresses using the PBVM page table. In _kvm_kvatop() make the distinction between physical address and core file offset a little clearer to avoid confusion. To further enhance readability, always store the translated address into pa so that it's obvious how the translation from va to pa happened. Approved by: re (blanket)
* libkvm code janitoringuqs2011-01-231-5/+6
| | | | | | | | | | | | - 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
* Add a level of indirection to the kernel PTE table. The oldmarcel2007-05-191-8/+16
| | | | | | | | | scheme allowed for 1024 PTE pages, each containing 256 PTEs. This yielded 2GB of KVA. This is not enough to boot a kernel on a 16GB box and in general too low for a 64-bit machine. By adding a level of indirection we now have 1024 2nd-level directory pages, each capable of supporting 2GB of KVA. This brings the grand total to 2TB of KVA.
* Support crash dumps > 4GB in size on 32 bit platforms. _kvm_kvatop()peter2005-06-291-2/+2
| | | | | | | | | | | | | | | | | | | | | 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
* Redefine a PTE as a 64-bit integral type instead of a struct ofmarcel2004-09-231-2/+2
| | | | | bit-fields. Unify the PTE defines accordingly and update all uses.
* The offset argument to mmap(2) is not a pointer. Use 0 instead of NULL.marcel2004-09-221-1/+1
|
* Revamp of the syscall path, exception and context handling. Themarcel2003-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prime objectives are: o Implement a syscall path based on the epc inststruction (see sys/ia64/ia64/syscall.s). o Revisit the places were we need to save and restore registers and define those contexts in terms of the register sets (see sys/ia64/include/_regset.h). Secundairy objectives: o Remove the requirement to use contigmalloc for kernel stacks. o Better handling of the high FP registers for SMP systems. o Switch to the new cpu_switch() and cpu_throw() semantics. o Add a good unwinder to reconstruct contexts for the rare cases we need to (see sys/contrib/ia64/libuwx) Many files are affected by this change. Functionally it boils down to: o The EPC syscall doesn't preserve registers it does not need to preserve and places the arguments differently on the stack. This affects libc and truss. o The address of the kernel page directory (kptdir) had to be unstaticized for use by the nested TLB fault handler. The name has been changed to ia64_kptdir to avoid conflicts. The renaming affects libkvm. o The trapframe only contains the special registers and the scratch registers. For syscalls using the EPC syscall path no scratch registers are saved. This affects all places where the trapframe is accessed. Most notably the unaligned access handler, the signal delivery code and the debugger. o Context switching only partly saves the special registers and the preserved registers. This affects cpu_switch() and triggered the move to the new semantics, which additionally affects cpu_throw(). o The high FP registers are either in the PCB or on some CPU. context switching for them is done lazily. This affects trap(). o The mcontext has room for all registers, but not all of them have to be defined in all cases. This mostly affects signal delivery code now. The *context syscalls are as of yet still unimplemented. Many details went into the removal of the requirement to use contigmalloc for kernel stacks. The details are mostly CPU specific and limited to exception_save() and exception_restore(). The few places where we create, destroy or switch stacks were mostly simplified by not having to construct physical addresses and additionally saving the virtual addresses for later use. Besides more efficient context saving and restoring, which of course yields a noticable speedup, this also fixes the dreaded SMP bootup problem as a side-effect. The details of which are still not fully understood. This change includes all the necessary backward compatibility code to have it handle older userland binaries that use the break instruction for syscalls. Support for break-based syscalls has been pessimized in favor of a clean implementation. Due to the overall better performance of the kernel, this will still be notived as an improvement if it's noticed at all. Approved by: re@ (jhb)
* Implement working on ELF corefiles. Use kvm_read() when readingmarcel2002-10-211-122/+135
| | | | | | | memory while mapping a virtual address to a physical address. This allows us to work with virtual addresses for page tables, provided it doesn't cause infinite recursion. Currently all page tables are direct mapped.
* Implement va->pa translation for kernel virtual addresses. This isdfr2001-10-251-30/+59
| | | | untested - it only seems to be used for crashdumps.
* Partially port kvm to ia64 - virtual to physical translation is incomplete.dfr2001-10-231-0/+167
OpenPOWER on IntegriCloud