Commit Graph

763 Commits

Author SHA1 Message Date
Jan Stoess 3ebf15e8a4 We do not have platform-specific linker scripts anymore 2009-07-21 20:45:55 +02:00
Jan Stoess 950fbecd64 Fix unwinding for nested IPCs; the previous check for polling or
waiting doesn't handle every case, so undo it.
2009-07-21 20:45:22 +02:00
Jan Stoess 14162f8803 Correct stack frame dumping for intercepted kernel code 2009-07-16 14:20:40 +02:00
Jan Stoess 3e7135a1cd -Fixed unwinding IPCs when saved state is running but partner is still
set
-Make IO Fpage helpers compatible to C
2009-07-15 20:24:30 +02:00
Jan Stoess cade634ac2 Fix a hideous bug where thread state is set to running but the partner
is still set; in such cases, IPC error handling may fail
2009-07-15 13:06:26 +02:00
Jan Stoess fc639de80c Use L4_Bool_t insted of bool 2009-07-14 15:00:23 +02:00
Jan Stoess 867080e45b Added missing processor_sleep() for CONFIG_SMP_IDLE_POLL 2009-06-09 12:58:28 +02:00
Jan Stoess 8378ab328f Fix cut&paste bug. 2009-05-15 23:09:40 +02:00
Jan Stoess 01ae8784a4 Advertise io flexpages as feature string. 2009-05-15 23:07:52 +02:00
Jan Stoess c4b9e86a34 Use dummy var when retrieving KIP. Thx. to S. Gregorzyk 2009-05-15 15:31:18 +02:00
Philipp Kupferschmied cda4662146 Adapted build system to allow compilation for 32bit-targets on 64bit-hosts. 2009-04-22 11:09:33 +02:00
Philipp Kupferschmied a71f140ba2 Clobber memory in segment register load asm code to prevent
too optimistic optimizations by gcc-4.3 (which seemed to lead to
a triple fault).
2009-04-20 16:43:37 +02:00
ksandstr@iki.fi e0f663d465 return correct propagated thread ID to receiver when propagator and receiver are local to one another
In the case of a propagated message, current->get_partner()'s result may not
refer to the same thread as from_tcb->get_{local,global}_id(). This changeset
narrows the case where local TIDs are returned to avoid this confusion.

This changeset also makes explicit (through the use of an ASSERT()) the
assumption that only global IDs are passed through propagation.
2009-03-28 23:51:54 +02:00
Philipp Kupferschmied 8220bfaf0b Fixed double-allocation of page for UTCB pointers. Thanks to M. Kroll 2009-02-23 10:01:35 +01:00
Philipp Kupferschmied 372c86ac62 BUGFIX: clobber memory in do_ipc to prevent
gcc4.3 from setting MRs _after_ performing
        the IPC.
        (thx to R. Neider for his help)
2009-01-16 18:26:00 +01:00
Philipp Kupferschmied 74dd311bb3 Added workaround that avoids PGE being always set after
having called x86_mmu_t::flush_tlb(true).
2008-10-21 13:56:15 +02:00
Jan Stoess 1d2bedbe9f - A couple of minor fixes (thx to W.Catteau) 2008-10-21 00:29:44 -04:00
Philipp Kupferschmied ffe30a6506 - Fixed bug that had been introduced with the previous commit 2008-08-05 14:02:31 +02:00
Philipp Kupferschmied 30132e9248 - Avoid TBUF_PMC_SEL_* and TBUF_RDPMC_* being undefined
This could happen if CPU was not set to I686, P4, or K8
  (Thanks to Simon Kellner for a hint that helped finding this bug)
- Removed redundant "defined(CONFIG_CPU_X86_K8)"
- Fixed typo in comment
2008-07-31 16:57:25 +02: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 c8871cf853 - Clear LDTR contents during initialization 2008-06-20 14:33:41 +02:00
Jan Stoess 16ebb49836 - Bugfix initialization of priority queue. Thx to T. Chen. 2008-06-19 11:09:34 +02:00
Jan Stoess 480c17fb43 - IDT limit in IDTR is actually 1 byte more than the value in the
descriptor. Thx to S.Reichelt
2008-06-12 11:41:16 +02:00
Jan Stoess f219adadf0 - Remove march=athlon for GCC3 and x64
- Add a small (hacky) typecast to make GCC-4.3.1 happy
2008-06-12 11:21:59 +02:00
Jan Stoess abf79e2f7e - For x64, don't use -march=pentium4 2008-06-11 16:19:09 +02:00
Jan Stoess 931aa43983 - Use x86_64- as prefix rather than amd64-, former is more generic 2008-05-30 16:44:49 +02:00
Jan Stoess d748305ae1 - Fixed 6-year old thread resource bug. Thx to V.Uhlig 2008-05-29 11:40:45 +02:00
Jan Stoess 215a130460 - platform/pc99 is the wrong location for IO-fpage related code. With the
new x32/x64 merge, files can now be put to a more appropriate location
2008-05-16 11:24:35 +02:00
Jan Stoess d0f325c9ed - Use key 'j' for branch stepping ('S' is occupied by list-spaces); thanks
to Dzianis Barzakouski
2008-05-15 15:21:58 +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 4a1238b014 - BUGFIX: rights mask was incorrect 2008-03-19 22:00:06 +01:00
Jan Stoess 3ccda67a6f Fix a bug that may occur when setting up an idt entry: add_int_gate was
stored in the init section, i.e., at a low address, so that it can be called
before virtual memory has been initialized. Later on, however, init memory
may not be mapped into each address space anymore. The fix introduces a
private init_gate() and a public add_gate() function to idt_t, of which the
former is used during initialization, and the later afterwards.
2008-02-21 12:25:14 +01:00
Jan Stoess bf5d6e1bd0 - Fix misleading preprocessor error output 2008-02-14 10:05:49 +01:00
Jan Stoess bc0c133fa2 - No alpha and arm arch anymore 2008-02-13 12:16:11 +01:00
Jan Stoess e188d597e1 - Properly declare L4_Reset_WordSizeMask() 2008-02-08 17:33:55 +01:00
Jan Stoess 905f7d472f - Improve debug output 2008-02-08 17:33:36 +01:00
Jan Stoess 5ea2a76774 - Minor fixes to allow compiling w/o KDB 2008-01-28 16:32:44 +01:00
Jan Stoess 0995fc294d - X64 renaming fix 2008-01-28 15:52:36 +01:00
Jan Stoess 4571da5db9 - Disable flushfilter on K8 cpus if deselected, may be enabled by default 2008-01-28 15:52:21 +01:00
Jan Stoess efd8ffdd6c - Only set tss.esp0 when not switching to KDB
- Don't assert stuff when switching from/to KDB
2008-01-25 16:25:58 +01:00
Jan Stoess 5acc7bd6ad - Add some const compiler hints to bitmask
- Introduce a string() method to print out contents
2008-01-25 16:25:44 +01:00
Jan Stoess d3acc0da1d - For unknown reasons, print IP info 2008-01-25 16:25:26 +01:00
Jan Stoess 926164543c - Don't have an IA64 outputprefix anymore 2008-01-25 16:25:15 +01:00
Jan Stoess 9610239310 - Correctly print KDB TCB's thread id 2008-01-25 16:24:47 +01:00
Jan Stoess 37031aa006 - Minor spinlock debugging fix
- In rare cases, we might get a NMI (or breakpoint exception) just after
sys_ipc has been invoked, but _before_ esp has been set to tss.esp0 in that
case, we need to switch stacks manually and preserve the processor-saved
frame. We make sure that, before tss there is enough scratch space to cover
EFLAGS, CS, and EIP saved by the processor; this way, we can get around
without having to spend KDB its own interrupt task gate
2008-01-25 16:24:21 +01:00
Jan Stoess cd7e97b512 - Some nicer debug output when dumping kernel memory configuration 2008-01-25 16:22:59 +01:00
Jan Stoess 7a1166eef8 - If kickstart tells l4 to grab some reserved memory for its own use, there
may be an overlap with boot modules. In that case, relocate the grub modules
and patch the MBI appropriately
2008-01-25 16:22:30 +01:00