Skip to content
Snippets Groups Projects
  1. Apr 07, 2013
  2. Apr 04, 2013
  3. Apr 03, 2013
    • Nadav Har'El's avatar
      New scripts/run script to replace scripts/run.sh · c3ccee88
      Nadav Har'El authored
      I've written a slightly more advanced version of the old scripts/run.sh,
      which also gives control over qemu's memory size and the number of vcpus
      used, using command line options:
      	-d (or --debug): run the debug build instead of the release build.
      	-c N (or --vcpus): number of vcpus (defaults to 4).
      	-m M (or --memsize): VM memory size (defaults to 1 GB).
      
      I did not remove the old "scripts/run.sh" - I named the new script
      scripts/run - if everyone likes it we can remove the old scripts/run.sh.
      We don't need to call it ".sh" - in Unix it isn't customary for command line
      tools to have extensions.
      c3ccee88
    • Nadav Har'El's avatar
      Handle #DE (divide error) exception · 372c4a73
      Nadav Har'El authored
      In the existing code, #PF was handled correctly (generating a SIGSEGV),
      but on most other x86 hardware exceptions, we just abort()ed the kernel.
      
      The #DE (divide error) exception should, like #PF, generate a signal
      (the inappropriately-named SIGFPE), and this patch does this. Strangely,
      the SPECjvm2008 benchmark depends on this behavior (I didn't check its
      source code to figure out why).
      
      To make it easier to generate other signals in the future, I abstracted
      the existing function handle_segmentation_fault() into a more general
      generate_signal() which is used in both #PF and #DE handling.
      372c4a73
    • Nadav Har'El's avatar
      Automatically create directories in bootfs as needed. · 6bd83854
      Nadav Har'El authored
      The previous code created certain empty directories in the boot file system
      (/tmp, /java, /usr/lib) and the bootfs.manifest could only put files in
      those directories - attempting to include a file "/foo/bar" would fail
      unpacking.
      
      Now, we just create one empty directory (/tmp, I don't even know if it's
      necessary), and got rid of the hard-code list of directories - directories
      are automatically created as needed. I.e., if the bootfs.manifest contains
      a file path /foo/bar/dog, we mkdir() /foo, then mkdir() /foo/bar, and only
      then creat() /foo/bar/dog.
      6bd83854
Loading