Skip to content
Snippets Groups Projects
  1. Jun 06, 2013
  2. May 27, 2013
    • Guy Zana's avatar
      debug: introduce debug_ll() and use it in abort() · 6ebb582e
      Guy Zana authored
      the debug() console function is taking a lock before it access the console driver,
      it does that by acquiring a mutex which may sleep.
      
      since we want to be able to debug (and abort) in contexts where it's not possible sleep,
      such as in page_fault, a lockless debug print method is introduced.
      
      previousely to this patch, any abort on page_fault would cause an "endless" recursive
      abort() loop which hanged the system in a peculiar state.
      6ebb582e
  3. May 24, 2013
  4. May 23, 2013
    • Nadav Har'El's avatar
      Removed redundant line · 9fcc397d
      Nadav Har'El authored
      Oops, forgot to commit the removal of this redundant line (thanks Dor
      for spotting it).
      9fcc397d
    • Nadav Har'El's avatar
      Fix errors in serial console setup · 17b62089
      Nadav Har'El authored
      Fix two errors in IsaSerialConsole::reset(). The visible effect of these
      errors was a spurious \001 (^A) character which always appeared at the
      beginning of every OSV's run output.
      
      The two errors were:
      1. The DLAB bit on the LCR was incorrectly set (a spurious
         "& LCR_DIVISOR_LATCH_ACCESS_BIT" appeared in the code), causing the
         next outb(1) to go to the output register (and output a "1" character)
         instead of setting the baud rate.
      2. When writing the FCR register, the "ioport + " base forgotten.
      
      I took the opportunity and added better names for the constants,
      removed a couple of duplicate constants, and added comments.
      17b62089
    • Avi Kivity's avatar
      kvmclock: drop unneeded memory barriers · 4078ffa5
      Avi Kivity authored
      kvmclock changes always come from the same cpu, so a real memory barrier
      is not needed.
      
      Replace with a compiler barrier.
      4078ffa5
  5. May 22, 2013
    • Nadav Har'El's avatar
      Implement some missing functions in drivers/acpi.cc · bac9129c
      Nadav Har'El authored
      Implement some missing functions in drivers/acpi.cc, which an OS that
      uses the ACPICA library needs to implement, to enable the use of
      semaphores and locks.
      
      These functions get called from ACPICA functions for entering sleep
      state - and in particular for powering off - which we will use in the
      next patch.
      
      This patch includes no new implementation - the semaphore implementation
      was already committed earlier, and here it is just used.
      bac9129c
    • Dor Laor's avatar
      Use a free_deleter for unique_prt · 54be2062
      Dor Laor authored
      There was a bug caused by calling um.get() in the destructor
      still left the unique_ptr armed with the pointer. Using free_deleter
      is cleaner and works too.
      54be2062
    • Dor Laor's avatar
      Fix mbuf leak · ce35ec3f
      Dor Laor authored
      Put the right pointer into the smart pointer.
      Noted by Guy
      ce35ec3f
  6. May 20, 2013
  7. May 18, 2013
  8. May 16, 2013
    • Dor Laor's avatar
      Decrease the rx mbus size. · 090d9d61
      Dor Laor authored
      Use size of MCLBYTES which is 2k for the mbufs instead of the
      previous page size. As TODO I need to add an mtu change function
      that will take this number and uma alloc as param
      090d9d61
    • Dor Laor's avatar
      Track mbuf deallocation · 21eede3d
      Dor Laor authored
      Using unique_ptr and make sure we don't leak.
      Note that the FreeBSD convention is to let the upper protocols to
      free the mbuf in the receive path (without them increasing the ref count)
      21eede3d
    • Nadav Har'El's avatar
      Default console to cooked mode, not raw mode. · cf74861e
      Nadav Har'El authored
      Until now, OSV's console defaulted to raw mode, to make the CLI
      happy. The problem is that on Linux, applications expect to be
      run in cooked mode, so if we ever run a simple application that
      tries to read user input, it can be confused.
      
      This patch makes OSV console default to cooked mode, and the
      CLI switch to raw mode before reading an input line - and reset
      to the default mode just before running the user's command.
      
      Unfortunately, we had to resort to adding a JNI class "Stty",
      since Java has no builtin support for the ioctls required for
      changing the tty settings.
      cf74861e
  9. May 14, 2013
  10. May 10, 2013
  11. May 01, 2013
    • Nadav Har'El's avatar
      Unify "mutex_t" and "mutex" types · 3c692eaa
      Nadav Har'El authored
      Previously we had two different mutex types - "mutex_t" defined by
      <osv/mutex.h> for use in C code, and "mutex" defined by <mutex.hh>
      for use in C++ code. This is difference is unnecessary, and causes
      a mess for functions that need to accept either type, so they work
      for both C++ and C code (e.g., consider condvar_wait()).
      
      So after this commit, we have just one include file, <osv/mutex.h>
      which works both in C and C++ code. This results in the same type
      and same functions being defined, plus some additional conveniences
      when in C++, such as method variants of the functions (e.g.,
      m.lock() in addition to mutex_lock(m)), and the "with_lock" function.
      
      The mutex type is now called either "mutex_t" or "struct mutex" in
      C code, or can also be called just "mutex" in C++ code (all three
      names refer to an identical type - there's no longer a different
      mutex_t and mutex type).
      
      This commit also modifies all the includers of <mutex.hh> to use
      <osv/mutex.h>, and fixes a few miscelleneous compilation issues
      that were discovered in the process.
      3c692eaa
  12. Apr 29, 2013
    • Guy Zana's avatar
      ioctl: use osv/ioctl.h · 617dceed
      Guy Zana authored
          1. use osv/ioctl.h in the netport, main.c and various tests
          2. change ioctl prototype to agree with glibc.
             we now use the variadic prototype specified in sys/ioctl.h
      617dceed
  13. Apr 28, 2013
  14. Apr 22, 2013
    • Nadav Har'El's avatar
      Fix implementation of TCGETS ioctl on console · 6abe05cd
      Nadav Har'El authored
      While I implemented TCSETS ioctl, TCGETS used to be a no-op. This patch
      implements it (which is trivial). TGETS is need because the standard
      idiom for programs which switch to raw mode is to use TCGETS to save the
      original mode, then use TCSETS, and when exiting restore the original mode.
      
      Also used <sys/ioctl.h> definitions (from the host...) instead of the ugly
      ioctl numbers.
      6abe05cd
    • Guy Zana's avatar
      use RAW mode by default in the conosle. · 6273b858
      Guy Zana authored
      the javascript CLI owns echo and line editing discipline and needs
      raw mode from the console.
      6273b858
  15. Apr 17, 2013
    • Nadav Har'El's avatar
      Add cooked (ICANON) console input. · 741c05b2
      Nadav Har'El authored
      Add support for ICANON mode a.k.a. "cooked" mode (see termios(3)), where the
      user's input only reaches the reader after a newline, and until then, the
      erase character case be used to edit the line. This makes it easier for
      non-perfect typist to use rhino ;-)
      
      Various line-discipline features such as word-erase, line kill, flow
      control and signals, aren't yet supported in this version.
      
      Note how the echo and the line discipline (editing) are now both handled in
      the console_poll() thread, while previously the echo was handled in the
      read() implementation (console_read()). This means we now have full read-ahead,
      i.e., the user can now type before read() starts - even during the OSv boot.
      
      This patch also removes the old debugging read() function, which doesn't do
      anything useful.
      741c05b2
  16. Apr 14, 2013
  17. Apr 11, 2013
  18. Apr 07, 2013
  19. Apr 02, 2013
Loading