Commit Graph

49 Commits

Author SHA1 Message Date
Jan Stoess af23a208d9 PPC: use SUBPLATFORM instead of PLATFORM to distinguish between bg and
ebony
2010-09-13 16:37:34 +02:00
Jan Stoess 32b08ecb1c Added a non-ASM implementation of the tracebuffer for X86 and PPC
kernels. User to follow soon.
2010-08-10 18:34:22 +02:00
Jan Stoess 82e9555bda Merge cpu_t objects from glue to an api-wide one. 2010-06-24 12:29:25 +02:00
Jan Stoess d52a5e203d Added support for PPC440 processors, including full-virtualization capabilities 2010-03-16 10:38:11 +01:00
Jan Stoess d2d4a8e623 Remove debug if0 2010-03-03 16:29:34 +01:00
Jan Stoess 9406f9d969 Added missing headers 2010-03-02 23:58:37 +01:00
Jan Stoess c8e1ccf088 Reintroduce lost macro for non-PGE machines 2010-03-03 09:16:07 +01:00
Jan Stoess c881a86a2b Huge patchset with 2 new features:
- Experimental support for control transfer items
- Experimental support for full virtualization on Intel x32
processors via VMX extensions
- Improved, pluggable scheduler architecture, with support for
round-robin, and (experimentally) hierarchical proportional share
scheduling
- Support for event logging (x32 only at present), which allows
light-weight tracing kernel of events into a  user-level buffer.
2010-03-01 23:33:11 +01:00
Jan Stoess a0ac050de9 Fix typecast problem that hinders GCC 4.4.x from printing strings 2009-12-22 11:52:45 +01:00
Jan Stoess 0828dcfae5 Add a user-controllable method to check if KDB should breakin or not;
handy for console multiplexing.
2009-10-31 11:53:45 +01:00
Jan Stoess 74428fb4b9 - Remove debugging stuff. 2008-07-20 09:44:07 +02:00
Jan Stoess 4514ad3642 - NMI bugfixes:
1) A race condition that causes an assertion to fail: kdb_current_cpu stores
the current CPU executing within the KDB; all other CPUs are sleeping
uninterruptibly waiting for a broadcast NMI to either go on or try to enter
KDB themselves (see kdb_t::pre()). There might actually occur a race
condition, because the CPU leaving KDB first resets kdb_current_cpu, then
uses an NMI broadcast to inform other CPUs that they may go on or enter KDB,
and finally verifies the value of kdb_current_cpu. But meanwhile the value
may have changed because of another CPU instantly entering KDB again.
Solution: remove the bogus assertion

2) Occasionally, depending on the hardware circumstances, an NMI may arrive
at the processor while a pending NMI hasn't been serviced yet. In this case
a CPU may receive an "exit KDB" NMI without having had time to process the
"enter KDB" NMI. In that case, it will jump into KDB with reason
X86_EXC_NMI. Handle this case by just leaving KDB instantly.

3) Only send broadcast NMIs to stop other CPUs if the CPU has actually
initiated the entering of KDB (i.e., if it isn't one of those having
received a broadcast NMI itself).
2008-07-14 16:12:39 +02:00
Jan Stoess ad79b7e22d - Tracebuffer fix: added missing definitions 2008-07-14 16:06:47 +02:00
Jan Stoess 5921bd1e04 - Tracebuffer bugfixes: properly filter TID for user-supplied tracebuffer
entries, safely copy user-supplied buffers into the kernel before printing
them.
2008-07-14 16:04:36 +02:00
Jan Stoess ae3555a81b - Merge x32/x64 cpuid logic
- Update last branch MSR indices for newer P4 revisions
2008-04-01 11:18:06 +02:00
Jan Stoess d3acc0da1d - For unknown reasons, print IP info 2008-01-25 16:25:26 +01:00
Jan Stoess 50f174c618 - Tracebuffer/tracepoint changes improvements:
- Add a scientific notion when printing cycles and pmcs (4 digts + exponent)
 - Increase number of characters after which tracebuffer wraps around
 - Add a tsc filter for dumping tb entries
 - Add a function to dump tracebuffer automatically (tbuf_dump), e.g.
   periodically during timer interrupt
 - Take user tracepoints into account when enabling un-detailed tracing of
   records
 - Allow tp id filter to accept user ids
 - Fix K8 tracebuffer pmcs
 - When recording a tbuf entry, first record pmcs then (finally) the tsc
 - Start tracepoint detail levels with bit 0
 - Allow tracepoint to enter kdb without printing something on the console
 - Use TRACEPOINT_DETAIL for detailed tracing
 - Add some TRACE_..._DETAILS macros
 - Coalesce TRACE_... macros in tracepoints.h
2008-01-25 16:22:15 +01:00
Jan Stoess 50f4602adf - Tracebuffer cleanup and improvements:
- When determining number of records to dump in KDB, incorporate potential
display filters
-  Store tracebuffer size in metadate, and use it user level
- Merge user-level tracebuffer.h from ia32 and amd64
2008-01-18 11:23:39 +01:00
Jan Stoess 135bc251bc - Rename ia32 -> x86_x32, amd64 -> x86_x64
- Make naming of msrs consistent (X86_MSR_...)
2008-01-17 11:22:38 +01:00
Jan Stoess 0787b6dc7a - Add a catcher when dumping pagetable entries/tracebuffer items, to avoid
dumping hours and hours worth of items
- Properly calculate wrapped tsc/pmc values in tracebuffer
- Dump tracebuffer header also for when using tracebuffer shortcut 'Y'
2008-01-16 15:53:35 +01:00
Jan Stoess feefb89c45 - Tracebuffer: merge checking for strings, newlines during reading user buffer
- Tracebuffer: If user buffer was not completely mapped, print a placeholder
2008-01-11 11:02:38 +01:00
Jan Stoess b506bcee80 Tracebuffer updates:
- Make tracebuffer terminology consistent: each tb record has a type
and an id.
- Add a display type filter and merge it with the record type filter
- Improve readability of tracebuffer output: wrap lines automatically,
divide tsc/pmcs by 1000/1000000 and add 'K'/'M'
- Add 'Y' top level command to quickly print tracebuffer with default
parameters
- Add two different tracepoint types (DEFAULT and DETAIL), so that
detailed recording can be suppressed at runtime
- Use TP_DETAIL type for detailed IPC recording and substitute
TRACE_IPC_DETAILS() by TRACEPOINT(IPC_DETAILS, ...)
- Use TP_DETAIL type when recording context switches
- Improve user level tracebuffer stubs: record both id and type
correctly; generic functions don't need a TID argument, since it's
determined automatically;
2008-01-07 09:32:14 +01:00
Jan Stoess 619d1425d8 - Added SMP synchronization of KDB via NMIs and an atomic variable 2007-12-07 19:00:30 +01:00
Jan Stoess a660c27f8b - Print SMP pagetable resource 2007-12-01 01:25:44 +01:00
Jan Stoess e06676547c - Move retrieving kernel space to top
- Bugfix: x86_last_ip has size word_t
2007-11-30 22:48:09 +01:00
Jan Stoess 2b3befa8b6 - Use a double cast to avoid GCC4 warning 2007-11-27 12:07:09 +01:00
Jan Stoess eebad85302 - Add manually set pagetable dump regions
- Remove TSS mapping dump, since we don't use such a mapping for
IO-flexpages anymore
2007-11-26 11:07:31 +01:00
Jan Stoess 5682bb7ce8 - Don't use C0000000 address for manual pagetable dump, because that may
cause the whole user address space to be dumped
- We don't use a special TSS mapping anymore for IO flexpages
2007-11-26 11:06:54 +01:00
Jan Stoess a464da1eba - Rename IA32_PAGEDIR_SIZE to IA32_PDIR_SZIE, to make it consistent with X86
and X64
2007-11-26 11:05:33 +01:00
Jan Stoess 3ae52fa655 - Use copy_area_pdir_idx function rather than to address the array directly 2007-11-26 11:05:04 +01:00
Jan Stoess c7d11def2e - Use TRACEPOINTS (if available) when trapping on breakpoints. The
tracepoint is enabled whenever a breakpoint fires, thus the new code is
semantically equivalent to the previous code. However, with tracepoints
breakpoints may now be logged into the tracebuffer rather than to the
console, which is handy to find out the context in which the breakpoint has
actually fired.
2007-11-26 11:04:32 +01:00
Jan Stoess 716850ccbf - Bugfix, new macro name 2007-11-15 11:55:42 +01:00
Jan Stoess 53e3061b6d - Remove moved files
- Remove changed configuration samples
2007-11-09 16:15:50 +01:00
Jan Stoess 5371871911 - Moved x64-specific kdb space stuff 2007-11-09 15:41:29 +01:00
Jan Stoess dd516ea755 - Moved x32-specific kdb space stuff 2007-11-09 15:40:37 +01:00
Jan Stoess d94f88e6b7 - Moved x32-specific kdb space stuff 2007-11-09 15:40:22 +01:00
Jan Stoess 31dc833ea1 - Moved x32-specific smallspace kdb info 2007-11-09 15:40:08 +01:00
Jan Stoess f460cd0b79 - x32 specific glue code for kdb 2007-11-09 15:39:51 +01:00
Jan Stoess e775a0026c - Unified thread info dumping for x86 2007-11-09 15:39:32 +01:00
Jan Stoess 9f9e0c6749 - Unified thread resources dumping for x86 2007-11-09 15:39:08 +01:00
Jan Stoess fc83b975aa - Unified readmem functions for x86 2007-11-09 15:38:55 +01:00
Jan Stoess 8ef1c8ee2f - Unified kdb pre/post handling for x86 2007-11-09 15:38:44 +01:00
Jan Stoess b54af98a4b - Unified kdb glue code for x86 2007-11-09 15:38:30 +01:00
Jan Stoess 23c040b732 - Adopt to new KDB parameter style 2007-10-31 08:55:52 +01:00
Jan Stoess e6abd8afca - Adopt to new KDB parameter style 2007-10-31 08:55:38 +01:00
Jan Stoess cbea22d72a - Adopt to new KDB parameter style 2007-10-31 08:55:24 +01:00
Sebastian Biemueller 4aad79b63e Merged IA-32's and AMD64's traps.h file. 2007-07-28 20:02:50 +02:00
Sebastian Biemueller 70cfceaa81 Merged IA32's and AMD64's assembler-instruction wrapper functions. 2007-07-28 14:20:03 +02:00
Espen Skoglund bf3e62808e Initial repository adapted to hg 2007-07-06 12:24:13 +02:00