]> rtime.felk.cvut.cz Git - l4.git/commitdiff
update
authorl4check <l4check@d050ee49-bd90-4346-b210-929a50b99cfc>
Sun, 13 Jun 2010 09:28:43 +0000 (09:28 +0000)
committerl4check <l4check@d050ee49-bd90-4346-b210-929a50b99cfc>
Sun, 13 Jun 2010 09:28:43 +0000 (09:28 +0000)
git-svn-id: http://svn.tudos.org/repos/oc/tudos/trunk@5 d050ee49-bd90-4346-b210-929a50b99cfc

kernel/fiasco/src/abi/l4_msg_item.cpp
kernel/fiasco/src/jdb/arm/jdb_tcb-arm.cpp
kernel/fiasco/src/kern/arm/perf_cnt-arm.cpp
kernel/fiasco/src/kern/dirq_io_apic.cpp
kernel/fiasco/src/kern/ia32/mem_space-ia32.cpp
kernel/fiasco/src/kern/io_apic.cpp
l4/pkg/io/server/src/main.cc

index 1c183f7b4edda77ca8147f40ca2a5eb80d8720c9..bbb92efce67fb1f781327ae1b4dd4fbeb829fee3 100644 (file)
@@ -12,7 +12,6 @@ public:
 
   enum Type
   {
-    String = 0,
     Map    = 8,
   };
 
index 2df1f1bf941fdf55a93681d96611fbc8c9debd69..dcb84c3de69d25881ad5b83b7f496b873152f5ad 100644 (file)
@@ -22,15 +22,15 @@ void Jdb_tcb::print_entry_frame_regs(Space * /*task*/)
   printf("Registers (before debug entry from %s mode):\n"
          "[0] %08lx %08lx %08lx %08lx  %08lx %08lx %08lx %08lx\n"
          "[8] %08lx %08lx %08lx %08lx  %08lx %08lx %08lx %s%08lx\033[m\n"
-         "sp = %08lx  upsr = %08lx\n",
+         "upsr = %08lx\n",
          from_user ? "user" : "kernel",
         ef->r[0], ef->r[1],ef->r[2], ef->r[3],
         ef->r[4], ef->r[5],ef->r[6], ef->r[7],
         ef->r[8], ef->r[9],ef->r[10], ef->r[11],
-        ef->r[12], ef->usp,ef->ulr, Jdb::esc_iret, ef->pc,
-        ef->r[13], ef->psr);
+        ef->r[12], ef->usp, ef->ulr, Jdb::esc_iret, ef->pc,
+        ef->psr);
 }
-      
+
 IMPLEMENT
 void
 Jdb_tcb::info_thread_state(Thread *t)
@@ -38,17 +38,17 @@ Jdb_tcb::info_thread_state(Thread *t)
   Jdb_tcb_ptr current((Address)t->get_kernel_sp());
 
   printf("PC=%s%08lx\033[m USP=%08lx\n",
-      Jdb::esc_emph, current.top_value(-2), current.top_value(-5));
+         Jdb::esc_emph, current.top_value(-2), current.top_value(-5));
   printf("[0] %08lx %08lx %08lx %08lx [4] %08lx %08lx %08lx %08lx\n",
-      current.top_value(-18), current.top_value(-17),
-      current.top_value(-16), current.top_value(-15),
-      current.top_value(-14), current.top_value(-13),
-      current.top_value(-12), current.top_value(-11));
+         current.top_value(-18), current.top_value(-17),
+         current.top_value(-16), current.top_value(-15),
+         current.top_value(-14), current.top_value(-13),
+         current.top_value(-12), current.top_value(-11));
   printf("[8] %08lx %08lx %08lx %08lx [c] %08lx %08lx %08lx %08lx\n",
-      current.top_value(-10), current.top_value(-9),
-      current.top_value(-8),  current.top_value(-7),
-      current.top_value(-6),  current.top_value(-4),
-      current.top_value(-3),  current.top_value(-1));
+         current.top_value(-10), current.top_value(-9),
+         current.top_value(-8),  current.top_value(-7),
+         current.top_value(-6),  current.top_value(-4),
+         current.top_value(-3),  current.top_value(-1));
 }
 
 IMPLEMENT
index f6e2396fbaa668e901579d9ad0cb5cce883ff4bc..a52a093be34a72348eb25cf952008a1c03430733 100644 (file)
@@ -392,7 +392,7 @@ Perf_cnt::get_perf_event(Mword nr, unsigned *evntsel,
   _name[sizeof(_name) - 1] = 0;
 
   snprintf(_desc, sizeof(_desc), "Check manual for description of event %lx", nr);
-  _name[sizeof(_desc) - 1] = 0;
+  _desc[sizeof(_desc) - 1] = 0;
 
   *name = (const char *)&_name;
   *desc = (const char *)&_desc;
index 5b15a427b079b6deda44d47e30abc3982abf9b6c..f5108362c639acfc137321f14561047c54440452 100644 (file)
@@ -146,6 +146,7 @@ Pin_io_apic_level::do_mask()
 {
   assert (cpu_lock.test());
   Io_apic::mask(irq());
+  Io_apic::sync();
 }
 
 
@@ -165,6 +166,7 @@ Pin_io_apic_level::do_mask_and_ack()
   assert (cpu_lock.test());
   __mask();
   Io_apic::mask(irq());
+  Io_apic::sync();
   Apic::irq_ack();
 }
 
index 6cb98148e684c1408298f1d29ed8b3677cd3ada1..ff4fda5dad7c4b30be71e4b0365b3124c9688650 100644 (file)
@@ -58,9 +58,6 @@ public:
   void page_protect    (Address virt, Address size,
                          unsigned page_attribs);
 
-  void switch_ldt();
-
-
 protected:
   // DATA
   Dir_type *_dir;
index 95f3ede71cea118a6d417a9c58d9d2918fe3d4dc..024c48a8b917ad57f3147071d8f67bd574b0f21c 100644 (file)
@@ -78,6 +78,20 @@ Io_apic::read(int reg)
   return data;
 }
 
+PRIVATE inline NEEDS["lock_guard.h"]
+void
+Io_apic::modify(int reg, Mword set_bits, Mword del_bits)
+{
+  register Mword tmp;
+  Lock_guard<Spin_lock> g(&_l);
+  adr = reg;
+  asm volatile ("": : :"memory");
+  tmp = data;
+  tmp &= ~del_bits;
+  tmp |= set_bits;
+  data = tmp;
+}
+
 PRIVATE inline NEEDS["lock_guard.h"]
 void
 Io_apic::write(int reg, Mword value)
@@ -107,7 +121,7 @@ Io_apic::read_entry(unsigned i)
 }
 
 
-PUBLIC inline NEEDS["kdb_ke.h"]
+PUBLIC inline NEEDS["kdb_ke.h", Io_apic::write]
 void
 Io_apic::write_entry(unsigned i, Io_apic_entry const &e)
 {
@@ -224,20 +238,20 @@ bool
 Io_apic::active()
 { return _apic; }
 
-PUBLIC static inline NEEDS["kdb_ke.h", Io_apic::read,Io_apic::write]
+PUBLIC static inline NEEDS["kdb_ke.h", Io_apic::modify]
 void
 Io_apic::mask(unsigned irq)
 {
   //assert_kdb(irq <= _apic->num_entries());
-  _apic->write(0x10 + irq * 2, _apic->read(0x10 + irq * 2) | (1UL << 16));
+  _apic->modify(0x10 + irq * 2, 1UL << 16, 0);
 }
 
-PUBLIC static inline NEEDS["kdb_ke.h", Io_apic::read,Io_apic::write]
+PUBLIC static inline NEEDS["kdb_ke.h", Io_apic::modify]
 void
 Io_apic::unmask(unsigned irq)
 {
   //assert_kdb(irq <= _apic->num_entries());
-  _apic->write(0x10 + irq * 2, _apic->read(0x10 + irq * 2) & ~(1UL << 16));
+  _apic->modify(0x10 + irq * 2, 0, 1UL << 16);
 }
 
 PUBLIC static inline NEEDS["kdb_ke.h", Io_apic::read]
@@ -248,12 +262,19 @@ Io_apic::masked(unsigned irq)
   return _apic->read(0x10 + irq * 2) & (1UL << 16);
 }
 
-PUBLIC static inline NEEDS["kdb_ke.h", Io_apic::read,Io_apic::write]
+PUBLIC static inline NEEDS[Io_apic::read]
+void
+Io_apic::sync()
+{
+  (void)_apic->data;
+}
+
+PUBLIC static inline NEEDS["kdb_ke.h", Io_apic::modify]
 void
 Io_apic::set_dest(unsigned irq, Mword dst)
 {
   //assert_kdb(irq <= _apic->num_entries());
-  _apic->write(0x11 + irq * 2, (_apic->read(0x11 + irq * 2) & ~(~0UL << 24)) | (dst & (~0UL << 24)));
+  _apic->modify(0x11 + irq * 2, dst & (~0UL << 24), ~0UL << 24);
 }
 
 PUBLIC static inline NEEDS[Io_apic::num_entries]
index 69275175fcefe7628a5098028da02d72c5d2ef7a..82f81de5380d395ece71793cdefdcf3f64a16731 100644 (file)
@@ -114,6 +114,8 @@ void dump(Device *d)
 Hw_icu::Hw_icu()
 {
   icu = L4Re::Env::env()->get_cap<L4::Icu>("icu");
+  if (icu.is_valid())
+    icu->info(&info);
 }
 
 
@@ -215,6 +217,7 @@ arg_init(int argc, char * const *argv, Io_config_x *cfg)
           _my_cfg.inc_verbosity();
           break;
         case 1:
+         printf("Enabling transparent MSIs\n");
           cfg->set_transparent_msi(true);
           break;
         }