Merge with Arrakis branch
authorStefan Kaestle <stefan.kaestle@inf.ethz.ch>
Wed, 20 Aug 2014 14:52:02 +0000 (16:52 +0200)
committerStefan Kaestle <stefan.kaestle@inf.ethz.ch>
Wed, 20 Aug 2014 14:52:02 +0000 (16:52 +0200)
17 files changed:
1  2 
devices/Hakefile
devices/e10k.dev
hake/RuleDefs.hs
hake/symbolic_targets.mk
if/Hakefile
include/barrelfish/memobj.h
include/barrelfish/waitset_chan.h
kernel/arch/x86_64/startup_arch.c
kernel/dispatch.c
lib/barrelfish/Hakefile
lib/barrelfish/waitset.c
lib/newlib/newlib/libc/Hakefile
lib/spawndomain/arch/x86/spawn_arch.c
lib/spawndomain/spawn.c
usr/drivers/e10k/e10k_cdriver.c
usr/drivers/e10k/e10k_qdriver.c
usr/tests/testdesc/testdesc-child.c

@@@ -7,7 -7,7 +7,7 @@@
  -- ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
  --
  -- Hakefile for devices/
---- 
++--
  --------------------------------------------------------------------------
  
  -- Mackerel 2 device descriptions
@@@ -15,7 -15,7 +15,7 @@@
  -- THIS is the place for new device descriptions.
  --
  [ mackerel2 (options arch) f
--  | f <- [ "ac97_base_audio", 
++  | f <- [ "ac97_base_audio",
             "ac97_ext_audio",
             "ac97_ext_codec",
             "ac97_ext_modem",
@@@ -66,7 -67,7 +67,7 @@@
             "omap/omap44xx_cam_cm2",
             "omap/omap44xx_cam_prm",
             "omap/omap44xx_ckgen_cm2",
--           "omap/omap44xx_ckgen_prm", 
++           "omap/omap44xx_ckgen_prm",
             "omap/omap44xx_cortex_m3_nvic",
             "omap/omap44xx_ctrlmod",
             "omap/omap44xx_device_prm",
             "omap/omap44xx_hsusbhost",
             "omap/omap44xx_id",
             "omap/omap44xx_l3init_cm2",
--           "omap/omap44xx_l4per_cm2", 
++           "omap/omap44xx_l4per_cm2",
             "omap/omap44xx_mmchs",
--           "omap/omap44xx_mmchs1",           
++           "omap/omap44xx_mmchs1",
             "omap/omap44xx_mmu",
             "omap/omap44xx_scrm",
             "omap/omap44xx_spinlock",
             "omap/omap44xx_sysctrl_padconf_core",
             "omap/omap44xx_sysctrl_padconf_wkup",
             "omap/omap44xx_usbconf",
 -           "pci_sr_iov_cap",
             "omap/omap44xx_usbtllhs_config",
- <<<<<<< HEAD
 -           "omap/omap44xx_uart3"
++           "omap/omap44xx_uart3",
 +           "virtio/virtio_blk",
 +           "virtio/virtio_mmio",
 +           "xeon_phi/xeon_phi_serial",
-            "xeon_phi/xeon_phi_boot", 
++           "xeon_phi/xeon_phi_boot",
 +           "xeon_phi/xeon_phi_apic",
 +           "xeon_phi/xeon_phi_smpt",
 +           "xeon_phi/xeon_phi_irq",
 +           "pci_sr_iov_cap"
- =======
-            "omap/omap44xx_uart3"
- >>>>>>> Cleaned up omap44xx uart3 device file.
           ], arch <- allArchitectures
  ] ++
  
  -- Mackerel 1 device descriptions
---- 
++--
  -- DO NOT add new devices to this list - the interface is non-portable
  -- and liable to break with new C compiler versions!
---- 
--[ mackerel (options arch) f 
++--
++[ mackerel (options arch) f
    | f <- [ "amd_vmcb",
             "arm_icp_pic0",
             "arm_icp_pit",
@@@ -2256,11 -2267,11 +2267,19 @@@ device e10k lsbfirst ( addr base ) "Int
    register rlec rc addr(base, 0x04040) "Receive Length Error Count"
      type(uint32);
  
++
 +  // 8.2.3.23.23
 +  register prc1522 rc addr(base, 0x04070) "Packets Received [1024 to Max Bytes] Count"
 +    type(uint32);
 +
 +  // 8.2.23.26
++
+   // 8.2.3.23.8
+   register ssvpc rc addr(base, 0x08780) "Switch Security Violation Packet Count"
+     type(uint32);
+   // 8.2.3.23.26
++
    register gprc ro addr(base, 0x04074) "Good packets recieved count"
      type(uint32);
  
Simple merge
@@@ -172,17 -183,7 +175,18 @@@ MODULES_x86_64= 
        sbin/angler \
        sbin/sshd \
        sbin/lshw \
 +      sbin/xeon_phi \
 +      sbin/xeon_phi_manager \
+       sbin/spin \
 +#     sbin/block_server \
 +#     sbin/block_server_client \
 +#     sbin/bs_user \
 +#     sbin/bulk_shm \
 +#     sbin/bulk_transfer_passthrough \
 +#     sbin/bulkbench_micro_echo \
 +#     sbin/bulkbench_micro_throughput \
 +#     sbin/bulkbench_micro_rtt \
++      
  
  # the following are broken in the newidc system
  MODULES_x86_64_broken= \
@@@ -312,8 -308,12 +316,12 @@@ CLEAN_HD
  DISK=hd.img
  AHCI=-device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -drive id=disk,file=$(DISK),if=none
  
+ MENU_LST=-kernel $(shell sed -rne 's,^kernel[ \t]*/([^ ]*).*,\1,p' menu.lst) \
+       -append '$(shell sed -rne 's,^kernel[ \t]*[^ ]*[ \t]*(.*),\1,p' menu.lst)' \
+       -initrd '$(shell sed -rne 's,^module(nounzip)?[ \t]*/(.*),\2,p' menu.lst | awk '{ if(NR == 1) printf($$0); else printf("," $$0) } END { printf("\n") }')'
  ifeq ($(ARCH),x86_64)
-         QEMU_CMD=qemu-system-x86_64 -smp 2 -m 1024 -net nic,model=ne2k_pci -net user $(AHCI) -fda $(SRCDIR)/tools/grub-qemu.img -tftp $(PWD) -nographic
 -        QEMU_CMD=qemu-system-x86_64 -smp 2 -m 1024 -net nic,model=e1000 -net user $(AHCI) -nographic $(MENU_LST)
++    QEMU_CMD=qemu-system-x86_64 -smp 2 -m 1024 -net nic,model=e1000 -net user $(AHCI) -nographic $(MENU_LST)
        GDB=x86_64-pc-linux-gdb
        CLEAN_HD=qemu-img create $(DISK) 10M
  else ifeq ($(ARCH),x86_32)
diff --cc if/Hakefile
@@@ -49,7 -49,7 +49,7 @@@
                 "serial",
                 "skb",
                 "skb_map",
--               "octopus",               
++               "octopus",
                 "spawn",
                 "terminal",
                 "terminal_config",
@@@ -57,7 -57,7 +57,7 @@@
                 "test",
                 "timer",
                 "trivfs",
--               "usb_driver",  
++               "usb_driver",
                 "usb_manager",
                 "xcorecap",
                 "xcorecapbench",
                 "xmplrpc",
                 "xmplthc",
                 "unixsock",
 -             "bcache",
 -             "replay",
 +               "bcache",
 +               "replay",
 +               "xeon_phi",
 +               "xeon_phi_manager",
 +               "block_service",
 +               "bulk_ctrl",
-                "empty" 
-                
+                "arrakis",
+                "e10k_vf",
 -             "empty"],
++               "empty"
 +           ],
               arch <- allArchitectures
  ] ++
  
Simple merge
@@@ -36,11 -36,11 +36,14 @@@ errval_t waitset_chan_trigger_closure(s
  errval_t waitset_chan_deregister(struct waitset_chanstate *chan);
  errval_t waitset_chan_register(struct waitset *ws, struct waitset_chanstate *chan,
                                 struct event_closure closure);
 +errval_t waitset_chan_register_polled(struct waitset *ws,
 +                                      struct waitset_chanstate *chan,
 +                                      struct event_closure closure);
  void waitset_chan_migrate(struct waitset_chanstate *chan,
                            struct waitset *new_ws);
+ errval_t waitset_chan_register_polled(struct waitset *ws,
+                                       struct waitset_chanstate *chan,
+                                       struct event_closure closure);
  
  __END_DECLS
  
@@@ -647,7 -647,7 +647,7 @@@ struct dcb *spawn_bsp_init(const char *
      snprintf(bootinfochar, sizeof(bootinfochar), "%lu", BOOTINFO_BASE);
      const char *argv[] = { "init", bootinfochar };
  
--    struct dcb *init_dcb = spawn_init_common(&spawn_state, name, 
++    struct dcb *init_dcb = spawn_init_common(&spawn_state, name,
                                               ARRAY_LENGTH(argv), argv,
                                               bootinfo_phys, alloc_phys);
  
@@@ -722,7 -722,7 +722,7 @@@ struct dcb *spawn_app_init(struct x86_c
  
      const char *argv[] = { name, coreidchar, chanidchar, archidchar };
  
--    struct dcb *init_dcb = spawn_init_common(&spawn_state, name, 
++    struct dcb *init_dcb = spawn_init_common(&spawn_state, name,
                                               ARRAY_LENGTH(argv), argv,
                                               0, alloc_phys);
  
Simple merge
Simple merge
@@@ -173,8 -167,11 +173,12 @@@ static inline void ump_endpoint_poll(st
  }
  #endif // CONFIG_INTERCONNECT_DRIVER_UMP
  
- void bulk_e10k_poll(struct waitset_chanstate *chan) __attribute__((weak));
- void bulk_e10k_poll(struct waitset_chanstate *chan) { }
++
+ void arranet_polling_loop_proxy(void) __attribute__((weak));
+ void arranet_polling_loop_proxy(void)
+ {
+     USER_PANIC("Network polling not available without Arranet!\n");
+ }
  
  /// Helper function that knows how to poll the given channel, based on its type
  static void poll_channel(struct waitset_chanstate *chan)
Simple merge
Simple merge
@@@ -726,7 -722,38 +726,38 @@@ errval_t spawn_load_image(struct spawni
      if (err_is_fail(err)) {
          return err_push(err, SPAWN_ERR_SETUP_ARGCN);
      }
 - 
 +
+     // Add vspace-pspace mapping to environment
+     char envstr[2048];
+     snprintf(envstr, 2048, "ARRAKIS_PMAP=");
+     for(int i = 0; i < si->vregions; i++) {
+         struct memobj_anon *m = (struct memobj_anon *)si->vregion[i]->memobj;
+         assert(m->m.type == ANONYMOUS);
+         for(struct memobj_frame_list *f = m->frame_list; f != NULL; f = f->next) {
+             struct frame_identity id;
+             err = invoke_frame_identify(f->frame, &id);
+             assert(err_is_ok(err));
+             char str[128];
+             snprintf(str, 128, "%" PRIxGENVADDR ":%" PRIxGENPADDR ":%zx ", si->base[i] + f->offset, id.base, f->size);
+             strcat(envstr, str);
+         }
+     }
+     char **myenv = (char **)envp;
+     for(int i = 0; i < MAX_ENVIRON_VARS; i++) {
+         if(i + 1 == MAX_ENVIRON_VARS) {
+             printf("spawnd: Couldn't set environemnt. Out of variables!\n");
+             abort();
+         }
+         if(myenv[i] == NULL) {
+             myenv[i] = envstr;
+             myenv[i+1] = NULL;
+             break;
+         }
+     }
      /* Setup cmdline args */
      err = spawn_setup_env(si, argv, envp);
      if (err_is_fail(err)) {
Simple merge
Simple merge
Simple merge