Skip to content

mit-pdos/ward

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

* mtrace

  You need to build and install mtrace:
    git+ssh://amsterdam.csail.mit.edu/home/am6/mpdev/qemu.git -b mtrace

  #define MTRACE 1 in param.h  (for qemu!)
  If mtrace isn't cloned next to the xv6-scale repository, then set
  QEMUSRC in config.mk to the directory containing mtrace-magic.h.
  Set MTRACE in config.mk to the mtrace QEMU binary's path.
  $ make mscan.out
  or make mtrace.out to generate just the trace file and not the summary.

* Networking with lwIP

  $ git clone git://git.savannah.nongnu.org/lwip.git
  $ (cd lwip && git checkout DEVEL-1_4_1)
  $ make clean;make

  (if you are building o.josmp, make sure you make clean that make target)

* Copies of e1000 and e1000e manuals are in manuals/.  They were
  retrieved from:

  http://www.intel.com/products/ethernet/resource.htm#s1=Gigabit%20Ethernet&s2=all&s3=Manual

* qemu+gdb

  qemu and gdb do not properly handle mode-switching between 32- and
  64-bit code: once gdb connects in 32-bit mode, it will not switch to
  64-bit mode.  Thus, debugging 64-bit code requires attaching gdb after
  qemu is already executing 64-bit code.  Do not use -S, since that will
  attach in 16-/32-bit mode.

  # In a terminal..
  $ make gdb

  # ..In a different terminal
  $ echo add-auto-load-safe-path $(pwd) >> ~/.gdbinit
  $ gdb
  ...
  The target architecture is assumed to be i386:x86-64
  0xffffffffc011b5fc in ?? ()
  Breakpoint 1 at 0xffffffffc010b9c0: file kernel/console.cc, line 240.
  Breakpoint 2 at 0xffffffffc010b970: file kernel/console.cc, line 224.
  (gdb) c

* Mac cross compiler gcc-4.6.2
  compiler without libstdc++
  download, make, make install gmp-5.0.4, mpfr-3.1.0, and mpc-0.9
  for mpfr and mpc: ./configure --with-gmp=/usr/local
  for gcc: 
  mkdir build
  cd build
  ../configure --target=x86_64-jos-elf  --with-gmp=/usr/local/ --with-mpfr=/usr/local --enable-languages=c,c++ --without-headers --disable-nls
  make all-gcc ; sudo make install-gcc

* clang 
  - Version 3.0 or greater is required to build xv6
  - http://llvm.org/docs/GettingStarted.html
  - You might need a patched libstdc++ from gcc 4.7.0 or later:
    See http://clang.llvm.org/cxx_status.html
  - or you might be able to reuse you're current libstdc++, e.g.:
    export CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
    export C_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
    export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu

  gcc (for libstdc++ if necessary):
  # .. apply the patch ..
  $ ./configure --enable-languages=c,c++ --disable-nls --prefix=[PREFIX]

  llvm and clang:
  $ git clone http://llvm.org/git/llvm.git
  $ (cd llvm/tools && git clone http://llvm.org/git/clang.git)
  $ CC=gcc CXX=g++ ./configure --prefix=[PREFIX] \
    --enable-targets=x86_64 --enable-optimized
  $ CC=gcc CXX=g++ make && make install

* user-space version

  $ apt-get install libjemalloc-dev
  $ make HW=user
  $ ./o.user/utest

* abstract sharing

  Obtain and configure mtrace as described above.
  Disable DEBUG and enable MTRACE in param.h.
  $ make QEMUSMP=8 mtrace.out
  Run asharing in xv6 to generate abstract sharing traces
  $ mscan --abstract-scopes --unexpected-sharing