Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


added global module registry
[palacios.git] / palacios / include / palacios / vmm_symmod.h
index bf360d2..d46ad11 100644 (file)
@@ -42,10 +42,10 @@ struct v3_symmod_state {
 
 
 struct v3_sym_module {
-    char name[32];
-    uint16_t num_bytes;
-    char * data;
-};
+    char * name;
+    void * start_addr;
+    void * end_addr;
+} __attribute__((packed));
 
 
 int v3_set_symmod_loader(struct v3_vm_info * vm, struct v3_symmod_loader_ops * ops, void * priv_data);
@@ -61,17 +61,9 @@ struct v3_sym_module * v3_get_sym_module(struct v3_vm_info * vm, char * name);
 
 
 
-
-struct v3_module_hdr {
-    char * name;
-    void * start_addr;
-    void * end_addr;
-} __attribute__((packed));
-
-
 #define register_module(name, start, end)                      \
     static char v3_module_name[] = name;                       \
-    static struct v3_module_hdr _v3_module                     \
+    static struct v3_sym_module _v3_module                     \
     __attribute__((__used__))                                  \
        __attribute__((unused, __section__ ("_v3_modules"),     \
                       aligned(sizeof(addr_t))))                \