Index: branches/v4/platforms/tsarv4_mono_mmu_ioc/top.cpp
===================================================================
--- branches/v4/platforms/tsarv4_mono_mmu_ioc/top.cpp	(revision 410)
+++ branches/v4/platforms/tsarv4_mono_mmu_ioc/top.cpp	(revision 420)
@@ -86,54 +86,82 @@
  */
 
-char *soft_path = NULL;
-char *bd_path = NULL;
-bool trace_enabled = false;
-size_t trace_start_cycle = 0;
-
-/*
- * arguments parsing
- */
-
-void args_parse(unsigned int argc, char *argv[])
+struct param_s {
+    char *rom_path;
+    char *dsk_path;
+    bool dummy_boot;
+    bool trace_enabled;
+    size_t trace_start_cycle;
+};
+
+#define PARAM_INITIALIZER   \
+{                           \
+    .rom_path = NULL,      \
+    .dsk_path = NULL,        \
+    .dummy_boot = false,    \
+    .trace_enabled = false, \
+    .trace_start_cycle = 0  \
+}
+
+static inline void print_param(const struct param_s &param)
 {
-    if (argc > 1)
-    {
-        for (size_t n = 1; n < argc; n = n + 2)
-        {
-            if ((strcmp(argv[n], "-soft") == 0) && ((n + 1) < argc))
-            {
-                assert((soft_path = strdup(argv[n + 1]))
-                        && "insufficient memory");
-            }
-            else if ((strcmp(argv[n], "-img") == 0) && ((n + 1) < argc))
-            {
-                assert((bd_path = strdup(argv[n + 1]))
-                        && "insufficient memory");
-            }
-            else if ((strcmp(argv[n], "-trace") == 0) && ((n + 1) < argc))
-            {
-                trace_enabled = true;
-                trace_start_cycle = atoi(argv[n + 1]);
-            }
-            else
-            {
-                std::cout << "Error: don't understand option " << argv[n] << std::endl;
-                std::cout << "Accepted arguments are :" << std::endl;
-                std::cout << "-soft pathname" << std::endl;
-                std::cout << "-img pathname" << std::endl;
-                std::cout << "[-trace trace_start_cycle]" << std::endl;
-                exit(0);
-            }
-        }
-    }
-
-    assert(soft_path && "-soft is not optional");
-    assert(bd_path && "-img is not optional");
     std::cout << std::endl;
     std::cout << "simulation parameters:" << std::endl;
-    std::cout << "  soft = "        << soft_path << std::endl;
-    std::cout << "  img = "         << bd_path << std::endl;
-    std::cout << "  trace = "       << trace_enabled << std::endl;
+    std::cout << "  rom         = " << param.rom_path << std::endl;
+    std::cout << "  dummy boot  = " << param.dummy_boot << std::endl;
+    std::cout << "  dsk         = " << param.dsk_path << std::endl;
+    std::cout << "  trace       = " << param.trace_enabled << std::endl;
+    if (param.trace_enabled)
+        std::cout << "    start cyc = " << param.trace_start_cycle << std::endl;
+
     std::cout << std::endl;
+}
+
+
+/*
+ * arguments parsing
+ */
+
+void args_parse(unsigned int argc, char *argv[], struct param_s &param)
+{
+    for (size_t n = 1; n < argc; n = n + 2)
+    {
+        if ((strcmp(argv[n], "--rom") == 0) && ((n + 1) < argc))
+        {
+            assert((param.rom_path = strdup(argv[n + 1]))
+                    && "insufficient memory");
+        }
+        else if ((strcmp(argv[n], "--dsk") == 0) && ((n + 1) < argc))
+        {
+            assert((param.dsk_path = strdup(argv[n + 1]))
+                    && "insufficient memory");
+        }
+        else if (strcmp(argv[n], "--dummy-boot") == 0)
+        {
+            param.dummy_boot = true;
+            /* we don't have an extra argument */
+            n = n - 1;
+        }
+        else if ((strcmp(argv[n], "--trace") == 0) && ((n + 1) < argc))
+        {
+            param.trace_enabled = true;
+            param.trace_start_cycle = atoi(argv[n + 1]);
+        }
+        else
+        {
+            std::cout << "Error: don't understand option " << argv[n] << std::endl;
+            std::cout << "Accepted arguments are :" << std::endl;
+            std::cout << "--rom pathname" << std::endl;
+            std::cout << "--dsk pathname" << std::endl;
+            std::cout << "[--dummy-boot]" << std::endl;
+            std::cout << "[-trace trace_start_cycle]" << std::endl;
+            exit(0);
+        }
+    }
+
+    /* check parameters */
+    assert(param.rom_path && "--rom is not optional");
+    assert(param.dsk_path && "--dsk is not optional");
+
+    print_param(param);
 }
 
@@ -151,6 +179,8 @@
 #endif
 
+    struct param_s param = PARAM_INITIALIZER;
+
     /* parse arguments */
-    args_parse(argc, argv);
+    args_parse(argc, argv, param);
 
     /*
@@ -181,5 +211,5 @@
 
     Loader loader;
-    loader.load_file(soft_path);
+    loader.load_file(param.rom_path);
 
 #ifdef CONFIG_GDB_SERVER
@@ -189,4 +219,12 @@
     typedef Mips32ElIss proc_iss;
 #endif
+
+    if (param.dummy_boot == true)
+    {
+        /* boot linux image directly */
+        const BinaryFileSymbol *bfs = loader.get_symbol_by_name("kernel_entry");
+        std::cout << "setResetAdress: " << std::hex << bfs->address() << std::endl;
+        proc_iss::setResetAddress(bfs->address());
+    }
 
     VciCcVCacheWrapperV4<vci_param, proc_iss > proc("ccvcache",
@@ -205,6 +243,6 @@
                 1,          // memory cache local id
                 1000,       // max frozen cycles
-                trace_start_cycle,
-                trace_enabled);
+                param.trace_start_cycle,
+                param.trace_enabled);
 
     VciSimpleRam<vci_param> xram("xram", IntTab(0), maptabd, loader);
@@ -217,5 +255,5 @@
             16, 256, 16,    // cache size
             1024, 4, 4,     // HEAP size, TRT size, UPT size
-            trace_start_cycle, trace_enabled);
+            param.trace_start_cycle, param.trace_enabled);
 
     VciSimhelper<vci_param> vciexit("vciexit", IntTab(2), maptabd);
@@ -227,9 +265,10 @@
 
     VciBlockDeviceTsarV4<vci_param> iobd("iobd", maptabd, IntTab(1), IntTab(5),
-            bd_path); // mapped_file[, block_size=512, latency=0]
+            param.dsk_path); // mapped_file[, block_size=512, latency=0]
 
     VciVgmn<vci_param> ringd("ringd", maptabd,
-            2, 6,   // #initiators, #targets
-            2, 8);  // min_latency, FIFO depth
+            2, 6,       // #initiators, #targets
+            2, 8,       // min_latency, FIFO depth
+            IntTab(1)); // default target
 
     VciVgmn<vci_param> ringc("ringc", maptabc,
@@ -350,12 +389,12 @@
     signal_resetn = true;
 
-    if (trace_enabled)
+    if (param.trace_enabled)
     {
-        if (trace_start_cycle > 1)
+        if (param.trace_start_cycle > 1)
             // simulate without output until trace_start_cycle
-            sc_start(sc_time(trace_start_cycle, SC_NS));
+            sc_start(sc_time(param.trace_start_cycle, SC_NS));
 
         // enable debugging output
-        for (size_t n = trace_start_cycle ;; n++)
+        for (size_t n = param.trace_start_cycle ;; n++)
         {
             std::cout << "****************** cycle " << std::dec << n
