armv8: enable compilations of various network drivers
authorReto Achermann <reto.achermann@inf.ethz.ch>
Mon, 22 Jul 2019 16:00:02 +0000 (18:00 +0200)
committerReto Achermann <reto.achermann@inf.ethz.ch>
Mon, 22 Jul 2019 16:00:02 +0000 (18:00 +0200)
Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>

lib/driverkit/Hakefile
usr/drivers/e1000/Hakefile
usr/drivers/e10k/Hakefile
usr/drivers/e10k/e10k_queue.h
usr/drivers/solarflare/Hakefile

index b07ad56..5268dff 100644 (file)
@@ -56,6 +56,6 @@
         addLibraries = [ "collections", "skb" ],
         cFiles = [ "hwmodel.c", 
                    "iommu_client.c" ],
-        architectures = [ "x86_64", "k1om"]
+        architectures = [ "x86_64", "k1om", "armv8"]
     }
 ]
index 6447e15..b57e7b7 100644 (file)
@@ -18,7 +18,7 @@
         flounderDefs = [ "octopus", "e1000_devif" ],
         mackerelDevices = [ "e1000" ],
         addLibraries = [ "pci_driver_client", "int_msix_ctrl" ],
-        architectures = [ "x86_64" ],
+        architectures = ["x86_64", "armv8"],
         addCFlags = [ "-DLIBRARY" ]
     },
 
@@ -29,7 +29,8 @@
                     flounderBindings = [ "e1000_devif" ],
                     flounderDefs = [ "e1000_devif" ],
                     mackerelDevices = ["e1000"],
-                    addLibraries = libDeps ["driverkit_iommu"]
+                    addLibraries = libDeps ["driverkit_iommu"],
+                    architectures = ["x86_64", "armv8"]
     },
 
     build driverdomain {
         flounderDefs = [ "octopus", "e1000_devif" ],
         mackerelDevices = [ "e1000" ],
         addLibraries = [ "pci", "pci_driver_client", "int_msix_ctrl" ],
-        architectures = [ "x86_64" ],
+        architectures = ["x86_64", "armv8"],
         addCFlags = [ "-DLIBRARY", "-DUNDER_TEST" ]
     },
 
     build driverdomain {
         target = "e1000n_irqtest",
         addModules = ["e1000n_irqtest_module"],
-        architectures = ["x86_64"],
+        architectures = ["x86_64", "armv8"],
         addCFlags = [ "-DUNDER_TEST"]
     }
 
index d54725a..751231a 100644 (file)
@@ -20,7 +20,8 @@
                       flounderExtraBindings = [ ("net_filter", ["rpcclient"])],
                       flounderExtraDefs = [("net_filter",["rpcclient"])],
                       mackerelDevices = [ "e10k" ],
-                      addIncludes  = [ "/lib/lwip-2.0.2/src/include/" ]
+                      addIncludes  = [ "/lib/lwip-2.0.2/src/include/" ],
+                      architectures = ["x86_64", "armv8"]
                     },
 
   build library { target = "devif_backend_e10k",
@@ -31,7 +32,8 @@
                       flounderDefs = [ "e10k_vf", "e10k" ],
                       flounderExtraDefs = [ ("e10k_vf",["rpcclient"]) ],
                       mackerelDevices = [ "e10k_vf", "e10k", "e10k_q"],
-                      addLibraries = libDeps ["pci", "skb", "driverkit", "driverkit_iommu" ]
+                      addLibraries = libDeps ["pci", "skb", "driverkit", "driverkit_iommu" ],
+                      architectures = ["x86_64", "armv8"]
                   },
 
     -- Builds a driver domain: Use addModules instead of addLibraries to
index 5c7a73b..7afc0ab 100644 (file)
@@ -21,6 +21,7 @@
 #include <devif/backends/net/e10k_devif.h>
 #include <dev/e10k_dev.h>
 #include <dev/e10k_q_dev.h>
+#include <machine/atomic.h>
 
 //#define BENCH_QUEUE 1
 
@@ -671,7 +672,7 @@ static inline bool e10k_queue_get_rxbuf_avd(e10k_queue_t* q, regionid_t* rid,
 
     // Barrier needed according to linux driver to make sure nothing else is
     // read before the dd bit TODO: make sure
-    lfence();
+    rmb();
 
     // TODO add code for RSC
 
index 28a004f..072978e 100644 (file)
@@ -24,7 +24,8 @@
                         ("net_filter",["rpcclient"])
                       ],
                       mackerelDevices = [ "sfn5122f"],
-                      addIncludes  = [ "/lib/net/include/", "/lib/lwip-2.0.2/src/include/", "/include/lwip2/"]
+                      addIncludes  = [ "/lib/net/include/", "/lib/lwip-2.0.2/src/include/", "/include/lwip2/"],
+                      architectures = ["x86_64", "armv8"]
                     },
 
     build library { target = "devif_backend_solarflare",
@@ -36,7 +37,8 @@
                       mackerelDevices = [ "sfn5122f", "sfn5122f_q"],
                       addLibraries = libDeps ["skb", "devif_internal", 
                                               "driverkit_iommu"],
-                      addIncludes = ["/lib/devif/"]
+                      addIncludes = ["/lib/devif/"],
+                      architectures = ["x86_64", "armv8"]
                     },
 
     -- Builds a driver domain: Use addModules instead of addLibraries to
@@ -52,7 +54,7 @@
                                "contmng", "net_device_manager", "bench", "trace", "skb",
                                 "spawndomain", "netd" , "net", "lwip2", "driverkit_iommu"],
         addModules = ["sfn5122f_module"],
-        architectures = ["x86_64"]
+        architectures = ["x86_64", "armv8"]
     }
   ]