Slight changes to UDI structures and logging
authorJohn Hodge <tpg@prelude.(none)>
Fri, 15 Jan 2010 23:34:43 +0000 (07:34 +0800)
committerJohn Hodge <tpg@prelude.(none)>
Fri, 15 Jan 2010 23:34:43 +0000 (07:34 +0800)
Kernel/Makefile.BuildNum
Kernel/include/acess.h
Modules/UDI/include/udi/init.h
Modules/UDI/main.c

index 87dafb4..d026f56 100644 (file)
@@ -1 +1 @@
-BUILD_NUM = 1342
+BUILD_NUM = 1353
index e1131ef..efc925e 100644 (file)
@@ -6,6 +6,7 @@
 #define _COMMON_H
 
 #define NULL   ((void*)0)
+#define PACKED __attribute__ ((packed))
 
 #include <arch.h>
 #include <stdarg.h>
@@ -73,7 +74,7 @@ typedef void (*tThreadFunction)(void*);
  */
 typedef struct sKernelSymbol {
        char    *Name;
-       unsigned int    Value;
+       Uint    Value;
 } tKernelSymbol;
 #define        EXPORT(_name)   tKernelSymbol _kexp_##_name __attribute__((section ("KEXPORT"),unused))={#_name, (Uint)_name}
 #define        EXPORTV(_name)  tKernelSymbol _kexp_##_name __attribute__((section ("KEXPORT"),unused))={#_name, (Uint)&_name}
index fc69950..f405d03 100644 (file)
@@ -275,7 +275,7 @@ struct udi_limits_s
         * \see ::udi_timer_start_repeating, ::udi_timer_start
         */
        udi_ubit32_t    min_timer_res;
-};
+} PACKED;
 
 /**
  * \brief Primary Region Context data
@@ -295,7 +295,7 @@ struct udi_chan_context_s
         * \brief Pointer to the driver instance's initial region data
         */
        void    *rdata;
-};
+} PACKED;
 
 /**
  * \brief Child Channel context
index 0f5e45b..75ff343 100644 (file)
@@ -32,7 +32,8 @@ int UDI_LoadDriver(void *Base)
        udi_init_t      *info;
        char    *udiprops = NULL;
         int    udiprops_size;
-        int    i, j;
+        int    i;
+       // int  j;
        
        Log("UDI_LoadDriver: (Base=%p)", Base);
        
@@ -48,23 +49,44 @@ int UDI_LoadDriver(void *Base)
                Binary_FindSymbol(Base, "_udiprops_size", (Uint*)&udiprops_size);
        }
        
-       Log("primary_init_info = %p", info->primary_init_info);
+       Log("primary_init_info = %p = {", info->primary_init_info);
+       {
+               Log(" .mgmt_ops = %p = {", info->primary_init_info->mgmt_ops);
+               Log("  .usage_ind_op: %p() - 0x%02x",
+                       info->primary_init_info->mgmt_ops->usage_ind_op,
+                       info->primary_init_info->mgmt_op_flags[0]
+                       );
+               Log("  .enumerate_req_op: %p() - 0x%02x",
+                       info->primary_init_info->mgmt_ops->enumerate_req_op,
+                       info->primary_init_info->mgmt_op_flags[1]
+                       );
+               Log("  .devmgmt_req_op: %p() - 0x%02x",
+                       info->primary_init_info->mgmt_ops->devmgmt_req_op,
+                       info->primary_init_info->mgmt_op_flags[2]
+                       );
+               Log("  .final_cleanup_req_op: %p() - 0x%02x",
+                       info->primary_init_info->mgmt_ops->final_cleanup_req_op,
+                       info->primary_init_info->mgmt_op_flags[3]
+                       );
+               Log(" }");
+               Log(" .mgmt_scratch_requirement = 0x%x", info->primary_init_info->mgmt_scratch_requirement);
+               Log(" .enumeration_attr_list_length = 0x%x", info->primary_init_info->enumeration_attr_list_length);
+               Log(" .rdata_size = 0x%x", info->primary_init_info->rdata_size);
+               Log(" .child_data_size = 0x%x", info->primary_init_info->child_data_size);
+               Log(" .per_parent_paths = 0x%x", info->primary_init_info->per_parent_paths);
+       }
+       Log("}");
        Log("secondary_init_list = %p", info->secondary_init_list);
        Log("ops_init_list = %p", info->ops_init_list);
        
        for( i = 0; info->ops_init_list[i].ops_idx; i++ )
        {
                Log("info->ops_init_list[%i] = {", i);
-               Log(" .ops_idx = %i", info->ops_init_list[i].ops_idx);
-               Log(" .meta_idx = %i", info->ops_init_list[i].meta_idx);
-               Log(" .meta_ops_num = %i", info->ops_init_list[i].meta_ops_num);
-               Log(" .chan_context_size = %i", info->ops_init_list[i].chan_context_size);
-               Log(" .ops_vector = {");
-               for( j = 0; info->ops_init_list[i].ops_vector; j++ )
-               {
-                       Log("%i: %p()", j, info->ops_init_list[i].ops_vector);
-               }
-               Log(" }");
+               Log(" .ops_idx = 0x%x", info->ops_init_list[i].ops_idx);
+               Log(" .meta_idx = 0x%x", info->ops_init_list[i].meta_idx);
+               Log(" .meta_ops_num = 0x%x", info->ops_init_list[i].meta_ops_num);
+               Log(" .chan_context_size = 0x%x", info->ops_init_list[i].chan_context_size);
+               Log(" .ops_vector = %p", info->ops_init_list[i].ops_vector);
                Log(" .op_flags = %p", info->ops_init_list[i].op_flags);
                Log("}");
        }

UCC git Repository :: git.ucc.asn.au