[Tinyos-beta-commits] CVS: tinyos-1.x/beta/platform/pxa27x/lib MMU.h, 1.2, 1.3 Makefile, 1.3, 1.4 profile.c, 1.1, 1.2 queue.c, 1.2, 1.3 queue.h, 1.2, 1.3

Lama Nachman lnachman at users.sourceforge.net
Mon Oct 9 19:29:13 PDT 2006


Update of /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/lib
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv16204

Modified Files:
	MMU.h Makefile profile.c queue.c queue.h 
Log Message:
Pushed out new release OCT 2006


Index: MMU.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/lib/MMU.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MMU.h	10 Sep 2005 01:11:59 -0000	1.2
--- MMU.h	10 Oct 2006 02:29:11 -0000	1.3
***************
*** 1,12 ****
  #ifndef __MMU_H__
  #define __MMU_H__
  
! void initSyncFlash();
  void initMMU();
  void enableICache();
  void enableDCache();
  void disableDCache();
  void invalidateDCache(uint8_t *address, int32_t numbytes); 
  void cleanDCache(uint8_t *address, int32_t numbytes); 
  void globalCleanAndInvalidateDCache();
  #endif
--- 1,70 ----
+ /**
+  * author Robbie Adler
+  **/
+ 
  #ifndef __MMU_H__
  #define __MMU_H__
  
! 
! /**
!  * Initialize the processor's MMU unit.  The page table to use and some
!  other parameters are defined in platform/pxa27x/mmu_table.s
!  **/
! 
  void initMMU();
+ 
+ /**
+  * Place the attached flash chip into synchronous mode
+  **/
+ void initSyncFlash();
+ 
+ /**
+  *  Enable the Instruction Cache.  This function currently also enabled
+  *  the branch target buffer
+ **/
  void enableICache();
+ 
+ /**
+  *  Enable the data cache.  
+ **/
  void enableDCache();
+ 
+ 
+ /**
+  *  disable the data cache.  In order to ensure cache coherency, this function
+  *  will also globally clean and invalidate the cache
+  **/
  void disableDCache();
+ 
+ 
+ /**
+  *  invalidate the data cache for the buffer pointed to by address of length
+  *  numbytes.  
+  *
+  * Notes: 
+  * - invalidate = make cache lines invalid
+  * - numbytes will be rounded up to the nearest multiple of 32.
+  * - Address is required to be a virtual address 
+  *
+ **/
  void invalidateDCache(uint8_t *address, int32_t numbytes); 
+ 
+ 
+ /**
+  *  clean the data cache for the buffer pointed to by address of length
+  *  numbytes.  
+  *
+  * Notes: 
+  * - clean = write back to memory if dirty
+  * - numbytes will be rounded up to the nearest multiple of 32.
+  * - Address is required to be a virtual address 
+  *
+ **/
  void cleanDCache(uint8_t *address, int32_t numbytes); 
+ 
+ /**
+  *  globally clean (flush to memory if dirty) and invalidate the data cache
+  * 
+ **/
  void globalCleanAndInvalidateDCache();
  #endif

Index: Makefile
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/lib/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Makefile	8 Dec 2005 23:17:52 -0000	1.3
--- Makefile	10 Oct 2006 02:29:11 -0000	1.4
***************
*** 16,20 ****
  # $(find-source-dirs, base-directory-to-search)
  define find-source-dirs
! $(sort $(dir $(shell find -L $1 -name "*.[c,s]")))
  endef
  
--- 16,20 ----
  # $(find-source-dirs, base-directory-to-search)
  define find-source-dirs
! $(sort $(dir $(shell find $1 -name "*.[c,s]")))
  endef
  
***************
*** 22,26 ****
  # $(find-source-dirs, base-directory-to-search)
  define find-source-files
! $(sort $(subst .s,.o,$(subst .c,.o,$(shell find -L $1 -name "*.[c,s]"))))
  endef
  
--- 22,26 ----
  # $(find-source-dirs, base-directory-to-search)
  define find-source-files
! $(sort $(subst .s,.o,$(subst .c,.o,$(shell find $1 -name "*.[c,s]"))))
  endef
  

Index: profile.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/lib/profile.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** profile.c	6 Sep 2005 18:19:12 -0000	1.1
--- profile.c	10 Oct 2006 02:29:11 -0000	1.2
***************
*** 106,110 ****
      DC_mrate = (float) globalProfileInfo.DC_miss/ globalProfileInfo.DC_access;
      
!     trace("CYC=%d  CPI=%f  ICM=%f  DCM=%f \r\n", 
  	  globalProfileInfo.cycles, CPI, IC_mrate, DC_mrate);
    }
--- 106,110 ----
      DC_mrate = (float) globalProfileInfo.DC_miss/ globalProfileInfo.DC_access;
      
!     trace(1ULL<<27,"CYC=%d  CPI=%f  ICM=%f  DCM=%f \r\n", 
  	  globalProfileInfo.cycles, CPI, IC_mrate, DC_mrate);
    }

Index: queue.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/lib/queue.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** queue.c	18 Oct 2005 21:32:32 -0000	1.2
--- queue.c	10 Oct 2006 02:29:11 -0000	1.3
***************
*** 18,21 ****
--- 18,35 ----
  }
  
+ //get the value without removing it from the queue
+ int peekqueue(queue_t *queue, uint32_t *val) {
+   if(queue->head != queue->tail){
+     *val = queue->entries[queue->head];
+     return 1;
+   }
+   else{
+     *val = 0;
+     //queue is empty
+     return 0;
+   }
+ }
+ 
+ 
  int popqueue(queue_t *queue, uint32_t *val) {
    if(queue->head != queue->tail){

Index: queue.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/lib/queue.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** queue.h	18 Oct 2005 21:32:32 -0000	1.2
--- queue.h	10 Oct 2006 02:29:11 -0000	1.3
***************
*** 16,21 ****
--- 16,59 ----
  } queue_t;
  
+ /**********
+  *function to push an argument into a queue
+  *
+  *queue is a pointer to a previously initialized queue_t structure
+  *val is the value that should be pushed
+  *
+  *returns 1 if successful, 0 otherwise
+  ***********/
  int pushqueue(queue_t *queue, uint32_t val);
+ 
+ /**********
+  *function to pop a value from the queue
+  *
+  *queue is a pointer to a previously initialized queue_t structure
+  *val is a pointer to storage for the value that will get popped
+  *
+  *returns 1 if successful, 0 otherwise
+  ***********/
  int popqueue(queue_t *queue, uint32_t *val);
+ 
+ /**********
+  *function to peek a value from the queue.  This function will not remove
+  *the item from the queue
+  *
+  *queue is a pointer to a previously initialized queue_t structure
+  *val is a pointer to storage for the value that will get popped
+  *
+  *returns 1 if successful, 0 otherwise
+  ***********/
+ int peekqueue(queue_t *queue, uint32_t *val);
+ 
+ 
+ /**********
+  *function to initialize a queue_t structure
+  *
+  *queue is a pointer to a previously initialized queue_t structure
+  *size is the size of the queue that is getting initialized
+  *
+  *
+  ***********/
  void initqueue(queue_t *queue, uint32_t size);
  



More information about the Tinyos-beta-commits mailing list