Index: trunk/hal/tsar_mips32/core/hal_ppm.c
===================================================================
--- trunk/hal/tsar_mips32/core/hal_ppm.c	(revision 62)
+++ trunk/hal/tsar_mips32/core/hal_ppm.c	(revision 106)
@@ -1,7 +1,6 @@
 /*
- * hal_gpt.C - Generic Physcal Page Table API implementation for the TSAR archtecture.
+ * hal_ppm.c - Generic Physical Page Table API implementation for TSAR
  *
  * Authors  Alain Greiner (2016,2017)
- * 
  *
  * Copyright (c) UPMC Sorbonne Universites
@@ -36,6 +35,6 @@
 
 //////////////////////////////////////////////////////////////////////////////////////////
-// For The TSAR architecture, the kernel pointers are identity mapping: 
-// - the 32 bits PTR value is identical to the 32 bits LPA value, 
+// For The TSAR architecture, the kernel pointers are identity mapped:
+// - the 32 bits PTR value is identical to the 32 bits LPA value,
 // - the 64 bits XPTR value is identical to the 64 bits PADDR value.
 // The pages_tbl[] is mapped in first free page after kernel code.
@@ -47,24 +46,24 @@
 error_t  hal_ppm_init( boot_info_t * info )
 {
-    uint32_t i;
+	uint32_t i;
 
-    // get relevant info from boot_info structure
+	// get relevant info from boot_info structure
 	uint32_t   pages_nr         = info->pages_nr;
-    uint32_t   pages_tbl_offset = info->pages_offset;
-    uint32_t   rsvd_nr          = info->rsvd_nr;
+	uint32_t   pages_tbl_offset = info->pages_offset;
+	uint32_t   rsvd_nr          = info->rsvd_nr;
 
-    // check no reserved zones other than kernel code for TSAR
-    assert( (rsvd_nr == 0 ) , __FUNCTION__ , "NO reserved zones for TSAR\n" ); 
+	// check no reserved zones other than kernel code for TSAR
+	assert( (rsvd_nr == 0 ) , __FUNCTION__ , "NO reserved zones for TSAR\n" );
 
-    // get pointer on local Physical Page Manager
-    ppm_t * ppm = &LOCAL_CLUSTER->ppm;
-    
-    // initialize lock protecting the free_pages[] lists 
+	// get pointer on local Physical Page Manager
+	ppm_t * ppm = &LOCAL_CLUSTER->ppm;
+
+	// initialize lock protecting the free_pages[] lists
 	spinlock_init( &ppm->free_lock );
 
-    // initialize lock protecting the dirty_pages list 
+	// initialize lock protecting the dirty_pages list
 	spinlock_init( &ppm->dirty_lock );
 
-    // initialize all free_pages[] lists as empty
+	// initialize all free_pages[] lists as empty
 	for( i = 0 ; i < CONFIG_PPM_MAX_ORDER ; i++ )
 	{
@@ -73,52 +72,50 @@
 	}
 
-    // initialize dirty_list as empty
-    list_root_init( &ppm->dirty_root );
+	// initialize dirty_list as empty
+	list_root_init( &ppm->dirty_root );
 
-    // initialize pages_nr, pages_tbl, and vaddr_base pointers
-    // (TSAR uses identity mapping for kernel pointers)
-    // I86 architectures should use vaddr_base = 0xFFFF8000000000 + (cxy << 36)
+	// initialize pages_nr, pages_tbl, and vaddr_base pointers
+	// (TSAR uses identity mapping for kernel pointers)
+	// x86 architectures should use vaddr_base = 0xFFFF8000000000 + (cxy << 36)
+	ppm->pages_nr      = pages_nr;
+	ppm->vaddr_base = NULL;
+	ppm->pages_tbl  = (page_t*)( ppm->vaddr_base +
+	                             (pages_tbl_offset << CONFIG_PPM_PAGE_SHIFT) );
 
-	ppm->pages_nr      = pages_nr;
-    ppm->vaddr_base = NULL;
-	ppm->pages_tbl  = (page_t*)( ppm->vaddr_base + 
-                                 (pages_tbl_offset << CONFIG_PPM_PAGE_SHIFT) );
+	// compute size of pages_tbl[] array rounded to an integer number of pages
+	uint32_t bytes = ARROUND_UP( pages_nr * sizeof(page_t), CONFIG_PPM_PAGE_SIZE );
 
-    // compute size of pages_tbl[] array rounded to an integer number of pages
-    uint32_t bytes = ARROUND_UP( pages_nr * sizeof(page_t), CONFIG_PPM_PAGE_SIZE );
-
-    // compute number of pages required to store page descriptor array
+	// compute number of pages required to store page descriptor array
 	uint32_t pages_tbl_nr = bytes >> CONFIG_PPM_PAGE_SHIFT;
 
-    // compute total number of reserved pages (kernel code & pages_tbl[])
+	// compute total number of reserved pages (kernel code & pages_tbl[])
 	uint32_t reserved_pages = pages_tbl_offset + pages_tbl_nr;
 
-    // initialises all page descriptors in pages_tbl[]
+	// initialize all page descriptors in pages_tbl[]
 	for( i = 0 ; i < pages_nr ; i++ )
-    {
-        page_init( &ppm->pages_tbl[i] );
+	{
+		page_init( &ppm->pages_tbl[i] );
 
-        // TODO optimisation for this enormous loop on small pages:
-        // make only a partial init with a memset, and complete the 
-        // initialisation when page is allocated [AG]
-    }
+		// TODO optimisation for this enormous loop on small pages:
+		// make only a partial init with a memset, and complete the
+		// initialisation when page is allocated [AG]
+	}
 
-    // - set PG_RESERVED flag for reserved pages (kernel code & pages_tbl[])
-    // - release all other pages to populate the free lists
+	// - set PG_RESERVED flag for reserved pages (kernel code & pages_tbl[])
+	// - release all other pages to populate the free lists
 	for( i = 0 ; i < reserved_pages ; i++)
-    {
-        page_set_flag( &ppm->pages_tbl[i] , PG_RESERVED );
-    }
+	{
+		page_set_flag( &ppm->pages_tbl[i] , PG_RESERVED );
+	}
 	for( i = reserved_pages ; i < pages_nr ; i++ )
 	{
-	    ppm_free_pages_nolock( &ppm->pages_tbl[i] );
+		ppm_free_pages_nolock( &ppm->pages_tbl[i] );
 
-        // TODO optimisation : decompose this enormous set of small pages
-        // to several sets of big pages with various order values
+		// TODO optimisation : decompose this enormous set of small pages
+		// to several sets of big pages with various order values
 	}
 
-    // check consistency
-    return ppm_assert_order( ppm );
+	// check consistency
+	return ppm_assert_order( ppm );
+}
 
-}  // end hal_ppm_init()
-
